3b9901a3c60626d8aa7e0c1467484f9168aaa5b5
[libguestfs.git] / ocaml / examples / Makefile.am
1 EXTRA_DIST = LICENSE README lvs.ml viewer.ml Throbber.png Throbber.gif
2
3 CLEANFILES = throbber.ml *.cmi *.cmo *.cmx *.o lvs
4
5 if HAVE_OCAML
6
7 noinst_SCRIPTS = lvs
8
9 OCAMLFINDFLAGS = -ccopt '-L $(top_builddir)/src/.libs'
10
11 lvs:    lvs.ml
12         $(OCAMLFIND) ocamlopt $(OCAMLFINDFLAGS) \
13           -warn-error A -I .. mlguestfs.cmxa $< -o $@
14
15 if BUILD_OCAML_VIEWER
16
17 noinst_SCRIPTS += viewer
18
19 viewer: throbber.ml xmllight_loader.mli xmllight_loader.ml viewer.ml
20         ocamlducefind opt $(OCAMLFINDFLAGS) \
21           -warn-error A \
22           -thread \
23           -package libvirt,lablgtk2,extlib,xml-light,ocamlduce,threads -I .. \
24           -predicates init,threads \
25           -linkpkg mlguestfs.cmxa gtkThread.cmx \
26           $^ -o $@
27
28 throbber.ml: Throbber.png Throbber.gif
29         gdk_pixbuf_mlsource --build-list \
30           static Throbber.png \
31           animation Throbber.gif \
32           > $@-t && mv $@-t $@
33
34 endif
35
36 endif