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