318519c0c2357207d590b5dcd47181a8f554b6cf
[openwrt/svn-archive/archive.git] / libs / libmad / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=libmad
11 PKG_VERSION:=0.15.1b
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/mad \
16 ftp://ftp.mars.org/pub/mpeg/
17 PKG_MD5SUM:=1be543bc30c56fb6bea1d7bf6a64e66c
18
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 FPM:=default
24 ifeq ($(ARCH),armeb)
25 FPM:=arm
26 endif
27 ifeq ($(ARCH),i386)
28 FPM:=intel
29 endif
30 ifeq ($(ARCH),mipsel)
31 FPM:=mips
32 endif
33
34 define Package/libmad
35 SECTION:=libs
36 CATEGORY:=Libraries
37 TITLE:=An high-quality MPEG audio decoding library
38 URL:=http://www.underbit.com/products/mad/
39 endef
40
41 define Package/libmad/description
42 MAD is a high-quality MPEG audio decoder. It currently supports
43 MPEG-1 and the MPEG-2 extension to lower sampling frequencies,
44 as well as the de facto MPEG 2.5 format. All three audio layers -
45 Layer I, Layer II, and Layer III (i.e. MP3) - are fully implemented.
46 endef
47
48 TARGET_CFLAGS += $(FPIC)
49
50 define Build/Configure
51 $(call Build/Configure/Default, \
52 --enable-shared \
53 --enable-static \
54 --enable-fpm="$(FPM)" \
55 --disable-debugging \
56 --enable-speed \
57 )
58 endef
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/mad.h $(1)/usr/include/
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.{a,so*} $(1)/usr/lib/
65 endef
66
67 define Package/libmad/install
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(1)/usr/lib/
70 endef
71
72 $(eval $(call BuildPackage,libmad))