mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 01:54:09 +08:00
266bac361d
For the out-of-tree build to work we need to tell switch_endian_test to look for check-reversed.S in $(OUTPUT). Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
19 lines
546 B
Makefile
19 lines
546 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
TEST_GEN_PROGS := switch_endian_test
|
|
|
|
ASFLAGS += -O2 -Wall -g -nostdlib -m64
|
|
|
|
EXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S
|
|
|
|
top_srcdir = ../../../../..
|
|
include ../../lib.mk
|
|
|
|
$(OUTPUT)/switch_endian_test: ASFLAGS += -I $(OUTPUT)
|
|
$(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S
|
|
|
|
$(OUTPUT)/check-reversed.o: $(OUTPUT)/check.o
|
|
$(CROSS_COMPILE)objcopy -j .text --reverse-bytes=4 -O binary $< $@
|
|
|
|
$(OUTPUT)/check-reversed.S: $(OUTPUT)/check-reversed.o
|
|
hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@
|