Merge makefile rules for tests
This commit is contained in:
parent
d59dec50a8
commit
3ea6ff0e14
3
barista/.gitignore
vendored
3
barista/.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
build/
|
build/
|
||||||
test_ntc
|
misc/
|
||||||
|
*.test
|
||||||
*.o
|
*.o
|
||||||
|
|||||||
@ -16,6 +16,10 @@ SRC=barista.ino \
|
|||||||
overheat.c \
|
overheat.c \
|
||||||
overheat.h
|
overheat.h
|
||||||
|
|
||||||
|
TESTS=ntc.test \
|
||||||
|
overheat.test \
|
||||||
|
led.test
|
||||||
|
|
||||||
# For host test programs
|
# For host test programs
|
||||||
CPPFLAGS=-I.
|
CPPFLAGS=-I.
|
||||||
LIBS=-lm
|
LIBS=-lm
|
||||||
@ -31,18 +35,12 @@ upload: $(HEX)
|
|||||||
serial:
|
serial:
|
||||||
picocom -b 9600 --lower-rts --lower-dtr /dev/ttyUSB0 --imap lfcrlf
|
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
|
%.test: test/test_%.o test/compat.o %.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
|
|
||||||
gcc $^ -o $@ $(LIBS)
|
gcc $^ -o $@ $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f test/test_ntc.o ntc.o
|
rm -f $(TESTS) test/*.o *.o
|
||||||
|
|
||||||
.PHONY: test all clean
|
.PHONY: test all clean
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user