# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $

###########################################################################
# Makefile generated from "Imake.tmpl" and </tmp/IIf.a11120>
# $Header: /mit/olcdev/src/config/RCS/Imake.template,v 1.15 1992/01/10 20:04:45 lwvanels Exp $
#
# Platform-specific parameters may be set in the appropriate .cf
# configuration files.  Site-wide parameters may be set in the file
# site.def.  Full rebuilds are recommended if any parameters are changed.
#
# If your C preprocessor doesn't define any unique symbols, you'll need
# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
# "make Makefile", "make Makefiles", or "make World").
#
# If you absolutely can't get imake to work, you'll need to set the
# variables at the top of each Makefile as well as the dependencies at the
# bottom (makedepend will do this automatically).
#

###########################################################################
# platform-specific configuration parameters - edit ultrix.cf to change

###########################################################################
# site-specific configuration parameters - edit site.def to change

ZephyrLib	=	-L/usr/athena/lib -lzephyr$(LIBSUFFIX)

KerberosLib	=	-L/usr/athena/lib -lkrb$(LIBSUFFIX) -ldes$(LIBSUFFIX)

HesiodLib	=	-L/usr/athena/lib -lhesiod$(LIBSUFFIX)

MotifWCLLib	=	-L/mit/motif/$(MACHINE)lib -lWcm

MotifUtilLib	=	-L/mit/motif/$(MACHINE)lib -lMu

CursesLib	=	-lcurses$(LIBSUFFIX) -ltermcap$(LIBSUFFIX)
ComErrLib	=	-L/usr/athena/lib -lcom_err$(LIBSUFFIX)
MotifResLib	=	-L/mit/motif/$(MACHINE)lib -lMrm
MotifLib	=	-L/mit/motif/$(MACHINE)lib -lXm
MotifToolLib	=	-L/mit/motif/$(MACHINE)lib -lXtm
XUtilLib	=	-L/usr/athena/lib -lXmu$(LIBSUFFIX)
XtoolLib	=	-L/usr/athena/lib -lXt$(LIBSUFFIX)
XLib		=	-L/usr/athena/lib -lX11$(LIBSUFFIX)

###########################################################################
# end of site-specific code

            SHELL =           /bin/sh

              TOP = .
      CURRENT_DIR = .

               AR = ar r
  BOOTSTRAPCFLAGS =
               CC = cc
              C++ = CPlusPlusCmd

         COMPRESS = CompressCmd
              CPP = /lib/cpp $(STD_CPP_DEFINES)
    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
          INSTALL = install
               LD = ld
             LINT = lint
      LINTLIBFLAG = -C
         LINTOPTS = -axz
               LN = ln -s
             MAKE = make
               MV = mv
               CP = cp
           RANLIB = ranlib
  RANLIBINSTFLAGS =
               RM = rm -f
     STD_INCLUDES =
  STD_CPP_DEFINES =
      STD_DEFINES = -DZEPHYR -DHESIOD -DKERBEROS -DATHENA 	-DLOG 	-DLOG_USAGE  -DSYSLOG -DDISCUSS -DVOID_SIGRET   -DNEEDS_ERRNO_DEFS
 EXTRA_LOAD_FLAGS =
  EXTRA_LIBRARIES =
             TAGS = etags -t

     INSTPGMFLAGS = -s

     INSTBINFLAGS = -m 0755
     INSTUIDFLAGS = -m 4755
     INSTLIBFLAGS = -m 0664
     INSTINCFLAGS = -m 0444
     INSTMANFLAGS = -m 0444
     INSTDATFLAGS = -m 0444
    INSTKMEMFLAGS = -m 4755

          DESTDIR =

         INCLUDES =

      CDEBUGFLAGS = -g
        CCOPTIONS =
      COMPATFLAGS =
       ALLDEFINES = $(STD_INCLUDES) $(INCLUDES) $(STD_DEFINES) $(DEFINES) $(COMPATFLAGS)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
       C++OPTIONS =
         C++FLAGS = $(C++OPTIONS) $(CFLAGS)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)

        MACROFILE = ultrix.cf
           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
			gmon.out .emacs_* tags TAGS make.log MakeOut

    IMAKE_DEFINES =
            IMAKE = imake
         IRULESRC = $(CONFIGDIR)
        IMAKE_CMD = $(IMAKE) -I$(NEWTOP)$(IRULESRC) $(IMAKE_DEFINES) \
			-s Makefile
     ICONFIGFILES = $(IRULESRC)/Imake.template $(IRULESRC)/Imake.rules \
			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
			$(IRULESRC)/$(MACROFILE)
MAKEDEPEND = makedepend
DEPEND = $(MAKEDEPEND)

all :: Makefile

CONFIGDIR	=	${TOP}/config

COMMONLIB	=	$(TOP)/common/libcommon$(LIBSUFFIX).a
PARSER		=	$(TOP)/clients/parser/libparser$(LIBSUFFIX).a
TTY		=	$(TOP)/clients/tty/libtty$(LIBSUFFIX).a
CLIENTLIB	=	$(TOP)/clients/lib/libclient$(LIBSUFFIX).a
LOGGERLIB	=	$(TOP)/logger/liblogger$(LIBSUFFIX).a

STD_INCLUDES	=	-I$(TOP)/include -I/mit/motif/include -I/usr/athena/include

###########################################################################
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $Header: /afs/athena.mit.edu/astaff/project/olcdev/src/config/RCS/Imake.rules,v 1.12 91/10/31 15:08:43 lwvanels Exp $

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

#
# $Id: Imakefile,v 1.21 91/10/30 16:11:21 lwvanels Exp $
# $Source: /afs/athena.mit.edu/astaff/project/olcdev/src/RCS/Imakefile,v $
#
# For copying and distribution information,
# please see the file <mit-copyright.h>.
#
# Imakefile for top level directory.
#

WCLDIR=

LIBMUDIR=

SUBDIRS= common logger clients server browser man lib $(WCLDIR) $(LIBMUDIR)
RM=rm -f
MV=mv -f

all::

world::
	make ${MFLAGS} Makefile
	@make ${MFLAGS} -f Makefile world2

world2:
	make ${MFLAGS} Makefiles
	make ${MFLAGS} depend
	make ${MFLAGS} all

mytags::
	make ${MFLAGS} olc_tags olcd_tags rpd_tags polld_tags xolc_tags

olc_tags::
	$(TAGS) clients/tty/*.[ch] clients/lib/*.[ch] clients/parser/*.[ch] clients/olc/*.[ch] common/*.[ch] include/olc/*.[ch]
	$(MV) TAGS ../src/TAGS.olc

xolc_tags::
	$(TAGS) clients/lib/*.[ch] clients/motif/*.[ch] common/*.[ch] include/olc/*.[ch]
	$(MV) TAGS ../src/TAGS.xolc

olcd_tags::
	$(TAGS) common/*.[ch] include/olc/*.[ch] include/*.[ch] server/olcd/*.[ch]
	$(MV) TAGS ../src/TAGS.olcd

rpd_tags::
	$(TAGS) include/*.[ch] server/rpd/*.[ch]
	$(MV) TAGS ../src/TAGS.rpd

polld_tags::
	$(TAGS) include/*.[ch] server/polld/*.[ch]
	$(MV) TAGS ../src/TAGS.polld

###########################################################################
# common rules for all Makefiles - do not edit

emptyrule::

clean::
	$(RM_CMD) \#*

Makefile: Imakefile $(ICONFIGFILES)
	-@if [ -f Makefile ]; then \
		echo "	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
		$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)

tags::
	$(TAGS)  *.[ch]

saber:
	#load $(ALLDEFINES) $(SRCS)

osaber:
	#load $(ALLDEFINES) $(OBJS)

###########################################################################
# rules for building in SUBDIRS - do not edit

all::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
		(cd $$i ; echo "making" all "in $(CURRENT_DIR)/$$i..."; \
			$(MAKE) $(MFLAGS) CDEBUGFLAGS='$(CDEBUGFLAGS)' CC='$(CC)' all); \
	done

install::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
		(cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
			$(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \
	done

install.man::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
		(cd $$i ; echo "installing man pages" "in $(CURRENT_DIR)/$$i..."; \
			$(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install.man); \
	done

depend::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
		(cd $$i ; echo "depending" "in $(CURRENT_DIR)/$$i..."; \
			$(MAKE) $(MFLAGS)  depend); \
	done

clean::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
		(cd $$i ; echo "cleaning" "in $(CURRENT_DIR)/$$i..."; \
			$(MAKE) $(MFLAGS) RM_CMD='$(RM_CMD)' clean); \
	done

tags::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
		(cd $$i ; echo "tagging" "in $(CURRENT_DIR)/$$i..."; \
			$(MAKE) $(MFLAGS) TAGS='$(TAGS)' tags); \
	done

Makefiles::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
		echo "making Makefiles in $(CURRENT_DIR)/$$i..."; \
		case "$$i" in \
		./?*/?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \
		./?*/?*/?*) newtop=../../../ sub=subsubsub;; \
		./?*/?*)    newtop=../../ sub=subsub;; \
		./?*)       newtop=../ sub=sub;; \
		*/?*/?*/?*)    newtop=../../../../ sub=subsubsubsub;; \
		*/?*/?*)    newtop=../../../ sub=subsubsub;; \
		*/?*)       newtop=../../ sub=subsub;; \
		*)	    newtop=../ sub=sub;; \
		esac; \
		$(MAKE) $${sub}dirMakefiles NEWTOP=$$newtop \
		MAKEFILE_SUBDIR=$$i NEW_CURRENT_DIR=$(CURRENT_DIR)/$$i;\
	done

subdirMakefiles:
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
	echo "	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
	else exit 0; fi
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
	$(MAKE) $(MFLAGS) Makefiles

subsubdirMakefiles:
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
	echo "	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
	else exit 0; fi
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../../$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
	$(MAKE) $(MFLAGS) Makefiles

subsubsubdirMakefiles:
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
	echo "	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
	else exit 0; fi
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../../../$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
	$(MAKE) $(MFLAGS) Makefiles

subsubsubsubdirMakefiles:
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
	echo "	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
	else exit 0; fi
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../../../../$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
	$(MAKE) $(MFLAGS) Makefiles

includes::
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
		(cd $$i ; echo including "in $(CURRENT_DIR)/$$i..."; \
			$(MAKE) $(MFLAGS)  includes); \
	done

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

