brintos

brintos / linux-shallow public Read only

0
0
Text · 1.4 KiB · 7ce03d8 Raw
59 lines · plain
1# SPDX-License-Identifier: GPL-2.02# Originally tools/testing/arm64/Makefile3 4# When ARCH not overridden for crosscompiling, lookup machine5ARCH ?= $(shell uname -m 2>/dev/null || echo not)6 7ifneq (,$(filter $(ARCH),riscv))8RISCV_SUBTARGETS ?= hwprobe vector mm sigreturn9else10RISCV_SUBTARGETS :=11endif12 13CFLAGS := -Wall -O2 -g14 15# A proper top_srcdir is needed by KSFT(lib.mk)16top_srcdir = $(realpath ../../../../)17 18# Additional include paths needed by kselftest.h and local headers19CFLAGS += -I$(top_srcdir)/tools/testing/selftests/20 21CFLAGS += $(KHDR_INCLUDES)22 23export CFLAGS24export top_srcdir25 26all:27	@for DIR in $(RISCV_SUBTARGETS); do				\28		BUILD_TARGET=$(OUTPUT)/$$DIR;			\29		mkdir -p $$BUILD_TARGET;			\30		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@;		\31	done32 33install: all34	@for DIR in $(RISCV_SUBTARGETS); do				\35		BUILD_TARGET=$(OUTPUT)/$$DIR;			\36		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@;		\37	done38 39run_tests: all40	@for DIR in $(RISCV_SUBTARGETS); do				\41		BUILD_TARGET=$(OUTPUT)/$$DIR;			\42		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@;		\43	done44 45# Avoid any output on non riscv on emit_tests46emit_tests:47	@for DIR in $(RISCV_SUBTARGETS); do				\48		BUILD_TARGET=$(OUTPUT)/$$DIR;			\49		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@;		\50	done51 52clean:53	@for DIR in $(RISCV_SUBTARGETS); do				\54		BUILD_TARGET=$(OUTPUT)/$$DIR;			\55		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@;		\56	done57 58.PHONY: all clean install run_tests emit_tests59