-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·59 lines (43 loc) · 1.1 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
OCAMLINIT_PATH = "/home/fica/.ocamlinit"
OCB_FLAGS = -use-ocamlfind -no-hygiene
OCB = ocamlbuild $(OCB_FLAGS)
clean:
$(OCB) -clean
rm -f .ocamlinit_tmp
benchmarks_msorts:
$(OCB) benchmarks_msorts.native
./benchmarks_msorts.native
test:
$(OCB) test.native
./test.native
%.native:
$(OCB) $@
%.byte:
$(OCB) $@
%.cmo:
$(OCB) $@
%.top: %.cmo
cat $(OCAMLINIT_PATH) > .ocamlinit_tmp
for file in $(shell find ./_build -type d); do \
echo "#directory \"$$file\";;" >> .ocamlinit_tmp;\
done
echo '#load_rec "$<";;' >> .ocamlinit_tmp
utop -init .ocamlinit_tmp
# %.top: %.byte
# find _build -regex .*cmo | sed 's/_build\///; s/.cmo//' > $(TARGET).mltop
# $(OCB_CORE) $(TARGET).top
# $(TARGET).top: $(TARGET).byte
# find _build -regex .*cmo | sed 's/_build\///; s/.cmo//' > $(TARGET).mltop
# $(OCB_CORE) $(TARGET).top
# .PHONY: all clean byte native profile debug test
# OCB_FLAGS = -use-ocamlfind -I src -I lib
# all: native byte # profile debug
#
# native:
# $(OCB) main.native
# byte:
# $(OCB) main.byte
# profile:
# $(OCB) -tag profile main.native
# debug:
# $(OCB) -tag debug main.byte