tools/mktplinkfw: allow to specify hw_id, hw_rev and flash_layout
[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.10
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/
16 PKG_MD5SUM:=e215d0637d3422d49a63c2cde6673951
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,)
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 define Build/Prepare
76 $(PKG_UNPACK)
77 $(Build/Patch)
78 $(CP) ./src/* $(PKG_BUILD_DIR)
79 endef
80
81 define Build/Configure
82 (cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure)
83 $(call Build/Configure/Default)
84 endef
85
86 define Build/Compile
87 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
88 CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
89 LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) $(LIBGCC_S) -lm" \
90 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
91 endef
92
93 define Build/InstallDev
94 $(INSTALL_DIR) $(1)/usr
95 $(CP) $(PKG_INSTALL_DIR)/usr/pjsip-$(BUILD_VARIANT) $(1)/usr
96 endef
97
98 define Package/pjsip-$(BUILD_VARIANT)/install
99 echo "foo"
100 endef
101
102 $(eval $(call BuildPackage,pjsip-oss))
103 $(eval $(call BuildPackage,pjsip-ltq-tapi))
This page took 0.046207 seconds and 5 git commands to generate.