#
# Configuration Makefile for ALSA driver
# Copyright (c) 1994-98 by Jaroslav Kysela <perex@perex.cz>
#

NEW_KBUILD       = y

mainsrcdir	= .
MAINSRCDIR	= /home/ppetraki/Sandbox/alsa-project/build/alsa-driver
ALSAKERNELDIR	?= /home/ppetraki/Sandbox/alsa-project/build/alsa-driver/alsa-kernel

CROSS_COMPILE   ?= 
ARCH            ?= i386
ifdef NEW_KBUILD
CC		= $(CROSS_COMPILE)gcc
CPP		= $(CROSS_COMPILE)gcc -E
export CROSS_COMPILE ARCH
else
AS		= $(CROSS_COMPILE)as
LD		= $(CROSS_COMPILE)ld
CC		= $(CROSS_COMPILE)gcc
CPP		= $(CROSS_COMPILE)gcc -E
AR		= $(CROSS_COMPILE)ar
MODFLAGS	= -DMODULE=1
CFLAGS_KERNEL	=
GENKSYMS	= /sbin/genksyms -k 2.6.31 -p smp_
endif

prefix		= /usr
exec_prefix	= ${prefix}
sysconfdir	= ${prefix}/etc
bindir		= ${exec_prefix}/bin
sbindir		= ${exec_prefix}/sbin
mandir		= ${prefix}/share/man
moddir		= /lib/modules/2.6.31-14-generic/misc
moddir_tree	= 
c_opts		= -O2 -mpreferred-stack-boundary=2 -march=i586 -Wdeclaration-after-statement -Wno-pointer-sign -D__SMP__ -DCONFIG_SMP -DLINUX
m_opts		= 
processor	= i586
msmp		= 1
kaversion	= 2.6.31-14-generic
kversion	= 2
kpatchlevel	= 6
ksublevel	= 31
kextraversion	= -14-generic

CONFIG_SND_VERSION	= 1.0.22.1
CONFIG_SND_KERNELDIR	= /lib/modules/2.6.31-14-generic/build
CONFIG_MODULES		= y
CONFIG_SND_MVERSION	= y
CONFIG_ISAPNP_KERNEL	= y
CONFIG_PNP_KERNEL	= y
CONFIG_PROC_FS		= y
CONFIG_PM		= y
CONFIG_AC97_BUS		= m
CONFIG_HAS_DMA		= y

ifndef NEW_KBUILD
INCLUDE		= -I$(TOPDIR)/include  -I/lib/modules/2.6.31-14-generic/build/include -I/lib/modules/2.6.31-14-generic/build/arch/x86/include -I/lib/modules/2.6.31-14-generic/build/arch/x86/include
CFLAGS		= $(MODFLAGS) $(INCLUDE) $(c_opts) -Wall -Wstrict-prototypes \
	-fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common \
	-pipe -DALSA_BUILD -nostdinc -iwithprefix include
ifdef CONFIG_SND_MVERSION
CFLAGS += -DMODVERSIONS -include $(CONFIG_SND_KERNELDIR)/include/linux/modversions.h
endif
CPPFLAGS = $(MODFLAGS) $(INCLUDE) $(c_opts) -DALSA_BUILD -nostdinc -iwithprefix include
MAKE		+= $(m_opts)
SNDVERSIONS	= $(TOPDIR)/include/sndversions.h
DEXPORT		= $(TOPDIR)/include/modules
else
# 2.6 kbuild
EXTRA_CFLAGS += -DALSA_BUILD
LINUXINCLUDE := -I$(MAINSRCDIR)/include $(LINUXINCLUDE)
CPPFLAGS := -I$(MAINSRCDIR)/include $(CPPFLAGS)
KBUILD_CPPFLAGS := -I$(MAINSRCDIR)/include $(KBUILD_CPPFLAGS)
# 2.6.24 complains this override...
# CFLAGS := -I$(MAINSRCDIR)/include $(CFLAGS)
MAKE_ADDS = 
endif

