File: Makefile

package info (click to toggle)
linux 6.1.153-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,496,348 kB
  • sloc: ansic: 23,476,872; asm: 266,650; sh: 110,570; makefile: 49,899; python: 36,950; perl: 36,836; cpp: 6,055; yacc: 4,908; lex: 2,725; awk: 1,440; ruby: 25; sed: 5
file content (45 lines) | stat: -rw-r--r-- 1,170 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# SPDX-License-Identifier: GPL-2.0

gen	:= arch/$(ARCH)/include/generated
kapi	:= $(gen)/asm
uapi	:= $(gen)/uapi/asm

syscall	:= $(srctree)/$(src)/syscall.tbl
systbl	:= $(srctree)/$(src)/syscalltbl

gen-y := $(kapi)/syscall_table.h
kapi-hdrs-y := $(kapi)/unistd_nr.h
uapi-hdrs-y := $(uapi)/unistd_32.h
uapi-hdrs-y += $(uapi)/unistd_64.h

targets += $(addprefix ../../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))

PHONY += kapi uapi

kapi:	$(gen-y) $(kapi-hdrs-y)
uapi:	$(uapi-hdrs-y)


# Create output directory if not already present
$(shell mkdir -p $(uapi) $(kapi))

filechk_syshdr = $(CONFIG_SHELL) '$(systbl)' -H -a $(syshdr_abi_$(basetarget)) -f "$2" < $<

filechk_sysnr = $(CONFIG_SHELL) '$(systbl)' -N -a $(sysnr_abi_$(basetarget)) < $<

filechk_syscalls = $(CONFIG_SHELL) '$(systbl)' -S < $<

syshdr_abi_unistd_32 := common,32
$(uapi)/unistd_32.h: $(syscall) FORCE
	$(call filechk,syshdr,$@)

syshdr_abi_unistd_64 := common,64
$(uapi)/unistd_64.h: $(syscall) FORCE
	$(call filechk,syshdr,$@)

$(kapi)/syscall_table.h: $(syscall) FORCE
	$(call filechk,syscalls)

sysnr_abi_unistd_nr := common,32,64
$(kapi)/unistd_nr.h: $(syscall) FORCE
	$(call filechk,sysnr)