xref: /linux/tools/perf/arch/loongarch/Makefile (revision a36e9f5cfe9eb3a1dce8769c7058251c42705357)
1# SPDX-License-Identifier: GPL-2.0
2ifndef NO_DWARF
3PERF_HAVE_DWARF_REGS := 1
4endif
5PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 1
6PERF_HAVE_JITDUMP := 1
7HAVE_KVM_STAT_SUPPORT := 1
8
9#
10# Syscall table generation for perf
11#
12
13out    := $(OUTPUT)arch/loongarch/include/generated/asm
14header := $(out)/syscalls.c
15incpath := $(srctree)/tools
16sysdef := $(srctree)/tools/arch/loongarch/include/uapi/asm/unistd.h
17sysprf := $(srctree)/tools/perf/arch/loongarch/entry/syscalls/
18systbl := $(sysprf)/mksyscalltbl
19
20# Create output directory if not already present
21$(shell [ -d '$(out)' ] || mkdir -p '$(out)')
22
23$(header): $(sysdef) $(systbl)
24	$(Q)$(SHELL) '$(systbl)' '$(CC)' '$(HOSTCC)' $(incpath) $(sysdef) > $@
25
26clean::
27	$(call QUIET_CLEAN, loongarch) $(RM) $(header)
28
29archheaders: $(header)
30