summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-06-21 12:56:30 +0100
committerubq323 <ubq323@ubq323.website>2024-06-21 12:56:30 +0100
commit21994864559386f1d11c001d6d27714cbf624a15 (patch)
treeb9a5e76bdc8be9a41970cd6620aab7a3637b7e6a /Makefile
parent671645c370498955eb101695bd9099bf4caf5aea (diff)
add tests, and make dumping disasm optional
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 596f2a3..917c481 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CS=ast.c com.c dis.c ht.c mem.c prs.c read.c state.c val.c vm.c
HS=ast.h dis.h ht.h mem.h prs.h read.h state.h val.h vm.h
-CFLAGS=-O3 -lm -Wall -Wpedantic -Werror=implicit-function-declaration
+CFLAGS=$(EXTRA_CFLAGS) -O3 -lm -Wall -Wpedantic -Werror=implicit-function-declaration
bþ: $(CS) $(HS) Makefile
$(CC) $(CFLAGS) -o bþ $(CS)
@@ -8,7 +8,10 @@ bþ: $(CS) $(HS) Makefile
prs.c: g.peg
packcc -o prs g.peg
+test: bþ
+ ./run_tests.sh
+
clean:
rm bþ prs.c prs.h
-.PHONY: clean
+.PHONY: clean test