-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
47 lines (32 loc) · 1.2 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
CC?=gcc
CXX?=g++
# Adjust $(HTSSRC) to point to your top-level htslib directory
ifdef HTSSRC
HTS_INCDIR=$(realpath $(HTSSRC))
HTS_LIBDIR=$(realpath $(HTSSRC))/libhts.a
all: ngsF
else
HTS_INCDIR=$(realpath ./htslib)
HTS_LIBDIR=$(realpath ./htslib/bgzf.o) $(realpath ./htslib/knetfile.o)
all: bgzip ngsF
endif
#CFLAGS = -g -Wall -I$(SHARED_DIR) -I$(HTS_INCDIR) $(shell pkg-config --cflags gsl)
CFLAGS = -O3 -Wall -I$(SHARED_DIR) -I$(HTS_INCDIR) $(shell pkg-config --cflags gsl)
DFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE #-D_USE_BGZF
LIB = $(shell pkg-config --libs gsl) -lz -lpthread $(HTS_LIBDIR)
bgzip:
$(MAKE) -C htslib bgzip
parse_args.o: parse_args.cpp shared.h
$(CXX) $(CFLAGS) $(DFLAGS) -c parse_args.cpp
read_data.o: read_data.cpp shared.h
$(CXX) $(CFLAGS) $(DFLAGS) -c read_data.cpp
EM.o: EM.cpp shared.h
$(CXX) $(CFLAGS) $(DFLAGS) -c EM.cpp
shared.o: shared.cpp shared.h
$(CXX) $(CFLAGS) $(DFLAGS) -c shared.cpp
ngsF: ngsF.cpp parse_args.o read_data.o EM.o shared.o
$(CXX) $(CFLAGS) $(DFLAGS) ngsF.cpp parse_args.o read_data.o EM.o shared.o $(LIB) -o ngsF
test:
@cd examples/; bash test.sh 2> test.log; cd ../
clean:
@rm -f htslib/*.o htslib/bgzip *.o ngsF examples/testF.*