Debian Codegraph @

makefile

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #COMPILER MODE C++11
2 CXX=g++ -std=c++11
3
4 #HTSLIB LIBRARY [SPECIFY YOUR OWN PATHS]
5 HTSLIB_INC=$(HOME)/Tools/htslib-1.11
6 HTSLIB_LIB=$(HOME)/Tools/htslib-1.11/libhts.a
7
8 #BOOST IOSTREAM & PROGRAM_OPTION LIBRARIES [SPECIFY YOUR OWN PATHS]
9 BOOST_INC=/usr/include
10 BOOST_LIB_IO=/usr/lib/x86_64-linux-gnu/libboost_iostreams.a
11 BOOST_LIB_PO=/usr/lib/x86_64-linux-gnu/libboost_program_options.a
12
13 #HTSLIB LIBRARY [SPECIFY YOUR OWN PATHS]
14 #HTSLIB_INC=/software/UHTS/Analysis/samtools/1.4/include
15 #HTSLIB_LIB=/software/UHTS/Analysis/samtools/1.4/lib64/libhts.a
16
17 #BOOST IOSTREAM & PROGRAM_OPTION LIBRARIES [SPECIFY YOUR OWN PATHS]
18 #BOOST_INC=/software/include
19 #BOOST_LIB_IO=/software/lib64/libboost_iostreams.a
20 #BOOST_LIB_PO=/software/lib64/libboost_program_options.a
21
22 #COMPILER & LINKER FLAGS
23
24 #Best performance is achieved with this. Use it if running on the same plateform you're compiling.
25 #CXXFLAG=-O3 -march=native
26
27 #Good performance and portable on most CPUs
28 CXXFLAG=-O3 -mavx2 -mfma
29
30 #Portable version without avx2 (much slower)
31 #CXXFLAG=-O3
32
33 LDFLAG=-O3
34
35
36 #DYNAMIC LIBRARIES
37 DYN_LIBS=-lz -lbz2 -lm -lpthread -llzma -lcurl -lssl -lcrypto
38
39 #SHAPEIT SOURCES & BINARY
40 BFILE=bin/shapeit4.2
41 HFILE=$(shell find src -name *.h)
42 CFILE=$(shell find src -name *.cpp)
43 OFILE=$(shell for file in `find src -name *.cpp`; do echo obj/$$(basename $$file .cpp).o; done)
44 VPATH=$(shell for file in `find src -name *.cpp`; do echo $$(dirname $$file); done)
45
46 #COMPILATION RULES
47 all: $(BFILE)
48
49 $(BFILE): $(OFILE)
50 $(CXX) $(LDFLAG) $^ $(HTSLIB_LIB) $(BOOST_LIB_IO) $(BOOST_LIB_PO) -o $@ $(DYN_LIBS)
51
52 obj/%.o: %.cpp $(HFILE)
53 $(CXX) $(CXXFLAG) -c $< -o $@ -Isrc -I$(HTSLIB_INC) -I$(BOOST_INC)
54
55 clean:
56 rm -f obj/*.o $(BFILE)