Drop firewall-mod-save, it is not needed anymore
[packages.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:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/faac
16 PKG_MD5SUM:=4c332fa23febc0e4648064685a3d4332
17
18 PKG_CONFIG_DEPENDS := \
19         CONFIG_SOFT_FLOAT \
20         CONFIG_FAAD2_ALWAYS_USE_FLOATING_POINT
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 TARGET_CFLAGS += $(FPIC)
28
29 # Use fixed point math, if we're using soft floats, and the user didn't
30 # specifically ask to use floats anyways.
31 ifeq ($(CONFIG_SOFT_FLOAT)-$(CONFIG_FAAD2_ALWAYS_USE_FLOATING_POINT),y-)
32 TARGET_CFLAGS+= -DFIXED_POINT
33 endif
34
35 define Package/faad2/Default
36   URL:=http://www.audiocoding.com/faad2.html
37   TITLE:=Freeware Advanced Audio Decoder
38 endef
39
40 define Package/faad2/Default/description
41         FAAD2 is the fastest ISO AAC audio decoder available.
42         FAAD2 correctly decodes all MPEG-4 and MPEG-2 MAIN,
43         LOW, LTP, LD and ER object type AAC files.
44 endef
45
46 define Package/faad2
47 $(call Package/faad2/Default)
48   SECTION:=sound
49   CATEGORY:=Sound
50   TITLE+=player
51   DEPENDS:=+libfaad2
52 endef
53
54 define Package/faad2/description
55 $(call Package/faad2/Default/description)
56   This package contains a binary to play AAC or MP4 files.
57 endef
58
59 define Package/libfaad2
60 $(call Package/faad2/Default)
61   SECTION:=libs
62   CATEGORY:=Libraries
63   TITLE+=library
64   DEPENDS:=@BUILD_PATENTED
65   MENU:=1
66 endef
67
68 define Package/libfaad2/config
69         source "$(SOURCE)/Config.in"
70 endef
71
72 define Package/libfaad2/description
73 $(call Package/faad2/Default/description)
74   This package contains the library.
75 endef
76
77 define Build/Configure
78         # This replacement were do according to many comments on the web because of gcc 3.4.5 version (.6 included).-
79         # wich doesn't recognices the -iquote parameter to AM_CFLAGS
80         ($(SED) 's,-iquote $$$$(top_srcdir),-I$$$$(top_srcdir),g' $(PKG_BUILD_DIR)/libfaad/Makefile.am; \
81         $(SED) 's,-iquote $$$$(top_srcdir),-I$$$$(top_srcdir),g' $(PKG_BUILD_DIR)/libfaad/Makefile.in);
82         (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
83                 autoreconf -vif \
84         );
85         $(call Build/Configure/Default, \
86                 --with-mp4v2 \
87                 --without-xmms \
88                 , \
89                 FAAD2_CPPFLAGS="-fno-builtin-cos -fno-builtin-sin -fno-builtin-log" \
90         )
91 endef
92
93 define Build/InstallDev
94         $(INSTALL_DIR) $(1)/usr/include
95         $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
96         $(INSTALL_DIR) $(1)/usr/lib
97         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.{a,so*} $(1)/usr/lib/
98 endef
99
100 define Package/faad2/install
101         $(INSTALL_DIR) $(1)/usr/bin
102         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/faad $(1)/usr/bin/
103 endef
104
105 define Package/libfaad2/install
106         $(INSTALL_DIR) $(1)/usr/lib
107         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.so.* $(1)/usr/lib/
108 endef
109
110 $(eval $(call BuildPackage,faad2))
111 $(eval $(call BuildPackage,libfaad2))