1c7914ef6SFiroz Khan# SPDX-License-Identifier: GPL-2.0 2c7914ef6SFiroz Khankapi := arch/$(SRCARCH)/include/generated/asm 3c7914ef6SFiroz Khanuapi := arch/$(SRCARCH)/include/generated/uapi/asm 4c7914ef6SFiroz Khan 5*bbc90bc1SMasahiro Yamada$(shell mkdir -p $(uapi) $(kapi)) 6c7914ef6SFiroz Khan 729c5c3acSMasahiro Yamadasyscall := $(src)/syscall.tbl 82da75594SMasahiro Yamadasyshdr := $(srctree)/scripts/syscallhdr.sh 9daf26180SMasahiro Yamadasystbl := $(srctree)/scripts/syscalltbl.sh 10c7914ef6SFiroz Khan 11c7914ef6SFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 122da75594SMasahiro Yamada cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr $< $@ 13c7914ef6SFiroz Khan 14c7914ef6SFiroz Khanquiet_cmd_systbl = SYSTBL $@ 15daf26180SMasahiro Yamada cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@ 16c7914ef6SFiroz Khan 17865fa29fSMasahiro Yamada$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 18c7914ef6SFiroz Khan $(call if_changed,syshdr) 19c7914ef6SFiroz Khan 20865fa29fSMasahiro Yamada$(kapi)/syscall_table.h: $(syscall) $(systbl) FORCE 21c7914ef6SFiroz Khan $(call if_changed,systbl) 22c7914ef6SFiroz Khan 23c7914ef6SFiroz Khanuapisyshdr-y += unistd_32.h 24c7914ef6SFiroz Khankapisyshdr-y += syscall_table.h 25c7914ef6SFiroz Khan 26865fa29fSMasahiro Yamadauapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 27865fa29fSMasahiro Yamadakapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 28865fa29fSMasahiro Yamadatargets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 29c7914ef6SFiroz Khan 30c7914ef6SFiroz KhanPHONY += all 31865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y) 32c7914ef6SFiroz Khan @: 33