Merge makefile rules for tests

This commit is contained in:
Rodrigo Arias Mallo 2025-11-02 19:24:02 +01:00
parent d59dec50a8
commit 3ea6ff0e14
2 changed files with 9 additions and 10 deletions

3
barista/.gitignore vendored
View File

@ -1,3 +1,4 @@
build/
test_ntc
misc/
*.test
*.o

View File

@ -16,6 +16,10 @@ SRC=barista.ino \
overheat.c \
overheat.h
TESTS=ntc.test \
overheat.test \
led.test
# For host test programs
CPPFLAGS=-I.
LIBS=-lm
@ -31,18 +35,12 @@ upload: $(HEX)
serial:
picocom -b 9600 --lower-rts --lower-dtr /dev/ttyUSB0 --imap lfcrlf
test: test_ntc test_overheat
test: ntc.test overheat.test led.test
test_ntc: test/test_ntc.o ntc.o
gcc $^ -o $@ $(LIBS)
test_overheat: test/test_overheat.o overheat.o
gcc $^ -o $@ $(LIBS)
test_led: test/test_led.o test/compat.o led.o
%.test: test/test_%.o test/compat.o %.o
gcc $^ -o $@ $(LIBS)
clean:
rm -f test/test_ntc.o ntc.o
rm -f $(TESTS) test/*.o *.o
.PHONY: test all clean