selftests/powerpc: Fix out-of-tree build errors
[linux-2.6-block.git] / tools / testing / selftests / powerpc / switch_endian / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
88baa78d 2TEST_GEN_PROGS := switch_endian_test
4cd968ef
ME
3
4ASFLAGS += -O2 -Wall -g -nostdlib -m64
5
a8ba798b 6EXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S
80d443e8 7
7e0cf1c9 8top_srcdir = ../../../../..
88baa78d 9include ../../lib.mk
4cd968ef 10
d8a2fe29 11$(OUTPUT)/switch_endian_test: ASFLAGS += -I $(OUTPUT)
a8ba798b 12$(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S
4cd968ef 13
a8ba798b 14$(OUTPUT)/check-reversed.o: $(OUTPUT)/check.o
4cd968ef
ME
15 $(CROSS_COMPILE)objcopy -j .text --reverse-bytes=4 -O binary $< $@
16
a8ba798b 17$(OUTPUT)/check-reversed.S: $(OUTPUT)/check-reversed.o
4cd968ef 18 hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@