Makefile (a6ad93e37e76ec43c9cee6a91dd783fb854c2ff1) Makefile (14b3c9d24a7a5c274a9df27d245516f466d3bc5f)
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 := $(src)/syscall.tbl
9syshdr := $(srctree)/$(src)/syscallhdr.sh
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 := $(src)/syscall.tbl
9syshdr := $(srctree)/$(src)/syscallhdr.sh
10systbl := $(srctree)/$(src)/syscalltbl.sh
10systbl := $(srctree)/scripts/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 $@
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))'
19 cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis) $< $@
23
24syshdr_abis_unistd_32 := common,nospu,32
25$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE
26 $(call if_changed,syshdr)
27
28syshdr_abis_unistd_64 := common,nospu,64
29$(uapi)/unistd_64.h: $(syscall) $(syshdr) FORCE
30 $(call if_changed,syshdr)
31
20
21syshdr_abis_unistd_32 := common,nospu,32
22$(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE
23 $(call if_changed,syshdr)
24
25syshdr_abis_unistd_64 := common,nospu,64
26$(uapi)/unistd_64.h: $(syscall) $(syshdr) FORCE
27 $(call if_changed,syshdr)
28
32systbl_abis_syscall_table_32 := common,nospu,32
33systbl_abi_syscall_table_32 := 32
29$(kapi)/syscall_table_32.h: abis := common,nospu,32
34$(kapi)/syscall_table_32.h: $(syscall) $(systbl) FORCE
35 $(call if_changed,systbl)
36
30$(kapi)/syscall_table_32.h: $(syscall) $(systbl) FORCE
31 $(call if_changed,systbl)
32
37systbl_abis_syscall_table_64 := common,nospu,64
38systbl_abi_syscall_table_64 := 64
33$(kapi)/syscall_table_64.h: abis := common,nospu,64
39$(kapi)/syscall_table_64.h: $(syscall) $(systbl) FORCE
40 $(call if_changed,systbl)
41
34$(kapi)/syscall_table_64.h: $(syscall) $(systbl) FORCE
35 $(call if_changed,systbl)
36
42systbl_abis_syscall_table_c32 := common,nospu,32
43systbl_abi_syscall_table_c32 := c32
44$(kapi)/syscall_table_c32.h: $(syscall) $(systbl) FORCE
45 $(call if_changed,systbl)
46
47systbl_abis_syscall_table_spu := common,spu
48systbl_abi_syscall_table_spu := spu
37$(kapi)/syscall_table_spu.h: abis := common,spu
49$(kapi)/syscall_table_spu.h: $(syscall) $(systbl) FORCE
50 $(call if_changed,systbl)
51
52uapisyshdr-y += unistd_32.h unistd_64.h
53kapisyshdr-y += syscall_table_32.h \
54 syscall_table_64.h \
38$(kapi)/syscall_table_spu.h: $(syscall) $(systbl) FORCE
39 $(call if_changed,systbl)
40
41uapisyshdr-y += unistd_32.h unistd_64.h
42kapisyshdr-y += syscall_table_32.h \
43 syscall_table_64.h \
55 syscall_table_c32.h \
56 syscall_table_spu.h
57
58uapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y))
59kapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y))
60targets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y))
61
62PHONY += all
63all: $(uapisyshdr-y) $(kapisyshdr-y)
64 @:
44 syscall_table_spu.h
45
46uapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y))
47kapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y))
48targets += $(addprefix ../../../../, $(uapisyshdr-y) $(kapisyshdr-y))
49
50PHONY += all
51all: $(uapisyshdr-y) $(kapisyshdr-y)
52 @: