
TEST =  ctest ctest2 performance 
SRC = Makefile cortex.c ctest2.c ctest.c performance.c \
	INSTALL COPYING cortex.drv.lsm
CURRENT = cortex.drv.1.1.tgz


all: cortex.o $(TEST)

cortex.o: cortex.c
	cc   -Wall -Wstrict-prototypes -O3 -fomit-frame-pointer -c cortex.c

clean:
	- rm core foo foo.pgm *.o *~ $(TEST)

install: cortex.o
	cp cortex.o /lib/modules/2.*/misc/.
	depmod -a
	mknod /dev/cortex c 63 0
	mknod /dev/cortex.pgm c 63 1
	mknod /dev/cortexSmall c 63 2
	mknod /dev/cortexSmall.pgm c 63 3
	echo "Add a line like:"
	echo "   alias char-major-63 cortex"
	echo "to your conf.modules or modules.conf file"

release:
	tar cvfz $(CURRENT) $(SRC)
	echo "To use this file uudecode it then gunzip it then use tar" \
		> release.uu  
	cat cortex.drv.lsm  >> release.uu  
	uuencode $(CURRENT) < $(CURRENT) \
		>> release.uu  

