1# SPDX-License-Identifier: GPL-2.0 2 3gen := arch/$(ARCH)/include/generated 4kapi := $(gen)/asm 5 6kapisyshdr-y := cpucap-defs.h sysreg-defs.h 7 8kapi-hdrs-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 9 10targets += $(addprefix ../../../, $(kapi-hdrs-y)) 11 12PHONY += kapi 13 14all: $(syscall64) kapi 15 16kapi: $(kapi-hdrs-y) 17 18quiet_cmd_gen_cpucaps = GEN $@ 19 cmd_gen_cpucaps = mkdir -p $(dir $@); $(AWK) -f $(real-prereqs) > $@ 20 21quiet_cmd_gen_sysreg = GEN $@ 22 cmd_gen_sysreg = mkdir -p $(dir $@); $(AWK) -f $(real-prereqs) > $@ 23 24$(kapi)/cpucap-defs.h: $(src)/gen-cpucaps.awk $(src)/cpucaps FORCE 25 $(call if_changed,gen_cpucaps) 26 27$(kapi)/sysreg-defs.h: $(src)/gen-sysreg.awk $(src)/sysreg FORCE 28 $(call if_changed,gen_sysreg) 29