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