16ff645ddSFiroz Khan# SPDX-License-Identifier: GPL-2.0 26ff645ddSFiroz Khankapi := arch/$(SRCARCH)/include/generated/asm 36ff645ddSFiroz Khanuapi := arch/$(SRCARCH)/include/generated/uapi/asm 46ff645ddSFiroz Khan 56ff645ddSFiroz Khan_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ 66ff645ddSFiroz Khan $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 76ff645ddSFiroz Khan 829c5c3acSMasahiro Yamadasyscall := $(src)/syscall.tbl 9*c5849b7cSMasahiro Yamadasyshdr := $(srctree)/scripts/syscallhdr.sh 105ad4e94bSMasahiro Yamadasystbl := $(srctree)/scripts/syscalltbl.sh 116ff645ddSFiroz Khan 126ff645ddSFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 13*c5849b7cSMasahiro Yamada cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr --abis $(abis) $< $@ 146ff645ddSFiroz Khan 156ff645ddSFiroz Khanquiet_cmd_systbl = SYSTBL $@ 165ad4e94bSMasahiro Yamada cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis) $< $@ 176ff645ddSFiroz Khan 18*c5849b7cSMasahiro Yamada$(uapi)/unistd_32.h: abis := common,32 19865fa29fSMasahiro Yamada$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 206ff645ddSFiroz Khan $(call if_changed,syshdr) 216ff645ddSFiroz Khan 22*c5849b7cSMasahiro Yamada$(uapi)/unistd_64.h: abis := common,64 23865fa29fSMasahiro Yamada$(uapi)/unistd_64.h: $(syscall) $(syshdr) FORCE 246ff645ddSFiroz Khan $(call if_changed,syshdr) 256ff645ddSFiroz Khan 265ad4e94bSMasahiro Yamada$(kapi)/syscall_table_32.h: abis := common,32 27865fa29fSMasahiro Yamada$(kapi)/syscall_table_32.h: $(syscall) $(systbl) FORCE 286ff645ddSFiroz Khan $(call if_changed,systbl) 296ff645ddSFiroz Khan 305ad4e94bSMasahiro Yamada$(kapi)/syscall_table_64.h: abis := common,64 31865fa29fSMasahiro Yamada$(kapi)/syscall_table_64.h: $(syscall) $(systbl) FORCE 326ff645ddSFiroz Khan $(call if_changed,systbl) 336ff645ddSFiroz Khan 346ff645ddSFiroz Khanuapisyshdr-y += unistd_32.h unistd_64.h 356ff645ddSFiroz Khankapisyshdr-y += syscall_table_32.h \ 365ad4e94bSMasahiro Yamada syscall_table_64.h 376ff645ddSFiroz Khan 38865fa29fSMasahiro Yamadauapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 39865fa29fSMasahiro Yamadakapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 40865fa29fSMasahiro Yamadatargets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 416ff645ddSFiroz Khan 426ff645ddSFiroz KhanPHONY += all 43865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y) 446ff645ddSFiroz Khan @: 45