Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #
  2. # Copyright (C) 2008-2015 OpenWrt.org
  3. # Copyright (C) 2016 Luiz Angelo Daros de Luca
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=libvpx
  10. PKG_VERSION:=1.7.0
  11. PKG_RELEASE:=1
  12. PKG_REV:=v$(PKG_VERSION)
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
  14. PKG_MIRROR_HASH:=be50ff18464d614a08726597ecbd72d1f11ec69ec04df2d9acdf646ecd9adcca
  15. PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx
  16. PKG_SOURCE_PROTO:=git
  17. PKG_SOURCE_VERSION:=$(PKG_REV)
  18. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  20. PKG_LICENSE:=BSD-3-Clause
  21. PKG_LICENSE_FILES:=LICENSE
  22. PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION))))
  23. PKG_INSTALL:=1
  24. include $(INCLUDE_DIR)/package.mk
  25. define Package/libvpx
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE:=libvpx
  29. URL:=http://www.webmproject.org/
  30. DEPENDS:=+libpthread
  31. ABI_VERSION:=$(PKG_ABI_VERSION)
  32. endef
  33. define Package/libvpx/description
  34. libvpx is a VP8/VP9 Codec SDK.
  35. endef
  36. CONFIGURE_ARGS = \
  37. --target=generic-gnu \
  38. --prefix=$(CONFIGURE_PREFIX) \
  39. --libdir=/usr/lib \
  40. --enable-static \
  41. --enable-shared \
  42. --disable-examples \
  43. --disable-docs \
  44. --disable-unit-tests \
  45. # Add --enable-small as openwrt gcc flags are overwritten
  46. ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
  47. CONFIGURE_ARGS += --enable-small
  48. endif
  49. # libvpx expects gcc as linker but uses $LD if provided
  50. # However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
  51. CONFIGURE_VARS += \
  52. CROSS=$(GNU_TARGET_NAME) \
  53. LD="$(TARGET_CC)" \
  54. MAKE_FLAGS += \
  55. LD="$(TARGET_CC)" \
  56. define Build/InstallDev
  57. $(INSTALL_DIR) $(1)/usr/include/vpx/
  58. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/vpx/* $(1)/usr/include/vpx/
  59. $(INSTALL_DIR) $(1)/usr/lib/
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} $(1)/usr/lib/
  61. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  62. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  63. endef
  64. define Package/libvpx/install
  65. $(INSTALL_DIR) $(1)/usr/lib/
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  67. endef
  68. $(eval $(call BuildPackage,libvpx))