1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
Description: add static link to libbam.a
The Debian libbam package only provides a static library to link to,
adding this to the Makefile.
Author: Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de>
--- a/Makefile
+++ b/Makefile
@@ -622,6 +622,10 @@
$(V_DO)$(RANLIB) $@
endif
+ifeq ($(useshared),yes)
+ ADDITIONAL_STATIC_DEPS:=/usr/lib/libbam.a
+endif
+
lib/libgenometools.a: obj/gt_config.h $(LIBGENOMETOOLS_OBJ)
$(V_ECHO) "[link $(@F)]"
$(V_DO)test -d $(@D) || mkdir -p $(@D)
@@ -641,13 +645,14 @@
$(ADDITIONAL_SO_DEPS) \
$(ADDITIONAL_ZLIBS) \
$(OVERRIDELIBS) \
+ $(ADDITIONAL_STATIC_DEPS) \
$(VERSION_SCRIPT)
$(V_ECHO) "[link $(@F)]"
$(V_DO)test -d $(@D) || mkdir -p $(@D)
$(V_DO)$(CC) $(EXP_LDFLAGS) $(VERSION_SCRIPT_PARAM) \
$(GT_LDFLAGS) $(ADDITIONAL_SO_DEPS) $(SHARED) \
-Wl,-soname,$(notdir $@)$(SONAME_VERSION) $(LIBGENOMETOOLS_OBJ) \
- -o $@$(SONAME_VERSION) $(GTSHAREDLIB_LIBDEP)
+ -o $@$(SONAME_VERSION) $(GTSHAREDLIB_LIBDEP) $(ADDITIONAL_STATIC_DEPS)
define PROGRAM_template
$(1): $(2) $(OVERRIDELIBS)
@@ -665,41 +670,49 @@
$(eval $(call PROGRAM_template, bin/examples/custom_stream, \
obj/src/examples/custom_stream.o \
lib/libgenometools.a \
+ $(ADDITIONAL_STATIC_DEPS) \
$(ADDITIONAL_ZLIBS)))
$(eval $(call PROGRAM_template, bin/examples/gff3sort, \
obj/src/examples/gff3sort.o \
lib/libgenometools.a \
+ $(ADDITIONAL_STATIC_DEPS) \
$(ADDITIONAL_ZLIBS)))
$(eval $(call PROGRAM_template, bin/examples/gff3validator, \
obj/src/examples/gff3validator.o \
lib/libgenometools.a \
+ $(ADDITIONAL_STATIC_DEPS) \
$(ADDITIONAL_ZLIBS)))
$(eval $(call PROGRAM_template, bin/examples/noop, \
obj/src/examples/noop.o \
lib/libgenometools.a \
+ $(ADDITIONAL_STATIC_DEPS) \
$(ADDITIONAL_ZLIBS)))
$(eval $(call PROGRAM_template, bin/examples/sketch_constructed, \
obj/src/examples/sketch_constructed.o \
lib/libgenometools.a \
+ $(ADDITIONAL_STATIC_DEPS) \
$(ADDITIONAL_ZLIBS)))
$(eval $(call PROGRAM_template, bin/examples/sketch_parsed, \
obj/src/examples/sketch_parsed.o \
lib/libgenometools.a \
+ $(ADDITIONAL_STATIC_DEPS) \
$(ADDITIONAL_ZLIBS)))
$(eval $(call PROGRAM_template, bin/examples/sketch_parsed_with_ctrack, \
obj/src/examples/sketch_parsed_with_ctrack.o \
lib/libgenometools.a \
+ $(ADDITIONAL_STATIC_DEPS) \
$(ADDITIONAL_ZLIBS)))
$(eval $(call PROGRAM_template, bin/examples/sketch_parsed_with_ordering, \
obj/src/examples/sketch_parsed_with_ordering.o \
lib/libgenometools.a \
+ $(ADDITIONAL_STATIC_DEPS) \
$(ADDITIONAL_ZLIBS)))
bin/lua: $(LUAMAIN_OBJ)
|