|
1 | 1 | # Makefile for htslib, a C library for high-throughput sequencing data formats. |
2 | 2 | # |
3 | | -# Copyright (C) 2013-2021 Genome Research Ltd. |
| 3 | +# Copyright (C) 2013-2022 Genome Research Ltd. |
4 | 4 | # |
5 | 5 | # Author: John Marshall <jm18@sanger.ac.uk> |
6 | 6 | # |
@@ -131,8 +131,8 @@ LIBHTS_SOVERSION = 3 |
131 | 131 | # is not strictly necessary and should be removed the next time |
132 | 132 | # LIBHTS_SOVERSION is bumped (see #1144 and |
133 | 133 | # https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html#//apple_ref/doc/uid/TP40002013-SW23) |
134 | | -MACH_O_COMPATIBILITY_VERSION = 3.1.14 |
135 | | -MACH_O_CURRENT_VERSION = 3.1.14 |
| 134 | +MACH_O_COMPATIBILITY_VERSION = 3.1.15 |
| 135 | +MACH_O_CURRENT_VERSION = 3.1.15 |
136 | 136 |
|
137 | 137 | # $(NUMERIC_VERSION) is for items that must have a numeric X.Y.Z string |
138 | 138 | # even if this is a dirty or untagged Git working tree. |
@@ -282,10 +282,10 @@ SHLIB_FLAVOUR = cygdll |
282 | 282 | lib-shared: cyghts-$(LIBHTS_SOVERSION).dll |
283 | 283 | else ifeq "$(findstring MSYS,$(PLATFORM))" "MSYS" |
284 | 284 | SHLIB_FLAVOUR = dll |
285 | | -lib-shared: hts-$(LIBHTS_SOVERSION).dll |
| 285 | +lib-shared: hts-$(LIBHTS_SOVERSION).dll hts-$(LIBHTS_SOVERSION).def hts-$(LIBHTS_SOVERSION).lib |
286 | 286 | else ifeq "$(findstring MINGW,$(PLATFORM))" "MINGW" |
287 | 287 | SHLIB_FLAVOUR = dll |
288 | | -lib-shared: hts-$(LIBHTS_SOVERSION).dll |
| 288 | +lib-shared: hts-$(LIBHTS_SOVERSION).dll hts-$(LIBHTS_SOVERSION).def hts-$(LIBHTS_SOVERSION).lib |
289 | 289 | else |
290 | 290 | SHLIB_FLAVOUR = so |
291 | 291 | lib-shared: libhts.so |
@@ -330,6 +330,41 @@ cyghts-$(LIBHTS_SOVERSION).dll libhts.dll.a: $(LIBHTS_OBJS) |
330 | 330 | hts-$(LIBHTS_SOVERSION).dll hts.dll.a: $(LIBHTS_OBJS) |
331 | 331 | $(CC) -shared -Wl,--out-implib=hts.dll.a -Wl,--enable-auto-import -Wl,--exclude-all-symbols $(LDFLAGS) -o $@ -Wl,--whole-archive $(LIBHTS_OBJS) -Wl,--no-whole-archive $(LIBS) -lpthread |
332 | 332 |
|
| 333 | +hts-$(LIBHTS_SOVERSION).def: hts-$(LIBHTS_SOVERSION).dll |
| 334 | + gendef hts-$(LIBHTS_SOVERSION).dll |
| 335 | + |
| 336 | +hts-$(LIBHTS_SOVERSION).lib: hts-$(LIBHTS_SOVERSION).def |
| 337 | + dlltool -m i386:x86-64 -d hts-$(LIBHTS_SOVERSION).def -l hts-$(LIBHTS_SOVERSION).lib |
| 338 | + |
| 339 | +# Bundling libraries, binaries, dll dependencies, and licenses into a |
| 340 | +# single directory. NB: This is not needed for end-users, but a test bed |
| 341 | +# for maintainers building binary distributions. |
| 342 | +# |
| 343 | +# NOTE: only tested on the supported MSYS2/MINGW64 environment. |
| 344 | +dist-windows: DESTDIR= |
| 345 | +dist-windows: prefix=dist-windows |
| 346 | +dist-windows: install |
| 347 | + cp hts-$(LIBHTS_SOVERSION).def hts-$(LIBHTS_SOVERSION).lib dist-windows/lib |
| 348 | + cp `ldd hts-$(LIBHTS_SOVERSION).dll| awk '/mingw64/ {print $$3}'` dist-windows/bin |
| 349 | + mkdir -p dist-windows/share/licenses/htslib |
| 350 | + -cp -r /mingw64/share/licenses/mingw-w64-libraries \ |
| 351 | + /mingw64/share/licenses/brotli \ |
| 352 | + /mingw64/share/licenses/bzip2 \ |
| 353 | + /mingw64/share/licenses/gcc-libs \ |
| 354 | + /mingw64/share/licenses/libdeflate \ |
| 355 | + /mingw64/share/licenses/libpsl \ |
| 356 | + /mingw64/share/licenses/libtre \ |
| 357 | + /mingw64/share/licenses/libwinpthread \ |
| 358 | + /mingw64/share/licenses/openssl \ |
| 359 | + /mingw64/share/licenses/xz \ |
| 360 | + /mingw64/share/licenses/zlib \ |
| 361 | + /mingw64/share/licenses/zstd \ |
| 362 | + dist-windows/share/licenses/ |
| 363 | + -cp -r /usr/share/licenses/curl \ |
| 364 | + dist-windows/share/licenses/ |
| 365 | + cp LICENSE dist-windows/share/licenses/htslib/ |
| 366 | + |
| 367 | + |
333 | 368 | # Target to allow htslib.mk to build all the object files before it |
334 | 369 | # links the shared and static libraries. |
335 | 370 | hts-object-files: $(LIBHTS_OBJS) |
|
0 commit comments