|
|
@@ -38,10 +38,14 @@ SOEXT=dylib |
|
|
|
.error Unsupported platform: $(PLATFORM) |
|
|
|
.endif |
|
|
|
|
|
|
|
PROG = lora.irr |
|
|
|
PROGEXT = .elf |
|
|
|
|
|
|
|
SRCS = main.c |
|
|
|
PROGS = lora.gw lora.irr |
|
|
|
|
|
|
|
SRCS.lora.gw = main.c |
|
|
|
|
|
|
|
SRCS.lora.irr = irr_main.c |
|
|
|
|
|
|
|
SRCS+= board.c |
|
|
|
SRCS+= misc.c |
|
|
|
SRCS+= strobe_rng_init.c |
|
|
@@ -120,7 +124,6 @@ SRCS+= \ |
|
|
|
|
|
|
|
CFLAGS+= -I$(STM32)/usb |
|
|
|
|
|
|
|
OBJS = $(SRCS:C/.c$/.o/) |
|
|
|
CFLAGS+= -Werror -Wall |
|
|
|
|
|
|
|
LIBLORA_TEST_SRCS= comms.c strobe.c x25519.c |
|
|
@@ -132,7 +135,6 @@ $(LIBLORA_TEST): $(LIBLORA_TEST_OBJS) |
|
|
|
|
|
|
|
.MAIN: all |
|
|
|
.PHONY: all |
|
|
|
all: $(PROG)$(PROGEXT) $(PROG).list |
|
|
|
|
|
|
|
DEPENDS = .arm_deps .test_deps |
|
|
|
.PHONY: depend |
|
|
@@ -157,11 +159,19 @@ rng_save.c: Makefile |
|
|
|
.test_deps: $(LIBLORA_TEST_SRCS) |
|
|
|
$(CC) $(CFLAGS) $(.ALLSRC) -MM | sed -e 's/\.o:/\.no:/' > $@ || (rm -f $@ && false) |
|
|
|
|
|
|
|
$(PROG)$(PROGEXT) $(PROG).map: $(OBJS) |
|
|
|
$(ARMCC) $(ARMTARGET) -o $(PROG)$(PROGEXT) $(.ALLSRC) -T$(LINKER_SCRIPT) --specs=nosys.specs -Wl,-Map="$(PROG).map" -Wl,--gc-sections -static --specs=nano.specs -Wl,--start-group -lc -lm -Wl,--end-group |
|
|
|
.for i in $(PROGS) |
|
|
|
ALLTGTS+= $(i)$(PROGEXT) $(i).list |
|
|
|
ASRCS.$(i) = $(SRCS) $(SRCS.$(i)) |
|
|
|
OBJS.$(i) = $(ASRCS.$(i):C/.c$/.o/) |
|
|
|
|
|
|
|
$(PROG).list: $(PROG)$(PROGEXT) |
|
|
|
$(i)$(PROGEXT) $(i).map: $(OBJS.$(i)) |
|
|
|
$(ARMCC) $(ARMTARGET) -o $(i)$(PROGEXT) $(.ALLSRC) -T$(LINKER_SCRIPT) --specs=nosys.specs -Wl,-Map="$(i).map" -Wl,--gc-sections -static --specs=nano.specs -Wl,--start-group -lc -lm -Wl,--end-group |
|
|
|
|
|
|
|
$(i).list: $(i)$(PROGEXT) |
|
|
|
$(ARMOBJDUMP) -h -S $(.ALLSRC) > $@ || (rm -f $@ && false) |
|
|
|
.endfor |
|
|
|
|
|
|
|
all: $(ALLTGTS) |
|
|
|
|
|
|
|
.PHONY: runbuild |
|
|
|
runbuild: $(SRCS) |
|
|
|