X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=Makefile;h=4b37144dced75c36beb7ec3571f0969b66afc96a;hb=04630ec1de987f525c6594fcada17bb49ee79d6a;hp=b7084f019b3f36a1d9ca90a4dff48b3956ea8a45;hpb=77294fdd983393727bcee7fda52dacdaf943e585;p=SXSI%2Fxpathcomp.git diff --git a/Makefile b/Makefile index b7084f0..4b37144 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ MLOBJS = $(MLSRCS:.ml=.cmx) MLCINT = $(MLISRCS:.mli=.cmi) -OCAMLPACKAGES = unix,ulex,camlp4 +OCAMLPACKAGES = str,unix,ulex,camlp4 PPINCLUDES=$(OCAMLINCLUDES:%=-ppopt %) @@ -44,24 +44,25 @@ ifeq ($(PROFILE), true) SYNT_PROF = $(SYNT_DEBUG) -ppopt -DPROFILE endif - OCAMLFIND = ocamlfind OCAMLMKLIB = ocamlmklib OCAMLDEP = ocamldep -LINK=$(OCAMLOPT) -linkpkg camlp4lib.cmxa +#Ugly but seems difficult with a makefile + +LINK=$(OCAMLOPT) -linkpkg `ocamlc -version | grep -q "3.11.0" && echo dynlink.cmxa` camlp4lib.cmxa SYNTAX= -syntax camlp4o $(PPINCLUDES) -ppopt pa_macro.cmo $(SYNT_PROF) LIBS=-lxml2 -lxml++-2.6 -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lsigc-2.0 -all: libcamlshredder.a $(MLOBJS) +all: version libcamlshredder.a $(MLOBJS) + $(OCAMLFIND) $(LINK) -o main -package "$(OCAMLPACKAGES)" $(SYNTAX) -cclib \ "$(LIBS) ./libcamlshredder.a" $(MLOBJS) .SUFFIXES: .ml .mli .cmx .cmi .cpp -.PHONY:compute_depend - +.PHONY:compute_depend version .cpp.o: $(CXX) $(CXXINCLUDES) -c $(CXXFLAGS) $< .ml.cmx: @@ -69,7 +70,7 @@ all: libcamlshredder.a $(MLOBJS) .mli.cmi: $(OCAMLFIND) $(OCAMLOPT) -package "$(OCAMLPACKAGES)" $(SYNTAX) -c $< -libcamlshredder.a: $(CXXOBJECTS) +libcamlshredder.a: $(CXXOBJECTS) XMLTree/XMLTree.a mkdir -p .libs/ cd .libs/ && ar x ../XMLTree/XMLTree.a $(OCAMLMKLIB) -o camlshredder -custom $(CXXOBJECTS) ./.libs/*.o $(LIBS) @@ -79,6 +80,14 @@ clean: rm -f *~ *.cm* *.[oa] *.so main .libs +testSuccint: $(CXXOBJECTS) XMLTree/XMLTree.a + mkdir -p .libs/ + cd .libs/ && ar x ../XMLTree/XMLTree.a + $(CXX) -o testSuccint $(CXXFLAGS) $(CXXINCLUDES) XMLDocShredder.o \ +SXSIStorageInterface.o StorageInterface.o ./.libs/*.o \ +$(LIBS) testSuccint.cpp + rm -rf .libs + SXSIStorageInterface.o: SXSIStorageInterface.h SXSIStorageInterface.cpp StorageInterface.h StorageInterface.o: StorageInterface.h XMLDocShredder.o: XMLDocShredder.h XMLDocShredder.cpp OCamlStorageInterface.h StorageInterface.h