blob: 868ab12542e0e6e3a1d67078487e8b694e8ec428 [file] [log] [blame]
Chris Kay1000ea82021-05-19 19:24:37 +01001#
2# Copyright (c) 2021, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
Chris Kayf11909f2021-08-19 11:21:52 +01007include lib/fconf/fconf.mk
8
Chris Kay1000ea82021-05-19 19:24:37 +01009AMU_SOURCES := lib/extensions/amu/${ARCH}/amu.c \
10 lib/extensions/amu/${ARCH}/amu_helpers.S
Chris Kayf11909f2021-08-19 11:21:52 +010011
12ifneq (${ENABLE_AMU_AUXILIARY_COUNTERS},0)
Andre Przywara0b7f1b02023-03-21 13:53:19 +000013 ifeq (${ENABLE_FEAT_AMU},0)
14 $(error AMU auxiliary counter support (`ENABLE_AMU_AUXILIARY_COUNTERS`) requires AMU support (`ENABLE_FEAT_AMU`))
Chris Kayf11909f2021-08-19 11:21:52 +010015 endif
16endif
17
18ifneq (${ENABLE_AMU_FCONF},0)
19 ifeq (${ENABLE_AMU_AUXILIARY_COUNTERS},0)
20 $(error AMU FCONF support (`ENABLE_AMU_FCONF`) is not necessary when auxiliary counter support (`ENABLE_AMU_AUXILIARY_COUNTERS`) is disabled)
21 endif
22
23 AMU_SOURCES += ${FCONF_AMU_SOURCES}
24endif