# Guestfs Browser. # Copyright (C) 2010 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ $(SOURCES) \ HACKING \ Throbber.png Throbber.gif \ .gitignore guestfs-browser.spec CLEANFILES = *.cmi *.cmo *.cmx *.o guestfs-browser # These are listed here in alphabetical order. SOURCES = \ config.mli \ config.ml \ deviceSet.mli \ deviceSet.ml \ filetree.mli \ filetree.ml \ main.ml \ slave.mli \ slave.ml \ throbber.ml \ utils.mli \ utils.ml \ window.mli \ window.ml # Note this list must be in dependency order. OBJECTS = \ config.cmx \ throbber.cmx \ utils.cmx \ deviceSet.cmx \ slave.cmx \ filetree.cmx \ window.cmx \ main.cmx bin_SCRIPTS = guestfs-browser OCAMLPACKAGES = libvirt,guestfs,lablgtk2,extlib,xml-light,threads OCAMLCFLAGS = \ -g \ -warn-error CDEFLMPSUVYZX \ -thread \ -package $(OCAMLPACKAGES) \ -predicates threads OCAMLOPTFLAGS = $(OCAMLCFLAGS) OCAMLDOCFLAGS = \ -package $(OCAMLPACKAGES) \ -predicates threads \ -I +threads \ -sort -html guestfs-browser: $(OBJECTS) $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \ -predicates init,threads \ -linkpkg gtkThread.cmx \ $^ -o $@ # This file is built. However gdk_pixbuf_mlsource requires X11 to # run, which prevents this from being built in places where an X # display is not available, such as on automated builders. So we'll # bundle this file in with the tarball anyway. throbber.ml: Throbber.png Throbber.gif $(GDK_PIXBUF_MLSOURCE) --build-list \ static Throbber.png \ animation Throbber.gif \ > $@-t && mv $@-t $@ .mli.cmi: $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@ .ml.cmo: $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@ .ml.cmx: $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@ # Convert internal documentation to HTML. docs: rm -rf doc mkdir -p doc $(OCAMLFIND) ocamldoc -d doc $(OCAMLDOCFLAGS) $(SOURCES) # Dependencies. depend: .depend .depend: $(wildcard *.mli) $(wildcard *.ml) rm -f $@ $@-t $(OCAMLFIND) ocamldep $^ > $@-t mv $@-t $@ include .depend .PHONY: depend docs