--- Makefile.orig	Wed Nov 10 12:32:40 1999
+++ Makefile	Sat Oct  4 03:15:28 2003
@@ -3,17 +3,17 @@
 #
 
 CC = gcc 
-CFLAGS = -O -D_GNU_SOURCE -Wall
-LFLAGS = -lncurses
+CFLAGS += -O -D_GNU_SOURCE -Wall -I${LOCALBASE}/include
+LFLAGS += -lncurses 
 
 PROG = typespeed
 SRCS = file.c  menu.c  misc.c  network.c
 OBJS = file.o  menu.o  misc.o  network.o
 
 local_dir = $(HOME)
-install_dir = "/usr/local/bin"
-wordfiles = "/usr/local/lib"
-man_dir  = "/usr/local/man/man1/"
+install_dir = ${PREFIX}/bin
+wordfiles = ${PREFIX}/lib
+man_dir  = ${PREFIX}/man/man1/
 
 all: clean $(PROG)
 
@@ -23,12 +23,10 @@
 
 
 $(PROG): $(OBJS)
-	
	$(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(PROG).c $(LFLAGS)
 
 
 install: typespeed
-
 	@echo Installing. You need to be root, or have access to install dirs
 	@echo ..and we know that everyone can delete the highscores, but
 	@echo we did not want to put setuid or setgid to typespeed yet,
@@ -40,11 +38,9 @@
 	if test ! -d $(wordfiles)/typespeed; then mkdir $(wordfiles)/typespeed; fi
 	./typespeed --makescores
 	cp words.* $(wordfiles)/typespeed
-	cp high.* $(wordfiles)/typespeed
 	chmod 755 $(wordfiles)/typespeed
-	chmod 666 $(wordfiles)/typespeed/high.*
 	chmod 644 $(wordfiles)/typespeed/words.*
-	echo $(wordfiles)/typespeed/ > /etc/typespeedrc
+	echo $(wordfiles)/typespeed/ > ${PREFIX}/etc/typespeedrc
 	cp typespeed.1 $(man_dir)
 	chmod 644 $(man_dir)/typespeed.1
 	@echo done...
