Merge tag 'linux-kselftest-kunit-fixes-5.11-rc3' of git://git.kernel.org/pub/scm...
[linux/fpc-iii.git] / arch / mips / kernel / syscalls / Makefile
blob6efb2f6889a7380e19bbe77c3fa9321ab143a7a7
1 # SPDX-License-Identifier: GPL-2.0
2 kapi := arch/$(SRCARCH)/include/generated/asm
3 uapi := arch/$(SRCARCH)/include/generated/uapi/asm
5 _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
6 $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
8 syscalln32 := $(srctree)/$(src)/syscall_n32.tbl
9 syscalln64 := $(srctree)/$(src)/syscall_n64.tbl
10 syscallo32 := $(srctree)/$(src)/syscall_o32.tbl
11 syshdr := $(srctree)/$(src)/syscallhdr.sh
12 sysnr := $(srctree)/$(src)/syscallnr.sh
13 systbl := $(srctree)/$(src)/syscalltbl.sh
15 quiet_cmd_syshdr = SYSHDR $@
16 cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \
17 '$(syshdr_abis_$(basetarget))' \
18 '$(syshdr_pfx_$(basetarget))' \
19 '$(syshdr_offset_$(basetarget))'
21 quiet_cmd_sysnr = SYSNR $@
22 cmd_sysnr = $(CONFIG_SHELL) '$(sysnr)' '$<' '$@' \
23 '$(sysnr_abis_$(basetarget))' \
24 '$(sysnr_pfx_$(basetarget))' \
25 '$(sysnr_offset_$(basetarget))'
27 quiet_cmd_systbl = SYSTBL $@
28 cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \
29 '$(systbl_abis_$(basetarget))' \
30 '$(systbl_abi_$(basetarget))' \
31 '$(systbl_offset_$(basetarget))'
33 syshdr_offset_unistd_n32 := __NR_Linux
34 $(uapi)/unistd_n32.h: $(syscalln32) $(syshdr)
35 $(call if_changed,syshdr)
37 syshdr_offset_unistd_n64 := __NR_Linux
38 $(uapi)/unistd_n64.h: $(syscalln64) $(syshdr)
39 $(call if_changed,syshdr)
41 syshdr_offset_unistd_o32 := __NR_Linux
42 $(uapi)/unistd_o32.h: $(syscallo32) $(syshdr)
43 $(call if_changed,syshdr)
45 sysnr_pfx_unistd_nr_n32 := N32
46 sysnr_offset_unistd_nr_n32 := 6000
47 $(uapi)/unistd_nr_n32.h: $(syscalln32) $(sysnr)
48 $(call if_changed,sysnr)
50 sysnr_pfx_unistd_nr_n64 := 64
51 sysnr_offset_unistd_nr_n64 := 5000
52 $(uapi)/unistd_nr_n64.h: $(syscalln64) $(sysnr)
53 $(call if_changed,sysnr)
55 sysnr_pfx_unistd_nr_o32 := O32
56 sysnr_offset_unistd_nr_o32 := 4000
57 $(uapi)/unistd_nr_o32.h: $(syscallo32) $(sysnr)
58 $(call if_changed,sysnr)
60 systbl_abi_syscall_table_32_o32 := 32_o32
61 systbl_offset_syscall_table_32_o32 := 4000
62 $(kapi)/syscall_table_32_o32.h: $(syscallo32) $(systbl)
63 $(call if_changed,systbl)
65 systbl_abi_syscall_table_64_n32 := 64_n32
66 systbl_offset_syscall_table_64_n32 := 6000
67 $(kapi)/syscall_table_64_n32.h: $(syscalln32) $(systbl)
68 $(call if_changed,systbl)
70 systbl_abi_syscall_table_64_n64 := 64_n64
71 systbl_offset_syscall_table_64_n64 := 5000
72 $(kapi)/syscall_table_64_n64.h: $(syscalln64) $(systbl)
73 $(call if_changed,systbl)
75 systbl_abi_syscall_table_64_o32 := 64_o32
76 systbl_offset_syscall_table_64_o32 := 4000
77 $(kapi)/syscall_table_64_o32.h: $(syscallo32) $(systbl)
78 $(call if_changed,systbl)
80 uapisyshdr-y += unistd_n32.h \
81 unistd_n64.h \
82 unistd_o32.h \
83 unistd_nr_n32.h \
84 unistd_nr_n64.h \
85 unistd_nr_o32.h
86 kapisyshdr-y += syscall_table_32_o32.h \
87 syscall_table_64_n32.h \
88 syscall_table_64_n64.h \
89 syscall_table_64_o32.h
91 targets += $(uapisyshdr-y) $(kapisyshdr-y)
93 PHONY += all
94 all: $(addprefix $(uapi)/,$(uapisyshdr-y))
95 all: $(addprefix $(kapi)/,$(kapisyshdr-y))