annotate ezBAMQC/src/htslib/Makefile @ 20:9de3bbec2479 draft default tip

Uploaded
author youngkim
date Thu, 31 Mar 2016 10:10:37 -0400
parents dfa3745e5fd8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
1 # Makefile for htslib, a C library for high-throughput sequencing data formats.
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 CC = gcc
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
26 AR = ar
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
27 RANLIB = ranlib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
28
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
29 CPPFLAGS = -I.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
30 # TODO: probably update cram code to make it compile cleanly with -Wc++-compat
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
31 CFLAGS = -g -Wall -O2
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
32 EXTRA_CFLAGS_PIC = -fPIC
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
33 LDFLAGS =
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
34 LDLIBS =
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
35
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
36 # For now these don't work too well as samtools also needs to know to
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
37 # add -lbz2 and -llzma if linking against the static libhts.a library.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
38 # TODO This needs configury and adding to htslib.pc.in.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
39 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
40 # # Bzip2 support; optionally used by CRAM.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
41 # HAVE_LIBBZ2 := $(shell echo -e "\#include <bzlib.h>\012int main(void){return 0;}" > .test.c && $(CC) $(CFLAGS) $(CPPFLAGS) -o .test .test.c -lbz2 2>/dev/null && echo yes)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
42 # ifeq "$(HAVE_LIBBZ2)" "yes"
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
43 # CPPFLAGS += -DHAVE_LIBBZ2
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
44 # LDLIBS += -lbz2
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
45 # endif
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
46 #
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
47 # # Lzma support; optionally used by CRAM.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
48 # HAVE_LIBLZMA := $(shell echo -e "\#include <lzma.h>\012int main(void){return 0;}" > .test.c && $(CC) $(CFLAGS) $(CPPFLAGS) -o .test .test.c -llzma 2>/dev/null && echo yes)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
49 # ifeq "$(HAVE_LIBLZMA)" "yes"
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
50 # CPPFLAGS += -DHAVE_LIBLZMA
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
51 # LDLIBS += -llzma
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
52 # endif
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
53
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
54 prefix = /usr/local
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
55 exec_prefix = $(prefix)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
56 bindir = $(exec_prefix)/bin
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
57 includedir = $(prefix)/include
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
58 libdir = $(exec_prefix)/lib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
59 datarootdir = $(prefix)/share
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
60 mandir = $(datarootdir)/man
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
61 man1dir = $(mandir)/man1
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
62 man5dir = $(mandir)/man5
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
63 pkgconfigdir= $(libdir)/pkgconfig
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
64
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
65 MKDIR_P = mkdir -p
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
66 INSTALL = install -p
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
67 INSTALL_PROGRAM = $(INSTALL)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
68 INSTALL_DATA = $(INSTALL) -m 644
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
69 INSTALL_DIR = $(MKDIR_P) -m 755
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
70
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
71 BUILT_PROGRAMS = \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
72 bgzip \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
73 htsfile \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
74 tabix
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
75
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
76 BUILT_TEST_PROGRAMS = \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
77 test/fieldarith \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
78 test/hfile \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
79 test/sam \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
80 test/test-regidx \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
81 test/test_view \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
82 test/test-vcf-api \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
83 test/test-vcf-sweep
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
84
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
85 all: lib-static lib-shared $(BUILT_PROGRAMS) $(BUILT_TEST_PROGRAMS)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
86
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
87 HTSPREFIX =
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
88 include htslib_vars.mk
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
89
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
90 lib-static: libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
91
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
92 # $(shell), :=, and ifeq/.../endif are GNU Make-specific. If you don't have
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
93 # GNU Make, comment out the parts of this conditional that don't apply.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
94 PLATFORM := $(shell uname -s)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
95 ifeq "$(PLATFORM)" "Darwin"
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
96 SHLIB_FLAVOUR = dylib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
97 lib-shared: libhts.dylib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
98 else
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
99 SHLIB_FLAVOUR = so
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
100 lib-shared: libhts.so
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
101 endif
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
102
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
103
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
104 PACKAGE_VERSION = 1.2.1
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
105 LIBHTS_SOVERSION = 1
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
106
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
107
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
108 # $(NUMERIC_VERSION) is for items that must have a numeric X.Y.Z string
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
109 # even if this is a dirty or untagged Git working tree.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
110 NUMERIC_VERSION = $(PACKAGE_VERSION)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
111
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
112 # If building from a Git repository, replace $(PACKAGE_VERSION) with the Git
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
113 # description of the working tree: either a release tag with the same value
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
114 # as $(PACKAGE_VERSION) above, or an exact description likely based on a tag.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
115 # Much of this is also GNU Make-specific. If you don't have GNU Make and/or
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
116 # are not building from a Git repository, comment out this conditional.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
117 ifneq "$(wildcard .git)" ""
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
118 original_version := $(PACKAGE_VERSION)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
119 PACKAGE_VERSION := $(shell git describe --always --dirty)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
120
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
121 # Unless the Git description matches /\d*\.\d*(\.\d*)?/, i.e., is exactly a tag
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
122 # with a numeric name, revert $(NUMERIC_VERSION) to the original version number
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
123 # written above, but with the patchlevel field bumped to 255.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
124 ifneq "$(subst ..,.,$(subst 0,,$(subst 1,,$(subst 2,,$(subst 3,,$(subst 4,,$(subst 5,,$(subst 6,,$(subst 7,,$(subst 8,,$(subst 9,,$(PACKAGE_VERSION))))))))))))" "."
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
125 empty :=
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
126 NUMERIC_VERSION := $(subst $(empty) ,.,$(wordlist 1,2,$(subst ., ,$(original_version))) 255)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
127 endif
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
128
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
129 # Force version.h to be remade if $(PACKAGE_VERSION) has changed.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
130 version.h: $(if $(wildcard version.h),$(if $(findstring "$(PACKAGE_VERSION)",$(shell cat version.h)),,force))
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
131 endif
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
132
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
133 version.h:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
134 echo '#define HTS_VERSION "$(PACKAGE_VERSION)"' > $@
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
135
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
136 print-version:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
137 @echo $(PACKAGE_VERSION)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
138
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
139
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
140 .SUFFIXES: .c .o .pico
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
141
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
142 .c.o:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
143 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
144
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
145 .c.pico:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
146 $(CC) $(CFLAGS) $(CPPFLAGS) $(EXTRA_CFLAGS_PIC) -c -o $@ $<
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
147
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
148
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
149 LIBHTS_OBJS = \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
150 kfunc.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
151 knetfile.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
152 kstring.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
153 bgzf.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
154 faidx.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
155 hfile.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
156 hfile_net.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
157 hts.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
158 regidx.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
159 sam.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
160 synced_bcf_reader.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
161 vcf_sweep.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
162 tbx.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
163 vcf.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
164 vcfutils.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
165 cram/cram_codecs.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
166 cram/cram_decode.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
167 cram/cram_encode.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
168 cram/cram_index.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
169 cram/cram_io.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
170 cram/cram_samtools.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
171 cram/cram_stats.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
172 cram/files.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
173 cram/mFILE.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
174 cram/md5.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
175 cram/open_trace_file.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
176 cram/pooled_alloc.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
177 cram/rANS_static.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
178 cram/sam_header.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
179 cram/string_alloc.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
180 cram/thread_pool.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
181 cram/vlen.o \
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
182 cram/zfio.o
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
183
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
184 cram_h = cram/cram.h $(cram_samtools_h) $(cram_sam_header_h) $(cram_structs_h) $(cram_io_h) cram/cram_encode.h cram/cram_decode.h cram/cram_stats.h cram/cram_codecs.h cram/cram_index.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
185 cram_io_h = cram/cram_io.h $(cram_misc_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
186 cram_misc_h = cram/misc.h cram/os.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
187 cram_sam_header_h = cram/sam_header.h cram/string_alloc.h cram/pooled_alloc.h htslib/khash.h htslib/kstring.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
188 cram_samtools_h = cram/cram_samtools.h $(htslib_sam_h) $(cram_sam_header_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
189 cram_structs_h = cram/cram_structs.h cram/thread_pool.h cram/string_alloc.h htslib/khash.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
190 cram_open_trace_file_h = cram/open_trace_file.h cram/mFILE.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
191 hfile_internal_h = hfile_internal.h $(htslib_hfile_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
192
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
193
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
194 # To be effective, config.mk needs to appear after most Makefile variables are
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
195 # set but before most rules appear, so that it can both use previously-set
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
196 # variables in its own rules' prerequisites and also update variables for use
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
197 # in later rules' prerequisites.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
198
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
199 # sinclude is GNU Make-specific. If you don't have GNU Make or another make
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
200 # that understands sinclude, change this to 'include' if you are using the
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
201 # configure script or just comment the line out if you are not.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
202 sinclude config.mk
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
203
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
204
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
205 libhts.a: $(LIBHTS_OBJS:.o=.pico)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
206 @-rm -f $@
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
207 $(AR) -rc $@ $(LIBHTS_OBJS:.o=.pico)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
208 -$(RANLIB) $@
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
209
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
210
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
211 # The target here is libhts.so, as that is the built file that other rules
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
212 # depend upon and that is used when -lhts appears in other program's recipes.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
213 # As a byproduct invisible to make, libhts.so.NN is also created, as it is the
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
214 # file used at runtime (when $LD_LIBRARY_PATH includes the build directory).
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
215
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
216 libhts.so: $(LIBHTS_OBJS:.o=.pico)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
217 $(CC) -shared -Wl,-soname,libhts.so.$(LIBHTS_SOVERSION) -pthread $(LDFLAGS) -o $@ $(LIBHTS_OBJS:.o=.pico) $(LDLIBS) -lz -lm
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
218 ln -sf $@ libhts.so.$(LIBHTS_SOVERSION)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
219
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
220 # Similarly this also creates libhts.NN.dylib as a byproduct, so that programs
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
221 # when run can find this uninstalled shared library (when $DYLD_LIBRARY_PATH
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
222 # includes this project's build directory).
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
223
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
224 libhts.dylib: $(LIBHTS_OBJS)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
225 $(CC) -dynamiclib -install_name $(libdir)/libhts.$(LIBHTS_SOVERSION).dylib -current_version $(NUMERIC_VERSION) -compatibility_version $(LIBHTS_SOVERSION) $(LDFLAGS) -o $@ $(LIBHTS_OBJS) $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
226 ln -sf $@ libhts.$(LIBHTS_SOVERSION).dylib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
227
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
228
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
229 bgzf.o bgzf.pico: bgzf.c $(htslib_hts_h) $(htslib_bgzf_h) $(htslib_hfile_h) htslib/khash.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
230 kstring.o kstring.pico: kstring.c htslib/kstring.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
231 knetfile.o knetfile.pico: knetfile.c htslib/knetfile.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
232 hfile.o hfile.pico: hfile.c $(htslib_hfile_h) $(hfile_internal_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
233 hfile_irods.o hfile_irods.pico: hfile_irods.c $(hfile_internal_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
234 hfile_net.o hfile_net.pico: hfile_net.c $(hfile_internal_h) htslib/knetfile.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
235 hts.o hts.pico: hts.c version.h $(htslib_hts_h) $(htslib_bgzf_h) $(cram_h) $(htslib_hfile_h) htslib/khash.h htslib/kseq.h htslib/ksort.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
236 vcf.o vcf.pico: vcf.c $(htslib_vcf_h) $(htslib_bgzf_h) $(htslib_tbx_h) $(htslib_hfile_h) htslib/khash.h htslib/kseq.h htslib/kstring.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
237 sam.o sam.pico: sam.c $(htslib_sam_h) $(htslib_bgzf_h) $(cram_h) $(htslib_hfile_h) htslib/khash.h htslib/kseq.h htslib/kstring.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
238 tbx.o tbx.pico: tbx.c $(htslib_tbx_h) $(htslib_bgzf_h) htslib/khash.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
239 faidx.o faidx.pico: faidx.c $(htslib_bgzf_h) $(htslib_faidx_h) $(htslib_hfile_h) htslib/khash.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
240 synced_bcf_reader.o synced_bcf_reader.pico: synced_bcf_reader.c $(htslib_synced_bcf_reader_h) htslib/kseq.h htslib/khash_str2int.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
241 vcf_sweep.o vcf_sweep.pico: vcf_sweep.c $(htslib_vcf_sweep_h) $(htslib_bgzf_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
242 vcfutils.o vcfutils.pico: vcfutils.c $(htslib_vcfutils_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
243 kfunc.o kfunc.pico: kfunc.c htslib/kfunc.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
244 regidx.o regidx.pico: regidx.c $(htslib_hts_h) $(HTSPREFIX)htslib/kstring.h $(HTSPREFIX)htslib/kseq.h $(HTSPREFIX)htslib/khash_str2int.h $(htslib_regidx_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
245
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
246 cram/cram_codecs.o cram/cram_codecs.pico: cram/cram_codecs.c $(cram_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
247 cram/cram_decode.o cram/cram_decode.pico: cram/cram_decode.c $(cram_h) cram/os.h cram/md5.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
248 cram/cram_encode.o cram/cram_encode.pico: cram/cram_encode.c $(cram_h) cram/os.h cram/md5.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
249 cram/cram_index.o cram/cram_index.pico: cram/cram_index.c $(htslib_hfile_h) $(cram_h) cram/os.h cram/zfio.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
250 cram/cram_io.o cram/cram_io.pico: cram/cram_io.c $(cram_h) cram/os.h cram/md5.h $(cram_open_trace_file_h) cram/rANS_static.h $(htslib_hfile_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
251 cram/cram_samtools.o cram/cram_samtools.pico: cram/cram_samtools.c $(cram_h) $(htslib_sam_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
252 cram/cram_stats.o cram/cram_stats.pico: cram/cram_stats.c $(cram_h) cram/os.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
253 cram/files.o cram/files.pico: cram/files.c $(cram_misc_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
254 cram/mFILE.o cram/mFILE.pico: cram/mFILE.c cram/os.h cram/mFILE.h cram/vlen.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
255 cram/md5.o cram/md5.pico: cram/md5.c cram/md5.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
256 cram/open_trace_file.o cram/open_trace_file.pico: cram/open_trace_file.c $(cram_open_trace_file_h) $(cram_misc_h) $(htslib_hfile_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
257 cram/pooled_alloc.o cram/pooled_alloc.pico: cram/pooled_alloc.c cram/pooled_alloc.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
258 cram/rANS_static.o cram/rANS_static.pico: cram/rANS_static.c cram/rANS_static.h cram/rANS_byte.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
259 cram/sam_header.o cram/sam_header.pico: cram/sam_header.c $(cram_sam_header_h) cram/string_alloc.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
260 cram/string_alloc.o cram/string_alloc.pico: cram/string_alloc.c cram/string_alloc.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
261 cram/thread_pool.o cram/thread_pool.pico: cram/thread_pool.c cram/thread_pool.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
262 cram/vlen.o cram/vlen.pico: cram/vlen.c cram/vlen.h cram/os.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
263 cram/zfio.o cram/zfio.pico: cram/zfio.c cram/os.h cram/zfio.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
264
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
265
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
266 bgzip: bgzip.o libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
267 $(CC) -pthread $(LDFLAGS) -o $@ bgzip.o libhts.a $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
268
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
269 htsfile: htsfile.o libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
270 $(CC) -pthread $(LDFLAGS) -o $@ htsfile.o libhts.a $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
271
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
272 tabix: tabix.o libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
273 $(CC) -pthread $(LDFLAGS) -o $@ tabix.o libhts.a $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
274
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
275 bgzip.o: bgzip.c $(htslib_bgzf_h) $(htslib_hts_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
276 htsfile.o: htsfile.c $(htslib_hfile_h) $(htslib_hts_h) $(htslib_sam_h) $(htslib_vcf_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
277 tabix.o: tabix.c $(htslib_tbx_h) $(htslib_sam_h) $(htslib_vcf_h) htslib/kseq.h $(htslib_bgzf_h) $(htslib_hts_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
278
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
279
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
280 # For tests that might use it, set $REF_PATH explicitly to use only reference
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
281 # areas within the test suite (or set it to ':' to use no reference areas).
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
282 check test: $(BUILT_TEST_PROGRAMS)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
283 test/fieldarith test/fieldarith.sam
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
284 test/hfile
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
285 test/sam test/ce.fa
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
286 test/test-regidx
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
287 cd test && REF_PATH=: ./test_view.pl
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
288 cd test && ./test.pl
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
289
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
290 test/fieldarith: test/fieldarith.o libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
291 $(CC) -pthread $(LDFLAGS) -o $@ test/fieldarith.o libhts.a $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
292
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
293 test/hfile: test/hfile.o libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
294 $(CC) $(LDFLAGS) -o $@ test/hfile.o libhts.a $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
295
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
296 test/sam: test/sam.o libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
297 $(CC) -pthread $(LDFLAGS) -o $@ test/sam.o libhts.a $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
298
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
299 test/test-regidx: test/test-regidx.o libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
300 $(CC) -pthread $(LDFLAGS) -o $@ test/test-regidx.o libhts.a $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
301
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
302 test/test_view: test/test_view.o libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
303 $(CC) -pthread $(LDFLAGS) -o $@ test/test_view.o libhts.a $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
304
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
305 test/test-vcf-api: test/test-vcf-api.o libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
306 $(CC) -pthread $(LDFLAGS) -o $@ test/test-vcf-api.o libhts.a $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
307
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
308 test/test-vcf-sweep: test/test-vcf-sweep.o libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
309 $(CC) -pthread $(LDFLAGS) -o $@ test/test-vcf-sweep.o libhts.a $(LDLIBS) -lz
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
310
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
311 test/fieldarith.o: test/fieldarith.c $(htslib_sam_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
312 test/hfile.o: test/hfile.c $(htslib_hfile_h) $(htslib_hts_defs_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
313 test/test-regidx.o: test/test-regidx.c $(htslib_regidx_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
314 test/sam.o: test/sam.c $(htslib_sam_h) $(htslib_faidx_h) htslib/kstring.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
315 test/test_view.o: test/test_view.c $(cram_h) $(htslib_sam_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
316 test/test-vcf-api.o: test/test-vcf-api.c $(htslib_hts_h) $(htslib_vcf_h) htslib/kstring.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
317 test/test-vcf-sweep.o: test/test-vcf-sweep.c $(htslib_vcf_sweep_h)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
318
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
319
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
320 install: libhts.a $(BUILT_PROGRAMS) installdirs install-$(SHLIB_FLAVOUR) install-pkgconfig
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
321 $(INSTALL_PROGRAM) $(BUILT_PROGRAMS) $(DESTDIR)$(bindir)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
322 $(INSTALL_DATA) htslib/*.h $(DESTDIR)$(includedir)/htslib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
323 $(INSTALL_DATA) libhts.a $(DESTDIR)$(libdir)/libhts.a
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
324 $(INSTALL_DATA) htsfile.1 tabix.1 $(DESTDIR)$(man1dir)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
325 $(INSTALL_DATA) faidx.5 sam.5 vcf.5 $(DESTDIR)$(man5dir)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
326
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
327 installdirs:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
328 $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/htslib $(DESTDIR)$(libdir) $(DESTDIR)$(man1dir) $(DESTDIR)$(man5dir) $(DESTDIR)$(pkgconfigdir)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
329
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
330 # After installation, the real file in $(libdir) will be libhts.so.X.Y.Z,
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
331 # with symlinks libhts.so (used via -lhts during linking of client programs)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
332 # and libhts.so.NN (used by client executables at runtime).
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
333
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
334 install-so: libhts.so installdirs
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
335 $(INSTALL_DATA) libhts.so $(DESTDIR)$(libdir)/libhts.so.$(PACKAGE_VERSION)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
336 ln -sf libhts.so.$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libhts.so
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
337 ln -sf libhts.so.$(PACKAGE_VERSION) $(DESTDIR)$(libdir)/libhts.so.$(LIBHTS_SOVERSION)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
338
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
339 install-dylib: libhts.dylib installdirs
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
340 $(INSTALL_PROGRAM) libhts.dylib $(DESTDIR)$(libdir)/libhts.$(PACKAGE_VERSION).dylib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
341 ln -sf libhts.$(PACKAGE_VERSION).dylib $(DESTDIR)$(libdir)/libhts.dylib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
342 ln -sf libhts.$(PACKAGE_VERSION).dylib $(DESTDIR)$(libdir)/libhts.$(LIBHTS_SOVERSION).dylib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
343
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
344 # Substitute these pseudo-autoconf variables only at install time
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
345 # so that "make install prefix=/prefix/path" etc continue to work.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
346 install-pkgconfig: installdirs
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
347 sed -e 's#@includedir@#$(includedir)#g;s#@libdir@#$(libdir)#g;s#@PACKAGE_VERSION@#$(PACKAGE_VERSION)#g' htslib.pc.in > $(DESTDIR)$(pkgconfigdir)/htslib.pc
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
348 chmod 644 $(DESTDIR)$(pkgconfigdir)/htslib.pc
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
349
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
350 # A pkg-config file (suitable for copying to $PKG_CONFIG_PATH) that provides
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
351 # flags for building against the uninstalled library in this build directory.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
352 htslib-uninstalled.pc: htslib.pc.in
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
353 sed -e 's#@includedir@#'`pwd`'#g;s#@libdir@#'`pwd`'#g' htslib.pc.in > $@
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
354
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
355
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
356 testclean:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
357 -rm -f test/*.tmp test/*.tmp.*
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
358
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
359 mostlyclean: testclean
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
360 -rm -f *.o *.pico cram/*.o cram/*.pico test/*.o test/*.dSYM version.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
361
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
362 clean: mostlyclean clean-$(SHLIB_FLAVOUR)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
363 -rm -f libhts.a $(BUILT_PROGRAMS) $(BUILT_TEST_PROGRAMS)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
364
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
365 distclean: clean
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
366 -rm -f config.cache config.log config.mk config.status
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
367 -rm -f TAGS *-uninstalled.pc
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
368
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
369 clean-so:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
370 -rm -f libhts.so libhts.so.*
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
371
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
372 clean-dylib:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
373 -rm -f libhts.dylib libhts.*.dylib
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
374
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
375
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
376 tags:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
377 ctags -f TAGS *.[ch] cram/*.[ch] htslib/*.h
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
378
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
379
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
380 force:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
381
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
382
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
383 .PHONY: all check clean distclean force install install-pkgconfig installdirs
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
384 .PHONY: lib-shared lib-static mostlyclean print-version tags test testclean
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
385 .PHONY: clean-so install-so
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
386 .PHONY: clean-dylib install-dylib