X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=flash%2FMakefile;h=8a30b4113a6bcebf88951810e7d83129e45f4f7d;hb=9bc72d4519e63fb1cf657a6c93008eaa8989fd01;hp=fe0dff7ce4aeddd49850db3223d7a99043ffc0bb;hpb=234e144d5d5aba4fcbe1a9fd9563023f1ca81a57;p=fw%2Fstlink diff --git a/flash/Makefile b/flash/Makefile index fe0dff7..8a30b41 100644 --- a/flash/Makefile +++ b/flash/Makefile @@ -1,12 +1,27 @@ +# make ... for both libusb and libsg +# +# make CONFIG_USE_LIBSG=0 ... +# for just libusb +# +CC=gcc + CFLAGS+=-g -CFLAGS+=-DCONFIG_USE_LIBUSB -CFLAGS+=-DCONFIG_USE_LIBSG +CFLAGS+=-DCONFIG_USE_LIBUSB=1 CFLAGS+=-DDEBUG CFLAGS+=-std=gnu99 CFLAGS+=-Wall -Wextra CFLAGS+=-I../src -LDFLAGS=-L.. -lstlink -lusb-1.0 -lsgutils2 +LDFLAGS=-lusb-1.0 -L.. -lstlink + +ifeq ($(CONFIG_USE_LIBSG),) +CONFIG_USE_LIBSG=1 +endif + +ifneq ($(CONFIG_USE_LIBSG),0) +CFLAGS+=-DCONFIG_USE_LIBSG=1 +LDFLAGS+=-lsgutils2 +endif SRCS=main.c OBJS=$(SRCS:.c=.o)