162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ciTEST_GEN_PROGS := switch_endian_test 362306a36Sopenharmony_ci 462306a36Sopenharmony_ciASFLAGS += -O2 -Wall -g -nostdlib -m64 562306a36Sopenharmony_ci 662306a36Sopenharmony_ciEXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S 762306a36Sopenharmony_ci 862306a36Sopenharmony_citop_srcdir = ../../../../.. 962306a36Sopenharmony_ciinclude ../../lib.mk 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci$(OUTPUT)/switch_endian_test: ASFLAGS += -I $(OUTPUT) 1262306a36Sopenharmony_ci$(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci$(OUTPUT)/check-reversed.o: $(OUTPUT)/check.o 1562306a36Sopenharmony_ci $(CROSS_COMPILE)objcopy -j .text --reverse-bytes=4 -O binary $< $@ 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci$(OUTPUT)/check-reversed.S: $(OUTPUT)/check-reversed.o 1862306a36Sopenharmony_ci hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@ 19