forked from mpetri/FM-Index
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (34 loc) · 2.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#CC=clang
#CXX=clang++
CC=gcc
CXX=g++
#CFLAGS=-g -W -Wall -O0 -DDEBUG
CFLAGS= -O3 -fomit-frame-pointer -march=native
INCCDS=./libcds/includes/
INCDIVSUF=./libdivsufsort/include/
all: ./libcds/lib/libcds.a libdivsufsort/lib/libdivsufsort.a fmbuild fmcount fmlocate fmrecover fmextract
./libcds/lib/libcds.a:
$(MAKE) -C libcds
libdivsufsort/lib/libdivsufsort.a:
cd libdivsufsort;cmake .;$(MAKE);cd ..
libfmindex.a: util.o FM.o
ar rcs libfmindex.a util.o FM.o
fmbuild: fmbuild.cpp ./libdivsufsort/lib/libdivsufsort.a ./libcds/lib/libcds.a libfmindex.a
$(CXX) -I $(INCCDS) -I $(INCDIVSUF) $(CFLAGS) -o fmbuild fmbuild.cpp libfmindex.a ./libdivsufsort/lib/libdivsufsort.a ./libcds/lib/libcds.a
fmcount: fmcount.cpp ./libdivsufsort/lib/libdivsufsort.a ./libcds/lib/libcds.a libfmindex.a
$(CXX) -I $(INCCDS) -I $(INCDIVSUF) $(CFLAGS) -o fmcount fmcount.cpp libfmindex.a ./libdivsufsort/lib/libdivsufsort.a ./libcds/lib/libcds.a
fmlocate: fmlocate.cpp ./libdivsufsort/lib/libdivsufsort.a ./libcds/lib/libcds.a libfmindex.a
$(CXX) -I $(INCCDS) -I $(INCDIVSUF) $(CFLAGS) -o fmlocate fmlocate.cpp libfmindex.a ./libdivsufsort/lib/libdivsufsort.a ./libcds/lib/libcds.a
fmextract: fmextract.cpp ./libdivsufsort/lib/libdivsufsort.a ./libcds/lib/libcds.a libfmindex.a
$(CXX) -I $(INCCDS) -I $(INCDIVSUF) $(CFLAGS) -o fmextract fmextract.cpp libfmindex.a ./libdivsufsort/lib/libdivsufsort.a ./libcds/lib/libcds.a
fmrecover: fmrecover.cpp ./libdivsufsort/lib/libdivsufsort.a ./libcds/lib/libcds.a libfmindex.a
$(CXX) -I $(INCCDS) -I $(INCDIVSUF) $(CFLAGS) -o fmrecover fmrecover.cpp libfmindex.a ./libdivsufsort/lib/libdivsufsort.a ./libcds/lib/libcds.a
# pattern rule for all objects files
%.o: %.c *.h
$(CXX) -I $(INCCDS) -I $(INCDIVSUF) -c $(CFLAGS) $< -o $@
%.o: %.cpp *.h
$(CXX) -I $(INCCDS) -I $(INCDIVSUF) -c $(CFLAGS) $< -o $@
clean:
rm -f fmbuild fmcount fmlocate fmextract fmrecover libfmindex.a *~ *.o ;
cleanall:
rm -f fmbuild fmcount fmlocate fmextract fmrecover libfmindex.a *~ *.o ; cd libdivsufsort; make -f Makefile clean ; cd .. ; cd libcds ; make -f Makefile clean ; cd ..