mirror of
https://github.com/Hizenberg469/Linux-kernel-driver-tutorial.git
synced 2026-04-20 00:42:25 +03:00
Hello World for linux Kernel Module
This commit is contained in:
21
02_better_hello/Makefile
Normal file
21
02_better_hello/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
#This variable is used to specify all the object file
|
||||
#which will be loaded and compile as kernel module for
|
||||
#usage. And the compilation for obj file from .c file
|
||||
#is done automatically.
|
||||
|
||||
obj-m += hello.o
|
||||
|
||||
# M variable used here tells the "make" to look in
|
||||
# current path to build bootable kernel module from
|
||||
# .c files in specified current path.
|
||||
|
||||
# modules: It is the target that is used to build the kernel
|
||||
# modules.
|
||||
# clean: It is used to clean the build targets, compile and
|
||||
# generated files which would be created.
|
||||
all:
|
||||
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
|
||||
|
||||
clean:
|
||||
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
|
||||
Reference in New Issue
Block a user