File: Makefile

package info (click to toggle)
ocamlbuild 0.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,832 kB
  • sloc: ml: 9,087; makefile: 521; sh: 187
file content (40 lines) | stat: -rw-r--r-- 723 bytes parent folder | download | duplicates (4)
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
#
# Pure OCaml, package from Opam, two directories
#

# - The -I flag introduces sub-directories
# - -use-ocamlfind is required to find packages (from Opam)
# - _tags file introduces packages, bin_annot

.PHONY: all clean byte native profile debug lib sanity test

OCB_FLAGS = -use-ocamlfind -I src -I libdemo
OCB = ocamlbuild $(OCB_FLAGS)

all: native byte lib # profile debug

clean:
	$(OCB) -clean

lib:
	$(OCB) libdemo.cma
	$(OCB) libdemo.cmxa
	$(OCB) libdemo.cmxs

native: sanity
	$(OCB) main.native

byte: sanity
	$(OCB) main.byte

profile: sanity
	$(OCB) -tag profile main.native

debug: sanity
	$(OCB) -tag debug main.byte

sanity:
	ocamlfind query yojson
			
test: native
	echo '{"hello": "json"}' | ./main.native