-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.makefile
29 lines (22 loc) · 1.17 KB
/
test.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
PREFIX:= /usr/local/
DamMet: dammet_dam_params.cpp myargparser.cc nlopt-2.5.0/install/lib/libnlopt.a htslib/libhts.a
g++ -O3 dammet_dam_params.cpp myargparser.cc ./htslib/libhts.a nlopt-2.5.0/install/lib/libnlopt.a -std=c++14 -I nlopt-2.5.0/install/include -I./htslib/ -lz -lm -lbz2 -llzma -o DamMet -lpthread -lcurl
# g++ -O3 deammeth.cc myargparser.cc ./htslib/libhts.a -std=c++11 -I./htslib/ -lz -lm -lbz2 -llzma -lnlopt_cxx -o DamMet -lpthread
nlopt-2.5.0/install/lib/libnlopt.a: v2.5.0.tar.gz
cd nlopt-2.5.0/ && mkdir -p build/ && cd build/ && cmake -DCMAKE_INSTALL_PREFIX=../install -DNLOPT_OCTAVE=Off -DNLOPT_MATLAB=Off -DNLOPT_GUILE=Off -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_LIBDIR=../install/lib .. && make && make install && cd ../..
v2.5.0.tar.gz:
wget https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz
tar xf v2.5.0.tar.gz
htslib/libhts.a:
git clone https://github.com/samtools/htslib.git
cd htslib && make && cd ../
## cd htslib && autoheader && autoconf && ./configure && make -j2 && cd ../
.PHONY: install clean
install: DamMet
mkdir -p ${PREFIX}/bin
cp DamMet ${PREFIX}/bin
clean:
rm -f DamMet
rm -rf nlopt-2.5.0/
rm -rf v2.5.0.tar.gz
rm -rf htslib