-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
56 lines (45 loc) · 1.46 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
ROOT = `pwd`/..
LLVM_OCAML_LIB = $(ROOT)/.build/llvm-obj/bindings/ocaml
LLVM_LIB = $(ROOT)/.build/llvm-obj/lib/ocaml
LIB_FILES = llvm.cmxa,llvm_analysis.cmxa,llvm_target.cmxa,llvm_bitreader.cmxa,llvm_bitwriter.cmxa,llvm_scalar_opts.cmxa
OCAMLBUILD = ocamlbuild
OCAMLBUILD_OPT = -r \
-I extract \
-I corehint \
-I vellvm \
-use-ocamlfind -pkg atdgen \
-cflags -I,$(LLVM_OCAML_LIB) \
-cflags -I,$(LLVM_LIB) \
-cflags -g \
-lflags -I,$(LLVM_OCAML_LIB) \
-lflags -I,$(LLVM_LIB) \
-lflags -cc,g++ \
-lflags -cclib,-lLLVMSupport \
-lflags -cclib,-lLLVMBitReader \
-lflags -cclib,-lLLVMBitWriter \
-lflags $(LIB_FILES)
MLS = corehint/coreHint_j.ml corehint/coreHint_j.mli \
corehint/coreHint_t.ml corehint/coreHint_t.mli \
$(shell find *.ml*) \
$(shell find */*.ml*)
all: main.native
main.native: $(MLS)
$(OCAMLBUILD) $(OCAMLBUILD_OPT) main.native
corehint/coreHint_t.ml: corehint/coreHint.atd
atdgen -t ./corehint/coreHint.atd
atdgen -j ./corehint/coreHint.atd
corehint/coreHint_j.ml: corehint/coreHint.atd
atdgen -t ./corehint/coreHint.atd
atdgen -j ./corehint/coreHint.atd
corehint/coreHint_t.mli: corehint/coreHint.atd
atdgen -t ./corehint/coreHint.atd
atdgen -j ./corehint/coreHint.atd
corehint/coreHint_j.mli: corehint/coreHint.atd
atdgen -t ./corehint/coreHint.atd
atdgen -j ./corehint/coreHint.atd
clean:
rm ./corehint/coreHint_j.mli
rm ./corehint/coreHint_t.mli
rm ./corehint/coreHint_j.ml
rm ./corehint/coreHint_t.ml
$(OCAMLBUILD) -clean