Makefile (6218d0f6b8dece1f2e82f0a47a0e6b8ecb631ef6) Makefile (3cba325b358f86357b5ce50eb9e6633183927eee)
1# SPDX-License-Identifier: GPL-2.0
2out := arch/$(SRCARCH)/include/generated/asm
3uapi := arch/$(SRCARCH)/include/generated/uapi/asm
4
5# Create output directory if not already present
6_dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)') \
7 $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)')
8
9syscall32 := $(src)/syscall_32.tbl
10syscall64 := $(src)/syscall_64.tbl
11
1# SPDX-License-Identifier: GPL-2.0
2out := arch/$(SRCARCH)/include/generated/asm
3uapi := arch/$(SRCARCH)/include/generated/uapi/asm
4
5# Create output directory if not already present
6_dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)') \
7 $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)')
8
9syscall32 := $(src)/syscall_32.tbl
10syscall64 := $(src)/syscall_64.tbl
11
12syshdr := $(srctree)/$(src)/syscallhdr.sh
12syshdr := $(srctree)/scripts/syscallhdr.sh
13systbl := $(srctree)/scripts/syscalltbl.sh
14
15quiet_cmd_syshdr = SYSHDR $@
13systbl := $(srctree)/scripts/syscalltbl.sh
14
15quiet_cmd_syshdr = SYSHDR $@
16 cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \
17 '$(syshdr_abi_$(basetarget))' \
18 '$(syshdr_pfx_$(basetarget))' \
19 '$(syshdr_offset_$(basetarget))'
16 cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --abis $(abis) --emit-nr \
17 $(if $(offset),--offset $(offset)) \
18 $(if $(prefix),--prefix $(prefix)) \
19 $< $@
20quiet_cmd_systbl = SYSTBL $@
21 cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis) $< $@
22
23quiet_cmd_hypercalls = HYPERCALLS $@
24 cmd_hypercalls = $(CONFIG_SHELL) '$<' $@ $(filter-out $<, $(real-prereqs))
25
20quiet_cmd_systbl = SYSTBL $@
21 cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis) $< $@
22
23quiet_cmd_hypercalls = HYPERCALLS $@
24 cmd_hypercalls = $(CONFIG_SHELL) '$<' $@ $(filter-out $<, $(real-prereqs))
25
26syshdr_abi_unistd_32 := i386
26$(uapi)/unistd_32.h: abis := i386
27$(uapi)/unistd_32.h: $(syscall32) $(syshdr) FORCE
28 $(call if_changed,syshdr)
29
27$(uapi)/unistd_32.h: $(syscall32) $(syshdr) FORCE
28 $(call if_changed,syshdr)
29
30syshdr_abi_unistd_32_ia32 := i386
31syshdr_pfx_unistd_32_ia32 := ia32_
30$(out)/unistd_32_ia32.h: abis := i386
31$(out)/unistd_32_ia32.h: prefix := ia32_
32$(out)/unistd_32_ia32.h: $(syscall32) $(syshdr) FORCE
33 $(call if_changed,syshdr)
34
32$(out)/unistd_32_ia32.h: $(syscall32) $(syshdr) FORCE
33 $(call if_changed,syshdr)
34
35syshdr_abi_unistd_x32 := common,x32
36syshdr_offset_unistd_x32 := __X32_SYSCALL_BIT
35$(uapi)/unistd_x32.h: abis := common,x32
36$(uapi)/unistd_x32.h: offset := __X32_SYSCALL_BIT
37$(uapi)/unistd_x32.h: $(syscall64) $(syshdr) FORCE
38 $(call if_changed,syshdr)
39
37$(uapi)/unistd_x32.h: $(syscall64) $(syshdr) FORCE
38 $(call if_changed,syshdr)
39
40syshdr_abi_unistd_64 := common,64
40$(uapi)/unistd_64.h: abis := common,64
41$(uapi)/unistd_64.h: $(syscall64) $(syshdr) FORCE
42 $(call if_changed,syshdr)
43
41$(uapi)/unistd_64.h: $(syscall64) $(syshdr) FORCE
42 $(call if_changed,syshdr)
43
44syshdr_abi_unistd_64_x32 := x32
45syshdr_pfx_unistd_64_x32 := x32_
44$(out)/unistd_64_x32.h: abis := x32
45$(out)/unistd_64_x32.h: prefix := x32_
46$(out)/unistd_64_x32.h: $(syscall64) $(syshdr) FORCE
47 $(call if_changed,syshdr)
48
49$(out)/syscalls_32.h: abis := i386
50$(out)/syscalls_32.h: $(syscall32) $(systbl) FORCE
51 $(call if_changed,systbl)
52$(out)/syscalls_64.h: abis := common,64
53$(out)/syscalls_64.h: $(syscall64) $(systbl) FORCE

--- 24 unchanged lines hidden ---
46$(out)/unistd_64_x32.h: $(syscall64) $(syshdr) FORCE
47 $(call if_changed,syshdr)
48
49$(out)/syscalls_32.h: abis := i386
50$(out)/syscalls_32.h: $(syscall32) $(systbl) FORCE
51 $(call if_changed,systbl)
52$(out)/syscalls_64.h: abis := common,64
53$(out)/syscalls_64.h: $(syscall64) $(systbl) FORCE

--- 24 unchanged lines hidden ---