-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
42 lines (32 loc) · 1.39 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
DIRS = src
.PHONY: all
# Init submodules if needed and make native version.
# The resulting executable can be found under /bin and /library (symlinks)
all: ktcutil ktcoption native
# Compile native version.
ktcutil:
@rm -f -r libs
@mkdir libs
@ocamlbuild -no-hygiene -cflags '-w -a -thread' -use-ocamlfind -pkgs 'cil,yojson,csv' -Is $(DIRS) ktcutil.cma
@ocamlbuild -no-hygiene -cflags '-w -a -thread' -use-ocamlfind -pkgs 'cil,yojson,csv' -Is $(DIRS) ktcutil.cmxa
@rm -f bytes.ml
@cp _build/src/ktcutil.cma libs/.
@cp _build/src/ktcutil.cmxa libs/.
ktcoption:
@ocamlbuild -cflags '-w -a -thread' -no-hygiene -use-ocamlfind -pkgs 'cil,yojson,csv' -Is $(DIRS) ktcoptions.cma > log
@ocamlbuild -cflags '-w -a -thread' -no-hygiene -use-ocamlfind -pkgs 'cil,yojson,csv' -Is $(DIRS) ktcoptions.cmxa > log
@ocamlbuild -cflags '-w -a' -no-hygiene -use-ocamlfind -pkgs 'cil,yojson,csv' -Is $(DIRS) cilktc.cma > log
@ocamlbuild -cflags '-w -a -thread' -no-hygiene -use-ocamlfind -pkgs 'cil,yojson,csv' -Is $(DIRS) cilktc.cmxa
@rm -f bytes.ml
@cp _build/src/ktcoptions.cma libs/.
@cp _build/src/ktcoptions.cmxa libs/.
native:
@ocamlbuild -cflags '-w -a -thread' -no-hygiene -use-ocamlfind -pkgs 'cil,yojson,csv' -Is $(DIRS) main.native
@rm -f main.native
@cd bin; cp ../_build/src/main.native ktcexe
clean:
@rm -f -r libs
@rm -f -r _build
@rm -f bin/ktcexe
@rm -f bin/*.cil.c
@rm -f bin/*.i