diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-09-06 16:10:27 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-09-06 22:16:30 +0200 |
commit | 3c11ced46aed9ad42c32397b653e2a4cebd22d2e (patch) | |
tree | de01b34fb3cd35be5adab194c1a480354c71bc85 /package/libmatroska/libmatroska.mk | |
parent | 0b29df3f1941adea0d9e7a76171594222e9ab0e1 (diff) |
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/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/libmatroska/libmatroska.mk')
-rw-r--r-- | package/libmatroska/libmatroska.mk | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/package/libmatroska/libmatroska.mk b/package/libmatroska/libmatroska.mk index 868eff256..fe4927505 100644 --- a/package/libmatroska/libmatroska.mk +++ b/package/libmatroska/libmatroska.mk @@ -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)) |