# 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.a23984>
# $Header: /afs/athena.mit.edu/astaff/project/olhdev/src/config/RCS/Imake.template,v 1.8 91/09/03 15:23:11 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

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

ComErrLib	=	-L/usr/athena/lib -lcom_err$(LIBSUFFIX)
TermcapLib	=	-ltermcap$(LIBSUFFIX)
CursesLib	=	-lcurses$(LIBSUFFIX)
MotifLib	=	-L/usr/athena/lib -lMu -lXm -lXt -lXmu
XLibs		=	-L/usr/athena/X11/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 = -DHESIOD -DATHENA     -DPUTENV -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 = $(INCLUDES) $(STD_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

MenuLib		=	$(TOP)/libmenu/libmenu$(LIBSUFFIX).a
LOGGERLIB	=	$(TOP)/logger/liblogger.a

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

###########################################################################
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $Header: /afs/athena.mit.edu/astaff/project/olhdev/src/config/RCS/Imake.rules,v 1.3 91/04/22 20:18:29 lwvanels Exp $

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

#
# This file is part of the OLH system
# Imakefile for top level directory.
#
# Copyright (C) 1990 by the Massachusetts Institute of Technology.
# For copying and distribution information, see the file "mit-copyright.h."
#
#       $Source: /afs/athena.mit.edu/astaff/project/olhdev/src/RCS/Imakefile,v $
#       $Id: Imakefile,v 1.13 92/06/03 08:25:51 lwvanels Exp $
#       $Author: lwvanels $
#

SUBDIRS= libmenu logger ascii motif

all::

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

world2:
	make ${MFLAGS} Makefiles
	make ${MFLAGS} depend
	make ${MFLAGS} all
mytags::
	make ${MFLAGS} olh_ascii_tags olh_motif_tags

olh_motif_tags::
	$(TAGS) ../src/libmenu/*.[ch] ../src/motif/*.[ch]
	$(MV) TAGS ../src/TAGS.motif

olh_ascii_tags::
	$(TAGS) ../src/libmenu/*.[ch] ../src/ascii/*.[ch]
	$(MV) TAGS ../src/TAGS.ascii

install:: olh.script
	$(INSTALL) -c $(INSTALLFLAGS) olh.script $(DESTDIR)/usr/athena/bin/olh

install:: help.1
	$(INSTALL) -c $(INSTALLFLAGS) help.1 $(DESTDIR)/usr/athena/man/man1

install:: olh.1
	$(INSTALL) -c $(INSTALLFLAGS) olh.1 $(DESTDIR)/usr/athena/man/man1

###########################################################################
# 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

