Deprecate ChangeLog file.
[ocaml-libvirt.git] / examples / 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 OCAMLFIND       = @OCAMLFIND@
19
20 OCAMLCPACKAGES  := -package unix -I ../libvirt
21 OCAMLCFLAGS     := -g
22 OCAMLCLIBS      := -linkpkg
23 OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
24 OCAMLOPTFLAGS   :=
25 OCAMLOPTLIBS    := $(OCAMLCLIBS)
26
27 export LIBRARY_PATH=../libvirt
28 export LD_LIBRARY_PATH=../libvirt
29
30 BYTE_TARGETS    := list_domains node_info
31 OPT_TARGETS     := $(BYTE_TARGETS:%=%.opt)
32
33 all: $(BYTE_TARGETS)
34
35 opt: $(OPT_TARGETS)
36
37 list_domains: list_domains.cmo
38         $(OCAMLFIND) ocamlc \
39           $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) \
40           ../libvirt/mllibvirt.cma -o $@ $<
41
42 list_domains.opt: list_domains.cmx
43         $(OCAMLFIND) ocamlopt \
44           $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \
45           ../libvirt/mllibvirt.cmxa -o $@ $<
46
47 node_info: node_info.cmo
48         $(OCAMLFIND) ocamlc \
49           $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) \
50           ../libvirt/mllibvirt.cma -o $@ $<
51
52 node_info.opt: node_info.cmx
53         $(OCAMLFIND) ocamlopt \
54           $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \
55           ../libvirt/mllibvirt.cmxa -o $@ $<
56
57 install:
58
59 include ../Make.rules