xref: /openbmc/linux/tools/perf/arch/loongarch/Makefile (revision 2fa5ebe3)
1*2fa5ebe3SHuacai Chen# SPDX-License-Identifier: GPL-2.0
2*2fa5ebe3SHuacai Chenifndef NO_DWARF
3*2fa5ebe3SHuacai ChenPERF_HAVE_DWARF_REGS := 1
4*2fa5ebe3SHuacai Chenendif
5*2fa5ebe3SHuacai ChenPERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 1
6*2fa5ebe3SHuacai ChenPERF_HAVE_JITDUMP := 1
7*2fa5ebe3SHuacai Chen
8*2fa5ebe3SHuacai Chen#
9*2fa5ebe3SHuacai Chen# Syscall table generation for perf
10*2fa5ebe3SHuacai Chen#
11*2fa5ebe3SHuacai Chen
12*2fa5ebe3SHuacai Chenout    := $(OUTPUT)arch/loongarch/include/generated/asm
13*2fa5ebe3SHuacai Chenheader := $(out)/syscalls.c
14*2fa5ebe3SHuacai Chenincpath := $(srctree)/tools
15*2fa5ebe3SHuacai Chensysdef := $(srctree)/tools/arch/loongarch/include/uapi/asm/unistd.h
16*2fa5ebe3SHuacai Chensysprf := $(srctree)/tools/perf/arch/loongarch/entry/syscalls/
17*2fa5ebe3SHuacai Chensystbl := $(sysprf)/mksyscalltbl
18*2fa5ebe3SHuacai Chen
19*2fa5ebe3SHuacai Chen# Create output directory if not already present
20*2fa5ebe3SHuacai Chen_dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)')
21*2fa5ebe3SHuacai Chen
22*2fa5ebe3SHuacai Chen$(header): $(sysdef) $(systbl)
23*2fa5ebe3SHuacai Chen	$(Q)$(SHELL) '$(systbl)' '$(CC)' '$(HOSTCC)' $(incpath) $(sysdef) > $@
24*2fa5ebe3SHuacai Chen
25*2fa5ebe3SHuacai Chenclean::
26*2fa5ebe3SHuacai Chen	$(call QUIET_CLEAN, loongarch) $(RM) $(header)
27*2fa5ebe3SHuacai Chen
28*2fa5ebe3SHuacai Chenarchheaders: $(header)
29