diff --git a/Makefile b/Makefile index 5b1aadf..773b4ff 100644 --- a/Makefile +++ b/Makefile @@ -71,13 +71,7 @@ LIBSYOTE_TEST = libsyote_test.$(SOEXT) $(LIBSYOTE_TEST): $(LIBSYOTE_TEST_OBJS) $(CC) -shared -o $@ $(.ALLSRC) -DEPENDS = .arm_deps .test_deps -.PHONY: $(DEPENDS) -depend: $(DEPENDS) - -.for i in $(DEPENDS) -.sinclude "$i" -.endfor +DEPENDS = .test_deps # Temporarily disabled as OpenOCD can't program EEPROM on the STM32L1. # This could be used to add the data to flash. diff --git a/mk/mu.progs.mk b/mk/mu.progs.mk index eae5d29..cfbb7f0 100644 --- a/mk/mu.progs.mk +++ b/mk/mu.progs.mk @@ -6,8 +6,16 @@ ALLTGTS+= $(i)$(PROGEXT) $(i).list ASRCS.$(i) = $(SRCS) $(SRCS.$(i)) OBJS.$(i) = $(ASRCS.$(i):C/.c$/.o/) +DEPENDS += .arm_deps + .arm_deps: $(ASRCS.$(i)) +.PHONY: depend +depend: $(DEPENDS) + +.for i in $(DEPENDS) +.sinclude "$i" +.endfor $(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