-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
46 lines (31 loc) · 1.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
OCAMLC := ocamlc
WORKLIST_EXEC := worklist
LOOKAHEAD_EXEC := lookahead
EXECS := $(WORKLIST_EXEC) $(LOOKAHEAD_EXEC)
WORKLIST_LIB := worklist.cma
LOOKAHEAD_LIB := lookahead.cma
ARITH_LIB := arith.cma
.PHONY: all
all: $(WORKLIST_EXEC) $(LOOKAHEAD_EXEC)
$(WORKLIST_EXEC): $(WORKLIST_LIB) worklist.ml
$(OCAMLC) $^ -o $@
$(WORKLIST_LIB): $(ARITH_LIB) pwZ_Worklist.cmo pwZ_Worklist_Help.cmo arithGrammar_Worklist.cmo
$(OCAMLC) -a $^ -o $@
arithGrammar_Worklist.cmo: $(ARITH_LIB) pwZ_Worklist.cmo arithGrammar_Worklist.ml
$(OCAMLC) -c $^ -o $@
$(LOOKAHEAD_EXEC): $(LOOKAHEAD_LIB) lookahead.ml
$(OCAMLC) $^ -o $@
$(LOOKAHEAD_LIB): $(ARITH_LIB) pwZ_WorklistWithLookahead.cmo pwZ_WorklistWithLookahead_Help.cmo arithGrammar_WorklistWithLookahead.cmo
$(OCAMLC) -a $^ -o $@
arithGrammar_WorklistWithLookahead.cmo: $(ARITH_LIB) pwZ_WorklistWithLookahead.cmo arithGrammar_WorklistWithLookahead.ml
$(OCAMLC) -c $^ -o $@
$(ARITH_LIB): arithTags.cmo arithTokenizer.ml
$(OCAMLC) -a $^ -o $@
%.cmo: %.ml
$(OCAMLC) -c $^
.PHONY: clean-all
clean-all: clean
$(RM) $(EXECS)
.PHONY: clean
clean:
$(RM) *.cmi *.cmo *.cma *.cmxa