xref: /linux/arch/sparc/kernel/syscalls/Makefile (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
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
5*bbc90bc1SMasahiro Yamada$(shell mkdir -p $(uapi) $(kapi))
66ff645ddSFiroz Khan
729c5c3acSMasahiro Yamadasyscall := $(src)/syscall.tbl
8c5849b7cSMasahiro Yamadasyshdr := $(srctree)/scripts/syscallhdr.sh
95ad4e94bSMasahiro Yamadasystbl := $(srctree)/scripts/syscalltbl.sh
106ff645ddSFiroz Khan
116ff645ddSFiroz Khanquiet_cmd_syshdr = SYSHDR  $@
12a0e781a2SMasahiro Yamada      cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr --abis common,$* $< $@
136ff645ddSFiroz Khan
146ff645ddSFiroz Khanquiet_cmd_systbl = SYSTBL  $@
15a0e781a2SMasahiro Yamada      cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis common,$* $< $@
166ff645ddSFiroz Khan
17a0e781a2SMasahiro Yamada$(uapi)/unistd_%.h: $(syscall) $(syshdr) FORCE
186ff645ddSFiroz Khan	$(call if_changed,syshdr)
196ff645ddSFiroz Khan
20a0e781a2SMasahiro Yamada$(kapi)/syscall_table_%.h: $(syscall) $(systbl) FORCE
216ff645ddSFiroz Khan	$(call if_changed,systbl)
226ff645ddSFiroz Khan
236ff645ddSFiroz Khanuapisyshdr-y		+= unistd_32.h unistd_64.h
246ff645ddSFiroz Khankapisyshdr-y		+= syscall_table_32.h		\
255ad4e94bSMasahiro Yamada			   syscall_table_64.h
266ff645ddSFiroz Khan
27865fa29fSMasahiro Yamadauapisyshdr-y	:= $(addprefix $(uapi)/, $(uapisyshdr-y))
28865fa29fSMasahiro Yamadakapisyshdr-y	:= $(addprefix $(kapi)/, $(kapisyshdr-y))
29865fa29fSMasahiro Yamadatargets		+= $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y))
306ff645ddSFiroz Khan
316ff645ddSFiroz KhanPHONY += all
32865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y)
336ff645ddSFiroz Khan	@:
34