Menu Home

一个简单的linux driver Makefile

一个简单的linux driver Makefile
ubuntu下测试通过

ifneq ($(KERNELRELEASE),)
     obj-m := hello.o
else
     KERNELDIR ?= /lib/modules/$(shell uname -r)/build
     PWD := $(shell pwd)
default:
     $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif

Leave a Reply

Your email address will not be published.