xref: /linux/arch/sparc/kernel/syscalls/Makefile (revision a0e781a2a35a8dd4e6a38571998d59c6b0e32cd8)
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
9c5849b7cSMasahiro Yamadasyshdr := $(srctree)/scripts/syscallhdr.sh
105ad4e94bSMasahiro Yamadasystbl := $(srctree)/scripts/syscalltbl.sh
116ff645ddSFiroz Khan
126ff645ddSFiroz Khanquiet_cmd_syshdr = SYSHDR  $@
13*a0e781a2SMasahiro Yamada      cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr --abis common,$* $< $@
146ff645ddSFiroz Khan
156ff645ddSFiroz Khanquiet_cmd_systbl = SYSTBL  $@
16*a0e781a2SMasahiro Yamada      cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis common,$* $< $@
176ff645ddSFiroz Khan
18*a0e781a2SMasahiro Yamada$(uapi)/unistd_%.h: $(syscall) $(syshdr) FORCE
196ff645ddSFiroz Khan	$(call if_changed,syshdr)
206ff645ddSFiroz Khan
21*a0e781a2SMasahiro Yamada$(kapi)/syscall_table_%.h: $(syscall) $(systbl) FORCE
226ff645ddSFiroz Khan	$(call if_changed,systbl)
236ff645ddSFiroz Khan
246ff645ddSFiroz Khanuapisyshdr-y		+= unistd_32.h unistd_64.h
256ff645ddSFiroz Khankapisyshdr-y		+= syscall_table_32.h		\
265ad4e94bSMasahiro Yamada			   syscall_table_64.h
276ff645ddSFiroz Khan
28865fa29fSMasahiro Yamadauapisyshdr-y	:= $(addprefix $(uapi)/, $(uapisyshdr-y))
29865fa29fSMasahiro Yamadakapisyshdr-y	:= $(addprefix $(kapi)/, $(kapisyshdr-y))
30865fa29fSMasahiro Yamadatargets		+= $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y))
316ff645ddSFiroz Khan
326ff645ddSFiroz KhanPHONY += all
33865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y)
346ff645ddSFiroz Khan	@:
35