Vignesh Venkatasubramanian | 7ce0a1d | 2015-08-25 11:05:01 -0700 | [diff] [blame] | 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 | |
| 10 | ifneq ($(strip $(libvpx_codec_srcs_asm_$(TARGET_$(libvpx_2nd_arch)ARCH))),) |
| 11 | libvpx_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. |
| 15 | VPX_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' |
| 17 | VPX_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 | |
| 23 | LOCAL_GENERATED_SOURCES_$(TARGET_$(libvpx_2nd_arch)ARCH) += $(VPX_GEN) |
| 24 | endif |