# Makefile for gpio OpenWRT Atheros SoC kernel mode driver
# David Rowe 30 Jan 2009

PWD   := $(shell pwd)
KDIR  := ../../build_dir/linux-atheros/linux-2.6.37.6/
#TOOLS := $(PWD)/../../staging_dir/toolchain-mips_gcc4.1.2/bin/
TOOLS := $(PWD)/../../staging_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0.9.32/bin/

	#make -C $(KDIR) SUBDIRS=$(PWD) CROSS_COMPILE="mips-linux-uclibc-" ARCH="mips" KBUILD_HAVE_NLS=no CONFIG_SHELL="/bin/bash" CC="mips-linux-uclibc-gcc" modules

export PATH:= $(TOOLS):$(PATH)

obj-m := gpio.o

all: 
make -C $(KDIR) SUBDIRS=$(PWD) CROSS_COMPILE="mips-openwrt-linux-uclibc-" ARCH="mips" KBUILD_HAVE_NLS=no CONFIG_SHELL="/bin/bash" CC="mips-openwrt-linux-uclibc-gcc" modules