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 quiet_cmd_hypercalls
= HYPERCALLS
$@
23 cmd_hypercalls
= $(CONFIG_SHELL
) '$<' $@
$(filter-out $<,$^
)
25 syshdr_abi_unistd_32
:= i386
26 $(uapi
)/unistd_32.h
: $(syscall32
) $(syshdr
)
27 $(call if_changed
,syshdr
)
29 syshdr_abi_unistd_32_ia32
:= i386
30 syshdr_pfx_unistd_32_ia32
:= ia32_
31 $(out
)/unistd_32_ia32.h
: $(syscall32
) $(syshdr
)
32 $(call if_changed
,syshdr
)
34 syshdr_abi_unistd_x32
:= common
,x32
35 syshdr_offset_unistd_x32
:= __X32_SYSCALL_BIT
36 $(uapi
)/unistd_x32.h
: $(syscall64
) $(syshdr
)
37 $(call if_changed
,syshdr
)
39 syshdr_abi_unistd_64
:= common
,64
40 $(uapi
)/unistd_64.h
: $(syscall64
) $(syshdr
)
41 $(call if_changed
,syshdr
)
43 syshdr_abi_unistd_64_x32
:= x32
44 syshdr_pfx_unistd_64_x32
:= x32_
45 $(out
)/unistd_64_x32.h
: $(syscall64
) $(syshdr
)
46 $(call if_changed
,syshdr
)
48 $(out
)/syscalls_32.h
: $(syscall32
) $(systbl
)
49 $(call if_changed
,systbl
)
50 $(out
)/syscalls_64.h
: $(syscall64
) $(systbl
)
51 $(call if_changed
,systbl
)
53 $(out
)/xen-hypercalls.h
: $(srctree
)/scripts
/xen-hypercalls.sh
54 $(call if_changed
,hypercalls
)
56 $(out
)/xen-hypercalls.h
: $(srctree
)/include/xen
/interface
/xen
*.h
58 uapisyshdr-y
+= unistd_32.h unistd_64.h unistd_x32.h
59 syshdr-y
+= syscalls_32.h
60 syshdr-
$(CONFIG_X86_64
) += unistd_32_ia32.h unistd_64_x32.h
61 syshdr-
$(CONFIG_X86_64
) += syscalls_64.h
62 syshdr-
$(CONFIG_XEN
) += xen-hypercalls.h
64 targets
+= $(uapisyshdr-y
) $(syshdr-y
)
67 all: $(addprefix $(uapi
)/,$(uapisyshdr-y
))
68 all: $(addprefix $(out
)/,$(syshdr-y
))