Upgrade speex, add fixed point for all targets (#1678)
[openwrt/svn-archive/archive.git] / libs / speex / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=speex
12 PKG_VERSION:=1.1.12
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/speex/
17 PKG_MD5SUM:=1bd6cdf3a0ebabf818cd72a3401e2610
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libspeex
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Open source speech compression codec library
29 DESCRIPTION:=\
30 Open source patent-free speech compression codec library.\\\
31 Speex is an Open Source/Free Software patent-free audio compression \\\
32 format designed for speech. The Speex Project aims to lower the \\\
33 barrier of entry for voice applications by providing a free \\\
34 alternative to expensive proprietary speech codecs. Moreover, Speex \\\
35 is well-adapted to Internet applications and provides useful features \\\
36 that are not present in most other codecs.\\\
37 \\\
38 This package contains the shared codec library, needed by other programs.
39 URL:=http://www.speex.org/
40 endef
41
42 TARGET_LDFLAGS:=$(TARGET_LDFLAGS) -lnotimpl
43
44 define Build/Configure
45 $(call Build/Configure/Default, \
46 --enable-shared \
47 --enable-static \
48 --enable-fixed-point \
49 --disable-oggtest \
50 )
51 endef
52
53 define Build/Compile
54 $(MAKE) -C $(PKG_BUILD_DIR) \
55 DESTDIR="$(PKG_INSTALL_DIR)" \
56 bin_PROGRAMS="" \
57 all install
58 endef
59
60 define Build/InstallDev
61 mkdir -p $(STAGING_DIR)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/speex $(STAGING_DIR)/usr/include/
63 mkdir -p $(STAGING_DIR)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.{a,so*} $(STAGING_DIR)/usr/lib/
65 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speex.pc $(STAGING_DIR)/usr/lib/pkgconfig/
67 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
68 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
69 endef
70
71 define Build/UninstallDev
72 rm -rf \
73 $(STAGING_DIR)/usr/include/speex \
74 $(STAGING_DIR)/usr/lib/libspeex.{a,so*} \
75 $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc
76 endef
77
78 define Package/libspeex/install
79 $(INSTALL_DIR) $(1)/usr/lib
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.so.* $(1)/usr/lib/
81 endef
82
83 $(eval $(call BuildPackage,libspeex))