1# SPDX-License-Identifier: GPL-2.0 2TEST_GEN_PROGS := switch_endian_test 3 4ASFLAGS += -O2 -Wall -g -nostdlib -m64 5 6EXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S 7 8include ../../lib.mk 9 10$(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S 11 12$(OUTPUT)/check-reversed.o: $(OUTPUT)/check.o 13 $(CROSS_COMPILE)objcopy -j .text --reverse-bytes=4 -O binary $< $@ 14 15$(OUTPUT)/check-reversed.S: $(OUTPUT)/check-reversed.o 16 hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@ 17