X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Makefile;h=538aee3b37c3e53ef133024ea6912859d0eeb313;hb=65cb807751c21e0befcfd89c1b605675dc280395;hp=24a0ce90710e0381d73de79e8a01c198d336e3a2;hpb=773470c05431f3f5b5c80e9ef1be2d8ce4bb6cd0;p=ocaml-ancient.git diff --git a/Makefile b/Makefile index 24a0ce9..538aee3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Mark objects as 'ancient' so they are taken out of the OCaml heap. -# $Id: Makefile,v 1.2 2006-09-27 12:09:02 rich Exp $ +# $Id: Makefile,v 1.7 2006-10-06 12:26:31 rich Exp $ include Makefile.config @@ -16,17 +16,29 @@ OCAMLOPTLIBS := OCAMLDOCFLAGS := -html -stars -sort $(OCAMLCPACKAGES) -all: ancient.cma ancient.cmxa test_ancient.opt META +TARGETS := mmalloc ancient.cma ancient.cmxa META \ + test_ancient.opt test_ancient_shared.opt + +all: $(TARGETS) ancient.cma: ancient.cmo ancient_c.o - ocamlmklib -o ancient $^ + ocamlmklib -o ancient -Lmmalloc -lmmalloc $^ ancient.cmxa: ancient.cmx ancient_c.o - ocamlmklib -o ancient $^ + ocamlmklib -o ancient -Lmmalloc -lmmalloc $^ test_ancient.opt: ancient.cmxa test_ancient.cmx LIBRARY_PATH=.:$$LIBRARY_PATH \ - ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) -o $@ $^ + ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) -o $@ $^ + +test_ancient_shared.opt: ancient.cmxa test_ancient_shared.cmx + LIBRARY_PATH=.:$$LIBRARY_PATH \ + ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) -o $@ $^ + +# Build the mmalloc library. + +mmalloc: + $(MAKE) -C mmalloc # Common rules for building OCaml objects. @@ -40,14 +52,15 @@ test_ancient.opt: ancient.cmxa test_ancient.cmx # Findlib META file. META: META.in Makefile.config - $(SED) -e 's/@PACKAGE@/$(PACKAGE)/' \ - -e 's/@VERSION@/$(VERSION)/' \ - < $< > $@ + sed -e 's/@PACKAGE@/$(PACKAGE)/' \ + -e 's/@VERSION@/$(VERSION)/' \ + < $< > $@ # Clean. clean: rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *~ core META *.opt + $(MAKE) -C mmalloc clean # Dependencies. @@ -65,7 +78,7 @@ endif install: rm -rf $(DESTDIR)$(OCAMLLIBDIR)/ancient - install -c -m 0755 -d $(DESTDIR)$(OCAMLLIBDIR)/weblogs + install -c -m 0755 -d $(DESTDIR)$(OCAMLLIBDIR)/ancient install -c -m 0644 *.cmi *.mli *.cma *.cmxa *.a META \ $(DESTDIR)$(OCAMLLIBDIR)/ancient @@ -120,6 +133,6 @@ doc: mkdir html -ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d html ancient.ml{i,} -.PHONY: depend dist check-manifest dpkg doc +.PHONY: depend dist check-manifest dpkg doc mmalloc .SUFFIXES: .cmo .cmi .cmx .ml .mli