2012-06-10 04:40:07 +00:00
|
|
|
PROBE_HOST ?= native
|
|
|
|
PLATFORM_DIR = platforms/$(PROBE_HOST)
|
|
|
|
VPATH += $(PLATFORM_DIR)
|
2011-02-04 07:23:52 +00:00
|
|
|
|
|
|
|
BUILDDATE := `date +"%Y%m%d"`
|
|
|
|
|
2011-02-06 23:09:07 +00:00
|
|
|
CFLAGS += -Wall -Wextra -Wno-pointer-sign -Wno-char-subscripts\
|
2012-06-25 09:19:09 +00:00
|
|
|
-Wno-sign-compare \
|
2012-01-08 05:42:24 +00:00
|
|
|
-O2 -std=gnu99 -g3 -DBUILDDATE=\"$(BUILDDATE)\"\
|
2012-06-10 04:40:07 +00:00
|
|
|
-I. -Iinclude -I$(PLATFORM_DIR) \
|
2012-01-08 05:42:24 +00:00
|
|
|
-DVERSION_SUFFIX=\"`../scripts/setlocalversion`\" -MD
|
2011-02-04 07:23:52 +00:00
|
|
|
|
2012-11-03 08:33:28 +00:00
|
|
|
SRC = \
|
2011-02-04 07:23:52 +00:00
|
|
|
adiv5.c \
|
2012-11-03 08:33:28 +00:00
|
|
|
adiv5_jtagdp.c \
|
2011-02-04 07:23:52 +00:00
|
|
|
adiv5_swdp.c \
|
2012-11-03 08:33:28 +00:00
|
|
|
arm7tdmi.c \
|
2011-02-04 07:23:52 +00:00
|
|
|
command.c \
|
2012-11-03 08:33:28 +00:00
|
|
|
cortexm.c \
|
|
|
|
crc32.c \
|
|
|
|
gdb_if.c \
|
|
|
|
gdb_main.c \
|
|
|
|
gdb_packet.c \
|
|
|
|
hex_utils.c \
|
2011-02-04 07:23:52 +00:00
|
|
|
jtag_scan.c \
|
2012-11-03 08:33:28 +00:00
|
|
|
jtagtap.c \
|
2011-02-04 07:23:52 +00:00
|
|
|
lmi.c \
|
2012-11-03 08:33:28 +00:00
|
|
|
lpc43xx.c \
|
|
|
|
main.c \
|
|
|
|
nxp_tgt.c \
|
|
|
|
platform.c \
|
|
|
|
sam3x.c \
|
|
|
|
stm32f1.c \
|
2011-11-12 06:15:52 +00:00
|
|
|
stm32f4.c \
|
2012-10-25 18:30:13 +00:00
|
|
|
stm32l1.c \
|
2012-11-03 08:33:28 +00:00
|
|
|
swdptap.c \
|
2012-06-24 04:53:13 +00:00
|
|
|
target.c \
|
2011-02-04 07:23:52 +00:00
|
|
|
|
2012-06-10 04:40:07 +00:00
|
|
|
include $(PLATFORM_DIR)/Makefile.inc
|
2011-02-04 07:23:52 +00:00
|
|
|
|
|
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
|
|
|
|
blackmagic: $(OBJ)
|
2011-02-17 04:24:26 +00:00
|
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
2011-02-04 07:23:52 +00:00
|
|
|
|
|
|
|
.PHONY: clean host_clean
|
|
|
|
|
|
|
|
clean: host_clean
|
2012-05-18 23:54:22 +00:00
|
|
|
$(RM) *.o *.d *~ blackmagic $(HOSTFILES)
|
2013-01-12 19:44:43 +00:00
|
|
|
$(RM) platforms/*/*.o platforms/*/*.d mapfile
|
2011-02-04 07:23:52 +00:00
|
|
|
|
2012-01-08 05:42:24 +00:00
|
|
|
-include *.d
|
|
|
|
|