Makefile 546 B

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