annotate ezBAMQC/src/htslib/htslib.mk @ 0:dfa3745e5fd8

Uploaded
author youngkim
date Thu, 24 Mar 2016 17:12:52 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
1 # Makefile rules useful for third-party code using htslib's public API.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
2 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
3 # Copyright (C) 2013-2015 Genome Research Ltd.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
4 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
5 # Author: John Marshall <jm18@sanger.ac.uk>
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
6 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
7 # Permission is hereby granted, free of charge, to any person obtaining a copy
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
8 # of this software and associated documentation files (the "Software"), to deal
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
9 # in the Software without restriction, including without limitation the rights
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
10 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
11 # copies of the Software, and to permit persons to whom the Software is
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
12 # furnished to do so, subject to the following conditions:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
13 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
14 # The above copyright notice and this permission notice shall be included in
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
15 # all copies or substantial portions of the Software.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
16 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
18 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
19 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
20 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
21 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
22 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
23 # DEALINGS IN THE SOFTWARE.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
24
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
25 # The makefile fragment included below provides variables that can be used
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
26 # to express dependencies on headers supplied by an in-development htslib.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
27 # If your source file foo.c #includes <htslib/hts.h> and <htslib/kstring.h>,
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
28 # you can write the correct prerequisites for foo.o as:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
29 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
30 # HTSDIR = <path to htslib top-level directory>
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
31 # include $(HTSDIR)/htslib.mk
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
32 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
33 # foo.o: foo.c $(htslib_hts_h) $(HTSDIR)/htslib/kstring.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
34 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
35 # Variables are not provided for k*.h, as those never include other headers.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
36
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
37 HTSPREFIX = $(HTSDIR)/
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
38 include $(HTSDIR)/htslib_vars.mk
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
39
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
40 # Rules for rebuilding an in-development htslib's static and shared libraries.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
41 # If your program foo links with libhts, adding the appropriate prerequisite
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
42 # will cause the library to be rebuilt as necessary:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
43 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
44 # foo: foo.o $(HTSDIR)/libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
45 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
46 # or similarly if your target requires any of the tools supplied:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
47 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
48 # bar.bed.bgz.tbi: bar.bed.bgz $(HTSDIR)/tabix
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
49 # $(HTSDIR)/tabix -p bed bar.bed.bgz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
50
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
51 HTSLIB_PUBLIC_HEADERS = \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
52 $(HTSDIR)/htslib/bgzf.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
53 $(HTSDIR)/htslib/faidx.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
54 $(HTSDIR)/htslib/hfile.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
55 $(HTSDIR)/htslib/hts.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
56 $(HTSDIR)/htslib/hts_defs.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
57 $(HTSDIR)/htslib/khash.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
58 $(HTSDIR)/htslib/klist.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
59 $(HTSDIR)/htslib/knetfile.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
60 $(HTSDIR)/htslib/kseq.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
61 $(HTSDIR)/htslib/ksort.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
62 $(HTSDIR)/htslib/kstring.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
63 $(HTSDIR)/htslib/regidx.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
64 $(HTSDIR)/htslib/sam.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
65 $(HTSDIR)/htslib/synced_bcf_reader.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
66 $(HTSDIR)/htslib/tbx.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
67 $(HTSDIR)/htslib/vcf.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
68 $(HTSDIR)/htslib/vcf_sweep.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
69 $(HTSDIR)/htslib/vcfutils.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
70
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
71 HTSLIB_ALL = \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
72 $(HTSLIB_PUBLIC_HEADERS) \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
73 $(HTSDIR)/bgzf.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
74 $(HTSDIR)/faidx.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
75 $(HTSDIR)/hfile_internal.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
76 $(HTSDIR)/hfile.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
77 $(HTSDIR)/hfile_irods.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
78 $(HTSDIR)/hfile_net.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
79 $(HTSDIR)/hts.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
80 $(HTSDIR)/knetfile.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
81 $(HTSDIR)/kstring.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
82 $(HTSDIR)/regidx.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
83 $(HTSDIR)/sam.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
84 $(HTSDIR)/synced_bcf_reader.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
85 $(HTSDIR)/tbx.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
86 $(HTSDIR)/vcf.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
87 $(HTSDIR)/vcf_sweep.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
88 $(HTSDIR)/vcfutils.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
89 $(HTSDIR)/cram/cram.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
90 $(HTSDIR)/cram/cram_codecs.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
91 $(HTSDIR)/cram/cram_codecs.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
92 $(HTSDIR)/cram/cram_decode.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
93 $(HTSDIR)/cram/cram_decode.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
94 $(HTSDIR)/cram/cram_encode.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
95 $(HTSDIR)/cram/cram_encode.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
96 $(HTSDIR)/cram/cram_index.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
97 $(HTSDIR)/cram/cram_index.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
98 $(HTSDIR)/cram/cram_io.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
99 $(HTSDIR)/cram/cram_io.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
100 $(HTSDIR)/cram/cram_samtools.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
101 $(HTSDIR)/cram/cram_samtools.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
102 $(HTSDIR)/cram/cram_stats.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
103 $(HTSDIR)/cram/cram_stats.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
104 $(HTSDIR)/cram/cram_structs.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
105 $(HTSDIR)/cram/files.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
106 $(HTSDIR)/cram/mFILE.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
107 $(HTSDIR)/cram/mFILE.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
108 $(HTSDIR)/cram/md5.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
109 $(HTSDIR)/cram/md5.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
110 $(HTSDIR)/cram/misc.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
111 $(HTSDIR)/cram/open_trace_file.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
112 $(HTSDIR)/cram/open_trace_file.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
113 $(HTSDIR)/cram/os.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
114 $(HTSDIR)/cram/pooled_alloc.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
115 $(HTSDIR)/cram/pooled_alloc.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
116 $(HTSDIR)/cram/sam_header.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
117 $(HTSDIR)/cram/sam_header.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
118 $(HTSDIR)/cram/string_alloc.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
119 $(HTSDIR)/cram/string_alloc.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
120 $(HTSDIR)/cram/thread_pool.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
121 $(HTSDIR)/cram/thread_pool.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
122 $(HTSDIR)/cram/vlen.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
123 $(HTSDIR)/cram/vlen.h \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
124 $(HTSDIR)/cram/zfio.c \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
125 $(HTSDIR)/cram/zfio.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
126
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
127 $(HTSDIR)/libhts.a: $(HTSLIB_ALL)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
128 +cd $(HTSDIR) && $(MAKE) lib-static
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
129
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
130 $(HTSDIR)/libhts.so $(HTSDIR)/libhts.dylib: $(HTSLIB_ALL)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
131 +cd $(HTSDIR) && $(MAKE) lib-shared
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
132
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
133 $(HTSDIR)/bgzip: $(HTSDIR)/bgzip.c $(HTSLIB_PUBLIC_HEADERS)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
134 +cd $(HTSDIR) && $(MAKE) bgzip
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
135
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
136 $(HTSDIR)/htsfile: $(HTSDIR)/htsfile.c $(HTSLIB_PUBLIC_HEADERS)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
137 +cd $(HTSDIR) && $(MAKE) htsfile
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
138
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
139 $(HTSDIR)/tabix: $(HTSDIR)/tabix.c $(HTSLIB_PUBLIC_HEADERS)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
140 +cd $(HTSDIR) && $(MAKE) tabix
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
141
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
142 # Rules for phony targets. You may wish to have your corresponding phony
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
143 # targets invoke these in addition to their own recipes:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
144 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
145 # clean: clean-htslib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
146
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
147 clean-htslib install-htslib:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
148 +cd $(HTSDIR) && $(MAKE) $(@:-htslib=)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
149
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
150 .PHONY: clean-htslib install-htslib