-
Notifications
You must be signed in to change notification settings - Fork 4
/
makefile
64 lines (51 loc) · 1.55 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
all: gtshark
GTShark_ROOT_DIR = .
GTShark_MAIN_DIR = src
LIBS_DIR = . #/usr/local/lib
INCLUDE_DIR= . #/usr/local/include
HTS_INCLUDE_DIR=htslib/include
HTS_LIB_DIR=htslib/lib
CC = g++
CFLAGS = -Wall -O3 -m64 -std=c++11 -pthread -mavx -I $(HTS_INCLUDE_DIR) -I $(INCLUDE_DIR) -fpermissive
CLINK = -lm -O3 -std=c++11 -pthread -mavx -lz -lbz2 -lcurl -llzma -L $(LIBS_DIR)
ifdef MSVC # Avoid the MingW/Cygwin sections
uname_S := Windows
else # If uname not available => 'not'
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
endif
ifeq ($(uname_S),Linux)
CLINK+=-fabi-version=6
endif
# default install location (binary placed in the /bin folder)
prefix = /usr/local
# optional install location
exec_prefix = $(prefix)
%.o: %.cpp
$(CC) $(CFLAGS) -c $< -o $@
gtshark: $(GTShark_MAIN_DIR)/application.o \
$(GTShark_MAIN_DIR)/cfile.o \
$(GTShark_MAIN_DIR)/lzma_wrapper.o \
$(GTShark_MAIN_DIR)/main.o \
$(GTShark_MAIN_DIR)/pbwt.o \
$(GTShark_MAIN_DIR)/sfile.o \
$(GTShark_MAIN_DIR)/utils.o \
$(GTShark_MAIN_DIR)/vcf.o
$(CC) -o $(GTShark_ROOT_DIR)/$@ \
$(GTShark_MAIN_DIR)/application.o \
$(GTShark_MAIN_DIR)/cfile.o \
$(GTShark_MAIN_DIR)/lzma_wrapper.o \
$(GTShark_MAIN_DIR)/main.o \
$(GTShark_MAIN_DIR)/pbwt.o \
$(GTShark_MAIN_DIR)/sfile.o \
$(GTShark_MAIN_DIR)/utils.o \
$(GTShark_MAIN_DIR)/vcf.o \
$(HTS_LIB_DIR)/libhts.a \
$(CLINK)
clean:
-rm $(GTShark_MAIN_DIR)/*.o
-rm gtshark
install:
mkdir -p -m 755 $(exec_prefix)/bin
cp gtshark $(exec_prefix)/bin/
uninstall:
rm $(exec_prefix)/bin/gtshark