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