2 # Copyright (C) 2010-2011 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 \
27 guestfs-browser.desktop.in \
29 guestfs-browser-large.png \
31 test-desktop-file-validate.sh \
34 CLEANFILES = *.cmi *.cmo *.cmx *.cmxa *.o guestfs-browser *~
38 # These are listed here in alphabetical order.
56 op_checksum_file.mli \
58 op_copy_regvalue.mli \
62 op_download_as_reg.mli \
63 op_download_as_reg.ml \
64 op_download_dir_find0.mli \
65 op_download_dir_find0.ml \
66 op_download_dir_tarball.mli \
67 op_download_dir_tarball.ml \
68 op_download_file.mli \
70 op_file_information.mli \
71 op_file_information.ml \
72 op_inspection_dialog.mli \
73 op_inspection_dialog.ml \
91 # Note this list must be in dependency order.
101 filetree_markup.cmo \
103 op_checksum_file.cmo \
104 op_copy_regvalue.cmo \
106 op_download_as_reg.cmo \
107 op_download_dir_find0.cmo \
108 op_download_dir_tarball.cmo \
109 op_download_file.cmo \
110 op_file_information.cmo \
111 op_inspection_dialog.cmo \
119 XOBJECTS = $(OBJECTS:.cmo=.cmx)
121 bin_SCRIPTS = guestfs-browser
124 -package libvirt,guestfs,hivex,lablgtk2,extlib,xml-light,calendar,camomile,threads,bitstring,bitstring.syntax -syntax bitstring
127 -warn-error CDEFLMPSUVYZX \
136 -predicates threads \
141 guestfs-browser: $(XOBJECTS)
142 $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
143 -predicates init,threads \
144 -linkpkg gtkThread.cmx \
147 guestfs-browser: $(OBJECTS)
148 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
149 -predicates init,threads \
150 -linkpkg gtkThread.cmo \
154 # This file is built. However gdk_pixbuf_mlsource requires X11 to
155 # run, which prevents this from being built in places where an X
156 # display is not available, such as on automated builders. So we'll
157 # bundle this file in with the tarball anyway.
158 throbber.ml: Throbber.png Throbber.gif
159 $(GDK_PIXBUF_MLSOURCE) --build-list \
160 static Throbber.png \
161 animation Throbber.gif \
165 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
167 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
169 $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@
172 icondir = $(datadir)/$(PACKAGE_NAME)/pixmaps
173 icon_DATA = guestfs-browser.svg guestfs-browser-large.png guestfs-browser.png
176 desktopdir = $(datadir)/applications
177 desktop_DATA = guestfs-browser.desktop
179 guestfs-browser.desktop: guestfs-browser.desktop.in Makefile
180 $(SED) "s,\@icondir\@,$(icondir),g" < $< > $@-t
183 TESTS += test-desktop-file-validate.sh
185 # Config. Can't use autoconf to build this because we want
186 # to embed the true icondir path.
187 config.ml: config.ml.in Makefile
190 -e "s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),g" \
191 -e "s,\@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g" \
192 -e "s,\@HIVEXREGEDIT\@,$(HIVEXREGEDIT),g" \
193 -e "s,\@OPENER\@,$(OPENER),g" \
194 -e "s,\@icondir\@,$(icondir),g" \
199 man_MANS = guestfs-browser.1
203 guestfs-browser.1: guestfs-browser.pod
206 -c "Virtualization Support" \
207 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
211 html/guestfs-browser.1.html
213 html/guestfs-browser.1.html: guestfs-browser.pod
218 --outfile html/guestfs-browser.1.html \
223 # Maintainer website update.
225 html/guestfs-browser.1.html
227 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
229 website: $(HTMLFILES)
230 cp $(HTMLFILES) $(WEBSITEDIR)
232 CLEANFILES += $(HTMLFILES) pod2*.tmp
234 # Convert internal documentation to HTML.
238 $(OCAMLFIND) ocamldoc -d doc $(OCAMLDOCFLAGS) $(SOURCES)
243 .depend: $(wildcard *.mli) $(wildcard *.ml)
244 $(OCAMLFIND) ocamldep $(OCAMLPACKAGES) $^ | \
245 $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \