1# SPDX-License-Identifier: GPL-2.0 2# Copyright (C) 2020 ARM Limited 3 4CFLAGS += -std=gnu99 -I. -pthread 5LDFLAGS += -pthread 6SRCS := $(filter-out mte_common_util.c,$(wildcard *.c)) 7PROGS := $(patsubst %.c,%,$(SRCS)) 8 9#Add mte compiler option 10CFLAGS += -march=armv8.5-a+memtag 11 12#check if the compiler works well 13mte_cc_support := $(shell if ($(CC) $(CFLAGS) -E -x c /dev/null -o /dev/null 2>&1) then echo "1"; fi) 14 15ifeq ($(mte_cc_support),1) 16# Generated binaries to be installed by top KSFT script 17TEST_GEN_PROGS := $(PROGS) 18 19# Get Kernel headers installed and use them. 20KSFT_KHDR_INSTALL := 1 21endif 22 23# Include KSFT lib.mk. 24include ../../lib.mk 25 26ifeq ($(mte_cc_support),1) 27$(TEST_GEN_PROGS): mte_common_util.c mte_common_util.h mte_helper.S 28endif 29