Fix executable permissions added by Windoze.
[virt-top.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 ifneq ($(OCAMLFIND),)
21 OCAMLCPACKAGES  := -package unix -I ../libvirt
22 OCAMLCFLAGS     := -g
23 OCAMLCLIBS      := -linkpkg
24 OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
25 OCAMLOPTFLAGS   :=
26 OCAMLOPTLIBS    := $(OCAMLCLIBS)
27 else
28 OCAMLCINCS      := -I ../libvirt
29 OCAMLCFLAGS     := -g
30 OCAMLCLIBS      := unix.cma
31 OCAMLOPTINCS    := $(OCAMLCINCS)
32 OCAMLOPTFLAGS   :=
33 OCAMLOPTLIBS    := unix.cmxa
34 endif
35
36 export LIBRARY_PATH=../libvirt
37 export LD_LIBRARY_PATH=../libvirt
38
39 BYTE_TARGETS    := list_domains
40 OPT_TARGETS     := list_domains.opt
41
42 all: $(BYTE_TARGETS)
43
44 opt: $(OPT_TARGETS)
45
46 ifneq ($(OCAMLFIND),)
47 list_domains: list_domains.cmo
48         $(OCAMLFIND) ocamlc \
49           $(OCAMLCPACKAGES) $(OCAMLCFLAGS) $(OCAMLCLIBS) \
50           ../libvirt/mllibvirt.cma -o $@ $<
51
52 list_domains.opt: list_domains.cmx
53         $(OCAMLFIND) ocamlopt \
54           $(OCAMLOPTPACKAGES) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \
55           ../libvirt/mllibvirt.cmxa -o $@ $<
56 else
57 list_domains: list_domains.cmo
58         $(OCAMLC) \
59           $(OCAMLCINCS) $(OCAMLCFLAGS) $(OCAMLCLIBS) \
60           ../libvirt/mllibvirt.cma -o $@ $<
61
62 list_domains.opt: list_domains.cmx
63         $(OCAMLOPT) \
64           $(OCAMLOPTINCS) $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) \
65           ../libvirt/mllibvirt.cmxa -o $@ $<
66 endif
67
68 install:
69
70 include ../Make.rules