-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (36 loc) · 1.3 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
HTSDIR = ./inst/include/htslib-1.18
CXX = g++
# CXXFLAGS = -std=c++17 -Wall -O3 -g -fsanitize=address
# CXXFLAGS = -std=c++17 -Wall -O3 -march=native -DNDEBUG
CXXFLAGS = -std=c++17 -Wall -O3 -mavx2 -fPIC -DNDEBUG
INC = -I./src -I./inst/include -I$(HTSDIR)
LDFLAGS = -L$(HTSDIR) -Wl,-rpath,$(HTSDIR)
LIBS = $(HTSDIR)/libhts.a -llzma -lbz2 -lm -lz -lpthread
OBJS = src/main.o src/phaseless.o src/fastphase.o src/admixture.o src/utils.o
BINS = phaseless
FLOAT = 0
ifeq ($(strip $(FLOAT)),1)
$(info "use float in phaseless!")
CXXFLAGS += -DUSE_FLOAT
endif
.PHONY: all clean htslib
all: $(BINS)
%.o: %.cpp
${CXX} ${CXXFLAGS} -o $@ -c $< ${INC}
$(BINS): $(OBJS) htslib
${CXX} ${CXXFLAGS} -o $@ $(OBJS) ${INC} $(LIBS) $(LDFLAGS)
htslib:
cd $(HTSDIR) && ./configure --disable-libcurl --without-libdeflate && make -j10
clean:
rm -f $(BINS) $(OBJS)
cd $(HTSDIR) && make clean
impute:
./phaseless -Dr impute -g data/bgl.gz -c 10 -n 4 -S -i 100
joint:
./phaseless -Dpr --pfile impute.P --rfile impute.recomb joint -g data/bgl.gz -c 10 -k 3 -n 4 -S -i 100
parse:
./phaseless -Dpr parse -j joint.pars.bin -n 4 -i 100
impute2:
./phaseless impute -g data/all.bgl.gz -c 10 -n 4 -S -i 100
joint2:
./phaseless -Dpr --pfile impute.P --rfile impute.recomb joint -g data/all.bgl.gz -c 10 -k 3 -n 4 -S