1 POPCOUNT=$(shell grep -q popcnt /proc/cpuinfo && echo 1)
4 POPCOUNT_FLAG=-DHAS_NATIVE_POPCOUNT
6 POPCOUNT_FLAG=-DPOPCOUNT_TABLE
9 ifeq ($(VERBOSE), true)
15 OPT_FLAGS=-O4 $(POPCOUNT_FLAG) -fno-PIC -static
16 INC_FLAGS=-I./libcds/includes/ -I.
17 CFLAGS= $(INC_FLAGS) $(OPT_FLAGS)
18 CXXFLAGS= -std=c++0x $(INC_FLAGS) $(OPT_FLAGS)
21 LIBCDS_A=libcds/lib/libcds.a
22 OBJECTS_TCO= TextCollection/TextCollection.o \
23 TextCollection/TextCollectionBuilder.o \
24 TextCollection/RLCSABuilder.o \
25 TextCollection/FMIndex.o \
26 TextCollection/FMIndexBuilder.o \
27 TextCollection/Tools.o \
28 TextCollection/TextStorage.o \
29 TextCollection/Query.o \
30 TextCollection/EditDistance.o \
31 TextCollection/ResultSet.o
33 OBJECTS_XMLTREE=XMLTree.o XMLTreeBuilder.o bp.o darray.o bpcore.o
35 LIBRLCSA_TCA=TextCollection/incbwt/rlcsa.a
36 LIBLZTRIE_TCA=TextCollection/lzindex/lztrie.a
37 LIBSWCSA_TCA=TextCollection/swcsa/swcsa.a
42 all: depend libcds text_collection XMLTree
44 XMLTree: $(OBJECTS_XMLTREE) $(LIBCDS_A) $(OBJECTS_TCO) \
45 $(LIBRLCSA_TCA) $(LIBLZTRIE_TCA) $(LIBSWCSA_TCA)
47 $(HIDE) cp libcds/lib/libcds.a libXMLTree.a
50 $(HIDE) (cd .objs; ar x ../$(LIBRLCSA_TCA); ar x ../$(LIBLZTRIE_TCA); ar x ../$(LIBSWCSA_TCA))
51 $(HIDE) ar rcs libXMLTree.a $(OBJECTS_XMLTREE) $(OBJECTS_TCO) .objs/*.o
56 $(HIDE) $(CC) -c $(CFLAGS) $< -o $@
60 $(HIDE) $(CC) -c $(CXXFLAGS) $< -o $@
64 $(HIDE) make -s -C TextCollection/
68 $(HIDE) make -s -C libcds/
72 $(HIDE) (gcc -MM *.c; g++ -MM -std=c++0x *.cpp) > $@
76 $(HIDE) rm -f *.[oa] depend