aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorGareth McMullin2011-02-04 20:23:52 +1300
committerGareth McMullin2011-02-04 20:23:52 +1300
commit406617a2a470021d9412e9280feda0d28bdb653b (patch)
tree43b2cb9b562fde0bf5187c31dea77d72318cfc29 /src/Makefile
Import of working source tree.
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..d6f2972
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,41 @@
+ifndef HOST
+HOST = stm32
+endif
+
+VPATH += $(HOST)
+
+BUILDDATE := `date +"%Y%m%d"`
+
+CFLAGS = -Wall -Wextra -Wno-pointer-sign -Wno-char-subscripts\
+ -O0 -std=gnu99 -g3 -DBUILDDATE=\"$(BUILDDATE)\"\
+ -I. -Iinclude -I$(HOST)
+
+SRC = gdb_if.c \
+ gdb_packet.c \
+ gdb_main.c \
+ hex_utils.c \
+ jtagtap.c \
+ swdptap.c \
+ adiv5.c \
+ adiv5_swdp.c \
+ cortexm3.c \
+ stm32_tgt.c \
+ main.c \
+ platform.c \
+ command.c \
+ jtag_scan.c \
+ adiv5_jtagdp.c \
+ lmi.c \
+
+include $(HOST)/Makefile.inc
+
+OBJ = $(SRC:.c=.o)
+
+blackmagic: $(OBJ)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+.PHONY: clean host_clean
+
+clean: host_clean
+ $(RM) *.o *~ blackmagic $(HOSTFILES)
+