libvpx.mk 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ################################################################################
  2. #
  3. # libvpx
  4. #
  5. ################################################################################
  6. LIBVPX_VERSION = 1.13.1
  7. LIBVPX_SITE = $(call github,webmproject,libvpx,v$(LIBVPX_VERSION))
  8. LIBVPX_LICENSE = BSD-3-Clause
  9. LIBVPX_LICENSE_FILES = LICENSE PATENTS
  10. LIBVPX_CPE_ID_VENDOR = webmproject
  11. LIBVPX_INSTALL_STAGING = YES
  12. # ld is being used with cc options. therefore, pretend ld is cc.
  13. LIBVPX_CONF_ENV = \
  14. LD="$(TARGET_CC)" \
  15. CROSS=$(GNU_TARGET_NAME)
  16. LIBVPX_CONF_OPTS = \
  17. --disable-examples \
  18. --disable-docs \
  19. --disable-unit-tests
  20. # vp8/ratectrl_rtc.cc vp9/ratectrl_rtc.cc
  21. ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
  22. LIBVPX_CONF_OPTS += --enable-vp8-encoder --enable-vp9-encoder
  23. else
  24. LIBVPX_CONF_OPTS += --disable-vp8-encoder --disable-vp9-encoder
  25. endif
  26. # This is not a true autotools package. It is based on the ffmpeg build system
  27. define LIBVPX_CONFIGURE_CMDS
  28. (cd $(LIBVPX_SRCDIR) && rm -rf config.cache && \
  29. $(TARGET_CONFIGURE_OPTS) \
  30. $(TARGET_CONFIGURE_ARGS) \
  31. $(LIBVPX_CONF_ENV) \
  32. ./configure \
  33. --target=generic-gnu \
  34. --enable-pic \
  35. --prefix=/usr \
  36. $(SHARED_STATIC_LIBS_OPTS) \
  37. $(LIBVPX_CONF_OPTS) \
  38. )
  39. endef
  40. define LIBVPX_BUILD_CMDS
  41. $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) -C $(@D) all
  42. endef
  43. define LIBVPX_INSTALL_STAGING_CMDS
  44. $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
  45. endef
  46. define LIBVPX_INSTALL_TARGET_CMDS
  47. $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
  48. endef
  49. $(eval $(generic-package))