aboutsummaryrefslogtreecommitdiff
path: root/tests/xok/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/xok/Makefile')
-rw-r--r--tests/xok/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/xok/Makefile b/tests/xok/Makefile
new file mode 100644
index 0000000..210982c
--- /dev/null
+++ b/tests/xok/Makefile
@@ -0,0 +1,15 @@
+FILES != echo *.c
+TARGETS := $(FILES:%.c=build/%)
+
+all: $(TARGETS)
+
+build/%: %.c ../../ngc1
+ @mkdir -p build
+ @gcc -E $< -o $@.i
+ @../../ngc1 $@.i > $@.c
+ @gcc $@.c -o $@
+ @./$@ | (grep -c 'OK' >/dev/null && echo "OK $@" || echo "FAIL $@")
+
+.PHONY: clean
+clean:
+ $(RM) -rf build