############################################################## # # Makefile for the kobjtest device driver # ############################################################## ifdef KBUILD_OUTPUT $(error "Please do not export KBUILD_OUTPUT=/path/to/the/kernel/build/dir/") endif CFLAGS += -isystem /home/usr-src/linux-2.6.3-um/include ifndef KERNELRELEASE LINUX ?= /home/usr-src/linux-2.6.3-um PWD := $(shell pwd)/hello $(shell pwd)/kobject ARCH := um all: $(MAKE) -C $(LINUX) SUBDIRS="$(PWD)" ARCH=um modules clean: for i in $(PWD); do cd $$i && $(MAKE) clean ; cd .. ; done else obj-m := kobjtest.o endif