summaryrefslogtreecommitdiff
path: root/prototype/fw/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'prototype/fw/Makefile')
-rw-r--r--prototype/fw/Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/prototype/fw/Makefile b/prototype/fw/Makefile
index 3fbd029..18e9447 100644
--- a/prototype/fw/Makefile
+++ b/prototype/fw/Makefile
@@ -196,12 +196,19 @@ $(BUILDDIR)/%.o: %.s
mkdir -p $(@D)
$(CC) $(COMMON_CFLAGS) $(CFLAGS) $(EXT_CFLAGS) -o $@ -c $<
-$(BUILDDIR)/crc32_test: src/crc32_test.c src/crc32.c
- $(HOSTCC) $(HOST_CFLAGS) -o $@ $^
+$(BUILDDIR)/crc32_test: src/crc32.c test/crc32_test.c
+ $(HOSTCC) $(HOST_CFLAGS) -o $@ -Isrc $^
+
+$(BUILDDIR)/microcobs_test_sg: src/microcobs.c test/microcobs_test_sg.c
+ $(HOSTCC) $(HOST_CFLAGS) -o $@ -Isrc $^
+
+$(BUILDDIR)/microcobs_test: src/microcobs.c test/microcobs_test.c
+ $(HOSTCC) $(HOST_CFLAGS) -o $@ -Isrc $^
.PHONY: run_tests
-run_tests: $(BUILDDIR)/crc32_test
+run_tests: $(BUILDDIR)/crc32_test $(BUILDDIR)/microcobs_test_sg $(BUILDDIR)/microcobs_test
$(PYTHON3) -m unittest test.crc32_ref
+ $(PYTHON3) -m unittest test.microcobs
venv:
test -d venv || python3 -m venv --system-site-packages venv
@@ -214,6 +221,9 @@ clean:
rm -f $(BUILDDIR)/$(BINARY:.elf=.map)
rm -f $(BUILDDIR)/$(BINARY:.elf=-symbol-sizes.dot)
rm -f $(BUILDDIR)/$(BINARY:.elf=-symbol-sizes.pdf)
+ rm -f $(BUILDDIR)/crc32_test
+ rm -f $(BUILDDIR)/microcobs_test_sg
+ rm -f $(BUILDDIR)/microcobs_test
mrproper: clean
rm -rf build