Files
kernel/Kbuild
T

60 lines
1.3 KiB
Makefile
Raw Normal View History

# SPDX-License-Identifier: GPL-2.0
#
# Kbuild for top-level directory of the kernel
#####
# Generate bounds.h
bounds-file := include/generated/bounds.h
always-y := $(bounds-file)
targets := kernel/bounds.s
2018-12-22 18:50:35 +09:00
$(bounds-file): kernel/bounds.s FORCE
$(call filechk,offsets,__LINUX_BOUNDS_H__)
#####
# Generate timeconst.h
timeconst-file := include/generated/timeconst.h
filechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $<
2018-12-22 18:50:35 +09:00
$(timeconst-file): kernel/time/timeconst.bc FORCE
$(call filechk,gentimeconst)
#####
# Generate asm-offsets.h
offsets-file := include/generated/asm-offsets.h
always-y += $(offsets-file)
targets += arch/$(SRCARCH)/kernel/asm-offsets.s
2018-12-22 18:50:35 +09:00
arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file)
2018-12-22 18:50:35 +09:00
$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
$(call filechk,offsets,__ASM_OFFSETS_H__)
2007-03-27 22:50:29 +02:00
#####
# Check for missing system calls
2007-03-27 22:50:29 +02:00
always-y += missing-syscalls
2007-03-27 22:50:29 +02:00
quiet_cmd_syscalls = CALL $<
cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags)
2007-03-27 22:50:29 +02:00
missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
2007-03-27 22:50:29 +02:00
$(call cmd,syscalls)
2016-05-23 16:24:40 -07:00
#####
# Check atomic headers are up-to-date
always-y += old-atomics
quiet_cmd_atomics = CALL $<
2018-11-08 20:41:28 +01:00
cmd_atomics = $(CONFIG_SHELL) $<
old-atomics: scripts/atomic/check-atomics.sh FORCE
$(call cmd,atomics)