]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - Kbuild
scripts/gdb: delay generation of gdb constants.py
[thirdparty/kernel/linux.git] / Kbuild
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
86feeaa8
SR
2#
3# Kbuild for top-level directory of the kernel
4# This file takes care of the following:
1cdf25d7 5# 1) Generate bounds.h
0a227985
NMG
6# 2) Generate timeconst.h
7# 3) Generate asm-offsets.h (may need bounds.h and timeconst.h)
8# 4) Check for missing system calls
86feeaa8 9
39664e2f
MY
10#####
11# 1) Generate bounds.h
12
13bounds-file := include/generated/bounds.h
14
15always := $(bounds-file)
8a58e162 16targets := kernel/bounds.s
39664e2f 17
11fda148 18$(bounds-file): kernel/bounds.s FORCE
70a4fd6c 19 $(call filechk,offsets,__LINUX_BOUNDS_H__)
1cdf25d7
CL
20
21#####
0a227985
NMG
22# 2) Generate timeconst.h
23
24timeconst-file := include/generated/timeconst.h
25
0a227985
NMG
26targets += $(timeconst-file)
27
ba97df45 28filechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $<
0a227985 29
11fda148 30$(timeconst-file): kernel/time/timeconst.bc FORCE
0a227985
NMG
31 $(call filechk,gentimeconst)
32
33#####
34# 3) Generate asm-offsets.h
86feeaa8
SR
35#
36
559df2e0 37offsets-file := include/generated/asm-offsets.h
86feeaa8 38
1cdf25d7 39always += $(offsets-file)
6752ed90 40targets += arch/$(SRCARCH)/kernel/asm-offsets.s
1cdf25d7 41
11fda148 42arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file)
86feeaa8 43
11fda148 44$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
70a4fd6c 45 $(call filechk,offsets,__ASM_OFFSETS_H__)
86feeaa8 46
c53aeca0 47#####
0a227985 48# 4) Check for missing system calls
c53aeca0
SR
49#
50
5f7efb4c
AL
51always += missing-syscalls
52targets += missing-syscalls
53
c53aeca0 54quiet_cmd_syscalls = CALL $<
44656fa0 55 cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags)
c53aeca0 56
5f7efb4c 57missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
c53aeca0 58 $(call cmd,syscalls)
1cdf25d7 59
0a227985
NMG
60# Keep these three files during make clean
61no-clean-files := $(bounds-file) $(offsets-file) $(timeconst-file)