1# SPDX-License-Identifier: GPL-2.0 2kapi := arch/$(SRCARCH)/include/generated/asm 3uapi := arch/$(SRCARCH)/include/generated/uapi/asm 4 5_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ 6 $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 7 8syscall := $(src)/syscall.tbl 9syshdr := $(srctree)/$(src)/syscallhdr.sh 10systbl := $(srctree)/scripts/syscalltbl.sh 11 12quiet_cmd_syshdr = SYSHDR $@ 13 cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ 14 '$(syshdr_abis_$(basetarget))' \ 15 '$(syshdr_pfx_$(basetarget))' \ 16 '$(syshdr_offset_$(basetarget))' 17 18quiet_cmd_systbl = SYSTBL $@ 19 cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@ 20 21$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 22 $(call if_changed,syshdr) 23 24$(kapi)/syscall_table.h: $(syscall) $(systbl) FORCE 25 $(call if_changed,systbl) 26 27uapisyshdr-y += unistd_32.h 28kapisyshdr-y += syscall_table.h 29 30uapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 31kapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y)) 32targets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y)) 33 34PHONY += all 35all: $(uapisyshdr-y) $(kapisyshdr-y) 36 @: 37