Skip to contentSkip to conversation

libmatroska: properly support static-only build

PATCH New Thomas Petazzoni 2 participants 2 messages Sep 6, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libmatroska: properly support static-only build

This is similar to commit 9cef35b68f33ac1f332784fdfef61d3904c7db41 on libebml, since libmatroska uses the same Makefile logic as libebml. It makes sure BR2_PREFER_STATIC_LIB=y succeed by not building the shared library in this case.

Fixes:

http://autobuild.buildroot.org/results/12e/12e752330b30adb5078acd72a548cc172fa9ecb8/

---
 package/libmatroska/libmatroska.mk | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
package/libmatroska/libmatroska.mk +14 -3
index 868eff2..fe49275 100644
@@ -12,16 +12,27 @@ LIBMATROSKA_LICENSE = LGPLv2.1+
 LIBMATROSKA_LICENSE_FILES = LICENSE.LGPL
 LIBMATROSKA_DEPENDENCIES = libebml
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+LIBMATROSKA_MAKE_TARGETS = staticlib
+LIBMATROSKA_MAKE_INSTALL_TARGETS = install_staticlib install_headers
+else
+LIBMATROSKA_MAKE_TARGETS = staticlib sharedlib
+LIBMATROSKA_MAKE_INSTALL_TARGETS = install_staticlib install_sharedlib install_headers
+endif
+
 define LIBMATROSKA_BUILD_CMDS
-	$(MAKE) -C $(@D)/make/linux CROSS="$(CCACHE) $(TARGET_CROSS)"
+	$(MAKE) -C $(@D)/make/linux CROSS="$(CCACHE) $(TARGET_CROSS)" \
+		$(LIBMATROSKA_MAKE_TARGETS)
 endef
 
 define LIBMATROSKA_INSTALL_STAGING_CMDS
-	$(MAKE) -C $(@D)/make/linux prefix=$(STAGING_DIR)/usr install
+	$(MAKE) -C $(@D)/make/linux prefix=$(STAGING_DIR)/usr \
+		$(LIBMATROSKA_MAKE_INSTALL_TARGETS)
 endef
 
 define LIBMATROSKA_INSTALL_TARGET_CMDS
-	$(MAKE) -C $(@D)/make/linux prefix=$(TARGET_DIR)/usr install
+	$(MAKE) -C $(@D)/make/linux prefix=$(TARGET_DIR)/usr \
+		$(LIBMATROSKA_MAKE_INSTALL_TARGETS)
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.0.0
#1 lore raw

PATCH 1/1 libmatroska: properly support static-only build

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

This is similar to commit 9cef35b68f33ac1f332784fdfef61d3904c7db41 on libebml, since libmatroska uses the same Makefile logic as libebml. It makes sure BR2_PREFER_STATIC_LIB=y succeed by not building the shared library in this case.

Quoted 5 lines

Fixes:

http://autobuild.buildroot.org/results/12e/12e752330b30adb5078acd72a548cc172fa9ecb8/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard