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_file_properties.mli \
73 op_file_properties.ml \
74 op_inspection_dialog.mli \
75 op_inspection_dialog.ml \
93 # Note this list must be in dependency order.
103 filetree_markup.cmo \
105 op_checksum_file.cmo \
106 op_copy_regvalue.cmo \
108 op_download_as_reg.cmo \
109 op_download_dir_find0.cmo \
110 op_download_dir_tarball.cmo \
111 op_download_file.cmo \
112 op_file_information.cmo \
113 op_file_properties.cmo \
114 op_inspection_dialog.cmo \
122 XOBJECTS = $(OBJECTS:.cmo=.cmx)
124 bin_SCRIPTS = guestfs-browser
127 -package libvirt,guestfs,hivex,lablgtk2,extlib,xml-light,calendar,camomile,threads,bitstring,bitstring.syntax -syntax bitstring
130 -warn-error CDEFLMPSUVYZX \
139 -predicates threads \
144 guestfs-browser: $(XOBJECTS)
145 $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
146 -predicates init,threads \
147 -linkpkg gtkThread.cmx \
150 guestfs-browser: $(OBJECTS)
151 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
152 -predicates init,threads \
153 -linkpkg gtkThread.cmo \
157 # This file is built. However gdk_pixbuf_mlsource requires X11 to
158 # run, which prevents this from being built in places where an X
159 # display is not available, such as on automated builders. So we'll
160 # bundle this file in with the tarball anyway.
161 throbber.ml: Throbber.png Throbber.gif
162 $(GDK_PIXBUF_MLSOURCE) --build-list \
163 static Throbber.png \
164 animation Throbber.gif \
168 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
170 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
172 $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@
175 icondir = $(datadir)/$(PACKAGE_NAME)/pixmaps
176 icon_DATA = guestfs-browser.svg guestfs-browser-large.png guestfs-browser.png
179 desktopdir = $(datadir)/applications
180 desktop_DATA = guestfs-browser.desktop
182 guestfs-browser.desktop: guestfs-browser.desktop.in Makefile
183 $(SED) "s,\@icondir\@,$(icondir),g" < $< > $@-t
186 TESTS += test-desktop-file-validate.sh
188 # Config. Can't use autoconf to build this because we want
189 # to embed the true icondir path.
190 config.ml: config.ml.in Makefile
193 -e "s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),g" \
194 -e "s,\@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g" \
195 -e "s,\@HIVEXREGEDIT\@,$(HIVEXREGEDIT),g" \
196 -e "s,\@OPENER\@,$(OPENER),g" \
197 -e "s,\@icondir\@,$(icondir),g" \
202 man_MANS = guestfs-browser.1
206 guestfs-browser.1: guestfs-browser.pod
209 -c "Virtualization Support" \
210 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
214 html/guestfs-browser.1.html
216 html/guestfs-browser.1.html: guestfs-browser.pod
221 --outfile html/guestfs-browser.1.html \
226 # Maintainer website update.
228 html/guestfs-browser.1.html
230 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
232 website: $(HTMLFILES)
233 cp $(HTMLFILES) $(WEBSITEDIR)
235 CLEANFILES += $(HTMLFILES) pod2*.tmp
237 # Convert internal documentation to HTML.
241 $(OCAMLFIND) ocamldoc -d doc $(OCAMLDOCFLAGS) $(SOURCES)
246 .depend: $(wildcard *.mli) $(wildcard *.ml)
247 $(OCAMLFIND) ocamldep $(OCAMLPACKAGES) $^ | \
248 $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \