-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·87 lines (65 loc) · 1.67 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
###############################################################
#
# IMPERATOR
#
# Blublu
#
# LSV
# Author: Etienne Andre
# Created: 2009/03
# Last modified: 2009/03/26
# Ocaml version: 3.09.3
###############################################################
# CONSTANTS
OCAMLIB_PATH = /usr/lib/ocaml
# FILES
.PREFIXES : +.
.SUFFIXES : .cmo .cmi .ml .mli
FILES = Global.+ Constraint.+ Matrix.+ AbstractImperatorFile.+ ImperatorLexer.+ ImperatorParser.+ ImperatorPrinter.+ IMPERATOR.+
FILESCMI = Global.cmi Constraint.cmi Matrix.cmi AbstractImperatorFile.cmi
all:
make parser
make compil
make rmtpf
make rmuseless
header:
ocamlc -c Global.mli
ocamlc -c Global.ml
ocamlc -c Constraint.mli
ocamlc -c Constraint.ml
ocamlc -c Matrix.mli
ocamlc -c Matrix.ml
ocamlc -c AbstractImperatorFile.mli
ocamlc -c AbstractImperatorFile.ml
parser:
make header
ocamllex ImperatorLexer.mll # generates ImperatorLexer.ml
ocamlyacc ImperatorParser.mly # generates ImperatorParser.ml and ImperatorParser.mli
compil:
make header
ocamlc -c ImperatorParser.mli
ocamlc -c ImperatorLexer.ml
ocamlc -c ImperatorParser.ml
ocamlc -c ImperatorPrinter.mli
ocamlc -c ImperatorPrinter.ml
ocamlc -c IMPERATOR.ml
ocamlc -I $(OCAMLIB_PATH) nums.cma str.cma unix.cma -o IMPRATOR $(FILES:+=cmo)
exe:
make compil
make rmtpf
make rmuseless
./IMPRATOR
count:
make clean
python lineCounter.py
clean:
make rmtpf
make rmuseless
rm -rf ImperatorLexer.ml ImperatorParser.ml ImperatorParser.mli
rm -rf IMPRATOR
rmuseless:
rm -rf $(FILES:+=cmo) $(FILES:+=cmi) $(FILES:+=o)
rm -rf $(FILESCMI)
rmtpf:
rm -rf *~
# rm -rf *.ml~ *.mli~ *.mly~ *.mll~ *.imp~ Makefile~