#
# Following options modified TO TASTE:
#
# Replace $(DEBUG) with following line when debugging...
#DEBUG=-g

#
# For "make save"
#
SAVEDIR=./save

# gf: Added LESSONDIR
LESSONDIR=/u/ferguson/lib/typist


#-----------------------------------------------------------------------
#
# Following options modified depending on TARGET ENVIRONMENT:
#
# following options should work on most BSD systems:
LIBS=-lcurses -ltermcap
LINTFLAGS=-achx
DEBUG=-O

# following options for all SMI (Sun Microsystems) systems:
#LIBS=-lcurses -ltermcap
#LINTFLAGS=-abchx
# Note: Sun-3 needs -O2 for kbdbind.c (SIGSEGV in iropt)
#DEBUG=-O4

# Following options for Ultrix
#LIBS=-lcursesX -ltermcap
#LINTFLAGS=
#DEBUG=-O2

# Following options for Sony NEWS
#LIBS=-lcurses -ltermcap
#LINTFLAGS=-abhvx
#DEBUG=-O

# following options for AIX
#LIBS=-lcurses
#LINTFLAGS=
#DEBUG=-O

# following options for HP-UX
#LIBS=-lcurses
#LINTFLAGS=-achx
#DEBUG=-O


SRCFILES=typist.c

# dvorak only works on Suns, by the way
TARGETS=typist dvorak

SOURCES=Makefile typist.c dvorak.c

#-----------------------------------------------------------------------
#
# Different Makes
#

all: $(TARGETS)

clean:
	rm -f *.o

clobber:
	rm -f *.o $(TARGETS)

lint:
	lint $(LINTFLAGS) *.c $(LIBS) 

save:
	if [ ! -d $(SAVEDIR) ]; then mkdir $(SAVEDIR); fi
	cp $(SOURCES) $(SAVEDIR)

shar:
	makekit -oMANIFEST -nUnix $(SOURCES)

typist: typist.c
	cc $(DEBUG) -DLESSONDIR=\"$(LESSONDIR)\" -o typist typist.c $(LIBS)
