# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
#
# The cpp used on this machine replaces all newlines and multiple tabs and
# spaces in a macro expansion with a single space.  Imake tries to compensate
# for this, but is not always successful.
#

SHELL=/bin/sh
MAKESHELL=/bin/sh

TOP = .
CWD = .
CONFIGSRC = /source/config
DESTDIR=

IRULESRC = $(CONFIGSRC)

IMAKE= imake
IFLAGS= -I$(IRULESRC) -DTOPDIR=/source
XIFLAGS= -I$(ATHXLIBDIR)/X11/config -DUseInstalled

ICONFIGFILE = ${IRULESRC}/Imake.tmpl ${IRULESRC}/Imake.rules \
	${IRULESRC}/site.def Imakefile
MKDIRHIER= sh $(IRULESRC)/mkdirhier.sh

ATHVERS = ${IRULESRC}/update.conf

ATHBASEDIR=/usr/athena

ATHLIBDIR=$(ATHBASEDIR)/lib
ATHBINDIR=$(ATHBASEDIR)/bin
ATHINCDIR=$(ATHBASEDIR)/include
ATHETCDIR=$(ATHBASEDIR)/etc
ATHCONFDIR=/etc/athena
ATHMANDIR=$(ATHBASEDIR)/man
ATHRBINDIR=/bin/athena
ATHRETCDIR=/etc/athena

ATHNEWDIR=$(ATHBINDIR)

ATHXAPPDIR=/usr/athena/lib/X11/app-defaults
ATHXBITDIR=/usr/athena/lib/X11/bitmaps
ATHXINCDIR=/usr/athena/include
ATHXLIBDIR=/usr/athena/lib

LINTCFLAG=-C
LINTFLAGS=$(DEFINES) -I/usr/athena/include

INSTALL=install -c
RANLIB=ranlib
CC=cc
LD=cc
AS=as
RM=rm -f
CDEBUG=-O2

CFLAGS=$(CDEBUG)  $(DEFINES) -I/usr/athena/include
LDFLAGS= $(LDDEFS)
LDPATH=-L$(ATHLIBDIR)
LDLIBS=

all::
install:: install_dirs
install_dirs::
install:: install.man
install.man::

clean::
depend::

FRC::

###########################################################################
# Project inclusion
###########################################################################

###########################################################################
# start of Imakefile
###########################################################################

# Top level make of the WAIS system
#   brewster 2/91
#   jonathan 6/91

# $Log:	Imakefile,v $
# Revision 1.11  92/08/05  12:40:14  epeisach
# Install dirname on BSD platforms
#
# Revision 1.10  92/08/04  18:30:53  epeisach
# Setup for Vax builds
#
# Revision 1.9  92/07/16  20:54:16  epeisach
# Changes for b5
#
# Revision 1.8  92/05/07  15:54:08  jonathan
# Updated for release.
#
# Revision 1.7  92/03/26  18:29:59  jonathan
# Fixed some broken make lines.
#
# Revision 1.6  92/03/07  19:45:01  jonathan
# Added recommendation for IBM.
#
# Revision 1.5  92/02/27  10:07:24  jonathan
# got rid of automatic setting of TOP.  Used Simon's approach instead.
#
# Revision 1.4  92/02/13  12:27:53  jonathan
# Removed references to seeker.
#
# Revision 1.3  92/02/13  12:05:17  jonathan
# Removed release targets.
#
# Revision 1.2  92/02/13  11:57:56  jonathan
# Added $Log for RCS.
#
#
# common customizations:
# see the CFLAGS variable for pointers.
#
# to do:
# create the scripts, install the pointer to this version if it is the
# newest.

RELEASE = wais-8-b5

RM = /bin/rm -f
AR = ar

# on SGIs set this to true
RANLIB = ranlib

OCC = $(CC)

# on IBM RS6000 this should be c89.

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 = ?
#comment-me:
#	@echo You must set "\$$(TOP)" to point to the wais src directory
TOP=/mit/wais/build/@sys/$(RELEASE)

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 = -I$(SUPDIR) -DSECURE_SERVER -DRELEVANCE_FEEDBACK ${MACHFL}

MACHFL=-DUSG -O

MAKE = make -k
all:: default

default: setup config.h lib ir ui bin doc x tags
	@echo "Welcome to WAIS"

setup::

config.h: config
	./config >config.h

config: config.c
	$(CC) -o config config.c

lib::
	cd lib; $(MAKE) CC=$(CC) "CFLAGS=$(CFLAGS)" TOP=$(TOP)

ir::
	cd ir; $(MAKE) CC=$(CC) "CFLAGS=$(CFLAGS)" TOP=$(TOP)

ui::
	cd ui; $(MAKE) CC=$(CC) "CFLAGS=$(CFLAGS)" TOP=$(TOP)

# ULTRIX doesn't have an env command, so this doesn't work.
# try going to the x directory and just doing a make -k
# you may have to edit the CFLAGS in the Makefile yourself.

x::
	cd x; (env TOP=$(TOP) CC=$(CC) "CFLAGS=$(CFLAGS) -I/usr/athena/include" ./makex.sh LFLAGS=-L/usr/athena/lib)

bin::
	cd bin; $(MAKE) CC=$(CC) "CFLAGS=$(CFLAGS)" TOP=$(TOP)

doc::
	cd doc; $(MAKE) CC=$(CC) "CFLAGS=$(CFLAGS)" TOP=$(TOP)

test::
	@echo $(MAKE) CC=$(CC) "CFLAGS=$(CFLAGS)" TOP=$(TOP)

# to make the emacs tags table for meta-.:
tags:

# Remove objects and library.
clean::
	$(RM) *~
	$(RM) \#*\#
	$(RM) core
	$(RM) TAGS
	$(RM) -r SearchLog
	$(RM) wais-sources/wais-docs*
	$(RM) config config.h
	cd lib; make $@
	cd ir; make $@
	cd ui; make  $@
	cd bin; make  $@
	cd doc; make  $@
	cd x; make $@

rlocks:
	$@
	cd lib; $@
	cd ir; $@
	cd ui;  $@
	cd bin;  $@
	cd doc;  $@
	cd x; $@

Makefile:: $(ICONFIGFILE)
	-@if [ -f Makefile ]; then \
	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
	$(RM) Makefile.bak; mv Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE) $(IFLAGS) $(IPROJ) -DNEWTOP=$(TOP) -DNEWCWD=$(CWD)

XMakefile::
	-@if [ -f Makefile ]; then \
	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
	$(RM) Makefile.bak; mv Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE) $(XIFLAGS)

clean::
	rm -f *~ *.o *.a core a.out

Makefiles::

###########################################################################
# dependencies generated by makedepend

