# This makefile will build the usbcam driver module
# external to the kernel source tree. It makes it easier
# to swap kernels.
# Location of the header files (most importantly the config files)
# for the kernel you want to build the module against.
# This should be correct for the currently installed kernel on your machine
KINCLUDE=/usr/src/linux-2.4.20-8/include
all: usbcam.o
clean:
rm usbcam.o -f
usbcam.o: usbcam.c usbcam.h
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i386 -DMODVERSIONS -include $(KINCLUDE)/linux/modversions.h -I$(KINCLUDE) -c -Idrivers/usb -DCONFIG_PROC_FS=1 -DCONFIG_VIDEO_PROC_FS=1 -DMODULE -D__KERNEL__ -DVID_HARDWARE_TP301B=0xFF usbcam.c
echo /sbin/insmod usbcam.o to turn it on
echo /sbin/rmmod usbcam to turn it off
echo
echo X and kernel programming do not mix.
echo Do the insmod and rmmod from outsid X
# echo must be linked with decode module
# echo this function not complete
# echo insmod tpdecode.o to turn it on
# echo rmmod tpdecode to turn it off