MAKEFLAGS := --no-builtin-rules
-EXE_TYPE := byte # byte | native
+DIR_TEST_CASES := ./testcases
+
+EXE_TYPE := native # byte | native
EXECUTABLES := tigerc tigert
OCAMLBUILD_FLAGS_PKGS := -pkg unix
OCAMLBUILD_FLAGS_DIRS := -I src/exe -I src/lib/tiger
-OCAMLBUILD_FLAGS_COMP := -cflags '-w A'
+OCAMLBUILD_FLAGS_COMP := -cflags '-g -w A'
OCAMLBUILD_FLAGS_YACC := -yaccflag '-v'
OCAMLBUILD := \
ocamlbuild \
all \
build \
clean \
+ test_all \
+ test_book \
+ test_micro \
test
all: clean
@$(OCAMLBUILD) -clean
@rm -rf ./bin
-test: build
- @./bin/exe/tigert
+test: test_all
+
+test_all: build
+ @./bin/exe/tigert all -dir $(DIR_TEST_CASES)
+
+test_book: build
+ @./bin/exe/tigert book -dir $(DIR_TEST_CASES)
+
+test_micro: build
+ @./bin/exe/tigert micro