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 585e69701SFiroz Khan_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ 685e69701SFiroz Khan $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 785e69701SFiroz Khan 829c5c3acSMasahiro Yamadasyscall := $(src)/syscall.tbl 9*adf27404SMasahiro Yamadasyshdr := $(srctree)/scripts/syscallhdr.sh 10df86ddbbSMasahiro Yamadasystbl := $(srctree)/scripts/syscalltbl.sh 1185e69701SFiroz Khan 1285e69701SFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 13*adf27404SMasahiro Yamada cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr --abis $(abis) $< $@ 1485e69701SFiroz Khan 1585e69701SFiroz Khanquiet_cmd_systbl = SYSTBL $@ 16df86ddbbSMasahiro Yamada cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis) $< $@ 1785e69701SFiroz Khan 18*adf27404SMasahiro Yamada$(uapi)/unistd_32.h: abis := common,32 19865fa29fSMasahiro Yamada$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 2085e69701SFiroz Khan $(call if_changed,syshdr) 2185e69701SFiroz Khan 22*adf27404SMasahiro Yamada$(uapi)/unistd_64.h: abis := common,64 23865fa29fSMasahiro Yamada$(uapi)/unistd_64.h: $(syscall) $(syshdr) FORCE 2485e69701SFiroz Khan $(call if_changed,syshdr) 2585e69701SFiroz Khan 26df86ddbbSMasahiro Yamada$(kapi)/syscall_table_32.h: abis := common,32 27865fa29fSMasahiro Yamada$(kapi)/syscall_table_32.h: $(syscall) $(systbl) FORCE 2885e69701SFiroz Khan $(call if_changed,systbl) 2985e69701SFiroz Khan 30df86ddbbSMasahiro Yamada$(kapi)/syscall_table_64.h: abis := common,64 31865fa29fSMasahiro Yamada$(kapi)/syscall_table_64.h: $(syscall) $(systbl) FORCE 3285e69701SFiroz Khan $(call if_changed,systbl) 3385e69701SFiroz Khan 3485e69701SFiroz Khanuapisyshdr-y += unistd_32.h unistd_64.h 3585e69701SFiroz Khankapisyshdr-y += syscall_table_32.h \ 36df86ddbbSMasahiro Yamada syscall_table_64.h 3785e69701SFiroz Khan 38865fa29fSMasahiro Yamadauapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 39865fa29fSMasahiro Yamadakapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 40865fa29fSMasahiro Yamadatargets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 4185e69701SFiroz Khan 4285e69701SFiroz KhanPHONY += all 43865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y) 4485e69701SFiroz Khan @: 45