1 out
:= $(obj
)/..
/include/generated
/asm
2 uapi
:= $(obj
)/..
/include/generated
/uapi
/asm
4 # Create output directory if not already present
5 _dummy
:= $(shell [ -d
'$(out)' ] || mkdir
-p
'$(out)') \
6 $(shell [ -d
'$(uapi)' ] || mkdir
-p
'$(uapi)')
8 syscall32
:= $(srctree
)/$(src
)/syscall_32.tbl
9 syscall64
:= $(srctree
)/$(src
)/syscall_64.tbl
11 syshdr
:= $(srctree
)/$(src
)/syscallhdr.sh
12 systbl
:= $(srctree
)/$(src
)/syscalltbl.sh
14 quiet_cmd_syshdr
= SYSHDR
$@
15 cmd_syshdr
= $(CONFIG_SHELL
) '$(syshdr)' '$<' '$@' \
16 '$(syshdr_abi_$(basetarget))' \
17 '$(syshdr_pfx_$(basetarget))' \
18 '$(syshdr_offset_$(basetarget))'
19 quiet_cmd_systbl
= SYSTBL
$@
20 cmd_systbl
= $(CONFIG_SHELL
) '$(systbl)' $< $@
22 syshdr_abi_unistd_32
:= i386
23 $(uapi
)/unistd_32.h
: $(syscall32
) $(syshdr
)
24 $(call if_changed
,syshdr
)
26 syshdr_abi_unistd_32_ia32
:= i386
27 syshdr_pfx_unistd_32_ia32
:= ia32_
28 $(out
)/unistd_32_ia32.h
: $(syscall32
) $(syshdr
)
29 $(call if_changed
,syshdr
)
31 syshdr_abi_unistd_x32
:= common
,x32
32 syshdr_offset_unistd_x32
:= __X32_SYSCALL_BIT
33 $(uapi
)/unistd_x32.h
: $(syscall64
) $(syshdr
)
34 $(call if_changed
,syshdr
)
36 syshdr_abi_unistd_64
:= common
,64
37 $(uapi
)/unistd_64.h
: $(syscall64
) $(syshdr
)
38 $(call if_changed
,syshdr
)
40 syshdr_abi_unistd_64_x32
:= x32
41 syshdr_pfx_unistd_64_x32
:= x32_
42 $(out
)/unistd_64_x32.h
: $(syscall64
) $(syshdr
)
43 $(call if_changed
,syshdr
)
45 $(out
)/syscalls_32.h
: $(syscall32
) $(systbl
)
46 $(call if_changed
,systbl
)
47 $(out
)/syscalls_64.h
: $(syscall64
) $(systbl
)
48 $(call if_changed
,systbl
)
50 uapisyshdr-y
+= unistd_32.h unistd_64.h unistd_x32.h
51 syshdr-y
+= syscalls_32.h
52 syshdr-
$(CONFIG_X86_64
) += unistd_32_ia32.h unistd_64_x32.h
53 syshdr-
$(CONFIG_X86_64
) += syscalls_64.h
55 targets
+= $(uapisyshdr-y
) $(syshdr-y
)
58 all: $(addprefix $(uapi
)/,$(uapisyshdr-y
))
59 all: $(addprefix $(out
)/,$(syshdr-y
))