Browse Source

move more into mu.progs.mk, reorder depends..

main
John-Mark Gurney 2 years ago
parent
commit
cd7bd758ea
2 changed files with 9 additions and 8 deletions
  1. +0
    -5
      Makefile
  2. +9
    -3
      mk/mu.progs.mk

+ 0
- 5
Makefile View File

@@ -34,8 +34,6 @@ SOEXT=dylib
.error Unsupported platform: $(PLATFORM)
.endif

PROGEXT = .elf

PROGS = lora.gw lora.irr

SRCS.lora.gw = main.c
@@ -82,9 +80,6 @@ rng_save.c: Makefile
echo '};' \
) > $@ || (rm $@ && false)

.arm_deps:
$(ARMCC) $(ARMTARGET) $(CFLAGS) $(.ALLSRC) -MM > $@ || (rm -f $@ && false)

.test_deps: $(LIBSYOTE_TEST_SRCS)
$(CC) $(CFLAGS) $(.ALLSRC) -MM | sed -e 's/\.o:/\.no:/' > $@ || (rm -f $@ && false)



+ 9
- 3
mk/mu.progs.mk View File

@@ -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


Loading…
Cancel
Save