projects
/
fw
/
stlink
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update documentation removing all sg-utils notes
[fw/stlink]
/
Makefile
diff --git
a/Makefile
b/Makefile
index 4cf2775dc2b4352f4c79fd0f9a26f93d378f93b1..646dde12df5e84ac4799af48c378d4b8dabda8ed 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,19
+1,21
@@
-
+# make ... for both stlink v1 and stlink v2 support
+##
VPATH=src
VPATH=src
-SOURCES_LIB=stlink-common.c stlink-usb.c
#stlink-s
g.c
+SOURCES_LIB=stlink-common.c stlink-usb.c
stlink-sg.c uglyloggin
g.c
OBJS_LIB=$(SOURCES_LIB:.c=.o)
OBJS_LIB=$(SOURCES_LIB:.c=.o)
+TEST_PROGRAMS=test_usb test_sg
+LDFLAGS=-lusb-1.0 -L. -lstlink
-CFLAGS+=-
DCONFIG_USE_LIBUSB
-#CFLAGS+=-DCONFIG_USE_LIBSG
-CFLAGS+=
-std=gnu99
+CFLAGS+=-
g
+CFLAGS+=-DDEBUG=1
+CFLAGS+=-std=gnu99
CFLAGS+=-Wall -Wextra
CFLAGS+=-Wall -Wextra
-LDFLAGS=-lstlink -lusb-1.0 -L.
LIBRARY=libstlink.a
LIBRARY=libstlink.a
-all: $(LIBRARY)
test_usb #test_sg
+all: $(LIBRARY)
flash gdbserver $(TEST_PROGRAMS)
$(LIBRARY): $(OBJS_LIB)
@echo "objs are $(OBJS_LIB)"
$(LIBRARY): $(OBJS_LIB)
@echo "objs are $(OBJS_LIB)"
@@
-23,7
+25,7
@@
$(LIBRARY): $(OBJS_LIB)
test_sg: test_sg.o $(LIBRARY)
@echo "building test_sg"
test_sg: test_sg.o $(LIBRARY)
@echo "building test_sg"
- $(CC) $(LDFLAGS) -o $@
+ $(CC)
test_sg.o
$(LDFLAGS) -o $@
test_usb: test_usb.o $(LIBRARY)
@echo "building test_usb"
test_usb: test_usb.o $(LIBRARY)
@echo "building test_usb"
@@
-40,5
+42,15
@@
clean:
rm -rf $(LIBRARY)
rm -rf test_usb*
rm -rf test_sg*
rm -rf $(LIBRARY)
rm -rf test_usb*
rm -rf test_sg*
+
+distclean: clean
+ $(MAKE) -C flash clean
+ $(MAKE) -C gdbserver clean
-.PHONY: clean all
+flash:
+ $(MAKE) -C flash
+
+gdbserver:
+ $(MAKE) -C gdbserver
+
+.PHONY: clean all flash gdbserver