
# change this to 0 if you have a plain Bt848 and NOT a Bt848A or higher 
# 0 == don't use PLL (plain Bt848, revision 17) 

# use 1 or 2 if you have a Bt848A, Bt849, Bt878, Bt879
# 1 == 28 MHz crystal installed
# 2 == 34 MHz crystal installed
PLL=-DUSE_PLL=0
# This can be set using module parameters too.

# Official major device number is 81
# Older kernels might have problems with such high numbers.
# But I rather recommend updating to kernel 2.0.31 or higher.
BTTV_MAJOR=81

# currently running kernel
CURRENT=$(shell uname -r)

# where the kernel sources are located
KERNEL_LOCATION=/usr/src/linux


#################################################
# some magic for using linux kernel settings
# when compiling module(s)

M_OBJS       = bttv.o tuner.o msp34xx.o #tda98xx.o tda8425.o tea6300.o
MX_OBJS      = videodev.o
EXTRA_CFLAGS = 	-DBTTV_MAJOR=$(BTTV_MAJOR) $(INTERFACE) $(PLL) \
		-Ii2c # -DVIDEODAT -DNODGA

here:
	DIR=`pwd`; (cd $(KERNEL_LOCATION); make SUBDIRS=$$DIR modules)

install:
	su -c "cp -v $(M_OBJS) $(MX_OBJS) /lib/modules/$(CURRENT)/misc"

clean:
	-rm -f $(M_OBJS) $(MX_OBJS) .*.o.flags *~

include $(KERNEL_LOCATION)/Rules.make

