forked from mpelleau/AbSolute
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·151 lines (124 loc) · 3.42 KB
/
Copy pathMakefile
File metadata and controls
executable file
·151 lines (124 loc) · 3.42 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# this configuration file is generated from configure.make
-include Makefile.config
OPAMBIN := $(shell opam config var bin)
OCAMLOPTOPTIONS := -w "+a-4-32-27" -warn-error "+a-4-32-27"
OCAMLOPT := $(OPAMBIN)/ocamlopt.opt $(OCAMLOPTOPTIONS)
OCAMLDEP := $(OPAMBIN)/ocamldep
OCAMLLEX := $(OPAMBIN)/ocamllex
OCAMLYACC := $(OPAMBIN)/ocamlyacc
CC := gcc
OCAMLOPTLIBS := $(LIBS:%=%.cmxa)
AUTOGEN =\
src/frontend/parser.ml \
src/frontend/lexer.ml \
src/frontend/parser.mli \
src/frontend/modParser.ml \
src/frontend/modLexer.ml \
src/frontend/modParser.mli
# source files
MLFILES = \
src/lib/mapext.ml \
src/lib/tools.ml \
src/lib/polynom.ml \
src/lib/array_maker.ml \
src/lib/linconsext.ml \
src/lib/tconsext.ml \
src/lib/abstractext.ml \
src/lib/constant.ml \
src/lib/apron_utils.ml \
src/lib/bot.ml \
src/lib/bound_sig.ml \
src/lib/bound_sig_simple.ml \
src/lib/bound_float.ml \
src/lib/itv_sig.ml \
src/lib/itv_simple.ml \
src/lib/itv.ml \
src/lib/itv_int.ml \
src/lib/itv_mix.ml \
src/lib/trigo.ml \
src/frontend/csp.ml \
src/frontend/rewrite.ml \
src/frontend/parser.ml \
src/frontend/lexer.ml \
src/frontend/builder.ml \
src/domains/apron_domain.ml \
src/domains/vpl_domain.ml \
src/domains/hc4.ml \
src/domains/cartesian.ml \
src/domains/domain_signature.ml \
src/domains/domain_signature2.ml \
src/domains/wrapper.ml \
src/domains/relational.ml \
src/solver/result.ml \
src/solver/splitter.ml \
src/solver/solver.ml \
src/solver/solver2.ml \
src/print/view.ml \
src/print/objgen.ml \
src/print/latex.ml \
src/print/drawer_sig.ml \
src/print/box_drawer.ml \
src/print/boxmix_drawer.ml \
src/print/wrapper_drawer.ml \
src/print/apron_drawer.ml \
src/print/vpl_drawer.ml \
src/print/out.ml \
src/solver/step_by_step.ml
# targets
TARGETS = solver.opt
# mains
ABS = src/main.ml
CHECK = src/solver/checker.ml \
src/check.ml
# object files
CMIFILES = $(MLIFILES:%.ml=%.cmi)
CMXFILES = $(MLFILES:%.ml=%.cmx)
# c files
CFILES = src/lib/ml_float.c
OFILES = $(CFILES:%.c=%.o)
# rules
all: $(TARGETS)
@mkdir -p out
solver.opt: $(OFILES) $(CMXFILES) $(ABS)
$(OCAMLOPT) -o $@ $(OCAMLINC) $(OCAMLOPTLIBS) $+
check: checker.opt
@./checker.opt
@rm checker.opt
checker.opt: $(OFILES) $(CMXFILES) $(CHECK)
@$(OCAMLOPT) -o $@ $(OCAMLINC) $(OCAMLOPTLIBS) $+
%.cmx: %.ml %.cmi
$(OCAMLOPT) $(OCAMLOPTFLAGS) $(OCAMLINC) -c $*.ml
%.cmi: %.mli %.ml
$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLINC) -c $*.mli
%.cmx: %.ml
$(OCAMLOPT) $(OCAMLOPTFLAGS) $(OCAMLINC) -c $*.ml
%.o: %.c
$(CC) -I $(OCAMLDIR) -o $@ -c $+
%.ml: %.mll
$(OCAMLLEX) $*.mll
%.ml %.mli: %.mly
$(OCAMLYACC) $*.mly
configure: Makefile.config
setup_vpl:
cp -f ./src/domains/vpl_domain.ok.ml ./src/domains/vpl_domain.ml
cp -f ./src/print/vpl_drawer.ok.ml ./src/print/vpl_drawer.ml
setup_no_vpl:
cp -f ./src/domains/vpl_domain.ko.ml ./src/domains/vpl_domain.ml
cp -f ./src/print/vpl_drawer.ko.ml ./src/print/vpl_drawer.ml
# proxy rule for rebuilding configuration files directly from the main Makefile
Makefile.config:
$(MAKE) -f .configure.make all
clean:
rm -f .depend $(TARGETS) $(AUTOGEN)
rm -f `find . -name "*.a"`
rm -f `find . -name "*.cm*"`
rm -f `find . -name "*~"`
rm -f `find . -name "*.o"`
rm -f out/*
rm -f -R out
rm -f Makefile.config
MLSOURCES = $(MLFILES) $(ABS) $(CHECK) $(MLIFILES)
.depend: $(MLSOURCES) Makefile
@-$(OCAMLDEP) $(OCAMLINC) -native $(MLSOURCES) > .depend
.phony: all clean configure
-include .depend