Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #
  2. # Copyright (C) 2008-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=faad2
  9. PKG_VERSION:=2.7
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/faac
  13. PKG_MD5SUM:=4c332fa23febc0e4648064685a3d4332
  14. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  15. PKG_CONFIG_DEPENDS := \
  16. CONFIG_SOFT_FLOAT \
  17. CONFIG_FAAD2_ALWAYS_USE_FLOATING_POINT
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. TARGET_CFLAGS += $(FPIC)
  22. # Use fixed point math, if we're using soft floats, and the user didn't
  23. # specifically ask to use floats anyways.
  24. ifeq ($(CONFIG_SOFT_FLOAT)-$(CONFIG_FAAD2_ALWAYS_USE_FLOATING_POINT),y-)
  25. TARGET_CFLAGS+= -DFIXED_POINT
  26. FAAD2_CONFIG_OPTS= --without-fp -nfp
  27. endif
  28. define Package/faad2/Default
  29. URL:=http://www.audiocoding.com/faad2.html
  30. TITLE:=Freeware Advanced Audio Decoder
  31. endef
  32. define Package/faad2/Default/description
  33. FAAD2 is the fastest ISO AAC audio decoder available.
  34. FAAD2 correctly decodes all MPEG-4 and MPEG-2 MAIN,
  35. LOW, LTP, LD and ER object type AAC files.
  36. endef
  37. define Package/faad2
  38. $(call Package/faad2/Default)
  39. SECTION:=sound
  40. CATEGORY:=Sound
  41. TITLE+=player
  42. DEPENDS:=+libfaad2
  43. endef
  44. define Package/faad2/description
  45. $(call Package/faad2/Default/description)
  46. This package contains a binary to play AAC or MP4 files.
  47. endef
  48. define Package/libfaad2
  49. $(call Package/faad2/Default)
  50. SECTION:=libs
  51. CATEGORY:=Libraries
  52. TITLE+=library
  53. DEPENDS:=@BUILD_PATENTED
  54. MENU:=1
  55. endef
  56. define Package/libfaad2/config
  57. source "$(SOURCE)/Config.in"
  58. endef
  59. define Package/libfaad2/description
  60. $(call Package/faad2/Default/description)
  61. This package contains the library.
  62. endef
  63. define Build/Configure
  64. # This replacement were do according to many comments on the web because of gcc 3.4.5 version (.6 included).-
  65. # which doesn't recognices the -iquote parameter to AM_CFLAGS
  66. ($(SED) 's,-iquote $$$$(top_srcdir),-I$$$$(top_srcdir),g' $(PKG_BUILD_DIR)/libfaad/Makefile.am; \
  67. $(SED) 's,-iquote $$$$(top_srcdir),-I$$$$(top_srcdir),g' $(PKG_BUILD_DIR)/libfaad/Makefile.in);
  68. (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
  69. autoreconf -vif \
  70. );
  71. $(call Build/Configure/Default, \
  72. --with-mp4v2 \
  73. $(FAAD2_CONFIG_OPTS) \
  74. --without-xmms \
  75. , \
  76. FAAD2_CPPFLAGS="-fno-builtin-cos -fno-builtin-sin -fno-builtin-log" \
  77. )
  78. endef
  79. define Build/InstallDev
  80. $(INSTALL_DIR) $(1)/usr/include
  81. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
  82. $(INSTALL_DIR) $(1)/usr/lib
  83. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.{a,so*} $(1)/usr/lib/
  84. endef
  85. define Package/faad2/install
  86. $(INSTALL_DIR) $(1)/usr/bin
  87. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/faad $(1)/usr/bin/
  88. endef
  89. define Package/libfaad2/install
  90. $(INSTALL_DIR) $(1)/usr/lib
  91. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.so.* $(1)/usr/lib/
  92. endef
  93. $(eval $(call BuildPackage,faad2))
  94. $(eval $(call BuildPackage,libfaad2))