|
@@ -22,14 +22,6 @@ |
|
|
# SUCH DAMAGE. |
|
|
# SUCH DAMAGE. |
|
|
# |
|
|
# |
|
|
|
|
|
|
|
|
ARMOBJDUMP?= arm-none-eabi-objdump |
|
|
|
|
|
ARMCC?= arm-none-eabi-gcc |
|
|
|
|
|
ARMTARGET?= -mcpu=cortex-m3 -mthumb -DSTROBE_SINGLE_THREAD=1 |
|
|
|
|
|
|
|
|
|
|
|
# Clang doesn't work due to no-nano libc |
|
|
|
|
|
#ARMCC?=clang-mp-9.0 |
|
|
|
|
|
#ARMTARGET?= -nostdlib -ffreestanding -target arm-none-eabi -mcpu=cortex-m3 -mfloat-abi=soft -mthumb |
|
|
|
|
|
|
|
|
|
|
|
.if $(.OBJDIR) == $(.CURDIR) |
|
|
.if $(.OBJDIR) == $(.CURDIR) |
|
|
.error Need to set MAKEOBJDIR. |
|
|
.error Need to set MAKEOBJDIR. |
|
|
.endif |
|
|
.endif |
|
@@ -79,9 +71,6 @@ LIBSYOTE_TEST = libsyote_test.$(SOEXT) |
|
|
$(LIBSYOTE_TEST): $(LIBSYOTE_TEST_OBJS) |
|
|
$(LIBSYOTE_TEST): $(LIBSYOTE_TEST_OBJS) |
|
|
$(CC) -shared -o $@ $(.ALLSRC) |
|
|
$(CC) -shared -o $@ $(.ALLSRC) |
|
|
|
|
|
|
|
|
.MAIN: all |
|
|
|
|
|
.PHONY: all |
|
|
|
|
|
|
|
|
|
|
|
DEPENDS = .arm_deps .test_deps |
|
|
DEPENDS = .arm_deps .test_deps |
|
|
.PHONY: $(DEPENDS) |
|
|
.PHONY: $(DEPENDS) |
|
|
depend: $(DEPENDS) |
|
|
depend: $(DEPENDS) |
|
@@ -105,22 +94,6 @@ rng_save.c: Makefile |
|
|
.test_deps: $(LIBSYOTE_TEST_SRCS) |
|
|
.test_deps: $(LIBSYOTE_TEST_SRCS) |
|
|
$(CC) $(CFLAGS) $(.ALLSRC) -MM | sed -e 's/\.o:/\.no:/' > $@ || (rm -f $@ && false) |
|
|
$(CC) $(CFLAGS) $(.ALLSRC) -MM | sed -e 's/\.o:/\.no:/' > $@ || (rm -f $@ && false) |
|
|
|
|
|
|
|
|
.for i in $(PROGS) |
|
|
|
|
|
ALLTGTS+= $(i)$(PROGEXT) $(i).list |
|
|
|
|
|
ASRCS.$(i) = $(SRCS) $(SRCS.$(i)) |
|
|
|
|
|
OBJS.$(i) = $(ASRCS.$(i):C/.c$/.o/) |
|
|
|
|
|
|
|
|
|
|
|
.arm_deps: $(ASRCS.$(i)) |
|
|
|
|
|
|
|
|
|
|
|
$(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 |
|
|
.PHONY: runbuild |
|
|
runbuild: $(SRCS) Makefile mk/*.mk |
|
|
runbuild: $(SRCS) Makefile mk/*.mk |
|
|
for i in $(.MAKEFILE_LIST) $(.ALLSRC) $$(cat $(DEPENDS) | gsed ':x; /\\$$/ { N; s/\\\n//; tx }' | sed -e 's/^[^:]*://'); do if [ "$$i" != ".." ]; then echo $$i; fi; done | sort -u | entr -d sh -c 'echo starting...; cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) depend && $(MAKE) $(.MAKEFLAGS) all' |
|
|
for i in $(.MAKEFILE_LIST) $(.ALLSRC) $$(cat $(DEPENDS) | gsed ':x; /\\$$/ { N; s/\\\n//; tx }' | sed -e 's/^[^:]*://'); do if [ "$$i" != ".." ]; then echo $$i; fi; done | sort -u | entr -d sh -c 'echo starting...; cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) depend && $(MAKE) $(.MAKEFLAGS) all' |
|
@@ -149,14 +122,6 @@ $(.OBJDIR)/shared_key.h: |
|
|
|
|
|
|
|
|
(cmp shared_key.h.tmp shared_key.h >/dev/null 2>&1 && rm shared_key.h.tmp) || mv shared_key.h.tmp shared_key.h |
|
|
(cmp shared_key.h.tmp shared_key.h >/dev/null 2>&1 && rm shared_key.h.tmp) || mv shared_key.h.tmp shared_key.h |
|
|
|
|
|
|
|
|
# native objects |
|
|
|
|
|
.SUFFIXES: .no |
|
|
|
|
|
.c.no: |
|
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@ |
|
|
|
|
|
|
|
|
|
|
|
.c.o: |
|
|
|
|
|
$(ARMCC) $(ARMTARGET) $(CFLAGS) -c $< -o $@ |
|
|
|
|
|
|
|
|
|
|
|
STROBE_NAME = strobe |
|
|
STROBE_NAME = strobe |
|
|
STROBE_REPO = https://git.code.sf.net/p/strobe/code |
|
|
STROBE_REPO = https://git.code.sf.net/p/strobe/code |
|
|
STROBE_BRANCH = master |
|
|
STROBE_BRANCH = master |
|
@@ -193,3 +158,5 @@ test-diag: |
|
|
|
|
|
|
|
|
# hard coded dependancy for when "make depend" has not been run. |
|
|
# hard coded dependancy for when "make depend" has not been run. |
|
|
irr_main.o: $(.OBJDIR)/shared_key.h |
|
|
irr_main.o: $(.OBJDIR)/shared_key.h |
|
|
|
|
|
|
|
|
|
|
|
.include <mk/mu.progs.mk> |