-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
72 lines (50 loc) · 2.75 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
64
65
66
67
68
69
70
71
72
CFLAGS=-std=c++11 -I$(BAMTOOLS)/src -I$(BAMTOOLS) -Ilib/jansson-2.8/src
LDFLAGS=-L$(BAMTOOLS)/lib -L$(BAMTOOLS)/build/src/api -lbamtools -lz
.SUFFIXES: .cc
SOURCES=main.cc \
AbstractStatCollector.cc \
BasicStatsCollector.cc \
HistogramStatsCollector.cc \
CoverageMapStatsCollector.cc \
GenomicRegionStore.cc
OBJECTS=$(SOURCES:.cc=.o)
OBJECTS+=bamtools_pileup_engine.o
#OBJECTS=main.o \
# AbstractStatCollector.o \
# BasicStatsCollector.o \
# HistogramStatsCollector.o \
# CoverageMapStatsCollector.o \
# GenomicRegionStore.o \
# bamtools_pileup_engine.o
STATLIBS=lib/jansson-2.8/src/.libs/libjansson.a
all: release
debug: CFLAGS += -DDEBUG -g -pg
debug: bamstatsAlive
release: CFLAGS += -DRELEASE -O2
release: bamstatsAlive
clean:
rm -rf *.o *.dSYM bamstatsAlive bamstatsAliveCommon.hpp.gch
clean-dep:
make -C lib/jansson-2.8 clean
.PHONY: all clean clean-dep
.cc.o :
$(CXX) -c $< $(CFLAGS) -include bamstatsAliveCommon.hpp
bamtools_pileup_engine.o: $(BAMTOOLS)/src/utils/bamtools_pileup_engine.cpp
$(CXX) -c $< $(CFLAGS)
bamstatsAliveCommon.hpp.gch: bamstatsAliveCommon.hpp
$(CXX) $(CFLAGS) -x c++-header $< -Winvalid-pch -o $@
bamstatsAlive: checkvar libjansson bamstatsAliveCommon.hpp.gch $(OBJECTS)
$(CXX) $(CFLAGS) -o bamstatsAlive $(OBJECTS) $(STATLIBS) $(LDFLAGS)
checkvar:
@if [ "x$(BAMTOOLS)" = "x" ]; then echo "BAMTOOLS need to be defined"; exit 1; fi
libjansson: lib/jansson-2.8/src/.libs/libjansson.a
lib/jansson-2.8/src/.libs/libjansson.a:
@if [ ! -d lib ]; then mkdir lib; fi
@if [ ! -d lib/jansson-2.8 ]; then cd lib; curl -Lo - https://digip.org/jansson/releases/jansson-2.8.tar.gz | tar -xzf - ; fi
@cd lib/jansson-2.8; ./configure --disable-shared --enable-static; make; cd ../..
test1:
curl --silent "http://bammerger.iobio.io/?binary=true&cmd=11:10108473-10188473%20http://s3.amazonaws.com/1000genomes/data/NA06984/alignment/NA06984.chrom11.ILLUMINA.bwa.CEU.low_coverage.20111114.bam%20http://s3.amazonaws.com/1000genomes/data/NA06985/alignment/NA06985.chrom11.ILLUMINA.bwa.CEU.low_coverage.20111114.bam" | ./bamstatsAlive
test2:
curl --silent "http://bammerger.iobio.io/?binary=true&cmd=11:10108473-10188473%20http://s3.amazonaws.com/1000genomes/data/NA06984/alignment/NA06984.chrom11.ILLUMINA.bwa.CEU.low_coverage.20111114.bam%20http://s3.amazonaws.com/1000genomes/data/NA06985/alignment/NA06985.chrom11.ILLUMINA.bwa.CEU.low_coverage.20111114.bam" | ./bamstatsAlive -u 100
test3:
curl --silent "http://bammerger.iobio.io/?binary=true&cmd=11:10108473-10188473%20http://s3.amazonaws.com/1000genomes/data/NA06984/alignment/NA06984.chrom11.ILLUMINA.bwa.CEU.low_coverage.20111114.bam%20http://s3.amazonaws.com/1000genomes/data/NA06985/alignment/NA06985.chrom11.ILLUMINA.bwa.CEU.low_coverage.20111114.bam" | ./bamstatsAlive -s 10108473 -l 80000