xref: /openbmc/linux/tools/perf/arch/s390/Makefile (revision 51bc620b)
1# SPDX-License-Identifier: GPL-2.0-only
2ifndef NO_DWARF
3PERF_HAVE_DWARF_REGS := 1
4endif
5HAVE_KVM_STAT_SUPPORT := 1
6PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 1
7
8#
9# Syscall table generation for perf
10#
11
12out    := $(OUTPUT)arch/s390/include/generated/asm
13header := $(out)/syscalls_64.c
14syskrn := $(srctree)/arch/s390/kernel/syscalls/syscall.tbl
15sysprf := $(srctree)/tools/perf/arch/s390/entry/syscalls
16sysdef := $(sysprf)/syscall.tbl
17systbl := $(sysprf)/mksyscalltbl
18
19# Create output directory if not already present
20_dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)')
21
22$(header): $(sysdef) $(systbl)
23	@(test -d ../../kernel -a -d ../../tools -a -d ../perf && ( \
24        (diff -B $(sysdef) $(syskrn) >/dev/null) \
25        || echo "Warning: Kernel ABI header at '$(sysdef)' differs from latest version at '$(syskrn)'" >&2 )) || true
26	$(Q)$(SHELL) '$(systbl)' $(sysdef) > $@
27
28clean::
29	$(call QUIET_CLEAN, s390) $(RM) $(header)
30
31archheaders: $(header)
32