16ff645ddSFiroz Khan# SPDX-License-Identifier: GPL-2.0 26ff645ddSFiroz Khankapi := arch/$(SRCARCH)/include/generated/asm 36ff645ddSFiroz Khanuapi := arch/$(SRCARCH)/include/generated/uapi/asm 46ff645ddSFiroz Khan 56ff645ddSFiroz Khan_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ 66ff645ddSFiroz Khan $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 76ff645ddSFiroz Khan 829c5c3acSMasahiro Yamadasyscall := $(src)/syscall.tbl 96ff645ddSFiroz Khansyshdr := $(srctree)/$(src)/syscallhdr.sh 10*5ad4e94bSMasahiro Yamadasystbl := $(srctree)/scripts/syscalltbl.sh 116ff645ddSFiroz Khan 126ff645ddSFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 136ff645ddSFiroz Khan cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ 146ff645ddSFiroz Khan '$(syshdr_abis_$(basetarget))' \ 156ff645ddSFiroz Khan '$(syshdr_pfx_$(basetarget))' \ 166ff645ddSFiroz Khan '$(syshdr_offset_$(basetarget))' 176ff645ddSFiroz Khan 186ff645ddSFiroz Khanquiet_cmd_systbl = SYSTBL $@ 19*5ad4e94bSMasahiro Yamada cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis) $< $@ 206ff645ddSFiroz Khan 216ff645ddSFiroz Khansyshdr_abis_unistd_32 := common,32 22865fa29fSMasahiro Yamada$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 236ff645ddSFiroz Khan $(call if_changed,syshdr) 246ff645ddSFiroz Khan 256ff645ddSFiroz Khansyshdr_abis_unistd_64 := common,64 26865fa29fSMasahiro Yamada$(uapi)/unistd_64.h: $(syscall) $(syshdr) FORCE 276ff645ddSFiroz Khan $(call if_changed,syshdr) 286ff645ddSFiroz Khan 29*5ad4e94bSMasahiro Yamada$(kapi)/syscall_table_32.h: abis := common,32 30865fa29fSMasahiro Yamada$(kapi)/syscall_table_32.h: $(syscall) $(systbl) FORCE 316ff645ddSFiroz Khan $(call if_changed,systbl) 326ff645ddSFiroz Khan 33*5ad4e94bSMasahiro Yamada$(kapi)/syscall_table_64.h: abis := common,64 34865fa29fSMasahiro Yamada$(kapi)/syscall_table_64.h: $(syscall) $(systbl) FORCE 356ff645ddSFiroz Khan $(call if_changed,systbl) 366ff645ddSFiroz Khan 376ff645ddSFiroz Khanuapisyshdr-y += unistd_32.h unistd_64.h 386ff645ddSFiroz Khankapisyshdr-y += syscall_table_32.h \ 39*5ad4e94bSMasahiro Yamada syscall_table_64.h 406ff645ddSFiroz Khan 41865fa29fSMasahiro Yamadauapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 42865fa29fSMasahiro Yamadakapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 43865fa29fSMasahiro Yamadatargets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 446ff645ddSFiroz Khan 456ff645ddSFiroz KhanPHONY += all 46865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y) 476ff645ddSFiroz Khan @: 48