|
|
@@ -1,6 +1,8 @@ |
|
|
|
.MAIN: all |
|
|
|
.PHONY: all |
|
|
|
|
|
|
|
PROGEXT = .elf |
|
|
|
|
|
|
|
.for i in $(PROGS) |
|
|
|
ALLTGTS+= $(i)$(PROGEXT) $(i).list |
|
|
|
ASRCS.$(i) = $(SRCS) $(SRCS.$(i)) |
|
|
@@ -10,12 +12,12 @@ DEPENDS += .arm_deps |
|
|
|
|
|
|
|
.arm_deps: $(ASRCS.$(i)) |
|
|
|
|
|
|
|
.arm_deps: |
|
|
|
$(ARMCC) $(ARMTARGET) $(CFLAGS) $(.ALLSRC) -MM > $@ || (rm -f $@ && false) |
|
|
|
|
|
|
|
.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 |
|
|
|
|
|
|
@@ -23,6 +25,10 @@ $(i).list: $(i)$(PROGEXT) |
|
|
|
$(ARMOBJDUMP) -h -S $(.ALLSRC) > $@ || (rm -f $@ && false) |
|
|
|
.endfor |
|
|
|
|
|
|
|
.for i in $(DEPENDS) |
|
|
|
.sinclude "$i" |
|
|
|
.endfor |
|
|
|
|
|
|
|
all: $(ALLTGTS) |
|
|
|
|
|
|
|
.PHONY: runbuild |
|
|
|