xref: /openbmc/linux/tools/perf/pmu-events/Build (revision e15a5365)
1hostprogs := jevents
2
3jevents-y	+= json.o jsmn.o jevents.o
4HOSTCFLAGS_jevents.o	= -I$(srctree)/tools/include
5pmu-events-y	+= pmu-events.o
6JDIR		=  pmu-events/arch/$(SRCARCH)
7JSON		=  $(shell [ -d $(JDIR) ] &&				\
8			find $(JDIR) -name '*.json' -o -name 'mapfile.csv')
9
10#
11# Locate/process JSON files in pmu-events/arch/
12# directory and create tables in pmu-events.c.
13#
14$(OUTPUT)pmu-events/pmu-events.c: $(JSON) $(JEVENTS)
15	$(Q)$(call echo-cmd,gen)$(JEVENTS) $(SRCARCH) pmu-events/arch $(OUTPUT)pmu-events/pmu-events.c $(V)
16