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