-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·61 lines (43 loc) · 1.39 KB
/
Makefile
File metadata and controls
executable file
·61 lines (43 loc) · 1.39 KB
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
52
53
54
55
56
57
58
59
60
61
MF= Makefile
CC= g++
CFLAGS= -g -D_USE_OMP -O3 -fomit-frame-pointer -funroll-loops -pthread
# Detect OS for platform-specific settings
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
# macOS
RPATH_FLAG := -Wl,-rpath,$(PWD)/libsdsl/lib
# Dynamically get Homebrew prefix (libomp path)
BREW_PREFIX := $(shell brew --prefix libomp)
# OpenMP flags for macOS
OPENMP_FLAGS := -Xpreprocessor -fopenmp -I$(BREW_PREFIX)/include
OPENMP_LIBS := -L$(BREW_PREFIX)/lib -lomp
CFLAGS += $(OPENMP_FLAGS)
LFLAGS += $(OPENMP_LIBS)
else
# Linux and others
RPATH_FLAG := -Wl,-rpath=$(PWD)/libsdsl/lib
CFLAGS += -fopenmp
LFLAGS += -fopenmp
endif
LFLAGS= -std=c++11 -I ./ -I ./libsdsl/include/ -L ./libsdsl/lib/ -lsdsl -ldivsufsort -ldivsufsort64 $(RPATH_FLAG) $(OPENMP_LIBS)
EXE= mars
SRC= mars.cc matrices.cc utils.cc sacsc.cc ced.cc nj.cc progAlignment.cc cyclic.cc RestrictedLevenshtein.cc bb.cc heap.cc edlib.cc
HD= EBLOSUM62.h EDNAFULL.h mars.h sacsc.h ced.h nj.h RestrictedLevenshtein.h heap.h Makefile
#
# No need to edit below this line
#
.SUFFIXES:
.SUFFIXES: .cc .o
OBJ= $(SRC:.cc=.o)
.cc.o:
$(CC) $(CFLAGS) -c $(LFLAGS) $<
all: $(EXE)
$(EXE): $(OBJ)
$(CC) $(CFLAGS) -o $@ $(OBJ) $(LFLAGS)
$(OBJ): $(MF) $(HD)
clean:
rm -f $(OBJ) $(EXE) *~
clean-all:
rm -f $(OBJ) $(EXE) *~
rm -r libsdsl
rm -r sdsl-lite