projects
/
fw
/
stlink
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge upstream texane/master
[fw/stlink]
/
flash
/
Makefile
diff --git
a/flash/Makefile
b/flash/Makefile
index fe0dff7ce4aeddd49850db3223d7a99043ffc0bb..8a30b4113a6bcebf88951810e7d83129e45f4f7d 100644
(file)
--- 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+=-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
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)
SRCS=main.c
OBJS=$(SRCS:.c=.o)