2021-04-28 20:12:31 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
gen := arch/$(ARCH)/include/generated
|
|
|
|
kapi := $(gen)/asm
|
|
|
|
|
2022-05-04 01:02:30 +08:00
|
|
|
kapi-hdrs-y := $(kapi)/cpucaps.h $(kapi)/sysreg-defs.h
|
2021-04-28 20:12:31 +08:00
|
|
|
|
2022-02-27 16:52:32 +08:00
|
|
|
targets += $(addprefix ../../../, $(kapi-hdrs-y))
|
2021-04-28 20:12:31 +08:00
|
|
|
|
|
|
|
PHONY += kapi
|
|
|
|
|
2022-02-27 16:52:32 +08:00
|
|
|
kapi: $(kapi-hdrs-y)
|
2021-04-28 20:12:31 +08:00
|
|
|
|
|
|
|
quiet_cmd_gen_cpucaps = GEN $@
|
2022-02-27 16:52:32 +08:00
|
|
|
cmd_gen_cpucaps = mkdir -p $(dir $@); $(AWK) -f $(real-prereqs) > $@
|
2021-04-28 20:12:31 +08:00
|
|
|
|
2022-05-04 01:02:30 +08:00
|
|
|
quiet_cmd_gen_sysreg = GEN $@
|
|
|
|
cmd_gen_sysreg = mkdir -p $(dir $@); $(AWK) -f $(real-prereqs) > $@
|
|
|
|
|
2021-04-28 20:12:31 +08:00
|
|
|
$(kapi)/cpucaps.h: $(src)/gen-cpucaps.awk $(src)/cpucaps FORCE
|
|
|
|
$(call if_changed,gen_cpucaps)
|
2022-05-04 01:02:30 +08:00
|
|
|
|
|
|
|
$(kapi)/sysreg-defs.h: $(src)/gen-sysreg.awk $(src)/sysreg FORCE
|
|
|
|
$(call if_changed,gen_sysreg)
|