-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
33 lines (24 loc) · 887 Bytes
/
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
HOME=/home/yutongq
GUROBI = /opt/local/stow/gurobi901/linux64
SDSL=$(HOME)/lib/libsdsl.a
SORTLIB=$(HOME)/lib/libdivsufsort.a
SORTLIB_64=$(HOME)/lib/libdivsufsort64.a
CC = gcc
CXX = g++
INCLUDES = -g -O3 -I $(HOME)/include -I $(GUROBI)/include
CXXFLAGS = -std=c++14 $(INCLUDES)
LDADD = $(SDSL) $(SORTLIB) $(SORTLIB_64)
GUROBI_LIB = $(shell ls $(GUROBI)/lib/libgurobi[0-9][0-9].so | tail -n 1 | xargs basename -s .so | cut -b 4-)
LDLIBS = $(LDADD)
LDLIBS += -L $(GUROBI)/lib -lgurobi_g++5.2 -l$(GUROBI_LIB)
LDFLAGS += -Wl,-rpath,$(GUROBI)/lib
SRCS=src/ChunkLoader.cpp src/RLZ.hpp src/RLZ.cpp src/RLZGraph.hpp src/RLZGraph.cpp src/rlzmain.cpp
all: bin/rlzgraph
bin/rlzgraph: $(subst .cpp,.o,$(SRCS))
mkdir -p bin
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
bin/ChunkLoader: src/ChunkLoader.cpp
mkdir -p bin
$(CXX) $(CXXFLAGS) -o $@ $^
clean:
rm -f bin/rlzgraph src/*.o