xref: /openbmc/linux/arch/ia64/kernel/syscalls/Makefile (revision 37744fee)
1# SPDX-License-Identifier: GPL-2.0
2kapi := arch/$(SRCARCH)/include/generated/asm
3uapi := arch/$(SRCARCH)/include/generated/uapi/asm
4
5_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)')	\
6	  $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
7
8syscall := $(srctree)/$(src)/syscall.tbl
9syshdr := $(srctree)/$(src)/syscallhdr.sh
10systbl := $(srctree)/$(src)/syscalltbl.sh
11
12quiet_cmd_syshdr = SYSHDR  $@
13      cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@'	\
14		   '$(syshdr_abis_$(basetarget))'		\
15		   '$(syshdr_pfx_$(basetarget))'		\
16		   '$(syshdr_offset_$(basetarget))'
17
18quiet_cmd_systbl = SYSTBL  $@
19      cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@'	\
20		   '$(systbl_abis_$(basetarget))'		\
21		   '$(systbl_abi_$(basetarget))'		\
22		   '$(systbl_offset_$(basetarget))'
23
24syshdr_offset_unistd_64 := __NR_Linux
25$(uapi)/unistd_64.h: $(syscall) $(syshdr)
26	$(call if_changed,syshdr)
27
28systbl_offset_syscall_table := 1024
29$(kapi)/syscall_table.h: $(syscall) $(systbl)
30	$(call if_changed,systbl)
31
32uapisyshdr-y		+= unistd_64.h
33kapisyshdr-y		+= syscall_table.h
34
35targets	+= $(uapisyshdr-y) $(kapisyshdr-y)
36
37PHONY += all
38all: $(addprefix $(uapi)/,$(uapisyshdr-y))
39all: $(addprefix $(kapi)/,$(kapisyshdr-y))
40	@:
41