Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / tools / testing / selftests / powerpc / switch_endian / Makefile
1 CC := $(CROSS_COMPILE)gcc
2 PROGS := switch_endian_test
3
4 ASFLAGS += -O2 -Wall -g -nostdlib -m64
5
6 all: $(PROGS)
7
8 switch_endian_test: check-reversed.S
9
10 check-reversed.o: check.o
11         $(CROSS_COMPILE)objcopy -j .text --reverse-bytes=4 -O binary $< $@
12
13 check-reversed.S: check-reversed.o
14         hexdump -v -e '/1 ".byte 0x%02X\n"' $< > $@
15
16 run_tests: all
17         @-for PROG in $(PROGS); do \
18                 ./$$PROG; \
19         done;
20
21 clean:
22         rm -f $(PROGS) *.o check-reversed.S
23
24 .PHONY: all run_tests clean