1 # SPDX-License-Identifier: GPL-2.0
3 # When ARCH not overridden for crosscompiling, lookup machine
4 ARCH ?= $(shell uname -m 2>/dev/null || echo not)
6 ifneq (,$(filter $(ARCH),aarch64 arm64))
7 ARM64_SUBTARGETS ?= tags signal pauth fp mte bti abi
12 CFLAGS := -Wall -O2 -g
14 # A proper top_srcdir is needed by KSFT(lib.mk)
15 top_srcdir = $(realpath ../../../../)
17 # Additional include paths needed by kselftest.h and local headers
18 CFLAGS += -I$(top_srcdir)/tools/testing/selftests/
20 CFLAGS += $(KHDR_INCLUDES)
26 @for DIR in $(ARM64_SUBTARGETS); do \
27 BUILD_TARGET=$(OUTPUT)/$$DIR; \
28 mkdir -p $$BUILD_TARGET; \
29 make OUTPUT=$$BUILD_TARGET -C $$DIR $@; \
33 @for DIR in $(ARM64_SUBTARGETS); do \
34 BUILD_TARGET=$(OUTPUT)/$$DIR; \
35 make OUTPUT=$$BUILD_TARGET -C $$DIR $@; \
39 @for DIR in $(ARM64_SUBTARGETS); do \
40 BUILD_TARGET=$(OUTPUT)/$$DIR; \
41 make OUTPUT=$$BUILD_TARGET -C $$DIR $@; \
44 # Avoid any output on non arm64 on emit_tests
46 @for DIR in $(ARM64_SUBTARGETS); do \
47 BUILD_TARGET=$(OUTPUT)/$$DIR; \
48 make OUTPUT=$$BUILD_TARGET -C $$DIR $@; \
52 @for DIR in $(ARM64_SUBTARGETS); do \
53 BUILD_TARGET=$(OUTPUT)/$$DIR; \
54 make OUTPUT=$$BUILD_TARGET -C $$DIR $@; \
57 .PHONY: all clean install run_tests emit_tests