ARMCC?= arm-none-eabi-gcc ARMTARGET?= -mcpu=cortex-m3 -mthumb -DSTROBE_SINGLE_THREAD=1 CFLAGS = -Istrobe CFLAGS+= -DNDEBUG SRCS = \ strobe/strobe.c strobe/x25519.c .OBJDIR = build .PHONY: all all: $(BUILDDIR)/strobe.o $(BUILDDIR)/x25519.o .PHONY: runtests runtests: ls *.py | entr sh -c 'python -m coverage run -m unittest lora && coverage report --omit=p/\* -m -i' $(BUILDDIR): mkdir -p $@ $(BUILDDIR)/%.o : %.c $(ARMCC) $(ARMTARGET) $(CFLAGS) -c $< -o $@ STROBE_REPO = https://git.code.sf.net/p/strobe/code STROBE_BRANCH = master .PHONY: init-strobe init-strobe: git subtree add -P strobe --squash $(STROBE_REPO) $(STROBE_BRANCH) .PHONY: update-strobe update-strobe: git subtree pull -P strobe --squash $(STROBE_REPO) $(STROBE_BRANCH)