#
#	ptyrs0		254	0
#	ttyrs0		253	0
#
#
#

KERNEL = /lib/modules/$(shell uname -r)/build
INSTALL	= /usr/local/rserial


CFLAGS = -Wall
MFLAGS = -D__KERNEL__ -I$(KERNEL)/include -DMODULE -Wstrict-prototypes \
	-O2 -fomit-frame-pointer -fno-strict-aliasing -pipe \
	-fno-strength-reduce -DEXPORT_SYMTAB
CC = gcc

cnt = 1

default: module remote client rstest

module:
	$(CC) $(CFLAGS) $(MFLAGS) -c rserial.c

install:
	./Makedev
	rm -rf $(INSTALL)
	mkdir $(INSTALL)
	cp rserial.o $(INSTALL)
	cp client $(INSTALL)
	cp remote $(INSTALL)
	cp rstest $(INSTALL)
	cp README $(INSTALL)
	cp INSTALL $(INSTALL)

client: client.o

remote: remote.o

ioctl:	ioctl.o

rstest:	rstest.o

clean: 
	rm -f *.o *~ pty tty ioctl remote client rstest
 
