brintos

brintos / linux-shallow public Read only

0
0
Text · 1.1 KiB · edb3613 Raw
32 lines · plain
1# SPDX-License-Identifier: GPL-2.02# Copyright (C) 2019 ARM Limited3 4# Additional include paths needed by kselftest.h and local headers5CFLAGS += -D_GNU_SOURCE -std=gnu99 -I.6 7SRCS := $(filter-out testcases/testcases.c,$(wildcard testcases/*.c))8PROGS := $(patsubst %.c,%,$(SRCS))9 10# Generated binaries to be installed by top KSFT script11TEST_GEN_PROGS := $(notdir $(PROGS))12 13# Get Kernel headers installed and use them.14 15# Including KSFT lib.mk here will also mangle the TEST_GEN_PROGS list16# to account for any OUTPUT target-dirs optionally provided by17# the toplevel makefile18include ../../lib.mk19 20$(TEST_GEN_PROGS): $(PROGS)21	cp $(PROGS) $(OUTPUT)/22 23# Common test-unit targets to build common-layout test-cases executables24# Needs secondary expansion to properly include the testcase c-file in pre-reqs25COMMON_SOURCES := test_signals.c test_signals_utils.c testcases/testcases.c \26	signals.S sve_helpers.c27COMMON_HEADERS := test_signals.h test_signals_utils.h testcases/testcases.h28 29.SECONDEXPANSION:30$(PROGS): $$@.c ${COMMON_SOURCES} ${COMMON_HEADERS}31	$(CC) $(CFLAGS) ${@}.c ${COMMON_SOURCES} -o $@32