-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
40 lines (29 loc) · 1.1 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
SDSL_DIR=../sdsl-lite
# In OS X, getrusage() returns maximum resident set size in bytes.
# In Linux, the value is in kilobytes, so this line should be commented out.
#RUSAGE_FLAGS=-DRUSAGE_IN_BYTES
# Verbose output during index construction etc.
OUTPUT_FLAGS=-DVERBOSE_STATUS_INFO
OTHER_FLAGS=$(RUSAGE_FLAGS) $(OUTPUT_FLAGS) -pthread
include $(SDSL_DIR)/Make.helper
CXX_FLAGS=$(MY_CXX_FLAGS) $(OTHER_FLAGS) $(MY_CXX_OPT_FLAGS) -I$(INC_DIR)
LIBOBJS=bwt.o fmi.o formats.o support.o utils.o
SOURCES=$(wildcard *.cpp)
HEADERS=$(wildcard *.h)
OBJS=$(SOURCES:.cpp=.o)
LIBS=-L$(LIB_DIR) -lsdsl -ldivsufsort -ldivsufsort64
LIBRARY=libbwtmerge.a
PROGRAMS=bwt_convert bwt_inspect bwt_merge
all: $(LIBRARY) $(PROGRAMS)
%.o:%.cpp $(HEADERS)
$(MY_CXX) $(CXX_FLAGS) -c $<
$(LIBRARY):$(LIBOBJS)
ar rcs $@ $(LIBOBJS)
bwt_convert:bwt_convert.o $(LIBRARY)
$(MY_CXX) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
bwt_inspect:bwt_inspect.o $(LIBRARY)
$(MY_CXX) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
bwt_merge:bwt_merge.o $(LIBRARY)
$(MY_CXX) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
clean:
rm -f $(PROGRAMS) $(OBJS) $(LIBRARY)