Remove CVS $Id$ strings.
[ocaml-ancient.git] / Makefile
index 3619f01..32417dd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,35 +1,27 @@
 # Mark objects as 'ancient' so they are taken out of the OCaml heap.
-# $Id: Makefile,v 1.6 2006-09-27 16:01:47 rich Exp $
 
 include Makefile.config
 
 CC     := gcc
-CFLAGS := -g -fPIC -Wall -Werror
+CFLAGS := -g -fPIC -Wall -Werror \
+       -DOCAML_VERSION_MAJOR=$(OCAML_VERSION_MAJOR) \
+       -DOCAML_VERSION_MINOR=$(OCAML_VERSION_MINOR) \
+       -I$(shell ocamlc -where)
 
 OCAMLCFLAGS    := -g
-OCAMLCPACKAGES := 
-OCAMLCLIBS     := 
+OCAMLCPACKAGES := -package unix
+OCAMLCLIBS     := -linkpkg
 
 OCAMLOPTFLAGS  :=
 OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
-OCAMLOPTLIBS   := 
+OCAMLOPTLIBS   := -linkpkg
 
 OCAMLDOCFLAGS := -html -stars -sort $(OCAMLCPACKAGES)
 
-ifeq ($(TEST_WEBLOGS),1)
-# For testing with large amount of weblogs data.
-OCAMLCPACKAGES := -package calendar,pcre,extlib -I ../../freeware/weblogs
-OCAMLCLIBS     := -linkpkg weblogs.cma
-OCAMLOPTPACKAGES  := $(OCAMLCPACKAGES)
-OCAMLOPTLIBS   := -linkpkg weblogs.cmxa
-endif
-
 TARGETS                := mmalloc ancient.cma ancient.cmxa META \
-                  test_ancient.opt test_ancient_shared.opt
-
-ifeq ($(TEST_WEBLOGS),1)
-TARGETS                += test_ancient_weblogs.opt
-endif
+                  test_ancient_dict_write.opt \
+                  test_ancient_dict_verify.opt \
+                  test_ancient_dict_read.opt
 
 all:   $(TARGETS)
 
@@ -39,19 +31,17 @@ ancient.cma: ancient.cmo ancient_c.o
 ancient.cmxa: ancient.cmx ancient_c.o
        ocamlmklib -o ancient -Lmmalloc -lmmalloc $^
 
-test_ancient.opt: ancient.cmxa test_ancient.cmx
+test_ancient_dict_write.opt: ancient.cmxa test_ancient_dict_write.cmx
        LIBRARY_PATH=.:$$LIBRARY_PATH \
        ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) -o $@ $^
 
-test_ancient_shared.opt: ancient.cmxa test_ancient_shared.cmx
+test_ancient_dict_verify.opt: ancient.cmxa test_ancient_dict_verify.cmx
        LIBRARY_PATH=.:$$LIBRARY_PATH \
        ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) -o $@ $^
 
-ifeq ($(TEST_WEBLOGS),1)
-test_ancient_weblogs.opt: ancient.cmxa test_ancient_weblogs.cmx
+test_ancient_dict_read.opt: ancient.cmxa test_ancient_dict_read.cmx
        LIBRARY_PATH=.:$$LIBRARY_PATH \
        ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) -o $@ $^
-endif
 
 # Build the mmalloc library.
 
@@ -96,7 +86,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