obj-m += gpio_test.o
#KERNEL_DIR=/lib/modules/$(shell uname -r)/build
#KERNEL_DIR :=/usr/src/linux-headers-2.6.32-21-generic/
KERNEL_DIR :=/home/OMAP/OMAP_L138_arm_1_00_00_08/DaVinci-PSP-SDK-03.20.00.08/src/kernel/linux-03.20.00.08/ #INSTALL_DIR=$(KERNEL_DIR)/gpio_module_install
#set KERNEL_DIR variable to kernel source directory
all: make -C $(KERNEL_DIR) M=$(shell pwd) ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules
#install:
# mkdir -p $(INSTALL_DIR)
# cp gpio_module.ko $(INSTALL_DIR)