# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.62 91/05/12 14:55:28 rws Exp $

###########################################################################
# Makefile generated from "Imake.tmpl" and </tmp/IIf.021941>
# $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)/util
UTILLIBDIR	= $(TOP)/lib
UTILINCDIR	= $(TOP)/include
DSLIBDIR	= $(TOP)/lib
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

COMMERRDEP	= $(UTILLIBDIR)/libcom_err.a
SSDEPLIB	= $(UTILLIBDIR)/libss.a
USPDEPLIB	= $(UTILLIBDIR)/libusp.a

DS_SERVER	= 		"/usr/athena/etc/disserve"
DS_SERVERLOCAL	= 	"disserve-fs"
DS_SERVERNAME	= 	"disserve"
DS_INFODIR	= "/usr/sipb/lib/discuss/info"
DS_REALM	=  		"ATHENA.MIT.EDU"
DS_SERVICENAME	= 	"discuss"
DS_DSPIPE	= 		"/usr/athena/etc/dspipe"
DS_DSCSETUP	= 	"dsc_setup"

            SHELL = 	/bin/sh

              TOP = ../.
      CURRENT_DIR = ./libds

               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 =

     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) $(PROJECT_LDOPTS) $(LDFLAGS)
   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.

# New rule macros

# New target patterns, etc.

.SUFFIXES: .et .ct

.et.c:
	rm -f $*.o $*.h
	$(COMPILE_ET) $*.et

.et.h:
	rm -r $*.o $*.h
	$(COMPILE_ET) $*.et

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

# Other random stuff

# We don't need X11's TOP_INCLUDES
TOP_INCLUDES	=

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

#
# Imakefile for Discuss libraries libds.a and libdsk.a.
#

INCLUDES= -I$(UTILINCDIR) -I../ets

SRCS	= tfile.c tunix.c tnet.c stubs.c dsname.c interface.c \
	rpcall.c conv_mgr.c host.c announce.c res_module.c \
	auth_krb.c dsc_enter.c auth_dum.c tmem.c

# Object files common to libds and libdsk
COMOBJS	= tfile.o tunix.o tnet.o stubs.o dsname.o interface.o rpcall.o \
	conv_mgr.o host.o announce.o dsc_enter.o tmem.o

# Object files specific to libds or libdsk
DSKOBJS	= res_module.k.o auth_krb.o $(KRBET)
DSOBJS	= res_module.nk.o auth_dum.o

ETS 	= $(ETDIR)/rpc_et.o $(ETDIR)/usp_et.o $(ETDIR)/dsc_et.o
UP_ETS 	= ../$(ETDIR)/rpc_et.o ../$(ETDIR)/usp_et.o ../$(ETDIR)/dsc_et.o

# I can't really use a GeneralExtendedLibraryTarget here, because the
# external object files have to have an extra ../ in front of them for
# the profiled version.

all:: libds.a

libds.a:  $(COMOBJS) $(DSOBJS)
	$(RM) $@
	$(AR) $@  $(COMOBJS) $(DSOBJS)  $(ETS)
	$(RANLIB) $@

all:: libdsk.a

libdsk.a:  $(COMOBJS) $(DSKOBJS)
	$(RM) $@
	$(AR) $@  $(COMOBJS) $(DSKOBJS)  $(ETS)
	$(RANLIB) $@

lintlib:: llib-lds.ln

llib-lds.ln:  $(SRCS)
	$(RM) $@
	$(LINT) $(LINTLIBFLAG)ds $(LINTFLAGS)  $(SRCS)

install:: libds.a
	$(INSTALL) -c $(INSTLIBFLAGS) libds.a   $(DSLIBDIR)
	$(RANLIB) $(RANLIBINSTFLAGS)   $(DSLIBDIR)/libds.a

install:: libdsk.a
	$(INSTALL) -c $(INSTLIBFLAGS) libdsk.a   $(DSLIBDIR)
	$(RANLIB) $(RANLIBINSTFLAGS)   $(DSLIBDIR)/libdsk.a

.c.o:
	$(RM) $@
	$(CC) -c $(CFLAGS) $*.c

# Generalizing these is insanely complicated.  Inline! :-)
res_module.k.o: res_module.c

	$(CC) $(CFLAGS) -DKERBEROS -c res_module.c
	mv res_module.o res_module.k.o

res_module.nk.o: res_module.c

	${CC} ${CFLAGS} -c res_module.c
	mv res_module.o res_module.nk.o

###########################################################################
# 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::
	-@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) -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

                                                                                                                                                                                                                                                                                                                                                                         