-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile.release
55 lines (37 loc) · 1.4 KB
/
Makefile.release
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
# Use custom to pass -DVCFLIB_PARITY to omit certain htslib API calls
CUSTOM?=
CFLAGS=-O3 -std=c++11 $(CUSTOM)
INCLUDES=-Ilib/jansson-2.6/src -Ilib/htslib/
LDADDS=-lz -lm -lbz2 -llzma -lstdc++ -lcurl -lpthread
UNAME_S := $(shell uname -s)
SOURCES=main.cpp \
AbstractStatCollector.cpp \
BasicStatsCollector.cpp
PROGRAM=vcfstatsalive vcfstats
PCH_SOURCE=vcfStatsAliveCommon.hpp
PCH=$(PCH_SOURCE).gch
PCH_FLAGS=-include $(PCH_SOURCE)
OBJECTS=AbstractStatCollector.o \
BasicStatsCollector.o
JANSSON=lib/jansson-2.6/src/.libs/libjansson.a
HTSLIB?=$(HTSLIB_HOME)/lib/libhts.a
all: $(PROGRAM)
.PHONY: all
vcfstatsalive: $(PCH) $(OBJECTS) main.cpp $(JANSSON)
$(CXX) $(CFLAGS) $(PCH_FLAGS) -v -o $@ $(OBJECTS) main.cpp $(JANSSON) $(HTSLIB) $(LDADDS)
vcfstats: $(PCH) $(OBJECTS) vcfstats.cpp $(JANSSON)
$(CXX) $(CFLAGS) $(PCH_FLAGS) -v -o $@ $(OBJECTS) vcfstats.cpp $(JANSSON) $(HTSLIB) $(LDADDS)
.cpp.o:
$(CXX) $(CFLAGS) $(INCLUDES) $(PCH_FLAGS) -c $< -o $@
$(PCH):
$(CXX) $(CFLAGS) $(INCLUDES) -x c++-header $(PCH_SOURCE) -Winvalid-pch -o $@
.PHONY: $(PCH)
$(JANSSON):
@if [ ! -d lib/jansson-2.6 ]; then cd lib; curl -o - http://www.digip.org/jansson/releases/jansson-2.6.tar.gz | tar -xzf - ; fi
@cd lib/jansson-2.6; ./configure --disable-shared --enable-static; make; cd ../..
clean:
rm -rf $(OBJECTS) $(PROGRAM) $(PCH) *.dSYM
clean-dep:
make -C lib/jansson-2.6 clean
make -C lib/htslib clean
.PHONY: clean