-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
35 lines (22 loc) · 781 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
34
35
CC?=gcc
CXX?=g++
SHARED_DIR = ./shared
SHARED_LIB = gen_func.cpp read_data.cpp HMM.cpp threadpool.c bfgs.cpp
CFLAGS = -I$(SHARED_DIR) $(shell pkg-config --cflags gsl)
#DFLAGS = -g -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
DFLAGS = -O3 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
LIB = $(shell pkg-config --libs gsl) -lz -lpthread
all: $(SHARED_LIB) parse_args EM ngsF-HMM
$(CXX) $(DFLAGS) *.o $(LIB) -o ngsF-HMM
$(SHARED_LIB):
$(CXX) $(CFLAGS) $(DFLAGS) -c $(SHARED_DIR)/$@
parse_args:
$(CXX) $(CFLAGS) $(DFLAGS) -c parse_args.cpp
EM:
$(CXX) $(CFLAGS) $(DFLAGS) -c EM.cpp
ngsF-HMM:
$(CXX) $(CFLAGS) $(DFLAGS) -c ngsF-HMM.cpp
test:
@cd examples/; bash ./test.sh 2> test.log; cd ../
clean:
@rm -f *~ *.o ngsF-HMM examples/testF* examples/test.log