1 # Mark objects as 'ancient' so they are taken out of the OCaml heap.
2 # $Id: Makefile,v 1.2 2006-09-27 12:09:02 rich Exp $
4 include Makefile.config
7 CFLAGS := -g -fPIC -Wall -Werror
14 OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
17 OCAMLDOCFLAGS := -html -stars -sort $(OCAMLCPACKAGES)
19 all: ancient.cma ancient.cmxa test_ancient.opt META
21 ancient.cma: ancient.cmo ancient_c.o
22 ocamlmklib -o ancient $^
24 ancient.cmxa: ancient.cmx ancient_c.o
25 ocamlmklib -o ancient $^
27 test_ancient.opt: ancient.cmxa test_ancient.cmx
28 LIBRARY_PATH=.:$$LIBRARY_PATH \
29 ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) -o $@ $^
31 # Common rules for building OCaml objects.
34 ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCINCS) $(OCAMLCPACKAGES) -c $<
36 ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCINCS) $(OCAMLCPACKAGES) -c $<
38 ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTINCS) $(OCAMLOPTPACKAGES) -c $<
42 META: META.in Makefile.config
43 $(SED) -e 's/@PACKAGE@/$(PACKAGE)/' \
44 -e 's/@VERSION@/$(VERSION)/' \
50 rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *~ core META *.opt
56 .depend: $(wildcard *.mli) $(wildcard *.ml)
60 ifeq ($(wildcard .depend),.depend)
67 rm -rf $(DESTDIR)$(OCAMLLIBDIR)/ancient
68 install -c -m 0755 -d $(DESTDIR)$(OCAMLLIBDIR)/weblogs
69 install -c -m 0644 *.cmi *.mli *.cma *.cmxa *.a META \
70 $(DESTDIR)$(OCAMLLIBDIR)/ancient
75 $(MAKE) check-manifest
76 rm -rf $(PACKAGE)-$(VERSION)
77 mkdir $(PACKAGE)-$(VERSION)
78 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
79 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
80 rm -rf $(PACKAGE)-$(VERSION)
81 ls -l $(PACKAGE)-$(VERSION).tar.gz
84 @for d in `find -type d -name CVS | grep -v '^\./debian/'`; \
87 awk -F/ '$$1 != "D" {print $$2}' $$d/Entries | \
88 sed -e "s|^|$$b|" -e "s|^\./||"; \
89 done | sort > .check-manifest; \
90 sort MANIFEST > .orig-manifest; \
91 diff -u .orig-manifest .check-manifest; rv=$$?; \
92 rm -f .orig-manifest .check-manifest; \
98 @if [ 0 != `cvs -q update | wc -l` ]; then \
99 echo Please commit all changes to CVS first.; \
105 cp $(PACKAGE)-$(VERSION).tar.gz \
106 /tmp/dbuild/$(PACKAGE)_$(VERSION).orig.tar.gz
107 export CVSROOT=`cat CVS/Root`; \
110 -d $(PACKAGE)-$(VERSION) \
111 -D now merjis/freeware/ancient
112 cd /tmp/dbuild/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot
113 rm -rf /tmp/dbuild/$(PACKAGE)-$(VERSION)
116 # Developer documentation (in html/ subdirectory).
121 -ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d html ancient.ml{i,}
123 .PHONY: depend dist check-manifest dpkg doc
125 .SUFFIXES: .cmo .cmi .cmx .ml .mli