1 #**************************************************************************
2 #* *
3 #* OCaml *
4 #* *
5 #* Xavier Clerc, SED, INRIA Rocquencourt *
6 #* *
7 #* Copyright 2010 Institut National de Recherche en Informatique et *
8 #* en Automatique. *
9 #* *
10 #* All rights reserved. This file is distributed under the terms of *
11 #* the GNU Lesser General Public License version 2.1, with the *
12 #* special exception on linking described in the file LICENSE. *
13 #* *
14 #**************************************************************************
15
16 TOPDIR = ../..
17 COMPFLAGS ?=
18 RUNTIME_VARIANT ?=
19
20 include $(TOPDIR)/Makefile.tools
21
22 libraries := testing.cmi testing.cma lib.cmo
23
24 # If the native compiler is enabled, then also compile testing.cmxa
25 ifeq "$(NATIVE_COMPILER)" "true"
26 libraries += testing.cmxa
27 endif
28
29 all: $(libraries)
30
31 testing.cma: testing.cmo
32 $(OCAMLC) -a -linkall -o $@ $<
33
34 testing.cmxa: testing.cmx
35 $(OCAMLOPT) -a -linkall -o $@ $<
36
37 testing.cmo : testing.cmi
38
39 %.cmi: %.mli
40 $(OCAMLC) -c $<
41
42 %.cmo: %.ml
43 $(OCAMLC) -c $<
44
45 %.cmx: %.ml
46 $(OCAMLOPT) -c $<
47
48 .PHONY: clean
49 clean:
50 rm -f *.cm* *.$(O) *.$(A)
51