From 856e859c5c6ec9e6033adc733fda902824c6d675 Mon Sep 17 00:00:00 2001 From: 0scar Date: Tue, 30 Aug 2022 16:36:40 +0200 Subject: Add testing framework --- tests/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/Makefile (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..19881a2 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,17 @@ +CASES := $(wildcard test_*.c) +CASES_OBJ := $(CASES:.c=.o) + +.PHONY: run + +run: test + +test: test.o $(CASES_OBJ) test.h + @echo Case sources: $(CASES) + @echo Objects: $(CASES_OBJ) + $(CC) -o $@ $^ + +test%.o: test%.c + $(CC) -I../src -c -o $@ $< + +clean: + rm *.o test -- cgit v1.3