.EXPORT_ALL_VARIABLES:

#If your kernel sources are not placed in /usr/src/linux, change KERNELDIR 
#to the directory of the kernel source tree
KERNELDIR=/usr/src/linux

#Change this to the version of your kernel: 
KERNELVERSION=2.2.9

#FIRMWAREDIR is the directory, where we install the firmware of the ZA2
#The paths are automatically changed in the driver when recompiling.
FIRMWAREDIR=/etc/sound

#In the following line, add -D__SMP__ if you are running a SMP-kernel (if the
#kernel was compiled with CONFIG_SMP=y)
KFLAGS= -fomit-frame-pointer -O2 -D__KERNEL__ -Wall -I$(INCLUDEDIRS) -DZA2FIRMWAREDIR=\"$(FIRMWAREDIR)\"

#Do not change the following variables if you don't know what you do.

INCLUDEDIRS=$(KERNELDIR)/drivers/sound
MODULEDIR=/lib/modules/$(KERNELVERSION)/misc

BINDIR=/usr/bin
MAKE=make
INSTALL=install
CC=gcc
CPP=$(CC)
LD=ld		                  #Link command
LDFLAGS=	                  #Flags for linker

all:
	cd driver; $(MAKE) all
	cd tools; $(MAKE) all

install: all
	cd driver; $(MAKE) install
	cd tools; $(MAKE) install
	cd firmware; $(MAKE) install


