185e69701SFiroz Khan# SPDX-License-Identifier: GPL-2.0 285e69701SFiroz Khankapi := arch/$(SRCARCH)/include/generated/asm 385e69701SFiroz Khanuapi := arch/$(SRCARCH)/include/generated/uapi/asm 485e69701SFiroz Khan 5*bbc90bc1SMasahiro Yamada$(shell mkdir -p $(uapi) $(kapi)) 685e69701SFiroz Khan 729c5c3acSMasahiro Yamadasyscall := $(src)/syscall.tbl 8adf27404SMasahiro Yamadasyshdr := $(srctree)/scripts/syscallhdr.sh 9df86ddbbSMasahiro Yamadasystbl := $(srctree)/scripts/syscalltbl.sh 1085e69701SFiroz Khan 1185e69701SFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 12e2a86a29SMasahiro Yamada cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr --abis common,$* $< $@ 1385e69701SFiroz Khan 1485e69701SFiroz Khanquiet_cmd_systbl = SYSTBL $@ 15e2a86a29SMasahiro Yamada cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis common,$* $< $@ 1685e69701SFiroz Khan 17e2a86a29SMasahiro Yamada$(uapi)/unistd_%.h: $(syscall) $(syshdr) FORCE 1885e69701SFiroz Khan $(call if_changed,syshdr) 1985e69701SFiroz Khan 20e2a86a29SMasahiro Yamada$(kapi)/syscall_table_%.h: $(syscall) $(systbl) FORCE 2185e69701SFiroz Khan $(call if_changed,systbl) 2285e69701SFiroz Khan 2385e69701SFiroz Khanuapisyshdr-y += unistd_32.h unistd_64.h 2485e69701SFiroz Khankapisyshdr-y += syscall_table_32.h \ 25df86ddbbSMasahiro Yamada syscall_table_64.h 2685e69701SFiroz Khan 27865fa29fSMasahiro Yamadauapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 28865fa29fSMasahiro Yamadakapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 29865fa29fSMasahiro Yamadatargets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 3085e69701SFiroz Khan 3185e69701SFiroz KhanPHONY += all 32865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y) 3385e69701SFiroz Khan @: 34