10c6c2d36SMark Brown# SPDX-License-Identifier: GPL-2.0 20c6c2d36SMark Brown 30c6c2d36SMark Browngen := arch/$(ARCH)/include/generated 40c6c2d36SMark Brownkapi := $(gen)/asm 50c6c2d36SMark Brown 6*c07d8017SMark Brownkapi-hdrs-y := $(kapi)/cpucaps.h $(kapi)/sysreg-defs.h 70c6c2d36SMark Brown 8819a47d2SMasahiro Yamadatargets += $(addprefix ../../../, $(kapi-hdrs-y)) 90c6c2d36SMark Brown 100c6c2d36SMark BrownPHONY += kapi 110c6c2d36SMark Brown 12819a47d2SMasahiro Yamadakapi: $(kapi-hdrs-y) 130c6c2d36SMark Brown 140c6c2d36SMark Brownquiet_cmd_gen_cpucaps = GEN $@ 15819a47d2SMasahiro Yamada cmd_gen_cpucaps = mkdir -p $(dir $@); $(AWK) -f $(real-prereqs) > $@ 160c6c2d36SMark Brown 17*c07d8017SMark Brownquiet_cmd_gen_sysreg = GEN $@ 18*c07d8017SMark Brown cmd_gen_sysreg = mkdir -p $(dir $@); $(AWK) -f $(real-prereqs) > $@ 19*c07d8017SMark Brown 200c6c2d36SMark Brown$(kapi)/cpucaps.h: $(src)/gen-cpucaps.awk $(src)/cpucaps FORCE 210c6c2d36SMark Brown $(call if_changed,gen_cpucaps) 22*c07d8017SMark Brown 23*c07d8017SMark Brown$(kapi)/sysreg-defs.h: $(src)/gen-sysreg.awk $(src)/sysreg FORCE 24*c07d8017SMark Brown $(call if_changed,gen_sysreg) 25