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
26 CLEANFILES = *.cmi *.cmo *.cmx *.o guestfs-browser
54 bin_SCRIPTS = guestfs-browser
56 OCAMLPACKAGES = libvirt,guestfs,lablgtk2,extlib,xml-light,threads
61 -package $(OCAMLPACKAGES) \
63 OCAMLOPTFLAGS = $(OCAMLCFLAGS)
65 -package $(OCAMLPACKAGES) \
70 guestfs-browser: $(OBJECTS)
71 $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
72 -predicates init,threads \
73 -linkpkg gtkThread.cmx \
76 # This file is built. However gdk_pixbuf_mlsource requires X11 to
77 # run, which prevents this from being built in places where an X
78 # display is not available, such as on automated builders. So we'll
79 # bundle this file in with the tarball anyway.
80 throbber.ml: Throbber.png Throbber.gif
81 $(GDK_PIXBUF_MLSOURCE) --build-list \
83 animation Throbber.gif \
87 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
89 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
91 $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@
93 # Convert internal documentation to HTML.
97 $(OCAMLFIND) ocamldoc -d doc $(OCAMLDOCFLAGS) $(SOURCES)
102 .depend: $(wildcard *.mli) $(wildcard *.ml)
104 $(OCAMLFIND) ocamldep $^ > $@-t