summaryrefslogtreecommitdiff
path: root/tests/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile17
1 files changed, 17 insertions, 0 deletions
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