1 # Makefile for powerpc selftests
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
/)
9 GIT_VERSION
= $(shell git describe
--always
--long
--dirty || echo
"unknown")
11 CFLAGS
:= -std
=gnu99
-Wall
-O2
-Wall
-Werror
-DGIT_VERSION
='"$(GIT_VERSION)"' -I
$(CURDIR
) $(CFLAGS
)
15 SUB_DIRS
= alignment \
39 override define RUN_TESTS
40 @for TARGET in
$(SUB_DIRS
); do \
41 $(MAKE
) -C
$$TARGET run_tests
; \
45 override define INSTALL_RULE
46 @for TARGET in
$(SUB_DIRS
); do \
47 $(MAKE
) -C
$$TARGET install; \
51 override define EMIT_TESTS
52 @for TARGET in
$(SUB_DIRS
); do \
53 $(MAKE
) -s
-C
$$TARGET emit_tests
; \
58 @for TARGET in
$(SUB_DIRS
); do \
59 $(MAKE
) -C
$$TARGET clean; \
64 find .
-name
'*.c' -o
-name
'*.h' | xargs ctags
66 .PHONY
: tags $(SUB_DIRS
)