-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·65 lines (43 loc) · 1.15 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
# File to compile
FILE=ebola_outbreak
# ReactiveML compiler
RMLC=rmlc
N=-1
SAMPLING=-1.0
RMLFLAGS=-dtypes
OCAMLC=ocamlc
OCAMLFLAGS=
OCAMLOPT=ocamlopt
OCAMLOPTFLAGS=
EXEC = $(FILE)
EXECOPT = $(FILE).opt
all: opt
byte: $(EXEC)
opt: $(EXECOPT)
$(FILE).ml: $(FILE).rml
$(FILE).cmo: $(FILE).ml
$(FILE): $(FILE).cmo
$(OCAMLC) $(OCAMLFLAGS) -o $(FILE) unix.cma graphics.cma -I `$(RMLC) -where` rmllib.cma $(FILE).cmo
$(FILE).cmx: $(FILE).ml
$(FILE).opt: $(FILE).cmx
$(OCAMLOPT) $(OCAMLOPTFLAGS) -o $(FILE).opt unix.cmxa graphics.cmxa -I `$(RMLC) -where` rmllib.cmxa $(FILE).cmx
# implicit rules
.SUFFIXES: .rml .mli .ml .cmi .cmo .cmx .o .rzi
.rml.ml:
$(RMLC) $(RMLFLAGS) -n $(N) -sampling $(SAMPLING) $<
.ml.cmo:
$(OCAMLC) $(OCAMLFLAGS) -c -I `$(RMLC) -where` $(INCLUDES) $<
.mli.cmi:
$(OCAMLC) $(OCAMLFLAGS) -c -I `$(RMLC) -where` $(INCLUDES) $<
.ml.cmx:
$(OCAMLOPT) $(OCAMLOPTFLAGS) -c -I `$(RMLC) -where` $(INCLUDES) $<
.ml.o:
$(OCAMLOPT) $(OCAMLOPTFLAGS) -c -I `$(RMLC) -where` $(INCLUDES) $<
.mli.rzi:
$(RMLC) -c $<
clean:
rm -f *.cm* *.o *.annot *.?annot *.rzi \
$(FILE).ml
realclean: clean
rm -f $(FILE) $(FILE).opt *~
cleanall: realclean