KERNELDIR = /lib/modules/`uname -r`/build

include $(KERNELDIR)/.config

CFLAGS = -D_GNU_SOURCE -DSAA7115_REGTEST -O2 -Wall

all: test_ioctl ivtvfbctl ivtvplay mpegindex

test_ioctl: test_ioctl.c

ivtvfbctl: ivtvfbctl.c

ivtvplay.o: ivtvplay.cpp

ivtvplay: ivtvplay.o
	gcc ivtvplay.o -o ivtvplay -lpthread -lm -lstdc++

mpegindex: mpegindex.c

clean: 
	rm -f *.o *~ core
