f1317fffd1de00e004f8b86498d7a583c4e76a07
[openwrt.git] / package / pjsip / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=pjsip
11 PKG_VERSION:=1.8.5
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/
16 PKG_MD5SUM:=f9aa9e58b4d697245eb4bfa7d81a54a3
17 PKG_INSTALL:=1
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/pjproject-$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define 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)
31 endef
32
33 CONFIGURE_PREFIX=/usr/pjsip-$(BUILD_VARIANT)
34
35 ifeq ($(BUILD_VARIANT),oss)
36 CONFIGURE_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
48 endif
49
50 ifeq ($(BUILD_VARIANT),ltq-tapi)
51 CONFIGURE_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
63 EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/drv_tapi -I$(STAGING_DIR)/usr/include/drv_vmmc
64 endif
65
66 Package/pjsip-oss=$(call Package/pjsip-template,oss,)
67 Package/pjsip-ltq-tapi=$(call Package/pjsip-template,ltq-tapi,@TARGET_lantiq)
68
69 define Build/Prepare
70 $(PKG_UNPACK)
71 $(Build/Patch)
72 $(CP) ./src/* $(PKG_BUILD_DIR)
73 endef
74
75 define Build/Configure
76 (cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure)
77 $(call Build/Configure/Default)
78 endef
79
80 define Build/Compile
81 CFLAGS="$(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
82 LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
83 $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
84 endef
85
86 define Build/InstallDev
87 $(INSTALL_DIR) $(1)/usr/
88 $(CP) $(PKG_INSTALL_DIR)/usr/pjsip-$(BUILD_VARIANT) \
89 $(1)/usr/
90 endef
91
92 define Package/pjsip-$(BUILD_VARIANT)/install
93 echo "foo"
94 endef
95
96 $(eval $(call BuildPackage,pjsip-oss))
97 $(eval $(call BuildPackage,pjsip-ltq-tapi))
This page took 0.05198 seconds and 3 git commands to generate.