You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Kbuild 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # Kbuild for top-level directory of the kernel
  4. #####
  5. # Generate bounds.h
  6. bounds-file := include/generated/bounds.h
  7. always := $(bounds-file)
  8. targets := kernel/bounds.s
  9. $(bounds-file): kernel/bounds.s FORCE
  10. $(call filechk,offsets,__LINUX_BOUNDS_H__)
  11. #####
  12. # Generate timeconst.h
  13. timeconst-file := include/generated/timeconst.h
  14. filechk_gentimeconst = echo $(CONFIG_HZ) | bc -q $<
  15. $(timeconst-file): kernel/time/timeconst.bc FORCE
  16. $(call filechk,gentimeconst)
  17. #####
  18. # Generate asm-offsets.h
  19. offsets-file := include/generated/asm-offsets.h
  20. always += $(offsets-file)
  21. targets += arch/$(SRCARCH)/kernel/asm-offsets.s
  22. arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file)
  23. $(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
  24. $(call filechk,offsets,__ASM_OFFSETS_H__)
  25. #####
  26. # Check for missing system calls
  27. always += missing-syscalls
  28. quiet_cmd_syscalls = CALL $<
  29. cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags)
  30. missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
  31. $(call cmd,syscalls)
  32. #####
  33. # Check atomic headers are up-to-date
  34. always += old-atomics
  35. quiet_cmd_atomics = CALL $<
  36. cmd_atomics = $(CONFIG_SHELL) $<
  37. old-atomics: scripts/atomic/check-atomics.sh FORCE
  38. $(call cmd,atomics)