X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=Makefile;h=b7084f019b3f36a1d9ca90a4dff48b3956ea8a45;hb=9c9764f2217221c6b2282d353233da958955cb97;hp=d0510b95de0ef7fafd0e0959479490717f1503d6;hpb=3623eefccfb5fc69e19ad975a3669f51a2a8b276;p=SXSI%2Fxpathcomp.git diff --git a/Makefile b/Makefile index d0510b9..b7084f0 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ OCAMLPACKAGES = unix,ulex,camlp4 PPINCLUDES=$(OCAMLINCLUDES:%=-ppopt %) -CXXSOURCES = XMLDocShredder.cpp OCamlStorageInterface.cpp StorageInterface.cpp OCamlDriver.cpp +CXXSOURCES = XMLDocShredder.cpp SXSIStorageInterface.cpp StorageInterface.cpp OCamlDriver.cpp CXXOBJECTS = $(CXXSOURCES:.cpp=.o) CXXINCLUDES = \ @@ -24,17 +24,22 @@ CXXINCLUDES = \ -I/usr/lib/glibmm-2.4/include \ -I/usr/lib/sigc++-2.0/include \ -I/usr/lib/glib-2.0/include\ - -I`ocamlc -where` + -I`ocamlc -where`\ + -IXMLTree \ + -IXMLTree/libcds/includes \ + -IXMLTree/TextCollection CXXFLAGS = -O3 -Wall $(INCLUDEDIRS) -fPIC -std=c++0x -CXX = g++ ifeq ($(DEBUG), true) +CXX = g++ -DDEBUG OCAMLOPT = ocamlopt -g -cc "$(CXX)" SYNT_DEBUG = -ppopt -DDEBUG else +CXX = g++ OCAMLOPT = ocamlopt -cc "$(CXX)" -noassert -inline 10000 endif + ifeq ($(PROFILE), true) SYNT_PROF = $(SYNT_DEBUG) -ppopt -DPROFILE endif @@ -48,7 +53,7 @@ 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 +LIBS=-lxml2 -lxml++-2.6 -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lsigc-2.0 all: libcamlshredder.a $(MLOBJS) $(OCAMLFIND) $(LINK) -o main -package "$(OCAMLPACKAGES)" $(SYNTAX) -cclib \ @@ -65,13 +70,16 @@ all: libcamlshredder.a $(MLOBJS) $(OCAMLFIND) $(OCAMLOPT) -package "$(OCAMLPACKAGES)" $(SYNTAX) -c $< libcamlshredder.a: $(CXXOBJECTS) - $(OCAMLMKLIB) -o camlshredder -custom $(CXXOBJECTS) $(LIBS) + mkdir -p .libs/ + cd .libs/ && ar x ../XMLTree/XMLTree.a + $(OCAMLMKLIB) -o camlshredder -custom $(CXXOBJECTS) ./.libs/*.o $(LIBS) + rm -rf .libs clean: - rm -f *~ *.cm* *.[oa] *.so main + rm -f *~ *.cm* *.[oa] *.so main .libs -OCamlStorageInterface.o: OCamlStorageInterface.h OCamlStorageInterface.cpp StorageInterface.h +SXSIStorageInterface.o: SXSIStorageInterface.h SXSIStorageInterface.cpp StorageInterface.h StorageInterface.o: StorageInterface.h XMLDocShredder.o: XMLDocShredder.h XMLDocShredder.cpp OCamlStorageInterface.h StorageInterface.h OCamlDriver.o: XMLDocShredder.h StorageInterface.h