2011-02-02 01:07:54 +02:00
|
|
|
#
|
2012-06-04 02:37:58 +03:00
|
|
|
# Copyright (C) 2010-2012 OpenWrt.org
|
2011-02-02 01:07:54 +02:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2010-11-03 21:12:34 +02:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=pjsip
|
2012-06-04 02:37:58 +03:00
|
|
|
PKG_VERSION:=1.14.2
|
2012-02-14 17:05:55 +02:00
|
|
|
PKG_RELEASE:=1
|
2010-11-03 21:12:34 +02:00
|
|
|
|
|
|
|
PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
|
2011-02-02 01:07:54 +02:00
|
|
|
PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/
|
2012-06-04 02:37:58 +03:00
|
|
|
PKG_MD5SUM:=05428502384c16e7abd85f047e6e2f6c
|
2011-11-12 00:23:26 +02:00
|
|
|
|
2010-11-03 21:12:34 +02:00
|
|
|
PKG_INSTALL:=1
|
2011-11-12 00:23:26 +02:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2010-11-03 21:12:34 +02:00
|
|
|
|
2011-02-07 23:47:54 +02:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/pjproject-$(PKG_VERSION)
|
2010-11-03 21:12:34 +02:00
|
|
|
|
2012-08-13 14:08:13 +03:00
|
|
|
include $(INCLUDE_DIR)/ltqtapi.mk
|
|
|
|
PKG_BUILD_DEPENDS:=$(LTQ_TAPI_BUILD_DEPENDS)
|
2011-07-03 20:38:52 +03:00
|
|
|
|
2010-11-03 21:12:34 +02:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2011-02-07 23:47:54 +02:00
|
|
|
define Package/pjsip-template
|
2010-11-03 21:12:34 +02:00
|
|
|
SECTION:=lib
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
URL:=http://www.pjsip.org/
|
2011-02-02 01:07:54 +02:00
|
|
|
MAINTAINER:=John Crispin <blogic@openwrt.org>
|
2011-02-07 23:47:54 +02:00
|
|
|
TITLE:=pjsip-$(1)
|
|
|
|
VARIANT:=$(1)
|
|
|
|
DEPENDS:=+libuuid $(2)
|
2011-02-02 01:07:54 +02:00
|
|
|
endef
|
|
|
|
|
2011-02-07 23:47:54 +02:00
|
|
|
CONFIGURE_PREFIX=/usr/pjsip-$(BUILD_VARIANT)
|
2010-11-03 21:12:34 +02:00
|
|
|
|
2011-02-07 23:47:54 +02:00
|
|
|
ifeq ($(BUILD_VARIANT),oss)
|
2010-11-03 21:12:34 +02:00
|
|
|
CONFIGURE_ARGS += \
|
2011-11-12 00:23:26 +02:00
|
|
|
--disable-floating-point \
|
2010-11-03 21:12:34 +02:00
|
|
|
--enable-g711-codec \
|
|
|
|
--disable-l16-codec \
|
|
|
|
--disable-g722-codec \
|
|
|
|
--disable-g7221-codec \
|
2011-02-07 23:47:54 +02:00
|
|
|
--disable-gsm-codec \
|
2010-11-03 21:12:34 +02:00
|
|
|
--disable-ilbc-coder \
|
|
|
|
--disable-libsamplerate \
|
|
|
|
--disable-ipp \
|
|
|
|
--disable-ssl \
|
2011-02-07 23:47:54 +02:00
|
|
|
--enable-oss \
|
|
|
|
--enable-sound
|
|
|
|
endif
|
2011-02-02 01:07:54 +02:00
|
|
|
|
2011-02-07 23:47:54 +02:00
|
|
|
ifeq ($(BUILD_VARIANT),ltq-tapi)
|
|
|
|
CONFIGURE_ARGS += \
|
2011-11-12 00:23:26 +02:00
|
|
|
--disable-floating-point \
|
2011-02-07 23:47:54 +02:00
|
|
|
--enable-g711-codec \
|
|
|
|
--disable-l16-codec \
|
|
|
|
--disable-g722-codec \
|
|
|
|
--disable-g7221-codec \
|
|
|
|
--disable-ilbc-coder \
|
|
|
|
--disable-gsm-codec \
|
|
|
|
--disable-libsamplerate \
|
|
|
|
--disable-ipp \
|
|
|
|
--disable-ssl \
|
|
|
|
--enable-sound \
|
|
|
|
--enable-ltq-tapi
|
2011-02-02 01:07:54 +02:00
|
|
|
EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/drv_tapi -I$(STAGING_DIR)/usr/include/drv_vmmc
|
|
|
|
endif
|
|
|
|
|
2012-02-14 17:05:55 +02:00
|
|
|
Package/pjsip-oss=$(call Package/pjsip-template,oss,BROKEN)
|
2012-08-13 14:08:13 +03:00
|
|
|
Package/pjsip-ltq-tapi=$(call Package/pjsip-template,ltq-tapi,$(LTQ_TAPI_DEPENDS))
|
2010-11-03 21:12:34 +02:00
|
|
|
|
2012-02-14 17:05:55 +02:00
|
|
|
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
|
|
|
|
ifneq ($(USE_LOCAL),)
|
2011-02-07 23:47:54 +02:00
|
|
|
define Build/Prepare
|
2012-02-14 17:05:55 +02:00
|
|
|
$(CP) ./src/* $(PKG_BUILD_DIR)
|
2010-11-03 21:12:34 +02:00
|
|
|
endef
|
2012-02-14 17:05:55 +02:00
|
|
|
endif
|
2010-11-03 21:12:34 +02:00
|
|
|
|
2011-02-07 23:47:54 +02:00
|
|
|
define Build/Configure
|
|
|
|
(cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure)
|
|
|
|
$(call Build/Configure/Default)
|
2010-11-03 21:12:34 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2011-11-12 00:23:26 +02:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
|
|
|
|
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
|
2012-06-16 02:42:48 +03:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS) -lc $(LIBGCC_S) -lm" \
|
2011-11-12 00:23:26 +02:00
|
|
|
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
|
2010-11-03 21:12:34 +02:00
|
|
|
endef
|
|
|
|
|
2011-02-07 23:47:54 +02:00
|
|
|
define Build/InstallDev
|
2011-11-12 00:23:26 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/pjsip-$(BUILD_VARIANT) $(1)/usr
|
2011-02-07 23:47:54 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,pjsip-oss))
|
|
|
|
$(eval $(call BuildPackage,pjsip-ltq-tapi))
|