# Top level make of the WAIS system
#   brewster 2/91
#   jonathan 6/91
#   ruthlessly stolen and hacked for my own twisted purposes, erik 1/92-9/92


RELEASE = wais-8-b4-motif-client

RM = /bin/rm -f
AR = ar

# on SGIs set this to true
RANLIB = ranlib

CC = cc

# set this for your site.  This syntax only works in SunOS
# for other UNIX-like OS's set this to this directory.
#TOP:sh = pwd
# or fill in the blank for other OS's
TOP = /afs/eos/project/wais/src/testdist
#comment-me:
#	@echo You must set "\$$(TOP)" to point to the wais src directory

SUPDIR = $(TOP)/ir

# for old BSD add -DBSD
# for System V add -DSYSV 
# for XENIX add -M3e -Zi
# for a little better security in the server, add -DSECURE_SERVER
# this sets the server user id to -u argument after startup.
# for relevance feedaback in the search engine, add -DRELEVANCE_FEEDBACK
# USG for Unix Dirent in lib
# for SGIs running IRIX 4.0.1, add -cckr
CFLAGS = -g -I$(SUPDIR) -I../ir -DSECURE_SERVER -DRELEVANCE_FEEDBACK -DUSG -D_NO_PROTO

# this is a pretty good guess at the MAKE command.  -e seems to be
# SunOS specific too, so remove it for ULTRIX.
# well, not anymore.  It works under Ultrix 4.2, at least.

MAKE = make -k CC=$(CC) "CFLAGS=$(CFLAGS)" TOP=$(TOP)

default: ir mw mwsrc
	@echo "Welcome to WAIS"

lib::
	cd lib; $(MAKE) 

ir::
	cd ir; $(MAKE) 

ui::
	cd ui; $(MAKE)

bin::
	cd bin; $(MAKE)

doc::
	cd doc; $(MAKE)

test::
	@echo $(MAKE)

mw::
	cd mw; $(MAKE)

mwsrc::
	cd mw/mwsrc; $(MAKE)

# Remove objects and library.
clean:
	$(RM) *~
	$(RM) \#*\#
	$(RM) core
	$(RM) TAGS
	$(RM) -r SearchLog
	cd ir; make $@
	cd mw; make $@
	cd mw/mwsrc; make $@

