16795ee33b403ac32fac6277214f742ff6fbd69f
[openwrt/svn-archive/archive.git] / libs / gsm / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gsm
11 PKG_VERSION:=1.0.10
12 PKG_RELEASE:=3
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.0-pl10
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/
17 PKG_MD5SUM:=4b148480f82e96d274248e13880ec873
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libgsm
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=A GSM transcoding library
25 URL:=ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/
26 endef
27
28 define Package/libgsm/description
29 A GSM 06.10 full-rate speech transcoding implementation (library).
30 An implementation of the European GSM 06.10 provisional standard
31 for full-rate speech transcoding, prI-ETS 300 036, which uses
32 RPE/LTP (residual pulse excitation/long term prediction) coding
33 at 13 kbit/s.
34 endef
35
36 define Package/gsm-utils
37 SECTION:=utils
38 CATEGORY:=Utilities
39 DEPENDS:=+libgsm
40 TITLE:=GSM transcoding utilities
41 URL:=ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/
42 endef
43
44 define Package/gsm-utils/description
45 A GSM 06.10 full-rate speech transcoding implementation (utilities).
46 An implementation of the European GSM 06.10 provisional standard
47 for full-rate speech transcoding, prI-ETS 300 036, which uses
48 RPE/LTP (residual pulse excitation/long term prediction) coding
49 at 13 kbit/s.
50 endef
51
52 define Build/Configure
53 endef
54
55 TARGET_CFLAGS += $(FPIC)
56
57 define Build/Compile
58 rm -rf $(PKG_INSTALL_DIR)
59 mkdir -p $(PKG_INSTALL_DIR)
60 $(MAKE) -C $(PKG_BUILD_DIR) \
61 $(TARGET_CONFIGURE_OPTS) \
62 LD="$(TARGET_CC)" \
63 COPTS="$(TARGET_CFLAGS)" \
64 INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
65 all install
66 endef
67
68 define Package/libgsm/install
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.so.* $(1)/usr/lib/
71 endef
72
73 define Package/gsm-utils/install
74 $(INSTALL_DIR) $(1)/usr/bin
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/toast $(1)/usr/bin/
76 (cd $(1)/usr/bin; ln -sf toast untoast; ln -sf toast tcat)
77 endef
78
79 define Build/InstallDev
80 mkdir -p $(1)/usr/include/gsm
81 $(CP) $(PKG_INSTALL_DIR)/usr/include/gsm.h $(1)/usr/include/gsm/
82 mkdir -p $(1)/usr/lib
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.{a,so*} $(1)/usr/lib/
84 endef
85
86 $(eval $(call BuildPackage,libgsm))
87 $(eval $(call BuildPackage,gsm-utils))