[pjsip] bump to 1.12, merge improved lantiq aud_dev driver
[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.12
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/
16 PKG_MD5SUM:=1db8e5a5dd73b216409b15afa34651a4
17
18 PKG_INSTALL:=1
19 PKG_BUILD_PARALLEL:=1
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/pjproject-$(PKG_VERSION)
22
23 PKG_BUILD_DEPENDS:=TARGET_lantiq:kmod-ltq-tapi TARGET_lantiq:kmod-ltq-vmmc
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define 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)
35 endef
36
37 CONFIGURE_PREFIX=/usr/pjsip-$(BUILD_VARIANT)
38
39 ifeq ($(BUILD_VARIANT),oss)
40 CONFIGURE_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
53 endif
54
55 ifeq ($(BUILD_VARIANT),ltq-tapi)
56 CONFIGURE_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
69 EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/drv_tapi -I$(STAGING_DIR)/usr/include/drv_vmmc
70 endif
71
72 Package/pjsip-oss=$(call Package/pjsip-template,oss,BROKEN)
73 Package/pjsip-ltq-tapi=$(call Package/pjsip-template,ltq-tapi,@TARGET_lantiq +TARGET_lantiq:kmod-ltq-tapi +TARGET_lantiq:kmod-ltq-vmmc)
74
75 USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
76 ifneq ($(USE_LOCAL),)
77 define Build/Prepare
78 $(CP) ./src/* $(PKG_BUILD_DIR)
79 endef
80 endif
81
82 define Build/Configure
83 (cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure)
84 $(call Build/Configure/Default)
85 endef
86
87 define 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)
92 endef
93
94 define Build/InstallDev
95 $(INSTALL_DIR) $(1)/usr
96 $(CP) $(PKG_INSTALL_DIR)/usr/pjsip-$(BUILD_VARIANT) $(1)/usr
97 endef
98
99 define Package/pjsip-$(BUILD_VARIANT)/install
100 echo "foo"
101 endef
102
103 $(eval $(call BuildPackage,pjsip-oss))
104 $(eval $(call BuildPackage,pjsip-ltq-tapi))
This page took 0.044083 seconds and 5 git commands to generate.