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