0001
0002 TEST_GEN_PROGS := switch_endian_test
0003
0004 ASFLAGS += -O2 -Wall -g -nostdlib -m64
0005
0006 EXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S
0007
0008 top_srcdir = ../../../../..
0009 include ../../lib.mk
0010
0011 $(OUTPUT)/switch_endian_test: ASFLAGS += -I $(OUTPUT)
0012 $(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S
0013
0014 $(OUTPUT)/check-reversed.o: $(OUTPUT)/check.o
0015 $(CROSS_COMPILE)objcopy -j .text --reverse-bytes=4 -O binary $< $@
0016
0017 $(OUTPUT)/check-reversed.S: $(OUTPUT)/check-reversed.o
0018 hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@