DESTDIR=/usr/local/etc
SRCS=websterd.c connection.c pat.c word.c help.c define.c complete.c endings.c spell.c thesaurus.c
OBJS=websterd.o connection.o pat.o word.o help.o define.o complete.o endings.o spell.o thesaurus.o
CFLAGS= -ObjC -g -I../BTREE/usr/local/include -I../LIBTEXT/include -L../LIBTEXT -L../BTREE/usr/local/lib

all:	websterd addfulltextindex

websterd:	$(OBJS)
	cc $(CFLAGS) -o websterd $(OBJS) -ltext -lbtree

test:	test.c
	cc $(CFLAGS) -o test test.c -ltext -lbtree
addfulltextindex:	addfulltextindex.o
	cc $(CFLAGS) -o addfulltextindex addfulltextindex.o -ltext -lbtree

shar::
	shar README BUGS Makefile $(SRCS) websterd.h addfulltextindex.c >NeXT-websterd-2.0.shar


# Run 'make repair' once to fix your thesaurus

repair:	addfulltextindex
	./addfulltextindex /NextLibrary/References/Webster-Thesaurus/Thesaurus.nxbf

install:	websterd
	install -c websterd $(DESTDIR)
    
clean::
	rm -f $(OBJS)

