X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/6ea7ec75d2fe0dd52bc3e86135412bfc92c3158c..002c3c665289b52eb20fd899fd3561e7f9d9e073:/package/pjsip/Makefile diff --git a/package/pjsip/Makefile b/package/pjsip/Makefile index 6216ebfc9..97a577155 100644 --- a/package/pjsip/Makefile +++ b/package/pjsip/Makefile @@ -1,58 +1,104 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME:=pjsip -PKG_VERSION:=1.6 +PKG_VERSION:=1.12 PKG_RELEASE:=1 PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.pjsip.org/release/1.6/ -#PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd +PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/ +PKG_MD5SUM:=1db8e5a5dd73b216409b15afa34651a4 + PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/pjproject-$(PKG_VERSION) -PKG_BUILD_DIR:=$(BUILD_DIR)/pjproject-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=TARGET_lantiq:kmod-ltq-tapi TARGET_lantiq:kmod-ltq-vmmc include $(INCLUDE_DIR)/package.mk -define Package/pjsip +define Package/pjsip-template SECTION:=lib CATEGORY:=Libraries - TITLE:=Voip lib URL:=http://www.pjsip.org/ - DEPENDS:=+libuuid + MAINTAINER:=John Crispin + TITLE:=pjsip-$(1) + VARIANT:=$(1) + DEPENDS:=+libuuid $(2) endef +CONFIGURE_PREFIX=/usr/pjsip-$(BUILD_VARIANT) + +ifeq ($(BUILD_VARIANT),oss) CONFIGURE_ARGS += \ - --disable-sound \ - --disable-oss \ - --disable-ext-sound \ - --disable-speex-aec \ + --disable-floating-point \ --enable-g711-codec \ --disable-l16-codec \ + --disable-g722-codec \ + --disable-g7221-codec \ --disable-gsm-codec \ + --disable-ilbc-coder \ + --disable-libsamplerate \ + --disable-ipp \ + --disable-ssl \ + --enable-oss \ + --enable-sound +endif + +ifeq ($(BUILD_VARIANT),ltq-tapi) +CONFIGURE_ARGS += \ + --disable-floating-point \ + --enable-g711-codec \ + --disable-l16-codec \ --disable-g722-codec \ --disable-g7221-codec \ - --disable-speex-codec \ --disable-ilbc-coder \ + --disable-gsm-codec \ --disable-libsamplerate \ --disable-ipp \ --disable-ssl \ + --enable-sound \ + --enable-ltq-tapi +EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/drv_tapi -I$(STAGING_DIR)/usr/include/drv_vmmc +endif -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/{include,lib} - $(CP) $(PKG_INSTALL_DIR)/usr/include/* \ - $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/* \ - $(1)/usr/lib/ +Package/pjsip-oss=$(call Package/pjsip-template,oss,BROKEN) +Package/pjsip-ltq-tapi=$(call Package/pjsip-template,ltq-tapi,@TARGET_lantiq +TARGET_lantiq:kmod-ltq-tapi +TARGET_lantiq:kmod-ltq-vmmc) + +USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1) +ifneq ($(USE_LOCAL),) +define Build/Prepare + $(CP) ./src/* $(PKG_BUILD_DIR) endef +endif -define Package/pjsip/install - $(INSTALL_DIR) $(1)/usr/sbin +define Build/Configure + (cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure) + $(call Build/Configure/Default) endef define Build/Compile - $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) + CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \ + CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) $(LIBGCC_S) -lm" \ + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) endef +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr + $(CP) $(PKG_INSTALL_DIR)/usr/pjsip-$(BUILD_VARIANT) $(1)/usr +endef + +define Package/pjsip-$(BUILD_VARIANT)/install + echo "foo" +endef -$(eval $(call BuildPackage,pjsip)) +$(eval $(call BuildPackage,pjsip-oss)) +$(eval $(call BuildPackage,pjsip-ltq-tapi))