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 885e69701SFiroz Khansyscall := $(srctree)/$(src)/syscall.tbl 985e69701SFiroz Khansyshdr := $(srctree)/$(src)/syscallhdr.sh 1085e69701SFiroz Khansystbl := $(srctree)/$(src)/syscalltbl.sh 1185e69701SFiroz Khan 1285e69701SFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 1385e69701SFiroz Khan cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ 1485e69701SFiroz Khan '$(syshdr_abis_$(basetarget))' \ 1585e69701SFiroz Khan '$(syshdr_pfx_$(basetarget))' \ 1685e69701SFiroz Khan '$(syshdr_offset_$(basetarget))' 1785e69701SFiroz Khan 1885e69701SFiroz Khanquiet_cmd_systbl = SYSTBL $@ 1985e69701SFiroz Khan cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \ 2085e69701SFiroz Khan '$(systbl_abis_$(basetarget))' \ 2185e69701SFiroz Khan '$(systbl_abi_$(basetarget))' \ 2285e69701SFiroz Khan '$(systbl_offset_$(basetarget))' 2385e69701SFiroz Khan 2485e69701SFiroz Khansyshdr_abis_unistd_32 := common,32 25*865fa29fSMasahiro Yamada$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 2685e69701SFiroz Khan $(call if_changed,syshdr) 2785e69701SFiroz Khan 2885e69701SFiroz Khansyshdr_abis_unistd_64 := common,64 29*865fa29fSMasahiro Yamada$(uapi)/unistd_64.h: $(syscall) $(syshdr) FORCE 3085e69701SFiroz Khan $(call if_changed,syshdr) 3185e69701SFiroz Khan 3285e69701SFiroz Khansystbl_abis_syscall_table_32 := common,32 33*865fa29fSMasahiro Yamada$(kapi)/syscall_table_32.h: $(syscall) $(systbl) FORCE 3485e69701SFiroz Khan $(call if_changed,systbl) 3585e69701SFiroz Khan 3685e69701SFiroz Khansystbl_abis_syscall_table_64 := common,64 37*865fa29fSMasahiro Yamada$(kapi)/syscall_table_64.h: $(syscall) $(systbl) FORCE 3885e69701SFiroz Khan $(call if_changed,systbl) 3985e69701SFiroz Khan 4085e69701SFiroz Khansystbl_abis_syscall_table_c32 := common,32 4185e69701SFiroz Khansystbl_abi_syscall_table_c32 := c32 42*865fa29fSMasahiro Yamada$(kapi)/syscall_table_c32.h: $(syscall) $(systbl) FORCE 4385e69701SFiroz Khan $(call if_changed,systbl) 4485e69701SFiroz Khan 4585e69701SFiroz Khanuapisyshdr-y += unistd_32.h unistd_64.h 4685e69701SFiroz Khankapisyshdr-y += syscall_table_32.h \ 4785e69701SFiroz Khan syscall_table_64.h \ 4885e69701SFiroz Khan syscall_table_c32.h 4985e69701SFiroz Khan 50*865fa29fSMasahiro Yamadauapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 51*865fa29fSMasahiro Yamadakapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 52*865fa29fSMasahiro Yamadatargets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 5385e69701SFiroz Khan 5485e69701SFiroz KhanPHONY += all 55*865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y) 5685e69701SFiroz Khan @: 57