Skip to contentSkip to conversation

libebml: properly support static only builds

PATCH New Thomas Petazzoni 2 participants 2 messages Aug 15, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libebml: properly support static only builds

This commit adjusts the libebml package to not build a shared library when BR2_PREFER_STATIC_LIB=y.

Fixes:

http://autobuild.buildroot.org/results/262/26279f72b6c5708f363b3cce2102afa0eccc3a72/

---
 package/libebml/libebml.mk | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
package/libebml/libebml.mk +14 -3
index e555922..618ef1a 100644
@@ -11,16 +11,27 @@ LIBEBML_INSTALL_STAGING = YES
 LIBEBML_LICENSE = LGPLv2.1+
 LIBEBML_LICENSE_FILES = LICENSE.LGPL
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+LIBEBML_MAKE_TARGETS = staticlib
+LIBEBML_MAKE_INSTALL_TARGETS = install_staticlib install_headers
+else
+LIBEBML_MAKE_TARGETS = staticlib sharedlib
+LIBEBML_MAKE_INSTALL_TARGETS = install_staticlib install_sharedlib install_headers
+endif
+
 define LIBEBML_BUILD_CMDS
-	$(MAKE) -C $(@D)/make/linux CROSS="$(CCACHE) $(TARGET_CROSS)"
+	$(MAKE) -C $(@D)/make/linux CROSS="$(CCACHE) $(TARGET_CROSS)" \
+		$(LIBEBML_MAKE_TARGETS)
 endef
 
 define LIBEBML_INSTALL_STAGING_CMDS
-	$(MAKE) -C $(@D)/make/linux prefix=$(STAGING_DIR)/usr install
+	$(MAKE) -C $(@D)/make/linux prefix=$(STAGING_DIR)/usr \
+		$(LIBEBML_MAKE_INSTALL_TARGETS)
 endef
 
 define LIBEBML_INSTALL_TARGET_CMDS
-	$(MAKE) -C $(@D)/make/linux prefix=$(TARGET_DIR)/usr install
+	$(MAKE) -C $(@D)/make/linux prefix=$(TARGET_DIR)/usr \
+		$(LIBEBML_MAKE_INSTALL_TARGETS)
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.0.0
#1 lore raw

PATCH 1/1 libebml: properly support static only builds

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

This commit adjusts the libebml package to not build a shared library when BR2_PREFER_STATIC_LIB=y.

Fixes:

http://autobuild.buildroot.org/results/262/26279f72b6c5708f363b3cce2102afa0eccc3a72/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard