1 # Mark objects as 'ancient' so they are taken out of the OCaml heap.
2 # $Id: Makefile,v 1.1 2006-09-27 12:07:07 rich Exp $
5 CFLAGS := -g -fPIC -Wall -Werror
12 OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
15 OCAMLDOCFLAGS := -html -stars -sort $(OCAMLCPACKAGES)
17 all: ancient.cma ancient.cmxa test_ancient.opt META
19 ancient.cma: ancient.cmo ancient_c.o
20 ocamlmklib -o ancient $^
22 ancient.cmxa: ancient.cmx ancient_c.o
23 ocamlmklib -o ancient $^
25 test_ancient.opt: ancient.cmxa test_ancient.cmx
26 LIBRARY_PATH=.:$$LIBRARY_PATH \
27 ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTLIBS) -o $@ $^
29 # Common rules for building OCaml objects.
32 ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCINCS) $(OCAMLCPACKAGES) -c $<
34 ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCINCS) $(OCAMLCPACKAGES) -c $<
36 ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTINCS) $(OCAMLOPTPACKAGES) -c $<
40 META: META.in Makefile.config
41 $(SED) -e 's/@PACKAGE@/$(PACKAGE)/' \
42 -e 's/@VERSION@/$(VERSION)/' \
48 rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *~ core META *.opt
54 .depend: $(wildcard *.mli) $(wildcard *.ml)
58 ifeq ($(wildcard .depend),.depend)
65 rm -rf $(DESTDIR)$(OCAMLLIBDIR)/ancient
66 install -c -m 0755 -d $(DESTDIR)$(OCAMLLIBDIR)/weblogs
67 install -c -m 0644 *.cmi *.mli *.cma *.cmxa *.a META \
68 $(DESTDIR)$(OCAMLLIBDIR)/ancient
73 $(MAKE) check-manifest
74 rm -rf $(PACKAGE)-$(VERSION)
75 mkdir $(PACKAGE)-$(VERSION)
76 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
77 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
78 rm -rf $(PACKAGE)-$(VERSION)
79 ls -l $(PACKAGE)-$(VERSION).tar.gz
82 @for d in `find -type d -name CVS | grep -v '^\./debian/'`; \
85 awk -F/ '$$1 != "D" {print $$2}' $$d/Entries | \
86 sed -e "s|^|$$b|" -e "s|^\./||"; \
87 done | sort > .check-manifest; \
88 sort MANIFEST > .orig-manifest; \
89 diff -u .orig-manifest .check-manifest; rv=$$?; \
90 rm -f .orig-manifest .check-manifest; \
96 @if [ 0 != `cvs -q update | wc -l` ]; then \
97 echo Please commit all changes to CVS first.; \
103 cp $(PACKAGE)-$(VERSION).tar.gz \
104 /tmp/dbuild/$(PACKAGE)_$(VERSION).orig.tar.gz
105 export CVSROOT=`cat CVS/Root`; \
108 -d $(PACKAGE)-$(VERSION) \
109 -D now merjis/freeware/ancient
110 cd /tmp/dbuild/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot
111 rm -rf /tmp/dbuild/$(PACKAGE)-$(VERSION)
114 # Developer documentation (in html/ subdirectory).
119 -ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d html ancient.ml{i,}
121 .PHONY: depend dist check-manifest dpkg doc
123 .SUFFIXES: .cmo .cmi .cmx .ml .mli