1fc06bac3SFiroz Khan# SPDX-License-Identifier: GPL-2.0 2fc06bac3SFiroz Khankapi := arch/$(SRCARCH)/include/generated/asm 3fc06bac3SFiroz Khanuapi := arch/$(SRCARCH)/include/generated/uapi/asm 4fc06bac3SFiroz Khan 5fc06bac3SFiroz Khan_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ 6fc06bac3SFiroz Khan $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 7fc06bac3SFiroz Khan 829c5c3acSMasahiro Yamadasyscall := $(src)/syscall.tbl 9*64f416c8SMasahiro Yamadasyshdr := $(srctree)/scripts/syscallhdr.sh 10ce372128SMasahiro Yamadasystbl := $(srctree)/scripts/syscalltbl.sh 11fc06bac3SFiroz Khan 12fc06bac3SFiroz Khanquiet_cmd_syshdr = SYSHDR $@ 13*64f416c8SMasahiro Yamada cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr $< $@ 14fc06bac3SFiroz Khan 15fc06bac3SFiroz Khanquiet_cmd_systbl = SYSTBL $@ 16ce372128SMasahiro Yamada cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@ 17fc06bac3SFiroz Khan 18865fa29fSMasahiro Yamada$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 19fc06bac3SFiroz Khan $(call if_changed,syshdr) 20fc06bac3SFiroz Khan 21865fa29fSMasahiro Yamada$(kapi)/syscall_table.h: $(syscall) $(systbl) FORCE 22fc06bac3SFiroz Khan $(call if_changed,systbl) 23fc06bac3SFiroz Khan 24fc06bac3SFiroz Khanuapisyshdr-y += unistd_32.h 25fc06bac3SFiroz Khankapisyshdr-y += syscall_table.h 26fc06bac3SFiroz Khan 27865fa29fSMasahiro Yamadauapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 28865fa29fSMasahiro Yamadakapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 29865fa29fSMasahiro Yamadatargets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 30fc06bac3SFiroz Khan 31fc06bac3SFiroz KhanPHONY += all 32865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y) 33fc06bac3SFiroz Khan @: 34