kumquat-buildroot/package/live555/live555.mk

56 lines
1.7 KiB
Makefile
Raw Normal View History

################################################################################
#
# live555
#
################################################################################
LIVE555_VERSION = 2014.11.01
LIVE555_SOURCE = live.$(LIVE555_VERSION).tar.gz
LIVE555_SITE = http://www.live555.com/liveMedia/public
LIVE555_LICENSE = LGPLv2.1+
LIVE555_LICENSE_FILES = COPYING
LIVE555_INSTALL_STAGING = YES
LIVE555_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_STATIC_LIBS),y)
LIVE555_CONFIG_TARGET = linux
LIVE555_LIBRARY_LINK = $(TARGET_AR) cr
else
LIVE555_CONFIG_TARGET = linux-with-shared-libraries
LIVE555_LIBRARY_LINK = $(TARGET_CC) -o
LIVE555_CFLAGS += -fPIC
endif
ifndef ($(BR2_ENABLE_LOCALE),y)
LIVE555_CFLAGS += -DLOCALE_NOT_USED
endif
define LIVE555_CONFIGURE_CMDS
echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
echo 'PREFIX = /usr' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
# Must have a whitespace at the end of LIBRARY_LINK, otherwise static link
# fails
echo 'LIBRARY_LINK = $(LIVE555_LIBRARY_LINK) ' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
(cd $(@D); ./genMakefiles $(LIVE555_CONFIG_TARGET))
endef
define LIVE555_BUILD_CMDS
$(MAKE) -C $(@D) all
endef
define LIVE555_INSTALL_STAGING_CMDS
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install
endef
define LIVE555_INSTALL_TARGET_CMDS
live555: fix library installation The manual target installation commands optionally copy 3 executables that demonstrate the library usage, but do not the library itself. This results in the following errors at runtime: # openRTSP openRTSP: can't load library 'libliveMedia.so.38' # live555MediaServer live555MediaServer: can't load library 'libliveMedia.so.38' # MPEG2TransportStreamIndexer MPEG2TransportStreamIndexer: can't load library 'libliveMedia.so.38' # Tested with the following defconfig, which is basically qemu_arm_versatile_defconfig plus C++ and live555: BR2_arm=y BR2_KERNEL_HEADERS_VERSION=y BR2_DEFAULT_KERNEL_VERSION="4.0" BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.0" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.0.config" BR2_LINUX_KERNEL_ZIMAGE=y BR2_PACKAGE_LIVE555=y BR2_TARGET_ROOTFS_EXT2=y Fix the whole installation step by using the 'make install' step provided by the upstream package, similar to what was done in commit 44d15563c706dce48f84 for the staging installation. Note: this change has the effect of installing unconditionally all the test and demo executables produced by the live555 compilation process, and that were previously not (or optionally) copied. This increases the uncompressed target filesystem size by roughly 300 kB (tested for a 32-bit ARM target). Undesired files can be deleted in a post-build script. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-04-20 10:42:31 +02:00
$(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D) install
endef
$(eval $(generic-package))