These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / tools / testing / selftests / powerpc / Makefile
1 # Makefile for powerpc selftests
2
3 # ARCH can be overridden by the user for cross compiling
4 ARCH ?= $(shell uname -m)
5 ARCH := $(shell echo $(ARCH) | sed -e s/ppc.*/powerpc/)
6
7 ifeq ($(ARCH),powerpc)
8
9 GIT_VERSION = $(shell git describe --always --long --dirty || echo "unknown")
10
11 CFLAGS := -Wall -O2 -flto -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CURDIR) $(CFLAGS)
12
13 export CFLAGS
14
15 SUB_DIRS = benchmarks           \
16            copyloops            \
17            dscr                 \
18            mm                   \
19            pmu                  \
20            primitives           \
21            stringloops          \
22            switch_endian        \
23            syscalls             \
24            tm                   \
25            vphn
26
27 endif
28
29 all: $(SUB_DIRS)
30
31 $(SUB_DIRS):
32         $(MAKE) -k -C $@ all
33
34 include ../lib.mk
35
36 override define RUN_TESTS
37         @for TARGET in $(SUB_DIRS); do \
38                 $(MAKE) -C $$TARGET run_tests; \
39         done;
40 endef
41
42 override define INSTALL_RULE
43         @for TARGET in $(SUB_DIRS); do \
44                 $(MAKE) -C $$TARGET install; \
45         done;
46 endef
47
48 override define EMIT_TESTS
49         @for TARGET in $(SUB_DIRS); do \
50                 $(MAKE) -s -C $$TARGET emit_tests; \
51         done;
52 endef
53
54 clean:
55         @for TARGET in $(SUB_DIRS); do \
56                 $(MAKE) -C $$TARGET clean; \
57         done;
58         rm -f tags
59
60 tags:
61         find . -name '*.c' -o -name '*.h' | xargs ctags
62
63 .PHONY: tags $(SUB_DIRS)