Added GNU GPL/LGPL copyright notices everywhere.
[virt-top.git] / libvirt / Makefile.in
1 # ocaml-libvirt
2 # Copyright (C) 2007 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 CFLAGS          := @CFLAGS@ \
19                    -I.. \
20                    -I$(shell ocamlc -where) \
21                    -Wall -Werror \
22                    -fPIC \
23                    -g
24 LDFLAGS         := @LDFLAGS@
25
26 OCAMLCPACKAGES  := -package extlib,unix
27 OCAMLCFLAGS     := -g
28 OCAMLCLIBS      := -linkpkg
29
30 OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
31 OCAMLOPTFLAGS   :=
32 OCAMLOPTLIBS    := $(OCAMLCLIBS)
33
34 export LIBRARY_PATH=.
35 export LD_LIBRARY_PATH=.
36
37 BYTE_TARGETS    := libvirt.cma
38 OPT_TARGETS     := libvirt.cmxa
39
40 all: $(BYTE_TARGETS)
41
42 opt: $(OPT_TARGETS)
43
44 libvirt.cma: libvirt_c.o libvirt.cmo libvirt_version.cmo
45         ocamlmklib -o mllibvirt $^ $(LDFLAGS) -lvirt
46
47 libvirt.cmxa: libvirt_c.o libvirt.cmx libvirt_version.cmx
48         ocamlmklib -o mllibvirt $^ $(LDFLAGS) -lvirt
49
50 libvirt.cmo: libvirt.cmi
51 libvirt.cmi: libvirt.mli
52
53 libvirt_version.cmo: libvirt_version.cmi
54 libvirt_version.cmi: libvirt_version.mli
55
56 install:
57         ocamlfind install libvirt ../META *.so *.a *.cmx *.cma *.cmxa *.mli
58
59 include ../Make.rules