1################################################################################ 2# 3# live555 4# 5################################################################################ 6 7LIVE555_VERSION = 2021.05.03 8LIVE555_SOURCE = live.$(LIVE555_VERSION).tar.gz 9LIVE555_SITE = http://www.live555.com/liveMedia/public 10# There is a COPYING file with the GPL-3.0 license text, but none of 11# the source files appear to be released under GPL-3.0, and the 12# project web site says it's licensed under the LGPL: 13# http://live555.com/liveMedia/faq.html#copyright-and-license 14LIVE555_LICENSE = LGPL-3.0+ 15LIVE555_LICENSE_FILES = COPYING.LESSER 16LIVE555_CPE_ID_VENDOR = live555 17LIVE555_CPE_ID_PRODUCT = streaming_media 18LIVE555_INSTALL_STAGING = YES 19 20LIVE555_CFLAGS = $(TARGET_CFLAGS) 21 22ifeq ($(BR2_STATIC_LIBS),y) 23LIVE555_CONFIG_TARGET = linux 24LIVE555_LIBRARY_LINK = $(TARGET_AR) cr 25else 26LIVE555_CONFIG_TARGET = linux-with-shared-libraries 27LIVE555_LIBRARY_LINK = $(TARGET_CC) -o 28LIVE555_CFLAGS += -fPIC 29endif 30 31ifeq ($(BR2_PACKAGE_OPENSSL),y) 32LIVE555_DEPENDENCIES += host-pkgconf openssl 33LIVE555_CONSOLE_LIBS = `$(PKG_CONFIG_HOST_BINARY) --libs openssl` 34# passed to ar for static linking, which gets confused by -L<dir> 35ifneq ($(BR2_STATIC_LIBS),y) 36LIVE555_LIVEMEDIA_LIBS = $(LIVE555_CONSOLE_LIBS) 37endif 38else 39LIVE555_CFLAGS += -DNO_OPENSSL 40endif 41 42ifndef ($(BR2_ENABLE_LOCALE),y) 43LIVE555_CFLAGS += -DLOCALE_NOT_USED 44endif 45 46define LIVE555_CONFIGURE_CMDS 47 echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) 48 echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) 49 echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) 50 51 echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) 52 echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) 53 echo 'PREFIX = /usr' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) 54 # Must have a whitespace at the end of LIBRARY_LINK, otherwise static link 55 # fails 56 echo 'LIBRARY_LINK = $(LIVE555_LIBRARY_LINK) ' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) 57 echo 'LIBS_FOR_CONSOLE_APPLICATION = $(LIVE555_CONSOLE_LIBS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) 58 echo 'LIBS_FOR_LIVEMEDIA_LIB = $(LIVE555_LIVEMEDIA_LIBS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) 59 (cd $(@D); ./genMakefiles $(LIVE555_CONFIG_TARGET)) 60endef 61 62define LIVE555_BUILD_CMDS 63 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all 64endef 65 66define LIVE555_INSTALL_STAGING_CMDS 67 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install 68endef 69 70define LIVE555_INSTALL_TARGET_CMDS 71 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D) install 72endef 73 74$(eval $(generic-package)) 75