all:
	make -C bttv KDIR=$(KERNEL_DIR)
	make -C ov511 INCLUDEDIR=$(KERNEL_DIR)/include KERNEL_MAJOR_MINOR=2.4
	make -C w9968cf KERNEL_INCLUDEDIR=$(KERNEL_DIR)/include KERNEL_MAJOR_MINOR=2.4

bttv_modules	:= video-buf.o #v4l1-compat.o v4l2-common.o
bttv_modules	+= btcx-risc.o ir-common.o bttv.o
bttv_modules	+= btcx-risc.o cx88xx.o cx8800.o
bttv_modules	+= saa7134.o saa6752hs.o
bttv_modules	+= ir-common.o
bttv_modules	+= tuner.o tda9887.o
bttv_modules	+= msp3400.o tvaudio.o tvmixer.o

ov511_modules	:= ov511.o ovfx2.o ovcamchip.o saa7111-new.o tda7313.o

w9968cf_modules	:= w9968cf.o w9968cf-vpp.o

install:
	install -d $(MODULE_INSTALL_DIR)
	( cd bttv && \
	  install -p -m644 $(sort $(bttv_modules)) $(MODULE_INSTALL_DIR) && \
	  install -d $(KERNEL_INSTALL_DIR)/drivers/media/video && \
	  install -p -m644 *.h $(KERNEL_INSTALL_DIR)/drivers/media/video )
	( cd ov511 && \
	  install -p -m644 $(ov511_modules) $(MODULE_INSTALL_DIR) )
	( cd w9968cf && \
	  install -p -m644 $(w9968cf_modules) $(MODULE_INSTALL_DIR) )
	install -d $(DOC_DIR)/{bttv,ov511,w9968cf}
	install -p -m644 bttv/doc/* $(DOC_DIR)/bttv/
	install -p -m644 ov511/{README,ov511.txt} $(DOC_DIR)/ov511/
	install -p -m644 w9968cf/w9968cf.txt $(DOC_DIR)/w9968cf/
