x264.mk 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ################################################################################
  2. #
  3. # x264
  4. #
  5. ################################################################################
  6. X264_VERSION = 20191217-2245
  7. X264_SITE = http://download.videolan.org/x264/snapshots
  8. X264_SOURCE = x264-snapshot-$(X264_VERSION).tar.bz2
  9. X264_LICENSE = GPL-2.0+
  10. X264_DEPENDENCIES = host-pkgconf
  11. X264_LICENSE_FILES = COPYING
  12. X264_INSTALL_STAGING = YES
  13. X264_CONF_OPTS = --disable-avs --disable-lavf --disable-swscale
  14. ifeq ($(BR2_i386)$(BR2_x86_64),y)
  15. # nasm needed for assembly files
  16. X264_DEPENDENCIES += host-nasm
  17. X264_CONF_ENV += AS="$(HOST_DIR)/bin/nasm"
  18. else ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_aarch64),y)
  19. # We need to pass gcc as AS, because the ARM assembly files have to be
  20. # preprocessed
  21. X264_CONF_ENV += AS="$(TARGET_CC)"
  22. else
  23. X264_CONF_OPTS += --disable-asm
  24. endif
  25. ifeq ($(BR2_STATIC_LIBS),)
  26. X264_CONF_OPTS += --enable-pic --enable-shared
  27. endif
  28. ifeq ($(BR2_PACKAGE_X264_CLI),)
  29. X264_CONF_OPTS += --disable-cli
  30. endif
  31. ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
  32. X264_CONF_OPTS += --disable-thread
  33. endif
  34. # Even though the configure script is not generated by autoconf, x264
  35. # uses config.sub/config.guess, so we want up-to-date versions of
  36. # them.
  37. X264_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
  38. # the configure script is not generated by autoconf
  39. define X264_CONFIGURE_CMDS
  40. (cd $(@D); $(TARGET_CONFIGURE_OPTS) $(X264_CONF_ENV) ./configure \
  41. --prefix=/usr \
  42. --host="$(GNU_TARGET_NAME)" \
  43. --cross-prefix="$(TARGET_CROSS)" \
  44. --disable-ffms \
  45. --enable-static \
  46. --disable-opencl \
  47. $(X264_CONF_OPTS) \
  48. )
  49. endef
  50. define X264_BUILD_CMDS
  51. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
  52. endef
  53. define X264_INSTALL_STAGING_CMDS
  54. $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
  55. endef
  56. define X264_INSTALL_TARGET_CMDS
  57. $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
  58. endef
  59. $(eval $(generic-package))