GNU Linux-libre 4.19.211-gnu1
[releases.git] / tools / perf / pmu-events / Build
1 hostprogs := jevents
2
3 jevents-y       += json.o jsmn.o jevents.o
4 HOSTCFLAGS_jevents.o    = -I$(srctree)/tools/include
5 pmu-events-y    += pmu-events.o
6 JDIR            =  pmu-events/arch/$(SRCARCH)
7 JSON            =  $(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)