x264: bump to version 97eaef2ab82a46d13ea5e00270712d6475fbe42b
[buildroot-gz.git] / package / x264 / x264.mk
blob80437c408c016bd0dceae043903f9ecfdafe7ea7
1 ################################################################################
3 # x264
5 ################################################################################
7 X264_VERSION = 97eaef2ab82a46d13ea5e00270712d6475fbe42b
8 X264_SITE = git://git.videolan.org/x264.git
9 X264_LICENSE = GPLv2+
10 X264_DEPENDENCIES = host-pkgconf
11 X264_LICENSE_FILES = COPYING
12 X264_INSTALL_STAGING = YES
13 X264_CONF_OPTS = --disable-avs
15 ifeq ($(BR2_i386)$(BR2_x86_64),y)
16 # yasm needed for assembly files
17 X264_DEPENDENCIES += host-yasm
18 X264_CONF_ENV += AS="$(HOST_DIR)/usr/bin/yasm"
19 else ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_aarch64),y)
20 # We need to pass gcc as AS, because the ARM assembly files have to be
21 # preprocessed
22 X264_CONF_ENV += AS="$(TARGET_CC)"
23 else
24 X264_CONF_OPTS += --disable-asm
25 endif
27 ifeq ($(BR2_STATIC_LIBS),)
28 X264_CONF_OPTS += --enable-pic --enable-shared
29 endif
31 ifeq ($(BR2_PACKAGE_X264_CLI),)
32 X264_CONF_OPTS += --disable-cli
33 endif
35 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
36 X264_CONF_OPTS += --disable-thread
37 endif
39 # the configure script is not generated by autoconf
40 define X264_CONFIGURE_CMDS
41 (cd $(@D); $(TARGET_CONFIGURE_OPTS) $(X264_CONF_ENV) ./configure \
42 --prefix=/usr \
43 --host="$(GNU_TARGET_NAME)" \
44 --cross-prefix="$(TARGET_CROSS)" \
45 --disable-ffms \
46 --enable-static \
47 --disable-opencl \
48 $(X264_CONF_OPTS) \
50 endef
52 define X264_BUILD_CMDS
53 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
54 endef
56 define X264_INSTALL_STAGING_CMDS
57 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
58 endef
60 define X264_INSTALL_TARGET_CMDS
61 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
62 endef
64 $(eval $(generic-package))