1*a0239c8eSFiroz Khan# SPDX-License-Identifier: GPL-2.0 2*a0239c8eSFiroz Khankapi := arch/$(SRCARCH)/include/generated/asm 3*a0239c8eSFiroz Khanuapi := arch/$(SRCARCH)/include/generated/uapi/asm 4*a0239c8eSFiroz Khan 5*a0239c8eSFiroz Khan_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ 6*a0239c8eSFiroz Khan $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 7*a0239c8eSFiroz Khan 8*a0239c8eSFiroz Khansyscall := $(srctree)/$(src)/syscall.tbl 9*a0239c8eSFiroz Khansyshdr := $(srctree)/$(src)/syscallhdr.sh 10*a0239c8eSFiroz Khansystbl := $(srctree)/$(src)/syscalltbl.sh 11*a0239c8eSFiroz Khan 12*a0239c8eSFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 13*a0239c8eSFiroz Khan cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ 14*a0239c8eSFiroz Khan '$(syshdr_abis_$(basetarget))' \ 15*a0239c8eSFiroz Khan '$(syshdr_pfx_$(basetarget))' \ 16*a0239c8eSFiroz Khan '$(syshdr_offset_$(basetarget))' 17*a0239c8eSFiroz Khan 18*a0239c8eSFiroz Khanquiet_cmd_systbl = SYSTBL $@ 19*a0239c8eSFiroz Khan cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \ 20*a0239c8eSFiroz Khan '$(systbl_abis_$(basetarget))' \ 21*a0239c8eSFiroz Khan '$(systbl_abi_$(basetarget))' \ 22*a0239c8eSFiroz Khan '$(systbl_offset_$(basetarget))' 23*a0239c8eSFiroz Khan 24*a0239c8eSFiroz Khan$(uapi)/unistd_32.h: $(syscall) $(syshdr) 25*a0239c8eSFiroz Khan $(call if_changed,syshdr) 26*a0239c8eSFiroz Khan 27*a0239c8eSFiroz Khan$(kapi)/syscall_table.h: $(syscall) $(systbl) 28*a0239c8eSFiroz Khan $(call if_changed,systbl) 29*a0239c8eSFiroz Khan 30*a0239c8eSFiroz Khanuapisyshdr-y += unistd_32.h 31*a0239c8eSFiroz Khankapisyshdr-y += syscall_table.h 32*a0239c8eSFiroz Khan 33*a0239c8eSFiroz Khantargets += $(uapisyshdr-y) $(kapisyshdr-y) 34*a0239c8eSFiroz Khan 35*a0239c8eSFiroz KhanPHONY += all 36*a0239c8eSFiroz Khanall: $(addprefix $(uapi)/,$(uapisyshdr-y)) 37*a0239c8eSFiroz Khanall: $(addprefix $(kapi)/,$(kapisyshdr-y)) 38*a0239c8eSFiroz Khan @: 39