]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | # SPDX-License-Identifier: GPL-2.0 |
86feeaa8 SR |
2 | # |
3 | # Kbuild for top-level directory of the kernel | |
86feeaa8 | 4 | |
39664e2f | 5 | ##### |
01d509a4 | 6 | # Generate bounds.h |
39664e2f MY |
7 | |
8 | bounds-file := include/generated/bounds.h | |
9 | ||
10 | always := $(bounds-file) | |
8a58e162 | 11 | targets := kernel/bounds.s |
39664e2f | 12 | |
11fda148 | 13 | $(bounds-file): kernel/bounds.s FORCE |
70a4fd6c | 14 | $(call filechk,offsets,__LINUX_BOUNDS_H__) |
1cdf25d7 CL |
15 | |
16 | ##### | |
01d509a4 | 17 | # Generate timeconst.h |
0a227985 NMG |
18 | |
19 | timeconst-file := include/generated/timeconst.h | |
20 | ||
0a227985 NMG |
21 | targets += $(timeconst-file) |
22 | ||
ba97df45 | 23 | filechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $< |
0a227985 | 24 | |
11fda148 | 25 | $(timeconst-file): kernel/time/timeconst.bc FORCE |
0a227985 NMG |
26 | $(call filechk,gentimeconst) |
27 | ||
28 | ##### | |
01d509a4 | 29 | # Generate asm-offsets.h |
86feeaa8 | 30 | |
559df2e0 | 31 | offsets-file := include/generated/asm-offsets.h |
86feeaa8 | 32 | |
1cdf25d7 | 33 | always += $(offsets-file) |
6752ed90 | 34 | targets += arch/$(SRCARCH)/kernel/asm-offsets.s |
1cdf25d7 | 35 | |
11fda148 | 36 | arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file) |
86feeaa8 | 37 | |
11fda148 | 38 | $(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE |
70a4fd6c | 39 | $(call filechk,offsets,__ASM_OFFSETS_H__) |
86feeaa8 | 40 | |
c53aeca0 | 41 | ##### |
01d509a4 | 42 | # Check for missing system calls |
c53aeca0 | 43 | |
5f7efb4c AL |
44 | always += missing-syscalls |
45 | targets += missing-syscalls | |
46 | ||
c53aeca0 | 47 | quiet_cmd_syscalls = CALL $< |
44656fa0 | 48 | cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags) |
c53aeca0 | 49 | |
5f7efb4c | 50 | missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE |
c53aeca0 | 51 | $(call cmd,syscalls) |
1cdf25d7 | 52 | |
f197d75f | 53 | ##### |
ffd602eb | 54 | # Check atomic headers are up-to-date |
8d325880 MR |
55 | |
56 | always += old-atomics | |
57 | targets += old-atomics | |
58 | ||
59 | quiet_cmd_atomics = CALL $< | |
bdf37b4d | 60 | cmd_atomics = $(CONFIG_SHELL) $< |
8d325880 MR |
61 | |
62 | old-atomics: scripts/atomic/check-atomics.sh FORCE | |
63 | $(call cmd,atomics) | |
64 | ||
0a227985 NMG |
65 | # Keep these three files during make clean |
66 | no-clean-files := $(bounds-file) $(offsets-file) $(timeconst-file) |