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 := -Wall -O2 -flto -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CURDIR) $(CFLAGS)
15 SUB_DIRS = benchmarks \
36 override define RUN_TESTS
37 @for TARGET in $(SUB_DIRS); do \
38 $(MAKE) -C $$TARGET run_tests; \
42 override define INSTALL_RULE
43 @for TARGET in $(SUB_DIRS); do \
44 $(MAKE) -C $$TARGET install; \
48 override define EMIT_TESTS
49 @for TARGET in $(SUB_DIRS); do \
50 $(MAKE) -s -C $$TARGET emit_tests; \
55 @for TARGET in $(SUB_DIRS); do \
56 $(MAKE) -C $$TARGET clean; \
61 find . -name '*.c' -o -name '*.h' | xargs ctags
63 .PHONY: tags $(SUB_DIRS)