-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.extr
35 lines (29 loc) · 1.03 KB
/
Makefile.extr
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
ARCH = ia32
OCAMLC = ocamlc -I extraction -I ~/.opam/system/lib/menhirLib/
OCAMLOPT = ocamlopt -I extraction -I ~/.opam/system/lib/menhirLib/
OCAMLDEP = ocamldep -I extraction \
-I compcert/backend \
-I compcert/cfrontend \
-I compcert/common \
-I compcert/cparser \
-I compcert/debug \
-I compcert/driver \
-I compcert/ia32 \
-I compcert/lib
%.cmi:
$(OCAMLC) -o $@ -c `find src extraction compcert -name $$(basename "$@" .cmi).mli | head -n 1`
%.cmo:
$(OCAMLC) -o $@ -c `find src extraction compcert -name $$(basename "$@" .cmo).ml | head -n 1`
%.cmx:
$(OCAMLOPT) -o $@ -c `find src extraction compcert/ia32 compcert -name $$(basename "$@" .cmx).ml | head -n 1`
DIRS= \
lib common $(ARCH) backend cfrontend cparser driver \
exportclight debug
depend:
$(OCAMLDEP) \
$(foreach d,$(DIRS),$(wildcard compcert/$(d)/*.mli compcert/$(d)/*.ml)) \
$(wildcard extraction/*.mli extraction/*.ml) \
src/OeufDriver.ml \
| sed -e 's:[a-zA-Z0-9/]*/:extraction/:g' >.depend.extr \
|| { rm -f .depend.extr; exit 2; }
-include .depend.extr