From d037cee5ded6760ac7cfb8cd9994741c1c8cfc83 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Wed, 7 Apr 2021 17:12:14 -0700 Subject: [PATCH] start the Makefile.. some basic arm building, and python test running.. --- Makefile | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 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