1da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# Rules to generate GAS compatible assembly from RVCT syntax files. 2da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# Input variables: 3da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# libvpx_2nd_arch 4da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# libvpx_source_dir 5da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# libvpx_codec_srcs_asm_<arch> 6da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# 7da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# Output variables: 8da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# LOCAL_GENERATED_SOURCES_<arch> 9da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian 10da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanianifneq ($(strip $(libvpx_codec_srcs_asm_$(TARGET_$(libvpx_2nd_arch)ARCH))),) 11da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanianlibvpx_intermediates := $(call local-intermediates-dir,,$(libvpx_2nd_arch)) 12da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# This step is only required for ARM. MIPS uses intrinsics exclusively and x86 13da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# requires 'yasm' to pre-process its assembly files. 14da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# The ARM assembly sources must be converted from ADS to GAS compatible format. 15da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh VenkatasubramanianVPX_ASM := $(addprefix $(libvpx_intermediates)/, $(libvpx_codec_srcs_asm_$(TARGET_$(libvpx_2nd_arch)ARCH))) 16da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian# The build system will only accept arm assembly which ends in '.s' 17da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh VenkatasubramanianVPX_GEN := $(addsuffix .s, $(VPX_ASM)) 18da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian$(VPX_GEN) : PRIVATE_SOURCE_DIR := $(libvpx_source_dir) 19da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian$(VPX_GEN) : PRIVATE_CUSTOM_TOOL = cat $< | perl $(PRIVATE_SOURCE_DIR)/build/make/ads2gas.pl > $@ 20da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian$(VPX_GEN) : $(libvpx_intermediates)/%.s : $(libvpx_source_dir)/% 21da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian $(transform-generated-source) 22da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanian 23da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh VenkatasubramanianLOCAL_GENERATED_SOURCES_$(TARGET_$(libvpx_2nd_arch)ARCH) += $(VPX_GEN) 24da49e34c1fb5e99681f4ad99c21d9cfd83eddb96Vignesh Venkatasubramanianendif 25