X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Makefile.am;h=569d3504697206b477c785f0b7caa299dfc1f209;hb=385db03c92bcb0f161f810bb6335531cc2d14685;hp=9e02e880cd15eaf6a73125b4749be41e2d23905e;hpb=bbfe03c47f1d7f03c3e6c0cab9e4f500f588c80a;p=guestfs-browser.git diff --git a/Makefile.am b/Makefile.am index 9e02e88..569d350 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,37 +19,71 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = HACKING Throbber.png Throbber.gif -CLEANFILES = *.cmi *.cmo *.cmx *.o guestfs-browser throbber.ml +CLEANFILES = *.cmi *.cmo *.cmx *.o guestfs-browser SOURCES = \ + cmdline.mli \ + cmdline.ml \ + config.ml \ + filetree.mli \ + filetree.ml \ main.ml \ slave.mli \ slave.ml \ throbber.ml \ utils.mli \ - utils.ml + utils.ml \ + window.mli \ + window.ml OBJECTS = \ - main.cmx \ - slave.cmx \ throbber.cmx \ - utils.cmx + config.cmx \ + utils.cmx \ + slave.cmx \ + filetree.cmx \ + cmdline.cmx \ + window.cmx \ + main.cmx bin_SCRIPTS = guestfs-browser -OCAMLOPTFLAGS = \ +OCAMLCFLAGS = \ + -g \ -warn-error A \ -thread \ -package libvirt,guestfs,lablgtk2,extlib,xml-light,threads +OCAMLOPTFLAGS = $(OCAMLCFLAGS) + guestfs-browser: $(OBJECTS) - ocamlfind ocamlopt $(OCAMLOPTFLAGS) \ + $(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 \ + $(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 $@ + +depend: .depend + +.depend: $(wildcard *.mli) $(wildcard *.ml) + rm -f $@ $@-t + $(OCAMLFIND) ocamldep $^ > $@-t + mv $@-t $@ + +include .depend