xref: /linux/arch/alpha/kernel/syscalls/Makefile (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1cabcebd3SFiroz Khan# SPDX-License-Identifier: GPL-2.0
2cabcebd3SFiroz Khankapi := arch/$(SRCARCH)/include/generated/asm
3cabcebd3SFiroz Khanuapi := arch/$(SRCARCH)/include/generated/uapi/asm
4cabcebd3SFiroz Khan
5*bbc90bc1SMasahiro Yamada$(shell mkdir -p $(uapi) $(kapi))
6cabcebd3SFiroz Khan
729c5c3acSMasahiro Yamadasyscall := $(src)/syscall.tbl
814b36dcfSMasahiro Yamadasyshdr := $(srctree)/scripts/syscallhdr.sh
9b186f2c3SMasahiro Yamadasystbl := $(srctree)/scripts/syscalltbl.sh
10cabcebd3SFiroz Khan
11cabcebd3SFiroz Khanquiet_cmd_syshdr = SYSHDR  $@
1214b36dcfSMasahiro Yamada      cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr $< $@
13cabcebd3SFiroz Khan
14cabcebd3SFiroz Khanquiet_cmd_systbl = SYSTBL  $@
15b186f2c3SMasahiro Yamada      cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@
16cabcebd3SFiroz Khan
17865fa29fSMasahiro Yamada$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE
18cabcebd3SFiroz Khan	$(call if_changed,syshdr)
19cabcebd3SFiroz Khan
20865fa29fSMasahiro Yamada$(kapi)/syscall_table.h: $(syscall) $(systbl) FORCE
21cabcebd3SFiroz Khan	$(call if_changed,systbl)
22cabcebd3SFiroz Khan
23cabcebd3SFiroz Khanuapisyshdr-y		+= unistd_32.h
24cabcebd3SFiroz Khankapisyshdr-y		+= syscall_table.h
25cabcebd3SFiroz Khan
26865fa29fSMasahiro Yamadauapisyshdr-y	:= $(addprefix $(uapi)/, $(uapisyshdr-y))
27865fa29fSMasahiro Yamadakapisyshdr-y	:= $(addprefix $(kapi)/, $(kapisyshdr-y))
28865fa29fSMasahiro Yamadatargets		+= $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y))
29cabcebd3SFiroz Khan
30cabcebd3SFiroz KhanPHONY += all
31865fa29fSMasahiro Yamadaall: $(uapisyshdr-y) $(kapisyshdr-y)
32cabcebd3SFiroz Khan	@:
33