X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=Makefile;h=910eb1dd693a84d677216732ced90ca4263e8034;hb=refs%2Fheads%2Ftrunk;hp=a3b0e611349521a87f2fad18689a982c6fe8b085;hpb=0bf9688e2615a9fc07860c5762240e4ce26ee5d3;p=SXSI%2FXMLTree.git diff --git a/Makefile b/Makefile index a3b0e61..910eb1d 100644 --- a/Makefile +++ b/Makefile @@ -1,28 +1,43 @@ -FLAGS = -O9 -I./libcds/includes/ - -OBJECTS=libcds/lib/libcds.a - -all: text_collection XMLTree - -XMLTree: XMLTree.o bp.o darray.o bpcore.o libcds/lib/libcds.a - cp libcds/lib/libcds.a XMLTree.a - ar vrcs XMLTree.a XMLTree.o bp.o darray.o bpcore.o - - -XMLTree.o: bp.c bp.h bpcore.c XMLTree.cpp XMLTree.h - g++ $(FLAGS) -c XMLTree.cpp - -bp.o: bp.c bpcore.c darray.c bp.h darray.h - g++ $(FLAGS) -c bp.c - -darray.o: darray.c darray.h bpcore.c - g++ $(FLAGS) -c darray.c - -bpcore.o: bpcore.c - g++ $(FLAGS) -c bpcore.c - -text_collection: - make -C TextCollection/ - -clean: - rm -f *.o \ No newline at end of file +INC_FLAGS=-I.. -I../libcds/includes/ + + +ifeq ($(VERBOSE), true) + HIDE= +else + HIDE=@ +endif + +ifeq ($(DEBUG), true) + OPT_FLAGS=-O0 -g $(POPCOUNT_FLAG) -fno-PIC -static +else + OPT_FLAGS=-O4 $(POPCOUNT_FLAG) -fno-PIC -static +endif + +CXXFLAGS=-std=c++0x $(INC_FLAGS) $(OPT_FLAGS) +CXX=g++ + +OBJECTS_XMLTREE=XMLTree.o XMLTreeBuilder.o +XMLTREE_A=libXMLTree.a + + + +all: depend $(XMLTREE_A) + +$(XMLTREE_A): $(OBJECTS_XMLTREE) + @echo [Link] $@ + $(HIDE) ar rcs $@ $(OBJECTS_XMLTREE) + +%o: %cpp + @echo [C++] $@ + $(HIDE) $(CXX) -c $(CXXFLAGS) $< -o $@ + + +depend: + @echo [DEPEND] + $(HIDE) ($(CXX) -MM $(CXXFLAGS) *.cpp) > $@ + +clean: + @echo [CLEAN] + $(HIDE) rm -f *.[oa] depend + +-include depend