Commit 48d648a0 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Peter Korsgaard
Browse files

dvb-apps: fix static only build

This commit makes dvb-apps behave properly in a static-only build. It
passes the static=1 variable to the Makefile, and adds a patch that
fixes the Makefile to not build .so libraries when static=1.

Fixes:

  http://autobuild.buildroot.org/results/3db/3dbfa7b692d4b123b3ba6b55c84df12818273554/



[Peter: drop V=1 as pointed out by Yann]
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent ebe6154f
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
Make.rules: don't build .so libraries when static=1

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Index: b/Make.rules
===================================================================
--- a/Make.rules
+++ b/Make.rules
@@ -9,7 +9,11 @@
 CFLAGS_LIB ?= -fPIC
 CFLAGS += $(CFLAGS_LIB)
 
+ifeq ($(static),1)
+libraries = $(lib_name).a
+else
 libraries = $(lib_name).so $(lib_name).a
+endif
 
 .PHONY: library
 
+8 −3
Original line number Diff line number Diff line
@@ -15,19 +15,24 @@ DVB_APPS_DEPENDENCIES = libiconv
DVB_APPS_LDLIBS += -liconv
endif

ifeq ($(BR2_PREFER_STATIC_LIB),y)
DVB_APPS_MAKE_OPTS += static=1
endif

DVB_APPS_INSTALL_STAGING = YES

define DVB_APPS_BUILD_CMDS
	$(TARGET_CONFIGURE_OPTS) LDLIBS="$(DVB_APPS_LDLIBS)" \
		$(MAKE) -C $(@D) CROSS_ROOT=$(STAGING_DIR) V=1
		$(MAKE) -C $(@D) CROSS_ROOT=$(STAGING_DIR) \
		$(DVB_APPS_MAKE_OPTS)
endef

define DVB_APPS_INSTALL_STAGING_CMDS
	$(MAKE) -C $(@D) V=1 DESTDIR=$(STAGING_DIR) install
	$(MAKE) -C $(@D) $(DVB_APPS_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
endef

define DVB_APPS_INSTALL_TARGET_CMDS
	$(MAKE) -C $(@D) V=1 DESTDIR=$(TARGET_DIR) install
	$(MAKE) -C $(@D) $(DVB_APPS_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
endef

$(eval $(generic-package))