# NB if your system does not have the functions: random and srandom,
#then un-comment the next line
#DEFS=-Drandom=rand -Dsrandom=srand

# NB if your system has getopt, then remove all references to getopt here
SRCS=sample.c getword.c tc.c getopt.c
OBJS=sample.o getword.o tc.o getopt.o

DOCS=sample.1 tc.3
HDRS=curses.h
DEMO=sample.demo dist.tri dist.antitri dist.skew dist.uni
ARCS=$(SRCS) makefile $(DIST) $(HDRS) $(DOCS) $(DEMO)
LIBS=-ltermlib -lm
CFLAGS=-O

sample: $(OBJS)
	cc $(CFLAGS) -o sample $(OBJS) $(LIBS)

sample.o: sample.c
	cc $(CFLAGS) -c $(DEFS) sample.c

demo: sample
	sample.demo

archive: $(ARCS)
	shar -a $(ARCS) > archive

lint:
	lint -h $(SRCS)
