source: trunk/package/pjsip/Makefile @ 30520

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

[pjsip] bump to 1.12, merge improved lantiq aud_dev driver

File size: 2.6 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.12
12PKG_RELEASE:=1
13
14PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/
16PKG_MD5SUM:=1db8e5a5dd73b216409b15afa34651a4
17
18PKG_INSTALL:=1
19PKG_BUILD_PARALLEL:=1
20
21PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/pjproject-$(PKG_VERSION)
22
23PKG_BUILD_DEPENDS:=TARGET_lantiq:kmod-ltq-tapi TARGET_lantiq:kmod-ltq-vmmc
24
25include $(INCLUDE_DIR)/package.mk
26
27define Package/pjsip-template
28  SECTION:=lib
29  CATEGORY:=Libraries
30  URL:=http://www.pjsip.org/
31  MAINTAINER:=John Crispin <blogic@openwrt.org>
32  TITLE:=pjsip-$(1)
33  VARIANT:=$(1)
34  DEPENDS:=+libuuid $(2)
35endef
36
37CONFIGURE_PREFIX=/usr/pjsip-$(BUILD_VARIANT)
38
39ifeq ($(BUILD_VARIANT),oss)
40CONFIGURE_ARGS += \
41        --disable-floating-point \
42        --enable-g711-codec \
43        --disable-l16-codec \
44        --disable-g722-codec \
45        --disable-g7221-codec \
46        --disable-gsm-codec \
47        --disable-ilbc-coder \
48        --disable-libsamplerate \
49        --disable-ipp \
50        --disable-ssl \
51        --enable-oss \
52        --enable-sound
53endif
54
55ifeq ($(BUILD_VARIANT),ltq-tapi)
56CONFIGURE_ARGS += \
57        --disable-floating-point \
58        --enable-g711-codec \
59        --disable-l16-codec \
60        --disable-g722-codec \
61        --disable-g7221-codec \
62        --disable-ilbc-coder \
63        --disable-gsm-codec \
64        --disable-libsamplerate \
65        --disable-ipp \
66        --disable-ssl \
67        --enable-sound \
68        --enable-ltq-tapi
69EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/drv_tapi -I$(STAGING_DIR)/usr/include/drv_vmmc
70endif
71
72Package/pjsip-oss=$(call Package/pjsip-template,oss,BROKEN)
73Package/pjsip-ltq-tapi=$(call Package/pjsip-template,ltq-tapi,@TARGET_lantiq +TARGET_lantiq:kmod-ltq-tapi +TARGET_lantiq:kmod-ltq-vmmc)
74
75USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
76ifneq ($(USE_LOCAL),)
77define Build/Prepare
78        $(CP) ./src/*  $(PKG_BUILD_DIR)
79endef
80endif
81
82define Build/Configure
83        (cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure)
84        $(call Build/Configure/Default)
85endef
86
87define Build/Compile
88        CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
89        CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
90        LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) $(LIBGCC_S) -lm" \
91                $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
92endef
93
94define Build/InstallDev
95        $(INSTALL_DIR) $(1)/usr
96        $(CP) $(PKG_INSTALL_DIR)/usr/pjsip-$(BUILD_VARIANT) $(1)/usr
97endef
98
99define Package/pjsip-$(BUILD_VARIANT)/install
100        echo "foo"
101endef
102
103$(eval $(call BuildPackage,pjsip-oss))
104$(eval $(call BuildPackage,pjsip-ltq-tapi))
Note: See TracBrowser for help on using the repository browser.