b4170d6c9a494c231a1a7256504a72fca100e0b7
[openwrt/svn-archive/archive.git] / libs / faad2 / Makefile
1 #
2 # Copyright (C) 2008 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:=faad2
11 PKG_VERSION:=2.7
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/faac
16 PKG_MD5SUM:=4c332fa23febc0e4648064685a3d4332
17
18 PKG_FIXUP = libtool
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/faad2/Default
23 URL:=http://www.audiocoding.com/faad2.html
24 TITLE:=Freeware Advanced Audio Decoder
25 endef
26
27 define Package/faad2/Default/description
28 FAAD2 is the fastest ISO AAC audio decoder available.
29 FAAD2 correctly decodes all MPEG-4 and MPEG-2 MAIN,
30 LOW, LTP, LD and ER object type AAC files.
31 endef
32
33 define Package/faad2
34 $(call Package/faad2/Default)
35 SECTION:=sound
36 CATEGORY:=Sound
37 TITLE+=player
38 DEPENDS:=+libfaad2
39 endef
40
41 define Package/faad2/description
42 $(call Package/faad2/Default/description)
43 This package contains a binary to play AAC or MP4 files.
44 endef
45
46 define Package/libfaad2
47 $(call Package/faad2/Default)
48 SECTION:=libs
49 CATEGORY:=Libraries
50 TITLE+=library
51 endef
52
53 define Package/libfaad2/description
54 $(call Package/faad2/Default/description)
55 This package contains the library.
56 endef
57
58 define Build/Configure
59 # This replacement were do according to many comments on the web because of gcc 3.4.5 version (.6 included).-
60 # wich doesn't recognices the -iquote parameter to AM_CFLAGS
61 ($(SED) 's,-iquote $$$$(top_srcdir),-I$$$$(top_srcdir),g' $(PKG_BUILD_DIR)/libfaad/Makefile.am; \
62 $(SED) 's,-iquote $$$$(top_srcdir),-I$$$$(top_srcdir),g' $(PKG_BUILD_DIR)/libfaad/Makefile.in);
63 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
64 autoreconf -vif \
65 );
66 $(call Build/Configure/Default, \
67 --with-mp4v2 \
68 --without-xmms \
69 , \
70 FAAD2_CPPFLAGS="-fno-builtin-cos -fno-builtin-sin -fno-builtin-log" \
71 )
72 endef
73
74 TARGET_CFLAGS += $(FPIC)
75
76 MAKE_FLAGS += \
77 DESTDIR="$(PKG_INSTALL_DIR)" \
78 all install \
79
80 define Build/InstallDev
81 $(INSTALL_DIR) $(1)/usr/include
82 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
83 $(INSTALL_DIR) $(1)/usr/lib
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.{a,so*} $(1)/usr/lib/
85 endef
86
87 define Package/faad2/install
88 $(INSTALL_DIR) $(1)/usr/bin
89 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/faad $(1)/usr/bin/
90 endef
91
92 define Package/libfaad2/install
93 $(INSTALL_DIR) $(1)/usr/lib
94 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.so.* $(1)/usr/lib/
95 endef
96
97 $(eval $(call BuildPackage,faad2))
98 $(eval $(call BuildPackage,libfaad2))