# Mark objects as 'ancient' so they are taken out of the OCaml heap.
-# $Id: Makefile,v 1.4 2006-09-27 14:05:07 rich Exp $
+# $Id: Makefile,v 1.5 2006-09-27 15:36:18 rich Exp $
include Makefile.config
OCAMLOPTLIBS := -linkpkg weblogs.cmxa
endif
-TARGETS := ancient.cma ancient.cmxa META test_ancient.opt
+TARGETS := mmalloc ancient.cma ancient.cmxa META test_ancient.opt
ifeq ($(TEST_WEBLOGS),1)
TARGETS += test_ancient_weblogs.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) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) -o $@ $^
endif
+# Build the mmalloc library.
+
+mmalloc:
+ $(MAKE) -C mmalloc
+
# Common rules for building OCaml objects.
.mli.cmi:
clean:
rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *~ core META *.opt
+ $(MAKE) -C mmalloc clean
# Dependencies.
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