19 lines
655 B
Plaintext
19 lines
655 B
Plaintext
|
hostprogs := jevents
|
||
|
|
||
|
jevents-y += json.o jsmn.o jevents.o
|
||
|
HOSTCFLAGS_jevents.o = -I$(srctree)/tools/include
|
||
|
pmu-events-y += pmu-events.o
|
||
|
JDIR = pmu-events/arch/$(SRCARCH)
|
||
|
JSON = $(shell [ -d $(JDIR) ] && \
|
||
|
find $(JDIR) -name '*.json' -o -name 'mapfile.csv')
|
||
|
JDIR_TEST = pmu-events/arch/test
|
||
|
JSON_TEST = $(shell [ -d $(JDIR_TEST) ] && \
|
||
|
find $(JDIR_TEST) -name '*.json')
|
||
|
|
||
|
#
|
||
|
# Locate/process JSON files in pmu-events/arch/
|
||
|
# directory and create tables in pmu-events.c.
|
||
|
#
|
||
|
$(OUTPUT)pmu-events/pmu-events.c: $(JSON) $(JSON_TEST) $(JEVENTS)
|
||
|
$(Q)$(call echo-cmd,gen)$(JEVENTS) $(SRCARCH) pmu-events/arch $(OUTPUT)pmu-events/pmu-events.c $(V)
|