1a0239c8eSFiroz Khan# SPDX-License-Identifier: GPL-2.0 2a0239c8eSFiroz Khankapi := arch/$(SRCARCH)/include/generated/asm 3a0239c8eSFiroz Khanuapi := arch/$(SRCARCH)/include/generated/uapi/asm 4a0239c8eSFiroz Khan 5a0239c8eSFiroz Khan_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ 6a0239c8eSFiroz Khan $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 7a0239c8eSFiroz Khan 829c5c3acSMasahiro Yamadasyscall := $(src)/syscall.tbl 9a0239c8eSFiroz Khansyshdr := $(srctree)/$(src)/syscallhdr.sh 10*9c19722cSMasahiro Yamadasystbl := $(srctree)/scripts/syscalltbl.sh 11a0239c8eSFiroz Khan 12a0239c8eSFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 13a0239c8eSFiroz Khan cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ 14a0239c8eSFiroz Khan '$(syshdr_abis_$(basetarget))' \ 15a0239c8eSFiroz Khan '$(syshdr_pfx_$(basetarget))' \ 16a0239c8eSFiroz Khan '$(syshdr_offset_$(basetarget))' 17a0239c8eSFiroz Khan 18a0239c8eSFiroz Khanquiet_cmd_systbl = SYSTBL $@ 19*9c19722cSMasahiro Yamada cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@ 20a0239c8eSFiroz Khan 21865fa29fSMasahiro Yamada$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 22a0239c8eSFiroz Khan $(call if_changed,syshdr) 23a0239c8eSFiroz Khan 24865fa29fSMasahiro Yamada$(kapi)/syscall_table.h: $(syscall) $(systbl) FORCE 25a0239c8eSFiroz Khan $(call if_changed,systbl) 26a0239c8eSFiroz Khan 27a0239c8eSFiroz Khanuapisyshdr-y += unistd_32.h 28a0239c8eSFiroz Khankapisyshdr-y += syscall_table.h 29a0239c8eSFiroz Khan 30865fa29fSMasahiro Yamadauapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 31865fa29fSMasahiro Yamadakapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 32865fa29fSMasahiro Yamadatargets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 33a0239c8eSFiroz Khan 34a0239c8eSFiroz KhanPHONY += all 35865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y) 36a0239c8eSFiroz Khan @: 37