Implement (mutually) recursive function definitions
[tiger.ml.git] / compiler / Makefile
... / ...
CommitLineData
1MAKEFLAGS := --no-builtin-rules
2
3DIR_TEST_CASES := ./testcases
4
5EXE_TYPE := native # byte | native
6EXECUTABLES := tigerc tigert
7OCAMLBUILD_FLAGS_PKGS := -pkg unix
8OCAMLBUILD_FLAGS_DIRS := -I src/exe -I src/lib/tiger
9OCAMLBUILD_FLAGS_COMP := -cflags '-g -w A'
10OCAMLBUILD_FLAGS_YACC := -yaccflag '-v'
11OCAMLBUILD := \
12 ocamlbuild \
13 $(OCAMLBUILD_FLAGS_PKGS) \
14 $(OCAMLBUILD_FLAGS_COMP) \
15 $(OCAMLBUILD_FLAGS_DIRS) \
16 $(OCAMLBUILD_FLAGS_YACC)
17
18.PHONY: \
19 all \
20 build \
21 clean \
22 test_all \
23 test_book \
24 test_micro \
25 test
26
27all: clean
28 @$(MAKE) -s test
29
30build:
31 @$(OCAMLBUILD) $(addsuffix .$(EXE_TYPE),$(EXECUTABLES))
32 @mkdir -p bin/exe
33 $(foreach exe,$(EXECUTABLES),cp _build/src/exe/$(exe).$(EXE_TYPE) bin/exe/$(exe); )
34 @rm $(addsuffix .$(EXE_TYPE),$(EXECUTABLES))
35
36clean:
37 @$(OCAMLBUILD) -clean
38 @rm -rf ./bin
39
40test: test_all
41
42test_all: build
43 @./bin/exe/tigert all -dir $(DIR_TEST_CASES)
44
45test_book: build
46 @./bin/exe/tigert book -dir $(DIR_TEST_CASES)
47
48test_micro: build
49 @./bin/exe/tigert micro
This page took 0.029436 seconds and 4 git commands to generate.