board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / x264 / x264.mk
blob2c8040b85e249f31b46cd22ffd48601abad4374d
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 # Even though the configure script is not generated by autoconf, x264
40 # uses config.sub/config.guess, so we want up-to-date versions of
41 # them.
42 X264_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
44 # the configure script is not generated by autoconf
45 define X264_CONFIGURE_CMDS
46 (cd $(@D); $(TARGET_CONFIGURE_OPTS) $(X264_CONF_ENV) ./configure \
47 --prefix=/usr \
48 --host="$(GNU_TARGET_NAME)" \
49 --cross-prefix="$(TARGET_CROSS)" \
50 --disable-ffms \
51 --enable-static \
52 --disable-opencl \
53 $(X264_CONF_OPTS) \
55 endef
57 define X264_BUILD_CMDS
58 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
59 endef
61 define X264_INSTALL_STAGING_CMDS
62 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
63 endef
65 define X264_INSTALL_TARGET_CMDS
66 $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
67 endef
69 $(eval $(generic-package))