????Linux 2.6 ?????????Makefile
????# Makefile 2.6
????obj-m += hello.o
????KDIR:=/lib/modules/$(shell uname -r)/build
????# PWD=$(shell pwd)
????all:
????make -C $(KDIR) M=$(PWD) modules
????clean:
????make -C $(KDIR) M=$(PWD) clean
????obj-m := hello.o????????????hello.o??顣
????$(KDIR) ????????????·????“M=”????????????飬M=$(PWD) ?????????????????·????
??????? makefile???????$(PWD)??????????????????????塣
?????????????????????????飬???????????test.ko?????????????????test.c
????obj-m := test.o
????test-objs := file1.o file2.o file3.o
????KDIR := /lib/modules/$(shell uname -r)/build
????#PWD := $(shell pwd)
????all:
????make -C $(KDIR) M=$(PWD) modules
????clean:
????make -C $(KDIR) M=$(PWD) clean
???????2.6?±????????????????ο?linux/Documentation/kbuild/modules.txt