Blame view
Kbuild
1.3 KB
b24413180
|
1 |
# SPDX-License-Identifier: GPL-2.0 |
86feeaa81
|
2 3 |
# # Kbuild for top-level directory of the kernel |
86feeaa81
|
4 |
|
39664e2f3
|
5 |
##### |
01d509a48
|
6 |
# Generate bounds.h |
39664e2f3
|
7 8 |
bounds-file := include/generated/bounds.h |
5f2fb52fa
|
9 |
always-y := $(bounds-file) |
8a58e1628
|
10 |
targets := kernel/bounds.s |
39664e2f3
|
11 |
|
11fda1480
|
12 |
$(bounds-file): kernel/bounds.s FORCE |
70a4fd6c5
|
13 |
$(call filechk,offsets,__LINUX_BOUNDS_H__) |
1cdf25d70
|
14 15 |
##### |
01d509a48
|
16 |
# Generate timeconst.h |
0a227985d
|
17 18 |
timeconst-file := include/generated/timeconst.h |
ba97df455
|
19 |
filechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $< |
0a227985d
|
20 |
|
11fda1480
|
21 |
$(timeconst-file): kernel/time/timeconst.bc FORCE |
0a227985d
|
22 23 24 |
$(call filechk,gentimeconst) ##### |
01d509a48
|
25 |
# Generate asm-offsets.h |
86feeaa81
|
26 |
|
559df2e02
|
27 |
offsets-file := include/generated/asm-offsets.h |
86feeaa81
|
28 |
|
5f2fb52fa
|
29 |
always-y += $(offsets-file) |
6752ed90d
|
30 |
targets += arch/$(SRCARCH)/kernel/asm-offsets.s |
1cdf25d70
|
31 |
|
11fda1480
|
32 |
arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file) |
86feeaa81
|
33 |
|
11fda1480
|
34 |
$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE |
70a4fd6c5
|
35 |
$(call filechk,offsets,__ASM_OFFSETS_H__) |
86feeaa81
|
36 |
|
c53aeca05
|
37 |
##### |
01d509a48
|
38 |
# Check for missing system calls |
c53aeca05
|
39 |
|
5f2fb52fa
|
40 |
always-y += missing-syscalls |
5f7efb4c6
|
41 |
|
c53aeca05
|
42 |
quiet_cmd_syscalls = CALL $< |
44656fa03
|
43 |
cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags) |
c53aeca05
|
44 |
|
5f7efb4c6
|
45 |
missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE |
c53aeca05
|
46 |
$(call cmd,syscalls) |
1cdf25d70
|
47 |
|
f197d75fc
|
48 |
##### |
ffd602eb4
|
49 |
# Check atomic headers are up-to-date |
8d3258807
|
50 |
|
5f2fb52fa
|
51 |
always-y += old-atomics |
8d3258807
|
52 53 |
quiet_cmd_atomics = CALL $< |
bdf37b4dd
|
54 |
cmd_atomics = $(CONFIG_SHELL) $< |
8d3258807
|
55 56 57 |
old-atomics: scripts/atomic/check-atomics.sh FORCE $(call cmd,atomics) |