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