############################################################## # # Makefile for the Meteor v4l2 device driver # ############################################################## ifndef KBUILD_OUTPUT $(error "Please export KBUILD_OUTPUT=/path/to/the/kernel/build/dir/") endif ifndef KERNEL_SOURCE $(error "Please export KERNEL_SOURCE=/path/to/the/kernel/dir/") endif ifndef KERNELRELEASE PWD := $(shell pwd) ARCH := i386 all: $(MAKE) -C $(KERNEL_SOURCE) SUBDIRS=$(PWD) modules clean: rm -f *.o *.ko *~ core .depend *.mod.c .*.cmd else obj-m := example.o endif