annotate ezBAMQC/Makefile @ 15:28cebcc7f774

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