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 8*29c5c3acSMasahiro Yamadasyscall := $(src)/syscall.tbl 96ff645ddSFiroz Khansyshdr := $(srctree)/$(src)/syscallhdr.sh 106ff645ddSFiroz Khansystbl := $(srctree)/$(src)/syscalltbl.sh 116ff645ddSFiroz Khan 126ff645ddSFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 136ff645ddSFiroz Khan cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ 146ff645ddSFiroz Khan '$(syshdr_abis_$(basetarget))' \ 156ff645ddSFiroz Khan '$(syshdr_pfx_$(basetarget))' \ 166ff645ddSFiroz Khan '$(syshdr_offset_$(basetarget))' 176ff645ddSFiroz Khan 186ff645ddSFiroz Khanquiet_cmd_systbl = SYSTBL $@ 196ff645ddSFiroz Khan cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \ 206ff645ddSFiroz Khan '$(systbl_abis_$(basetarget))' \ 216ff645ddSFiroz Khan '$(systbl_abi_$(basetarget))' \ 226ff645ddSFiroz Khan '$(systbl_offset_$(basetarget))' 236ff645ddSFiroz Khan 246ff645ddSFiroz Khansyshdr_abis_unistd_32 := common,32 25865fa29fSMasahiro Yamada$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 266ff645ddSFiroz Khan $(call if_changed,syshdr) 276ff645ddSFiroz Khan 286ff645ddSFiroz Khansyshdr_abis_unistd_64 := common,64 29865fa29fSMasahiro Yamada$(uapi)/unistd_64.h: $(syscall) $(syshdr) FORCE 306ff645ddSFiroz Khan $(call if_changed,syshdr) 316ff645ddSFiroz Khan 326ff645ddSFiroz Khansystbl_abis_syscall_table_32 := common,32 33865fa29fSMasahiro Yamada$(kapi)/syscall_table_32.h: $(syscall) $(systbl) FORCE 346ff645ddSFiroz Khan $(call if_changed,systbl) 356ff645ddSFiroz Khan 366ff645ddSFiroz Khansystbl_abis_syscall_table_64 := common,64 37865fa29fSMasahiro Yamada$(kapi)/syscall_table_64.h: $(syscall) $(systbl) FORCE 386ff645ddSFiroz Khan $(call if_changed,systbl) 396ff645ddSFiroz Khan 406ff645ddSFiroz Khansystbl_abis_syscall_table_c32 := common,32 416ff645ddSFiroz Khansystbl_abi_syscall_table_c32 := c32 42865fa29fSMasahiro Yamada$(kapi)/syscall_table_c32.h: $(syscall) $(systbl) FORCE 436ff645ddSFiroz Khan $(call if_changed,systbl) 446ff645ddSFiroz Khan 456ff645ddSFiroz Khanuapisyshdr-y += unistd_32.h unistd_64.h 466ff645ddSFiroz Khankapisyshdr-y += syscall_table_32.h \ 476ff645ddSFiroz Khan syscall_table_64.h \ 486ff645ddSFiroz Khan syscall_table_c32.h 496ff645ddSFiroz Khan 50865fa29fSMasahiro Yamadauapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 51865fa29fSMasahiro Yamadakapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 52865fa29fSMasahiro Yamadatargets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 536ff645ddSFiroz Khan 546ff645ddSFiroz KhanPHONY += all 55865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y) 566ff645ddSFiroz Khan @: 57