916105d260266f28fcade9bd5a31cf2ed84f7610
[openwrt/svn-archive/archive.git] / libs / gsm / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=gsm
11 PKG_VERSION:=1.0.13
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://user.cs.tu-berlin.de/~jutta/gsm/
16 PKG_MD5SUM:=c1ba392ce61dc4aff1c29ea4e92f6df4
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.0-pl13
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/gsm/Default
23 TITLE:=GSM transcoding
24 URL:=http://user.cs.tu-berlin.de/~jutta/toast.html
25 endef
26
27 define Package/gsm/description/Default
28 An implementation of the European GSM 06.10 provisional standard
29 for full-rate speech transcoding, prI-ETS 300 036, which uses
30 RPE/LTP (residual pulse excitation/long term prediction) coding
31 at 13 kbit/s.
32 endef
33
34 define Package/libgsm
35 $(call Package/gsm/Default)
36 SECTION:=libs
37 CATEGORY:=Libraries
38 TITLE+= library
39 endef
40
41 define Package/libgsm/description
42 $(call Package/gsm/description/Default)
43 This package contains a shared GSM transcoding library, used by other
44 programs.
45 endef
46
47 define Package/gsm-utils
48 $(call Package/gsm/Default)
49 SECTION:=utils
50 CATEGORY:=Utilities
51 DEPENDS:=+libgsm
52 TITLE+= utilities
53 endef
54
55 define Package/gsm-utils/description
56 $(call Package/gsm/description/Default)
57 This package contains GSM transcoding utilities.
58 endef
59
60 define Build/Configure
61 endef
62
63 TARGET_CFLAGS += $(FPIC)
64
65 define Build/Compile
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 $(TARGET_CONFIGURE_OPTS) \
68 LD="$(TARGET_CC)" \
69 COPTS="$(TARGET_CFLAGS)" \
70 INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
71 all install
72 endef
73
74 define Package/libgsm/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.so.* $(1)/usr/lib/
77 endef
78
79 define Package/gsm-utils/install
80 $(INSTALL_DIR) $(1)/usr/bin
81 $(CP) $(PKG_INSTALL_DIR)/usr/bin/toast $(1)/usr/bin/
82 (cd $(1)/usr/bin; ln -sf toast untoast; ln -sf toast tcat)
83 endef
84
85 define Build/InstallDev
86 $(INSTALL_DIR) $(1)/usr/include/gsm
87 $(CP) $(PKG_INSTALL_DIR)/usr/include/gsm.h $(1)/usr/include/gsm/
88 $(INSTALL_DIR) $(1)/usr/lib
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.{a,so*} $(1)/usr/lib/
90 endef
91
92 $(eval $(call BuildPackage,libgsm))
93 $(eval $(call BuildPackage,gsm-utils))