Started to copy the import tool from libunbin.
[ocaml-bitstring.git] / cil-tools / Makefile.in
1 # Bitmatch syntax extension.
2 # Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
17 #
18 # $Id: Makefile.in 81 2008-05-21 09:59:21Z richard.wm.jones $
19
20 PACKAGE         = @PACKAGE_NAME@
21 VERSION         = @PACKAGE_VERSION@
22
23 OCAMLFIND       = @OCAMLFIND@
24 OCAMLMKLIB      = @OCAMLMKLIB@
25 OCAMLDOC        = @OCAMLDOC@
26 INSTALL         = @INSTALL@
27
28 OCAMLCFLAGS     = -g
29 OCAMLCPACKAGES  = -package unix,str,extlib,cil -I ..
30 OCAMLCLIBS      = $(OCAMLCPACKAGES) -linkpkg ../bitmatch.cma
31 OCAMLOPTFLAGS   =
32 OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
33 OCAMLOPTLIBS    = $(OCAMLOPTPACKAGES) -linkpkg ../bitmatch.cmxa
34
35 OCAMLDOCFLAGS   = -html -sort
36
37 all:            bitmatch-import-c bitmatch-import-c.opt
38
39 bitmatch-import-c: bitmatch_import_c.cmo
40         $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCLIBS) $< -o $@
41
42 bitmatch-import-c.opt: bitmatch_import_c.cmx
43         $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) $< -o $@
44
45 test:
46
47 examples:
48
49 # Clean.
50
51 clean:
52         rm -f core *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o
53
54 distclean: clean
55
56 # Install.
57
58 install:
59
60 # Standard rules.
61
62 .mli.cmi:
63         $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
64 .ml.cmo:
65         $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
66 .ml.cmx:
67         $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) -c $<
68
69 depend: .depend
70
71 .depend: $(wildcard *.ml) $(wildcard *.mli)
72         rm -f .depend
73         $(OCAMLFIND) ocamldep $(OCAMLCPACKAGES) $^ > $@
74
75 ifeq ($(wildcard .depend),.depend)
76 include .depend
77 endif
78
79 .PHONY: depend dist check-manifest dpkg doc \
80         print-examples print-tests examples test
81
82 .SUFFIXES:      .cmo .cmi .cmx .ml .mli .mll