-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (40 loc) · 1.41 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
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 -DNDEBUG
INC = -I./src -I./inst/include -I$(HTSDIR)
LDFLAGS = -L$(HTSDIR) -Wl,-rpath,$(HTSDIR)
LIBS = -llzma -lbz2 -lm -lz -lpthread
OBJS = src/phaseless.o src/fastphase.o src/admixture.o src/io.o src/utils.o
libsrc = src/libsrc.a
BINS = phaseless
libhts = $(HTSDIR)/libhts.a
FLOAT = 0
ifeq ($(strip $(FLOAT)),1)
$(info "use float in phaseless!")
CXXFLAGS += -DUSE_FLOAT
endif
.PHONY: all clean
all: $(BINS) $(libhts)
%.o: %.cpp
${CXX} ${CXXFLAGS} -o $@ -c $< ${INC}
$(BINS): src/main.o $(libsrc) $(libhts)
${CXX} ${CXXFLAGS} -o $@ src/main.o $(libsrc) $(libhts) $(LIBS) $(LDFLAGS) $(INC)
$(libhts):
cd $(HTSDIR) && ./configure --disable-libcurl --without-libdeflate && make -j6
$(libsrc): $(OBJS)
ar -rcs $@ $?
clean:
rm -f $(BINS) src/*.o src/*.a
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