0
|
1 # Makefile for ezBAMQC, utilities for the Sequence Alignment/Map format.
|
|
2 #
|
|
3 # Version 0.6.5
|
|
4 #
|
|
5 # Copyright (C) 2015 Bioinformatics Shared Resource, CSHL.
|
|
6 # Portions copyright (C) 2015 Cold Spring Harbor Laboratory.
|
|
7 #
|
|
8 # Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9 # of this software and associated documentation files (the "Software"), to deal
|
|
10 # in the Software without restriction, including without limitation the rights
|
|
11 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12 # copies of the Software, and to permit persons to whom the Software is
|
|
13 # furnished to do so, subject to the following conditions:
|
|
14 #
|
|
15 # The above copyright notice and this permission notice shall be included in
|
|
16 # all copies or substantial portions of the Software.
|
|
17 #
|
|
18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
21 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
24 # DEALINGS IN THE SOFTWARE.
|
|
25
|
|
26 CC = g++
|
|
27 CPPFLAGS = $(DFLAGS) $(INCLUDES)
|
|
28 CFLAGS = -g -fpermissive -Wall -O9 -O3 -std=c++11 -fPIC
|
|
29 LDFLAGS = -O9 -fpermissive
|
|
30 LDLIBS =
|
|
31 DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1
|
|
32 LOBJS= src/ezBAMQC/GeneFeatures.o src/ezBAMQC/rRNA.o src/ezBAMQC/IntervalTree.o src/ezBAMQC/InnerDist_prof.o \
|
|
33 src/ezBAMQC/Results.o src/ezBAMQC/Mappability.o src/ezBAMQC/Coverage_prof.o src/ezBAMQC/parseBAM.o
|
|
34
|
|
35 INCLUDES= -I$(HTSDIR)
|
|
36 LIBCURSES= -lcurses # -lXCurses
|
|
37
|
|
38 prefix = /usr/local
|
|
39 exec_prefix = $(prefix)
|
|
40 bindir = $(exec_prefix)/bin
|
|
41 mandir = $(prefix)/share/man
|
|
42 man1dir = $(mandir)/man1
|
|
43
|
|
44 MKDIR_P = mkdir -p
|
|
45 #INSTALL = install -p
|
|
46 #INSTALL_PROGRAM = $(INSTALL)
|
|
47 #INSTALL_DATA = $(INSTALL) -m 644
|
|
48 #INSTALL_DIR = $(MKDIR_P) -m 755
|
|
49
|
|
50
|
|
51 PROGRAMS = libBAMqc.so
|
|
52
|
|
53
|
|
54 all: $(PROGRAMS)
|
|
55
|
|
56
|
|
57 # Adjust $(HTSDIR) to point to your top-level htslib directory
|
|
58 HTSDIR = ./src/htslib
|
|
59 include $(HTSDIR)/htslib.mk
|
|
60 HTSLIB = $(HTSDIR)/libhts.a
|
|
61 BGZIP = $(HTSDIR)/bgzip
|
|
62
|
|
63
|
|
64 PACKAGE_VERSION = 0.5
|
|
65
|
|
66
|
|
67 .SUFFIXES: .cpp .o
|
|
68
|
|
69 .cpp.o:
|
|
70 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
|
71
|
|
72
|
|
73 #lib:libbam.a
|
|
74
|
|
75 #libbam.a:$(LOBJS)
|
|
76 # $(AR) -csru $@ $(LOBJS)
|
|
77
|
|
78 #libBAMqc.so: $(LOBJS) $(HTSLIB)
|
|
79 # $(CC) -pthread $(LDFLAGS) -o $@ $(AOBJS) $(HTSLIB) $(LDLIBS) $(LIBCURSES) -lm -lz
|
|
80
|
|
81 libBAMqc.so: $(LOBJS) $(HTSLIB)
|
|
82 # $(CC) -shared -Wl,-soname, libBAMqc.so.$(PACKAGE_VERSION) -lpthread $(LDFLAGS) -o $@ $(LOBJS) $(HTSLIB) $(LDLIBS) -lz -lm
|
|
83 $(CC) -shared -lpthread $(LDFLAGS) -o $@ $(LOBJS) $(HTSLIB) $(LDLIBS) -lz -lm
|
|
84 # ln -sf $@ libBAMqc.so.$(PACKAGE_VERSION)
|
|
85
|
|
86 Constants_h = src/ezBAMQC/Constants.h
|
|
87 IntervalTree_h = src/ezBAMQC/IntervalTree.h $(Constants_h)
|
|
88 GeneFeatures_h = src/ezBAMQC/GeneFeatures.h $(Constants_h)
|
|
89 rRNA_h = src/ezBAMQC/rRNA.h $(IntervalTree_h) $(GeneFeatures_h)
|
|
90 Results_h = src/ezBAMQC/Resualts.h
|
|
91 Mappability_h = src/ezBAMQC/Mappability.h $(Constants_h)
|
|
92 InnerDist_prof_h = src/ezBAMQC/InnerDist_prof.h $(GeneFeatures_h)
|
|
93 Coverage_prof_h = src/ezBAMQC/Coverage_prof.h $(GeneFeatures_h)
|
|
94 parseBAM_h = src/ezBAMQC/parseBAM.h
|
|
95
|
|
96
|
|
97 IntervalTree.o: src/ezBAMQC/IntervalTree.cpp $(IntervalTree_h)
|
|
98 GeneFeatures.o: src/ezBAMQC/GeneFeatures.cpp $(GeneFeatures_h)
|
|
99 rRNA.o: src/ezBAMQC/rRNA.cpp $(rRNA_h)
|
|
100 Results.o: src/ezBAMQC/Results.cpp $(Results_h)
|
|
101 Mappability.o: src/ezBAMQC/Mappability.cpp $(Mappability_h) $(htslib_sam_h)
|
|
102 InnerDist_prof.o: src/ezBAMQC/InnerDist_prof.cpp $(InnerDist_prof_h) $(htslib_sam_h)
|
|
103 Coverage_prof.o: src/ezBAMQC/Coverage_prof.cpp $(Coverage_prof_h)
|
|
104 parseBAM.o: src/ezBAMQC/parseBAM.cpp $(parseBAM_h) $(htslib_sam_h) $(GeneFeatures_h) $(rRNA_h) $(Mappability_h) $(Coverage_prof_h) $(InnerDist_prof_h)
|
|
105
|
|
106
|
|
107 #install: $(PROGRAMS) $(BUILT_MISC_PROGRAMS)
|
|
108 # $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
|
|
109 # $(INSTALL_PROGRAM) $(PROGRAMS) $(MISC_PROGRAMS) $(DESTDIR)$(bindir)
|
|
110 # $(INSTALL_DATA) samtools.1 $(DESTDIR)$(man1dir)
|
|
111
|
|
112
|
|
113 mostlyclean:
|
|
114 -rm -f src/*.o
|
|
115
|
|
116 clean: mostlyclean
|
|
117 -rm -f $(PROGRAMS)
|
|
118
|
|
119 distclean: clean
|
|
120 -rm -f TAGS
|
|
121
|
|
122 clean-all: clean
|
|
123
|
|
124
|
|
125 tags:
|
|
126 ctags -f TAGS *.[ch] misc/*.[ch]
|
|
127
|
|
128
|
|
129 force:
|
|
130
|
|
131
|
|
132 .PHONY: all clean clean-all distclean force
|
|
133 .PHONY: mostlyclean tags
|