package/rtmpdump: Fix static build
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 27 Jul 2014 07:57:20 +0000 (09:57 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 27 Jul 2014 08:30:03 +0000 (10:30 +0200)
Fixes
http://autobuild.buildroot.net/results/04c/04cc4f4878466715d980442bd7114fecbeb51c0b/

Quote from README:

A shared library is now built by default, in addition to the static
library. You can also turn it off if desired

  $ make SHARED=

The rtmpdump programs still link to the static library, regardless.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/rtmpdump/rtmpdump.mk

index 4a8a1b03b388696aa2ab95a23dd3eafdaaa82340..684e0cfb2074bc0ab52785c65648d52320739fcf 100644 (file)
@@ -31,6 +31,8 @@ RTMPDUMP_CFLAGS = $(TARGET_CFLAGS)
 
 ifneq ($(BR2_PREFER_STATIC_LIB),y)
     RTMPDUMP_CFLAGS += -fPIC
+else
+    RTMPDUMP_SHARED = "SHARED="
 endif
 
 define RTMPDUMP_BUILD_CMDS
@@ -39,15 +41,16 @@ define RTMPDUMP_BUILD_CMDS
                XCFLAGS="$(RTMPDUMP_CFLAGS)" \
                XLDFLAGS="$(TARGET_CFLAGS)" \
                CROSS_COMPILE="$(TARGET_CROSS)" \
+               $(RTMPDUMP_SHARED) \
                -C $(@D)/librtmp
 endef
 
 define RTMPDUMP_INSTALL_STAGING_CMDS
-       $(MAKE) prefix=/usr -C $(@D)/librtmp install DESTDIR=$(STAGING_DIR)
+       $(MAKE) prefix=/usr -C $(@D)/librtmp install DESTDIR=$(STAGING_DIR) $(RTMPDUMP_SHARED)
 endef
 
 define RTMPDUMP_INSTALL_TARGET_CMDS
-       $(MAKE) prefix=/usr -C $(@D)/librtmp install DESTDIR=$(TARGET_DIR)
+       $(MAKE) prefix=/usr -C $(@D)/librtmp install DESTDIR=$(TARGET_DIR) $(RTMPDUMP_SHARED)
 endef
 
 $(eval $(generic-package))