Debian Codegraph @

examples/03-packages/Makefile

raw
1 #
2 # Pure OCaml, package from Opam, two directories
3 #
4
5 # - The -I flag introduces sub-directories
6 # - -use-ocamlfind is required to find packages (from Opam)
7 # - _tags file introduces packages, bin_annot flag for tool chain
8
9 .PHONY: all clean byte native profile debug sanity test
10
11 OCB_FLAGS = -use-ocamlfind -I src -I lib
12 OCB = ocamlbuild $(OCB_FLAGS)
13
14 all: native byte # profile debug
15
16 clean:
17 $(OCB) -clean
18
19 native: sanity
20 $(OCB) main.native
21
22 byte: sanity
23 $(OCB) main.byte
24
25 profile: sanity
26 $(OCB) -tag profile main.native
27
28 debug: sanity
29 $(OCB) -tag debug main.byte
30
31 # check that packages can be found
32 sanity:
33 ocamlfind query yojson
34
35 test: native
36 echo '[1, 2, "three", {"four": 4}]' | ./main.native