# To build modules outside of the kernel tree, we run "make"
# in the kernel source tree; the Makefile these then includes this
# Makefile once again.
# This conditional selects whether we are being included from the
# kernel Makefile or not.
# Assume the source tree is where the running kernel was built
# You should set KERNELDIR in the environment if it's elsewhere
obj-m := mini2440_hello_module.o
KERNELDIR = /root/workdir/filesys/opt/ema_psp-02.01.03.11
#KERNELDIR = /home/lm/src/linux-2.6.16/
#KERNELDIR = /home/lm/src/linux-2.6.18/
#KERNELDIR = /home/lm/src/linux-2.6.21/
# The current directory is passed to sub-makes as argument
PWD := $(shell pwd)
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
modules_install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.symvers
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载
- 1
- 2
前往页