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