From 31e962063930b54df71e72f24c4ba7f6b244d117 Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 18 Feb 2011 12:59:04 +0000 Subject: [PATCH 1/1] Cleanup makefile git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/XMLTree@1008 3cdefd35-fc62-479d-8e8d-bae585ffb9ca --- Makefile | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..99fc78c --- /dev/null +++ b/Makefile @@ -0,0 +1,62 @@ +OPT_FLAGS=-O6 -DPOPCOUNT_TABLE -DHAS_NATIVE_POPCOUNT +INC_FLAGS=-I./libcds/includes/ -I. +CFLAGS= $(INC_FLAGS) $(OPT_FLAGS) +CXXFLAGS= -std=c++0x $(INC_FLAGS) $(OPT_FLAGS) +CC=g++ + +LIBCDS_A=libcds/lib/libcds.a +OBJECTS_TCO= TextCollection/TextCollection.o \ + TextCollection/TextCollectionBuilder.o \ + TextCollection/RLCSABuilder.o \ + TextCollection/FMIndex.o \ + TextCollection/FMIndexBuilder.o \ + TextCollection/Tools.o \ + TextCollection/TextStorage.o \ + TextCollection/Query.o \ + TextCollection/EditDistance.o \ + TextCollection/ResultSet.o + +OBJECTS_XMLTREE=XMLTree.o XMLTreeBuilder.o bp.o darray.o bpcore.o bit_utils.o + +LIBRLCSA_TCA=TextCollection/incbwt/rlcsa.a +LIBLZTRIE_TCA=TextCollection/lzindex/lztrie.a +LIBSWCSA_TCA=TextCollection/swcsa/swcsa.a + +all: depend libcds text_collection XMLTree + +XMLTree: $(OBJECTS_XMLTREE) $(LIBCDS_A) $(OBJECTS_TCO) \ + $(LIBRLCSA_TCA) $(LIBLZTRIE_TCA) $(LIBSWCSA_TCA) + @echo [XMLTree] + @cp libcds/lib/libcds.a XMLTree.a + @rm -rf .objs + @mkdir .objs + @cd .objs; ar x ../$(LIBRLCSA_TCA); ar x ../$(LIBLZTRIE_TCA); ar x ../$(LIBSWCSA_TCA) + @ar rcs XMLTree.a XMLTree.o XMLTreeBuilder.o bp.o darray.o bpcore.o bit_utils.o $(OBJECTS_TCO) .objs/*.o + @rm -rf .objs + +%o: %c + @echo [C] $@ + @$(CC) -c $(CFLAGS) $< -o $@ + +%o: %cpp + @echo [C++] $@ + @$(CC) -c $(CXXFLAGS) $< -o $@ + +text_collection: + @echo [DEPENDENCY] $@ + @make -s -C TextCollection/ + +libcds: + @echo [DEPENDENCY] $@ + @make -s -C libcds/ + +depend: + @echo [DEPEND] + @(gcc -MM *.c; g++ -MM -std=c++0x *.cpp) > $@ + +clean: + @echo [CLEAN] + @rm -f *.[oa] depend + +-include depend + -- 2.17.1