X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=ocaml%2Fexamples%2FMakefile.am;h=e38a5c8d6a62e03f6c6306c3f5fc1555b716e3fc;hp=48191e78d41521683690384a96d6851aa7de6b57;hb=d1485e02f538d50fd7d4790fb63317093ba8c6bf;hpb=bf26360e5e91148a4479f812c2b43acce4f5884e diff --git a/ocaml/examples/Makefile.am b/ocaml/examples/Makefile.am index 48191e7..e38a5c8 100644 --- a/ocaml/examples/Makefile.am +++ b/ocaml/examples/Makefile.am @@ -1,10 +1,40 @@ -EXTRA_DIST = LICENSE README lvs.ml +EXTRA_DIST = \ + LICENSE README \ + lvs.ml \ + viewer.ml xmllight_loader.ml xmllight_loader.mli \ + Throbber.png Throbber.gif + +CLEANFILES = throbber.ml *.cmi *.cmo *.cmx *.o lvs if HAVE_OCAML +noinst_SCRIPTS = lvs + +OCAMLFINDFLAGS = -cclib -L$(top_builddir)/src/.libs + lvs: lvs.ml - $(OCAMLFIND) ocamlopt -I .. mlguestfs.cmxa $< -o $@ + $(OCAMLFIND) ocamlopt $(OCAMLFINDFLAGS) \ + -warn-error A -I .. mlguestfs.cmxa $< -o $@ + +if BUILD_OCAML_VIEWER + +noinst_SCRIPTS += viewer + +viewer: throbber.ml xmllight_loader.mli xmllight_loader.ml viewer.ml + ocamlducefind opt $(OCAMLFINDFLAGS) \ + -warn-error A \ + -thread \ + -package libvirt,lablgtk2,extlib,xml-light,ocamlduce,threads -I .. \ + -predicates init,threads \ + -linkpkg mlguestfs.cmxa gtkThread.cmx \ + $^ -o $@ + +throbber.ml: Throbber.png Throbber.gif + gdk_pixbuf_mlsource --build-list \ + static Throbber.png \ + animation Throbber.gif \ + > $@-t && mv $@-t $@ -CLEANFILES = *.cmi *.cmo *.cmx *.o *~ lvs +endif -endif \ No newline at end of file +endif