# Kernel includes.  Please avoid
# using '/usr/include' unless all
# other options exhausted.
#
KINCLUDES=/usr/src/linux/include

# uncomment line below if you have SMP
#SMPFLAGS=	-D__SMP__ -DCONFIG_SMP=1

# Unless you have a 386/486, you shouldn't need
# to change anything below here...

CPUFLAGS=	-DCPU=586 -march=i586
MODULE=		pl2303
CC=		gcc

KERNFLAGS=	\
	-D__KERNEL__ -I$(KINCLUDES) $(CPUFLAGS) $(SMPFLAGS) \
	-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
	-fno-strict-aliasing -pipe -DMODULE

EXTRA_CFLAGS= -DEXPORT_SYMTAB

# DBGCFLAGS = -DDEBUG -DUSB_SERIAL_DEBUG

CFLAGS=		$(KERNFLAGS) $(DBGCFLAGS)


all::		$(MODULE).o usbserial.o

$(MODULE).o:	$(MODULE).c usb-serial.h
	$(CC) $(CFLAGS) -c $<

usbserial.o: usbserial.c usb-serial.h
	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $<

inst:
	insmod ./usbserial.o
	insmod ./pl2303.o

uninst:
	rmmod pl2303
	rmmod usbserial

clean:
	rm -f *.o
