brcm47xx: update bcma and ssb to master-2011-07-21
[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 PKG_BUILD_DEPENDS:=TARGET_lantiq:kmod-ltq-tapi TARGET_lantiq:kmod-ltq-vmmc
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/pjsip-template
26 SECTION:=lib
27 CATEGORY:=Libraries
28 URL:=http://www.pjsip.org/
29 MAINTAINER:=John Crispin <blogic@openwrt.org>
30 TITLE:=pjsip-$(1)
31 VARIANT:=$(1)
32 DEPENDS:=+libuuid $(2)
33 endef
34
35 CONFIGURE_PREFIX=/usr/pjsip-$(BUILD_VARIANT)
36
37 ifeq ($(BUILD_VARIANT),oss)
38 CONFIGURE_ARGS += \
39 --enable-g711-codec \
40 --disable-l16-codec \
41 --disable-g722-codec \
42 --disable-g7221-codec \
43 --disable-gsm-codec \
44 --disable-ilbc-coder \
45 --disable-libsamplerate \
46 --disable-ipp \
47 --disable-ssl \
48 --enable-oss \
49 --enable-sound
50 endif
51
52 ifeq ($(BUILD_VARIANT),ltq-tapi)
53 CONFIGURE_ARGS += \
54 --enable-g711-codec \
55 --disable-l16-codec \
56 --disable-g722-codec \
57 --disable-g7221-codec \
58 --disable-ilbc-coder \
59 --disable-gsm-codec \
60 --disable-libsamplerate \
61 --disable-ipp \
62 --disable-ssl \
63 --enable-sound \
64 --enable-ltq-tapi
65 EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/drv_tapi -I$(STAGING_DIR)/usr/include/drv_vmmc
66 endif
67
68 Package/pjsip-oss=$(call Package/pjsip-template,oss,)
69 Package/pjsip-ltq-tapi=$(call Package/pjsip-template,ltq-tapi,@TARGET_lantiq +TARGET_lantiq:kmod-ltq-tapi +TARGET_lantiq:kmod-ltq-vmmc)
70
71 define Build/Prepare
72 $(PKG_UNPACK)
73 $(Build/Patch)
74 $(CP) ./src/* $(PKG_BUILD_DIR)
75 endef
76
77 define Build/Configure
78 (cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure)
79 $(call Build/Configure/Default)
80 endef
81
82 define Build/Compile
83 CFLAGS="$(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
84 LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) $(LIBGCC_S)" \
85 $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
86 endef
87
88 define Build/InstallDev
89 $(INSTALL_DIR) $(1)/usr/
90 $(CP) $(PKG_INSTALL_DIR)/usr/pjsip-$(BUILD_VARIANT) \
91 $(1)/usr/
92 endef
93
94 define Package/pjsip-$(BUILD_VARIANT)/install
95 echo "foo"
96 endef
97
98 $(eval $(call BuildPackage,pjsip-oss))
99 $(eval $(call BuildPackage,pjsip-ltq-tapi))
This page took 0.042586 seconds and 5 git commands to generate.