[pjsip]
[openwrt/svn-archive/archive.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)/pjproject-$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/pjsip
24 SECTION:=lib
25 CATEGORY:=Libraries
26 TITLE:=Voip lib
27 URL:=http://www.pjsip.org/
28 DEPENDS:=+libuuid
29 MAINTAINER:=John Crispin <blogic@openwrt.org>
30 endef
31
32 define Package/pjsip/config
33 source "$(SOURCE)/Config.in"
34 endef
35
36 CONFIGURE_ARGS += \
37 --enable-g711-codec \
38 --disable-l16-codec \
39 --disable-g722-codec \
40 --disable-g7221-codec \
41 --disable-ilbc-coder \
42 --disable-libsamplerate \
43 --disable-ipp \
44 --disable-ssl \
45 $(call autoconf_bool,CONFIG_PJSIP_GSM,gsm-codec) \
46 $(call autoconf_bool,CONFIG_PJSIP_SPEEX,speex-aec) \
47 $(call autoconf_bool,CONFIG_PJSIP_OSS,oss) \
48 $(call autoconf_bool,CONFIG_PJSIP_SOUND,sound) \
49 $(call autoconf_bool,CONFIG_PJSIP_DEV_TAPI,ltq-tapi)
50
51 ifeq ($(CONFIG_PJSIP_DEV_TAPI),y)
52 EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/drv_tapi -I$(STAGING_DIR)/usr/include/drv_vmmc
53 endif
54
55 define Build/Configure
56 (cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure)
57 $(call Build/Configure/Default)
58 endef
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/{include,lib}
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/* \
63 $(1)/usr/include/
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* \
65 $(1)/usr/lib/
66 endef
67
68 define Package/pjsip/install
69 $(INSTALL_DIR) $(1)/usr/sbin
70 endef
71
72 define Build/Compile
73 CFLAGS="$(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
74 LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
75 $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
76 endef
77
78 $(eval $(call BuildPackage,pjsip))