2 # Copyright (C) 2008-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/faac
16 PKG_MD5SUM:=4c332fa23febc0e4648064685a3d4332
17 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
19 PKG_CONFIG_DEPENDS := \
21 CONFIG_FAAD2_ALWAYS_USE_FLOATING_POINT
26 include $(INCLUDE_DIR)/package.mk
28 TARGET_CFLAGS += $(FPIC)
30 # Use fixed point math, if we're using soft floats, and the user didn't
31 # specifically ask to use floats anyways.
32 ifeq ($(CONFIG_SOFT_FLOAT)-$(CONFIG_FAAD2_ALWAYS_USE_FLOATING_POINT),y-)
33 TARGET_CFLAGS+= -DFIXED_POINT
34 FAAD2_CONFIG_OPTS= --without-fp -nfp
37 define Package/faad2/Default
38 URL:=http://www.audiocoding.com/faad2.html
39 TITLE:=Freeware Advanced Audio Decoder
42 define Package/faad2/Default/description
43 FAAD2 is the fastest ISO AAC audio decoder available.
44 FAAD2 correctly decodes all MPEG-4 and MPEG-2 MAIN,
45 LOW, LTP, LD and ER object type AAC files.
49 $(call Package/faad2/Default)
56 define Package/faad2/description
57 $(call Package/faad2/Default/description)
58 This package contains a binary to play AAC or MP4 files.
61 define Package/libfaad2
62 $(call Package/faad2/Default)
66 DEPENDS:=@BUILD_PATENTED
70 define Package/libfaad2/config
71 source "$(SOURCE)/Config.in"
74 define Package/libfaad2/description
75 $(call Package/faad2/Default/description)
76 This package contains the library.
79 define Build/Configure
80 # This replacement were do according to many comments on the web because of gcc 3.4.5 version (.6 included).-
81 # which doesn't recognices the -iquote parameter to AM_CFLAGS
82 ($(SED) 's,-iquote $$$$(top_srcdir),-I$$$$(top_srcdir),g' $(PKG_BUILD_DIR)/libfaad/Makefile.am; \
83 $(SED) 's,-iquote $$$$(top_srcdir),-I$$$$(top_srcdir),g' $(PKG_BUILD_DIR)/libfaad/Makefile.in);
84 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
87 $(call Build/Configure/Default, \
89 $(FAAD2_CONFIG_OPTS) \
92 FAAD2_CPPFLAGS="-fno-builtin-cos -fno-builtin-sin -fno-builtin-log" \
96 define Build/InstallDev
97 $(INSTALL_DIR) $(1)/usr/include
98 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
99 $(INSTALL_DIR) $(1)/usr/lib
100 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.{a,so*} $(1)/usr/lib/
103 define Package/faad2/install
104 $(INSTALL_DIR) $(1)/usr/bin
105 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/faad $(1)/usr/bin/
108 define Package/libfaad2/install
109 $(INSTALL_DIR) $(1)/usr/lib
110 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.so.* $(1)/usr/lib/
113 $(eval $(call BuildPackage,faad2))
114 $(eval $(call BuildPackage,libfaad2))