###################################################
#
# Makefile for building the hellokernel derived from char-driver sample module
#
###################################################

KERNEL_VERSION	:= `2.6.28-r28`
KERNEL_DIR	:= /home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.28-r28
CROSS_COMPILE	:= /home/naruto/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-


ifneq ($(KERNELRELEASE),)
# call from kernel build system
obj-m := hellokernel.o
else
PWD       := $(shell pwd)

default: kernel-module
.PHONY: kernel-module

kernel-module:
        $(MAKE) -C $(KERNEL_DIR) M=$(PWD) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) modules

endif

clean:
        rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions sample Module.symvers


