about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e99038a..1f6677b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@ CFLAGS ?= -std=c99 -Wall -Werror -static -g -O0
 .DEFAULT_GOAL := all
 
 BOOTSTRAP_SOURCES = boot/catboot.c boot/common.c boot/lex.c boot/tree.c boot/visit.c boot/parse.c
+BOOTSTRAP_TEST_SOURCES = boot/tests/test.c
 SOURCES = src/catskill.csk
 
 build/catskill: build $(SOURCES)
@@ -11,12 +12,15 @@ build/catskill: build $(SOURCES)
 build/catboot: build $(BOOTSTRAP_SOURCES)
 	$(CC) $(CFLAGS) -o ./build/catboot ./boot/catboot.c
 
+build/catboot-test: build $(BOOTSTRAP_TEST_SOURCES)
+	$(CC) $(CFLAGS) -o ./build/catboot-test ./boot/tests/test.c
+
 build:
 	mkdir -p ./build
 
-.PHONY: all run run-boot clean
+.PHONY: all run run-boot clean test test-all
 
-all: build/catskill build/catboot
+all: build/catskill build/catboot build/catboot-test
 
 run: build/catskill
 	echo "Not implemented yet."
@@ -24,5 +28,11 @@ run: build/catskill
 run-boot: build/catboot
 	./build/catboot
 
+test: build/catboot-test
+	./build/catboot-test
+
+test-all: build/catboot-test
+	./build/catboot-test all
+
 clean:
 	rm -rf build/*