1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun# Copyright (C) 2019 ARM Limited 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun# Additional include paths needed by kselftest.h and local headers 5*4882a593SmuzhiyunCFLAGS += -D_GNU_SOURCE -std=gnu99 -I. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunSRCS := $(filter-out testcases/testcases.c,$(wildcard testcases/*.c)) 8*4882a593SmuzhiyunPROGS := $(patsubst %.c,%,$(SRCS)) 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun# Generated binaries to be installed by top KSFT script 11*4882a593SmuzhiyunTEST_GEN_PROGS := $(notdir $(PROGS)) 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun# Get Kernel headers installed and use them. 14*4882a593SmuzhiyunKSFT_KHDR_INSTALL := 1 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun# Including KSFT lib.mk here will also mangle the TEST_GEN_PROGS list 17*4882a593Smuzhiyun# to account for any OUTPUT target-dirs optionally provided by 18*4882a593Smuzhiyun# the toplevel makefile 19*4882a593Smuzhiyuninclude ../../lib.mk 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun$(TEST_GEN_PROGS): $(PROGS) 22*4882a593Smuzhiyun cp $(PROGS) $(OUTPUT)/ 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun# Common test-unit targets to build common-layout test-cases executables 25*4882a593Smuzhiyun# Needs secondary expansion to properly include the testcase c-file in pre-reqs 26*4882a593Smuzhiyun.SECONDEXPANSION: 27*4882a593Smuzhiyun$(PROGS): test_signals.c test_signals_utils.c testcases/testcases.c signals.S $$@.c test_signals.h test_signals_utils.h testcases/testcases.h 28*4882a593Smuzhiyun $(CC) $(CFLAGS) $^ -o $@ 29