.
[tatoo.git] / Makefile.in
1 CAMLP4FLAGS=@CAMLP4FLAGS@
2 PPOPTSFLAGS= $($CAMLP4FLAGS:%=ppopt(%))
3 OCAMLBUILDFLAGS=-j 0  -use-ocamlfind @OCAMLBUILDFLAGS@
4 OCAMLBUILD=@OCAMLBUILD@
5 PACKAGE = @PACKAGE_TARNAME@
6 NATIVE=$(PACKAGE).native
7 BYTE=$(PACKAGE).byte
8 TARGETS=$(NATIVE)
9
10 ifeq ($(BYTE), true)
11         TARGETS += $(BYTE)
12 endif
13
14 INLINE=@INLINE@
15 TAGS= -tag 'inline($(INLINE))'
16
17
18 .PHONY: clean distclean test test_byte test_native do_test all $(TARGETS)
19
20 all:
21         @
22
23 %:
24         @ $(OCAMLBUILD) $(OCAMLBUILDFLAGS) $(TAGS) $(PPOPTFLAGS:%=-tag %) $@
25
26 clean:
27         @ $(OCAMLBUILD) $(OCAMLBUILDFLAGS) -clean
28
29 distclean: clean
30         @ rm -rf configure config.log config.status autom4te.cache Makefile
31
32
33 test:
34         ${MAKE} test_native
35         ${MAKE} test_byte
36
37 test_native: PROG=$(NATIVE)
38 test_native: $(NATIVE) do_test
39
40 test_byte: PROG=$(BYTE)
41 test_byte: $(BYTE) do_test
42
43
44 do_test:
45                 for test in tests/test_*.sh ; \
46                 do \
47                         $${test} $(PROG) tests ; \
48                 done