xref: /openbmc/linux/tools/perf/arch/loongarch/Makefile (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
1 # SPDX-License-Identifier: GPL-2.0
2 ifndef NO_DWARF
3 PERF_HAVE_DWARF_REGS := 1
4 endif
5 PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 1
6 PERF_HAVE_JITDUMP := 1
7 
8 #
9 # Syscall table generation for perf
10 #
11 
12 out    := $(OUTPUT)arch/loongarch/include/generated/asm
13 header := $(out)/syscalls.c
14 incpath := $(srctree)/tools
15 sysdef := $(srctree)/tools/arch/loongarch/include/uapi/asm/unistd.h
16 sysprf := $(srctree)/tools/perf/arch/loongarch/entry/syscalls/
17 systbl := $(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 	$(Q)$(SHELL) '$(systbl)' '$(CC)' '$(HOSTCC)' $(incpath) $(sysdef) > $@
24 
25 clean::
26 	$(call QUIET_CLEAN, loongarch) $(RM) $(header)
27 
28 archheaders: $(header)
29