diff --git a/Makefile b/Makefile index 03ff825..6bf2f3c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,26 @@ -ARMCC = arm-none-eabi-gcc +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