summaryrefslogtreecommitdiffstats
path: root/ocaml/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml/Makefile.am')
-rw-r--r--ocaml/Makefile.am22
1 files changed, 11 insertions, 11 deletions
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index 5813f84b..7028fa4a 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -53,16 +53,16 @@ mlguestfs.cmxa: $(XOBJS)
$(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
@@ -122,14 +122,14 @@ t/guestfs_070_threads.cmx: t/guestfs_070_threads.ml mlguestfs.cmxa
$(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