DRIVER_VERSION := 1.48 #KVERSION := `uname -r` KVERSION := 2.6.29.1 KDIR := /lib/modules/$(KVERSION)/build PWD := $(shell pwd) #INSTALL_MOD_DIR := kernel/drivers/media/video/sn9c102/ INSTALL_MOD_DIR := kernel/drivers/media/??? default: modules modules: $(MAKE) -C $(KDIR) M=$(PWD) modules install: modules_install modules_install: $(MAKE) -C $(KDIR) M=$(PWD) INSTALL_MOD_PATH=${DESTDIR} INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install clean: $(MAKE) -C $(KDIR) M=$(PWD) clean rm -rf Module.symvers ############################################################################## help: @echo 'List of available targets. Type:' @echo '- "make modules" to build the modules' @echo '- "make modules_install" to install the built modules' @echo '- "make clean" to remove all generated files in the current directory' @echo '- "make tar" to create and place an archive of the current directory in $(TARFILE)' @echo '- "make help" to print the list of available targets' ############################################################################## TARFILE := ../s3c2410_vs1001k-$(DRIVER_VERSION).tar.gz DIR := ../ FILE := s3c2410_vs1001k-$(DRIVER_VERSION) EXCLUDEFILE := device_table.txt tar: tar -choz --exclude $(EXCLUDEFILE) --verbose -C $(DIR) --file=$(TARFILE) $(FILE) archive: tar -choz --verbose -C $(DIR) --file=$(TARFILE) $(FILE)