1aff85039SFiroz Khan# SPDX-License-Identifier: GPL-2.0 2aff85039SFiroz Khankapi := arch/$(SRCARCH)/include/generated/asm 3aff85039SFiroz Khanuapi := arch/$(SRCARCH)/include/generated/uapi/asm 4aff85039SFiroz Khan 5aff85039SFiroz Khan_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ 6aff85039SFiroz Khan $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 7aff85039SFiroz Khan 8aff85039SFiroz Khansyscall := $(srctree)/$(src)/syscall.tbl 9aff85039SFiroz Khansyshdr := $(srctree)/$(src)/syscallhdr.sh 10aff85039SFiroz Khansystbl := $(srctree)/$(src)/syscalltbl.sh 11aff85039SFiroz Khan 12aff85039SFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 13aff85039SFiroz Khan cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ 14aff85039SFiroz Khan '$(syshdr_abis_$(basetarget))' \ 15aff85039SFiroz Khan '$(syshdr_pfx_$(basetarget))' \ 16aff85039SFiroz Khan '$(syshdr_offset_$(basetarget))' 17aff85039SFiroz Khan 18aff85039SFiroz Khanquiet_cmd_systbl = SYSTBL $@ 19aff85039SFiroz Khan cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \ 20aff85039SFiroz Khan '$(systbl_abis_$(basetarget))' \ 21aff85039SFiroz Khan '$(systbl_abi_$(basetarget))' \ 22aff85039SFiroz Khan '$(systbl_offset_$(basetarget))' 23aff85039SFiroz Khan 24aff85039SFiroz Khansyshdr_abis_unistd_32 := common,nospu,32 25*865fa29fSMasahiro Yamada$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 26aff85039SFiroz Khan $(call if_changed,syshdr) 27aff85039SFiroz Khan 28aff85039SFiroz Khansyshdr_abis_unistd_64 := common,nospu,64 29*865fa29fSMasahiro Yamada$(uapi)/unistd_64.h: $(syscall) $(syshdr) FORCE 30aff85039SFiroz Khan $(call if_changed,syshdr) 31aff85039SFiroz Khan 32aff85039SFiroz Khansystbl_abis_syscall_table_32 := common,nospu,32 33aff85039SFiroz Khansystbl_abi_syscall_table_32 := 32 34*865fa29fSMasahiro Yamada$(kapi)/syscall_table_32.h: $(syscall) $(systbl) FORCE 35aff85039SFiroz Khan $(call if_changed,systbl) 36aff85039SFiroz Khan 37aff85039SFiroz Khansystbl_abis_syscall_table_64 := common,nospu,64 38aff85039SFiroz Khansystbl_abi_syscall_table_64 := 64 39*865fa29fSMasahiro Yamada$(kapi)/syscall_table_64.h: $(syscall) $(systbl) FORCE 40aff85039SFiroz Khan $(call if_changed,systbl) 41aff85039SFiroz Khan 42aff85039SFiroz Khansystbl_abis_syscall_table_c32 := common,nospu,32 43aff85039SFiroz Khansystbl_abi_syscall_table_c32 := c32 44*865fa29fSMasahiro Yamada$(kapi)/syscall_table_c32.h: $(syscall) $(systbl) FORCE 45aff85039SFiroz Khan $(call if_changed,systbl) 46aff85039SFiroz Khan 47aff85039SFiroz Khansystbl_abis_syscall_table_spu := common,spu 48aff85039SFiroz Khansystbl_abi_syscall_table_spu := spu 49*865fa29fSMasahiro Yamada$(kapi)/syscall_table_spu.h: $(syscall) $(systbl) FORCE 50aff85039SFiroz Khan $(call if_changed,systbl) 51aff85039SFiroz Khan 52aff85039SFiroz Khanuapisyshdr-y += unistd_32.h unistd_64.h 53aff85039SFiroz Khankapisyshdr-y += syscall_table_32.h \ 54aff85039SFiroz Khan syscall_table_64.h \ 55aff85039SFiroz Khan syscall_table_c32.h \ 56aff85039SFiroz Khan syscall_table_spu.h 57aff85039SFiroz Khan 58*865fa29fSMasahiro Yamadauapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 59*865fa29fSMasahiro Yamadakapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 60*865fa29fSMasahiro Yamadatargets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 61aff85039SFiroz Khan 62aff85039SFiroz KhanPHONY += all 63*865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y) 64aff85039SFiroz Khan @: 65