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