if HAVE_OCAML
-generator: $(OBJECTS)
- $(OCAMLC) -o generator $(OCAMLCFLAGS) $(OCAMLCLIBS) $(OBJECTS)
+$(srcdir)/generator: $(OBJECTS)
+ $(OCAMLC) -I $(srcdir) -o $@ $(OCAMLCFLAGS) $(OCAMLCLIBS) $(OBJECTS)
.ml.cmo:
- $(OCAMLC) $(OCAMLCFLAGS) -c $< -o $@
+ $(OCAMLC) -I $(srcdir) $(OCAMLCFLAGS) -c $< -o $@
.mli.cmi:
- $(OCAMLC) $(OCAMLCFLAGS) -c $< -o $@
+ $(OCAMLC) -I $(srcdir) $(OCAMLCFLAGS) -c $< -o $@
depend: .depend
$(OCAMLMKLIB) -o mlguestfs $^ -L$(top_builddir)/src/.libs -lguestfs
guestfs_c.o: guestfs_c.c
- $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $<
+ $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $(srcdir)/$<
guestfs_c_actions.o: guestfs_c_actions.c
- $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $<
+ $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $(srcdir)/$<
if HAVE_OCAMLDOC
noinst_DATA += html/index.html
-html/index.html: guestfs*.mli guestfs*.ml
+html/index.html: $(srcdir)/guestfs*.mli $(srcdir)/guestfs*.ml
mkdir -p html
-$(OCAMLDOC) -d html -html $^
endif
$(OCAMLFIND) ocamlopt -package unix,threads -thread -linkpkg -c $< -o $@
t/%.cmx: t/%.ml mlguestfs.cmxa
- $(OCAMLFIND) ocamlopt -package unix -linkpkg -c $< -o $@
-
-.mli.cmi:
- $(OCAMLFIND) ocamlc -package unix -c $< -o $@
-.ml.cmo:
- $(OCAMLFIND) ocamlc -package unix -c $< -o $@
-.ml.cmx:
- $(OCAMLFIND) ocamlopt -package unix -c $< -o $@
+ $(OCAMLFIND) ocamlopt -package unix -linkpkg -c $< -o $(builddir)/$@
+
+%.cmi: %.mli
+ $(OCAMLFIND) ocamlc -package unix -c $< -o $(builddir)/$@
+%.cmo: %.ml
+ $(OCAMLFIND) ocamlc -package unix -c $< -o $(builddir)/$@
+%.cmx: %.ml
+ $(OCAMLFIND) ocamlopt -package unix -c $< -o $(builddir)/$@
depend: .depend