2 # Copyright (C) 2010 Red Hat Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program 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
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along
15 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 ACLOCAL_AMFLAGS = -I m4
23 Throbber.png Throbber.gif \
24 .gitignore guestfs-browser.spec \
29 CLEANFILES = *.cmi *.cmo *.cmx *.o guestfs-browser
31 # These are listed here in alphabetical order.
54 # Note this list must be in dependency order.
68 bin_SCRIPTS = guestfs-browser
70 OCAMLPACKAGES = libvirt,guestfs,lablgtk2,extlib,xml-light,threads
73 -warn-error CDEFLMPSUVYZX \
75 -package $(OCAMLPACKAGES) \
77 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
79 -package $(OCAMLPACKAGES) \
84 guestfs-browser: $(OBJECTS)
85 $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
86 -predicates init,threads \
87 -linkpkg gtkThread.cmx \
90 # This file is built. However gdk_pixbuf_mlsource requires X11 to
91 # run, which prevents this from being built in places where an X
92 # display is not available, such as on automated builders. So we'll
93 # bundle this file in with the tarball anyway.
94 throbber.ml: Throbber.png Throbber.gif
95 $(GDK_PIXBUF_MLSOURCE) --build-list \
97 animation Throbber.gif \
101 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
103 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
105 $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@
108 man_MANS = guestfs-browser.1
112 guestfs-browser.1: guestfs-browser.pod
115 -c "Virtualization Support" \
116 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
120 html/guestfs-browser.1.html
122 html/guestfs-browser.1.html: guestfs-browser.pod
127 --outfile html/guestfs-browser.1.html \
132 # Maintainer website update.
134 html/guestfs-browser.1.html
136 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
138 website: $(HTMLFILES)
139 cp $(HTMLFILES) $(WEBSITEDIR)
141 CLEANFILES += $(HTMLFILES) pod2*.tmp
143 # Convert internal documentation to HTML.
147 $(OCAMLFIND) ocamldoc -d doc $(OCAMLDOCFLAGS) $(SOURCES)
152 .depend: $(wildcard *.mli) $(wildcard *.ml)
154 $(OCAMLFIND) ocamldep $^ | \
155 $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \