5.2.3. Linux kernel makefiles
- Two ways to build modules: statically linked in vs dynamically loadable
- Extensive documentation:
Documentation/kbuild/
- build a kernel with module statically compiled in
#
# Slightly more advanced Makefile for building the hello world module
#
ifneq ($(KERNELRELEASE),)
obj-m := hello.o
else
KDIR := /home/mk/git/linux-2.6-denx
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif
clean:
rm -rf .*.cmd .tmp* *.ko *~ *.o *.mod.c *.symvers
| 5.2.2. A first hello_world module | 1. Denx Training Topics | 5.2.4. Kernel message logging and printk | |||
| Prev | Home | Next | |||
