xref: /linux/arch/alpha/kernel/syscalls/Makefile (revision cabcebd33b8b80276d4cbbb1091e784dfbc516f8)
1*cabcebd3SFiroz Khan# SPDX-License-Identifier: GPL-2.0
2*cabcebd3SFiroz Khankapi := arch/$(SRCARCH)/include/generated/asm
3*cabcebd3SFiroz Khanuapi := arch/$(SRCARCH)/include/generated/uapi/asm
4*cabcebd3SFiroz Khan
5*cabcebd3SFiroz Khan_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)')	\
6*cabcebd3SFiroz Khan	  $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
7*cabcebd3SFiroz Khan
8*cabcebd3SFiroz Khansyscall := $(srctree)/$(src)/syscall.tbl
9*cabcebd3SFiroz Khansyshdr := $(srctree)/$(src)/syscallhdr.sh
10*cabcebd3SFiroz Khansystbl := $(srctree)/$(src)/syscalltbl.sh
11*cabcebd3SFiroz Khan
12*cabcebd3SFiroz Khanquiet_cmd_syshdr = SYSHDR  $@
13*cabcebd3SFiroz Khan      cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@'	\
14*cabcebd3SFiroz Khan		   '$(syshdr_abis_$(basetarget))'		\
15*cabcebd3SFiroz Khan		   '$(syshdr_pfx_$(basetarget))'		\
16*cabcebd3SFiroz Khan		   '$(syshdr_offset_$(basetarget))'
17*cabcebd3SFiroz Khan
18*cabcebd3SFiroz Khanquiet_cmd_systbl = SYSTBL  $@
19*cabcebd3SFiroz Khan      cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@'	\
20*cabcebd3SFiroz Khan		   '$(systbl_abis_$(basetarget))'		\
21*cabcebd3SFiroz Khan		   '$(systbl_abi_$(basetarget))'		\
22*cabcebd3SFiroz Khan		   '$(systbl_offset_$(basetarget))'
23*cabcebd3SFiroz Khan
24*cabcebd3SFiroz Khan$(uapi)/unistd_32.h: $(syscall) $(syshdr)
25*cabcebd3SFiroz Khan	$(call if_changed,syshdr)
26*cabcebd3SFiroz Khan
27*cabcebd3SFiroz Khan$(kapi)/syscall_table.h: $(syscall) $(systbl)
28*cabcebd3SFiroz Khan	$(call if_changed,systbl)
29*cabcebd3SFiroz Khan
30*cabcebd3SFiroz Khanuapisyshdr-y		+= unistd_32.h
31*cabcebd3SFiroz Khankapisyshdr-y		+= syscall_table.h
32*cabcebd3SFiroz Khan
33*cabcebd3SFiroz Khantargets	+= $(uapisyshdr-y) $(kapisyshdr-y)
34*cabcebd3SFiroz Khan
35*cabcebd3SFiroz KhanPHONY += all
36*cabcebd3SFiroz Khanall: $(addprefix $(uapi)/,$(uapisyshdr-y))
37*cabcebd3SFiroz Khanall: $(addprefix $(kapi)/,$(kapisyshdr-y))
38*cabcebd3SFiroz Khan	@:
39