source: packages/libs/libmad/Makefile @ 21052

Last change on this file since 21052 was 21052, checked in by mirko, 7 years ago

make libmad depending on CONFIG_BUILD_PATENTED

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=libmad
11PKG_VERSION:=0.15.1b
12PKG_RELEASE:=3
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@SF/mad \
16        ftp://ftp.mars.org/pub/mpeg/
17PKG_MD5SUM:=1be543bc30c56fb6bea1d7bf6a64e66c
18
19PKG_FIXUP:=libtool
20PKG_INSTALL:=1
21
22include $(INCLUDE_DIR)/package.mk
23
24FPM:=default
25ifeq ($(ARCH),armeb)
26  FPM:=arm
27endif
28ifeq ($(ARCH),i386)
29  FPM:=intel
30endif
31ifeq ($(ARCH),mipsel)
32  FPM:=mips
33endif
34
35define 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  DEPENDS:=@BUILD_PATENTED
41endef
42
43define Package/libmad/description
44        MAD is a high-quality MPEG audio decoder. It currently supports
45        MPEG-1 and the MPEG-2 extension to lower sampling frequencies,
46        as well as the de facto MPEG 2.5 format. All three audio layers -
47        Layer I, Layer II, and Layer III (i.e. MP3) - are fully implemented.
48endef
49
50TARGET_CFLAGS += $(FPIC)
51
52CONFIGURE_ARGS+= \
53        --enable-shared \
54        --enable-static \
55        --enable-fpm="$(FPM)" \
56        --disable-debugging \
57        --enable-speed \
58
59# XXX: configure is parsing and "optimizing" CFLAGS, adding unsupported
60# XXX: compiler args to it (like -fforce-mem)
61# XXX: so pass an empty one to configure
62CONFIGURE_VARS+= \
63        CFLAGS="" \
64
65# XXX: and pass our own to make
66MAKE_FLAGS+= \
67        CFLAGS="$(TARGET_CFLAGS)" \
68
69define Build/InstallDev
70        $(INSTALL_DIR) $(1)/usr/include
71        $(CP) $(PKG_INSTALL_DIR)/usr/include/mad.h $(1)/usr/include/
72        $(INSTALL_DIR) $(1)/usr/lib
73        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.{a,so*} $(1)/usr/lib/
74endef
75
76define Package/libmad/install
77        $(INSTALL_DIR) $(1)/usr/lib
78        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(1)/usr/lib/
79endef
80
81$(eval $(call BuildPackage,libmad))
Note: See TracBrowser for help on using the repository browser.