79cb315578f18d81976f0eea26816cd59dae52b9
[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:=3
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_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 FPM:=default
25 ifeq ($(ARCH),armeb)
26 FPM:=arm
27 endif
28 ifeq ($(ARCH),i386)
29 FPM:=intel
30 endif
31 ifeq ($(ARCH),mipsel)
32 FPM:=mips
33 endif
34
35 define Package/libmad
36 SECTION:=libs
37 CATEGORY:=Libraries
38 TITLE:=An high-quality MPEG audio decoding library
39 URL:=http://www.underbit.com/products/mad/
40 endef
41
42 define Package/libmad/description
43 MAD is a high-quality MPEG audio decoder. It currently supports
44 MPEG-1 and the MPEG-2 extension to lower sampling frequencies,
45 as well as the de facto MPEG 2.5 format. All three audio layers -
46 Layer I, Layer II, and Layer III (i.e. MP3) - are fully implemented.
47 endef
48
49 TARGET_CFLAGS += $(FPIC)
50
51 define Build/Configure
52 $(call Build/Configure/Default, \
53 --enable-shared \
54 --enable-static \
55 --enable-fpm="$(FPM)" \
56 --disable-debugging \
57 --enable-speed \
58 )
59 endef
60
61 define Build/InstallDev
62 $(INSTALL_DIR) $(1)/usr/include
63 $(CP) $(PKG_INSTALL_DIR)/usr/include/mad.h $(1)/usr/include/
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.{a,so*} $(1)/usr/lib/
66 endef
67
68 define Package/libmad/install
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(1)/usr/lib/
71 endef
72
73 $(eval $(call BuildPackage,libmad))