# GCC stuff
#INCLUDES=-I /usr/src/linux/include -I /usr/lib/gcc-lib/i386-slackware-linux/3.0.4/include/ 
INCLUDES=-I $(KSRC)/include -include $(KSRC)/include/linux/modversions.h
CFLAGS=-O2 -D__KERNEL__ -DMODULE -Wall -DMODVERSIONS
# -nostdinc
CC=gcc

OBJ=nw802.o
# usbvideo.o

# Build rules

all: $(OBJ)

usbvideo.o: usbvideo.c usbvideo.h
	$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< 

nw802.o: nw802.c usbvideo.o
	$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< 

clean:
	rm -f *.so *.o *~ *.swp $(OBJ)

install:
	mkdir -p $(DESTDIR)/lib/modules/$(KVERS)/usb
	install --mode=644 nw802.o $(DESTDIR)/lib/modules/$(KVERS)/usb
