Search notes:

Makefile

The Makefile in the root of the Linux kernel source tree is essentially used to build
The top level Makefile includes arch/$SRCARCH/Makefile which supplies architecture-specific information to the top Makefile.

Version variables

The top of the Makefile defines a few version related variables:
VERSION = 6
PATCHLEVEL = 5
SUBLEVEL = 0
EXTRAVERSION = -rc7
NAME = Hurr durr I'ma ninja sloth
$ make -s kernelversion
6.5.0-rc7
Compare with include/config/kernel.release (if it exists) and include/generated/uapi/linux/version.h (if it exists).

See also

$ make [target]
Documentation/kbuild/makefiles.rst
Linux kernel source tree

Links

Linux Kernel Makefiles
Process of the Linux kernel building

Index