forked from samtools/bcftools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamically export bcftools symbols to plugins
...instead of linking the plugins against libhts.so. This simplifies building and installation, as plugins no longer need to be able to find libhts.so/.dylib at runtime -- which to date has unfortunately often been done via $LD_LIBRARY_PATH. On OS X, build plugins as Mach-O bundles rather than shared libraries (and ensure that bcftools is built first, so is available for use with -bundle_loader). Fixes samtools#225. (TODO) The advice in print_plugin_usage_hint() should be revisited. When bcftools is linked to libhts.a statically, there is a small chance that a plugin will need HTSlib functions that have not been pulled in by the bcftools executable. This is surely unlikely, and can be prevented by linking bcftools or your plugin against a shared libhts.so. Fixes samtools#249; fixes samtools#224; supersedes and closes samtools#254.
- Loading branch information
Showing
4 changed files
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
plugins/color-chrs.so: plugins/color-chrs.c version.h version.c HMM.h HMM.c $(HTSDIR)/libhts.so | ||
$(CC) -fPIC -shared $(CFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS) -L$(HTSDIR) $(LDFLAGS) -o $@ HMM.c version.c $< -lhts $(LIBS) | ||
plugins/color-chrs.so: plugins/color-chrs.c version.h version.c HMM.h HMM.c | ||
$(CC) $(PLUGIN_FLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ HMM.c version.c $< $(LIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
plugins/fixploidy.so: plugins/fixploidy.c version.h version.c ploidy.h ploidy.c $(HTSDIR)/libhts.so | ||
$(CC) -fPIC -shared $(CFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS) -L$(HTSDIR) $(LDFLAGS) -o $@ ploidy.c version.c $< -lhts $(LIBS) | ||
plugins/fixploidy.so: plugins/fixploidy.c version.h version.c ploidy.h ploidy.c | ||
$(CC) $(PLUGIN_FLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ ploidy.c version.c $< $(LIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
plugins/vcf2sex.so: plugins/vcf2sex.c version.h version.c ploidy.h ploidy.c $(HTSDIR)/libhts.so | ||
$(CC) -fPIC -shared $(CFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS) -L$(HTSDIR) $(LDFLAGS) -o $@ ploidy.c version.c $< -lhts $(LIBS) | ||
plugins/vcf2sex.so: plugins/vcf2sex.c version.h version.c ploidy.h ploidy.c | ||
$(CC) $(PLUGIN_FLAGS) $(CFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ ploidy.c version.c $< $(LIBS) |