source: trunk/package/pjsip/Makefile @ 26024

Last change on this file since 26024 was 26024, checked in by blogic, 5 years ago

[pjsip]

  • adds proper dependencies for pjsip-ltq-tapi
File size: 2.2 KB
Line 
1#
2# Copyright (C) 2010-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=pjsip
11PKG_VERSION:=1.8.5
12PKG_RELEASE:=2
13
14PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/
16PKG_MD5SUM:=f9aa9e58b4d697245eb4bfa7d81a54a3
17PKG_INSTALL:=1
18
19PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/pjproject-$(PKG_VERSION)
20
21include $(INCLUDE_DIR)/package.mk
22
23define Package/pjsip-template
24  SECTION:=lib
25  CATEGORY:=Libraries
26  URL:=http://www.pjsip.org/
27  MAINTAINER:=John Crispin <blogic@openwrt.org>
28  TITLE:=pjsip-$(1)
29  VARIANT:=$(1)
30  DEPENDS:=+libuuid $(2)
31endef
32
33CONFIGURE_PREFIX=/usr/pjsip-$(BUILD_VARIANT)
34
35ifeq ($(BUILD_VARIANT),oss)
36CONFIGURE_ARGS += \
37        --enable-g711-codec \
38        --disable-l16-codec \
39        --disable-g722-codec \
40        --disable-g7221-codec \
41        --disable-gsm-codec \
42        --disable-ilbc-coder \
43        --disable-libsamplerate \
44        --disable-ipp \
45        --disable-ssl \
46        --enable-oss \
47        --enable-sound
48endif
49
50ifeq ($(BUILD_VARIANT),ltq-tapi)
51CONFIGURE_ARGS += \
52        --enable-g711-codec \
53        --disable-l16-codec \
54        --disable-g722-codec \
55        --disable-g7221-codec \
56        --disable-ilbc-coder \
57        --disable-gsm-codec \
58        --disable-libsamplerate \
59        --disable-ipp \
60        --disable-ssl \
61        --enable-sound \
62        --enable-ltq-tapi
63EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/drv_tapi -I$(STAGING_DIR)/usr/include/drv_vmmc
64endif
65
66Package/pjsip-oss=$(call Package/pjsip-template,oss,)
67Package/pjsip-ltq-tapi=$(call Package/pjsip-template,ltq-tapi,@TARGET_lantiq +kmod-ltq-tapi +kmod-ltq-vmmc)
68
69define Build/Prepare
70        $(PKG_UNPACK)
71        $(Build/Patch)
72        $(CP) ./src/* $(PKG_BUILD_DIR)
73endef
74
75define Build/Configure
76        (cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure)
77        $(call Build/Configure/Default)
78endef
79
80define Build/Compile
81        CFLAGS="$(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
82        LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) $(LIBGCC_S)" \
83                $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
84endef
85
86define Build/InstallDev
87        $(INSTALL_DIR) $(1)/usr/
88        $(CP) $(PKG_INSTALL_DIR)/usr/pjsip-$(BUILD_VARIANT) \
89                $(1)/usr/
90endef
91
92define Package/pjsip-$(BUILD_VARIANT)/install
93        echo "foo"
94endef
95
96$(eval $(call BuildPackage,pjsip-oss))
97$(eval $(call BuildPackage,pjsip-ltq-tapi))
Note: See TracBrowser for help on using the repository browser.