2 # Copyright (C) 2007 Red Hat Inc., Richard W.M. Jones
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.
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.
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
20 -I$(shell ocamlc -where) \
26 OCAMLCPACKAGES := -package extlib,unix
28 OCAMLCLIBS := -linkpkg
30 OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
32 OCAMLOPTLIBS := $(OCAMLCLIBS)
35 export LD_LIBRARY_PATH=.
37 BYTE_TARGETS := libvirt.cma
38 OPT_TARGETS := libvirt.cmxa
44 libvirt.cma: libvirt_c.o libvirt.cmo libvirt_version.cmo
45 ocamlmklib -o mllibvirt $^ $(LDFLAGS) -lvirt
47 libvirt.cmxa: libvirt_c.o libvirt.cmx libvirt_version.cmx
48 ocamlmklib -o mllibvirt $^ $(LDFLAGS) -lvirt
50 libvirt.cmo: libvirt.cmi
51 libvirt.cmi: libvirt.mli
53 libvirt_version.cmo: libvirt_version.cmi
54 libvirt_version.cmi: libvirt_version.mli
57 ocamlfind install libvirt ../META *.so *.a *.cmx *.cma *.cmxa *.mli