# 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.010833>
# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim 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 ibm.cf to change

            PCC = pcc

# platform:  $XConsortium: ibm.cf,v 1.15 89/12/13 15:27:50 keith Exp $
# operating system:  AOS

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

IMAKE 		= $(IMAKESRC)/imake

DEPEND 		= $(UTILBINDIR)/makedepend
COMPILE_ET	= $(UTILBINDIR)/compile_et
MK_CMDS		= $(UTILBINDIR)/mk_cmds

CONFIGSRC 	= $(TOP)/config
CLIENTSRC 	= $(TOP)/clients
UTILSRC 	= $(TOP)/util
IMAKESRC 	= $(CONFIGSRC)
UTILBINDIR	= $(TOP)/utils/bin
UTILLIBDIR	= $(TOP)/utils/lib
UTILINCDIR	= $(TOP)/utils/include
ETDIR		= $(TOP)/ets

KRBDEF		=  	-DKERBEROS
ZEPHYRDEF	= -DZEPHYR

PANSS_CCOPTS	= -I/usr/athena/include
PANSS_LDOPTS	= -L/usr/athena/lib
KRBLIB		= 	-lkrb
DESLIB		= 	-ldes
ZEPHYRLIB	= -lzephyr

COMERRDEP	= $(UTILLIBDIR)/libcom_err.a
SSDEPLIB	= $(UTILLIBDIR)/libss.a

DESTDIR		= 	/usr/athena/bin
DS_SERVERDIR	= /usr/athena/etc
DS_SERVER	= 		$(DS_SERVERDIR)/disserve
DS_SERVERLOCAL	= 	disserve-fs
DS_SERVERNAME	= 	disserve
DS_INFODIR	= 	/usr/athena/lib/discuss/info
DS_INFODIRP	= 	/usr/athena/lib/discuss
DS_REALM	=  		ATHENA.MIT.EDU
DS_SERVICENAME	= 	discuss
DS_SERVICEPORT	= 2100
DS_DSPIPE	= 		/usr/athena/etc/dspipe
DS_DSCSETUP	= 	dsc_setup
DS_MAINSERVER	= CHARON.MIT.EDU

            SHELL = 	/bin/sh

              TOP = .
      CURRENT_DIR = .

               AR = ar clq
  BOOTSTRAPCFLAGS = -Dibm
               CC = hc

         COMPRESS = compress
              CPP = /lib/cpp $(STD_CPP_DEFINES)
    PREPROCESSCMD = hc -E $(STD_CPP_DEFINES)
          INSTALL = install
               LD = ld
             LINT = lint
      LINTLIBFLAG = -C
         LINTOPTS = -ax -Dibm -DHCVERSION=21004
               LN = ln -s
             MAKE = make
               MV = mv
               CP = cp
           RANLIB = ranlib
  RANLIBINSTFLAGS =
               RM = rm -f
     STD_INCLUDES =
  STD_CPP_DEFINES =
      STD_DEFINES = -Dibm -DHCVERSION=21004
 EXTRA_LOAD_FLAGS =
  EXTRA_LIBRARIES =
             TAGS = ctags

   SIGNAL_DEFINES = -DSIGNALRETURNSINT

    PROTO_DEFINES =

     INSTPGMFLAGS =

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

          DESTDIR = 	/usr/athena/bin

     TOP_INCLUDES = -I$(TOP)

      CDEBUGFLAGS = -O
        CCOPTIONS =
      COMPATFLAGS =

      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(PROJECT_DEFINES) $(DEFINES) $(COMPATFLAGS)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LDFLAGS) $(PROJECT_LDOPTS)
   LDCOMBINEFLAGS = -X -r

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

    IMAKE_DEFINES =

         IRULESRC = $(CONFIGSRC)
        IMAKE_CMD = $(NEWTOP)$(IMAKE) -I$(NEWTOP)$(IRULESRC) $(IMAKE_DEFINES)

     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
			$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)

# Discuss extensions to the X11R4 Imake configuration.

EXTRA_INCLUDES	= -I$(UTILINCDIR) $(PANSS_CCOPTS)
PROJECT_LDOPTS 	= -L$(UTILLIBDIR) $(PANSS_LDOPTS)
TOP_INCLUDES	= -I$(TOP)/include

MKSTEMPSRC	=
MKSTEMPOBJ	=

MOVE_IF_CHANGE	= $(TOP)/utils/move-if-change

# New rule macros

# New target patterns, etc.

.SUFFIXES: .h .c .et .ct

.et.c:
	$(COMPILE_ET) $*.et

.et.h:
	$(COMPILE_ET) $*.et

.ct.c:
	$(MK_CMDS) $*.ct

# Other random stuff

###########################################################################
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $XConsortium: Imake.rules,v 1.70 90/05/04 16:57:30 keith Exp $

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

#
# Top-level Imakefile for the discuss source hierarchy
#
# $Id: Imakefile,v 1.2 92/07/11 22:25:41 raeburn Exp $
# $Source: /afs/sipb.mit.edu/project/discuss/.cvsroot/discuss/source/Imakefile,v $

SUBDIRS	= utils ets include usp libds server client mclient edsc dsgrep

barf:
	@echo " "
	@echo " "
	@echo ' >>> Please use "make target", where "target" is one'
	@echo ' >>> or more of: world, build, depend, clean, all, or a'
	@echo ' >>> specific local target like Makefile.'
	@echo " "
	@false

world:
	cd ./config; $(MAKE) -f Makefile.ini clean; $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"
	$(IMAKE) -I./config
	$(MAKE) Makefile
	$(MAKE) build

build:
	$(MAKE) Makefiles
	$(MAKE) clean

	(cd ./utils; $(MAKE) build-utils)

	(cd ./include; $(MAKE) config)
	$(MAKE) depend
	$(MAKE) all

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

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

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

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)' all); \
	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

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

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; \
		case "$(TOP)" in \
		/?*) newtop=  upprefix=  ;; \
		*) upprefix=../ ;; \
		esac; \
		$(MAKE) $${sub}dirMakefiles UPPREFIX=$$upprefix 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=$(UPPREFIX)$(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=$(UPPREFIX)$(UPPREFIX)$(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=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(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=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
	$(MAKE) $(MFLAGS) Makefiles

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

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

emptyrule::

clean::
	$(RM_CMD) \#*

Makefile:: $(IMAKE)

$(IMAKE):
	@(cd $(IMAKESRC); if [ -f Makefile ]; then \
	echo "checking $@ in $(IMAKESRC) first..."; $(MAKE) all; else \
	echo "bootstrapping $@ from Makefile.ini in $(IMAKESRC) first..."; \
	$(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS); fi; \
	echo "okay, continuing in $(CURRENT_DIR)")

Makefile:: Imakefile $(ICONFIGFILES)
	$(IMAKE_CMD) -s- -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)   > Makefile.new
	mv -f Makefile.new Makefile

tags::
	$(TAGS) -w *.[ch]
	$(TAGS) -xw *.[ch] > TAGS

###########################################################################
# empty rules for directories that do not have SUBDIRS - do not edit

install::
	@echo "install in $(CURRENT_DIR) done"

install.man::
	@echo "install.man in $(CURRENT_DIR) done"

Makefiles::

includes::

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

