X-Git-Url: https://git.xandkar.net/?p=tiger.ml.git;a=blobdiff_plain;f=compiler%2FMakefile;h=0cb89eb5730fde66de34604d4166b3cf82fb1486;hp=1e9b32f8d6628bc4d917dcdf9476d0e296da83bd;hb=fca49f4f3908de86d5895b6a8708216fbb4dd529;hpb=38ffcb1fc99ecb7a48097cbcf97b9a3062c8bfa0 diff --git a/compiler/Makefile b/compiler/Makefile index 1e9b32f..0cb89eb 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -1,10 +1,12 @@ 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 \ @@ -17,6 +19,9 @@ OCAMLBUILD := \ all \ build \ clean \ + test_all \ + test_book \ + test_micro \ test all: clean @@ -32,5 +37,13 @@ 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