2021-05-27 00:09:36 +05:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# Copyright (C) 2020 ARM Limited
|
|
|
|
|
2021-09-23 21:59:15 +05:00
|
|
|
CFLAGS += -std=gnu99 -I.
|
2021-05-27 00:09:36 +05:00
|
|
|
SRCS := $(filter-out mte_common_util.c,$(wildcard *.c))
|
|
|
|
PROGS := $(patsubst %.c,%,$(SRCS))
|
|
|
|
|
|
|
|
#Add mte compiler option
|
|
|
|
CFLAGS += -march=armv8.5-a+memtag
|
|
|
|
|
|
|
|
#check if the compiler works well
|
|
|
|
mte_cc_support := $(shell if ($(CC) $(CFLAGS) -E -x c /dev/null -o /dev/null 2>&1) then echo "1"; fi)
|
|
|
|
|
|
|
|
ifeq ($(mte_cc_support),1)
|
|
|
|
# Generated binaries to be installed by top KSFT script
|
|
|
|
TEST_GEN_PROGS := $(PROGS)
|
|
|
|
|
|
|
|
# Get Kernel headers installed and use them.
|
|
|
|
KSFT_KHDR_INSTALL := 1
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Include KSFT lib.mk.
|
|
|
|
include ../../lib.mk
|
|
|
|
|
|
|
|
ifeq ($(mte_cc_support),1)
|
2021-09-23 21:59:15 +05:00
|
|
|
$(TEST_GEN_PROGS): mte_common_util.c mte_common_util.h mte_helper.S
|
2021-05-27 00:09:36 +05:00
|
|
|
endif
|