summaryrefslogtreecommitdiffstats
path: root/lib/extensions/amu/amu.mk
blob: 868ab12542e0e6e3a1d67078487e8b694e8ec428 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# Copyright (c) 2021, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#

include lib/fconf/fconf.mk

AMU_SOURCES	:=	lib/extensions/amu/${ARCH}/amu.c \
			lib/extensions/amu/${ARCH}/amu_helpers.S

ifneq (${ENABLE_AMU_AUXILIARY_COUNTERS},0)
        ifeq (${ENABLE_FEAT_AMU},0)
                $(error AMU auxiliary counter support (`ENABLE_AMU_AUXILIARY_COUNTERS`) requires AMU support (`ENABLE_FEAT_AMU`))
        endif
endif

ifneq (${ENABLE_AMU_FCONF},0)
        ifeq (${ENABLE_AMU_AUXILIARY_COUNTERS},0)
                $(error AMU FCONF support (`ENABLE_AMU_FCONF`) is not necessary when auxiliary counter support (`ENABLE_AMU_AUXILIARY_COUNTERS`) is disabled)
        endif

        AMU_SOURCES	+=	${FCONF_AMU_SOURCES}
endif