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') 9JDIR_TEST = pmu-events/arch/test 10JSON_TEST = $(shell [ -d $(JDIR_TEST) ] && \ 11 find $(JDIR_TEST) -name '*.json') 12 13# 14# Locate/process JSON files in pmu-events/arch/ 15# directory and create tables in pmu-events.c. 16# 17$(OUTPUT)pmu-events/pmu-events.c: $(JSON) $(JSON_TEST) $(JEVENTS) 18 $(Q)$(call echo-cmd,gen)$(JEVENTS) $(SRCARCH) pmu-events/arch $(OUTPUT)pmu-events/pmu-events.c $(V) 19