18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci# Copyright (C) 2020 ARM Limited 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciCFLAGS += -std=gnu99 -I. 58c2ecf20Sopenharmony_ciSRCS := $(filter-out mte_common_util.c,$(wildcard *.c)) 68c2ecf20Sopenharmony_ciPROGS := $(patsubst %.c,%,$(SRCS)) 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#Add mte compiler option 98c2ecf20Sopenharmony_ciCFLAGS += -march=armv8.5-a+memtag 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#check if the compiler works well 128c2ecf20Sopenharmony_cimte_cc_support := $(shell if ($(CC) $(CFLAGS) -E -x c /dev/null -o /dev/null 2>&1) then echo "1"; fi) 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciifeq ($(mte_cc_support),1) 158c2ecf20Sopenharmony_ci# Generated binaries to be installed by top KSFT script 168c2ecf20Sopenharmony_ciTEST_GEN_PROGS := $(PROGS) 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci# Get Kernel headers installed and use them. 198c2ecf20Sopenharmony_ciKSFT_KHDR_INSTALL := 1 208c2ecf20Sopenharmony_ciendif 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci# Include KSFT lib.mk. 238c2ecf20Sopenharmony_ciinclude ../../lib.mk 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ciifeq ($(mte_cc_support),1) 268c2ecf20Sopenharmony_ci$(TEST_GEN_PROGS): mte_common_util.c mte_common_util.h mte_helper.S 278c2ecf20Sopenharmony_ciendif 28