18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ciTEST_GEN_PROGS := switch_endian_test 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciASFLAGS += -O2 -Wall -g -nostdlib -m64 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciEXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_citop_srcdir = ../../../../.. 98c2ecf20Sopenharmony_ciinclude ../../lib.mk 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci$(OUTPUT)/switch_endian_test: ASFLAGS += -I $(OUTPUT) 128c2ecf20Sopenharmony_ci$(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci$(OUTPUT)/check-reversed.o: $(OUTPUT)/check.o 158c2ecf20Sopenharmony_ci $(CROSS_COMPILE)objcopy -j .text --reverse-bytes=4 -O binary $< $@ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci$(OUTPUT)/check-reversed.S: $(OUTPUT)/check-reversed.o 188c2ecf20Sopenharmony_ci hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@ 19