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