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

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 = ./utils/ss

               AR = ar clq
  BOOTSTRAPCFLAGS =
               CC = cc

         COMPRESS = compress
              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 =
 EXTRA_LOAD_FLAGS =
  EXTRA_LIBRARIES =
             TAGS = ctags

    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 = -Wf,-XNh2000 -Olimit 2000
      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 = ultrix.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)

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

MKSTEMPSRC	= mktemp.c
MKSTEMPOBJ	= mktemp.o

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

.SUFFIXES: .h .c .et .ct

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

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

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

#
# Imakefile for ss library
#
# Copyright 1987, 1988 by the MIT Student Information Processing Board
# For copyright info, see copyright.h.
#

SRCS	= invocation.c help.c \
	execute_cmd.c listen.c parse.c error.c prompt.c \
	request_tbl.c list_rqs.c pager.c requests.c \
	data.c mk_cmds.c utils.c options.c ct.tab.c cmd_tbl.c \
	ss_err.h test.c

OBJS=	ss_err.o \
	std_rqs.o \
	invocation.o help.o \
	execute_cmd.o listen.o parse.o error.o prompt.o \
	request_tbl.o list_rqs.o pager.o requests.o \
	data.o

MKCMDSOBJS=	mk_cmds.o utils.o options.o ct.tab.o cmd_tbl.o

INCLUDES= -I. -I..

all:: mk_cmds

all:: libss.a

mk_cmds:  $(MKCMDSOBJS)
	 $(RM) $@
	$(CC) -o $@  $(MKCMDSOBJS) $(LDOPTIONS)  $(LDLIBS)  -ll $(EXTRA_LOAD_FLAGS)

clean::
	$(RM) mk_cmds

all:: libss.a

libss.a:   $(OBJS)
	$(RM) $@
	$(AR) $@   $(OBJS)
	$(RANLIB) $@

install:: mk_cmds
	$(INSTALL) -c $(INSTPGMFLAGS)   mk_cmds  $(MK_CMDS)

install:: ss.h
	$(INSTALL) -c $(INSTDATFLAGS) ss.h  $(UTILINCDIR)/ss

install:: ss_err.h
	$(INSTALL) -c $(INSTDATFLAGS) ss_err.h  $(UTILINCDIR)/ss

install:: mit-sipb-copyright.h
	$(INSTALL) -c $(INSTDATFLAGS) mit-sipb-copyright.h  $(UTILINCDIR)/ss

install:: libss.a
	$(INSTALL) -c $(INSTLIBFLAGS) libss.a   $(UTILLIBDIR)
	$(RANLIB) $(RANLIBINSTFLAGS)   $(UTILLIBDIR)/libss.a

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

depend:: $(SRCS)
	$(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)

clean::
	$(RM) ss_err.c ss_err.h std_rqs.c std_rqs.o cmd_tbl.c ct.tab.c \
	ct.tab.h

# Magic dependencies
std_rqs.c: mk_cmds std_rqs.ct
	./mk_cmds std_rqs.ct

ss_err.c: ss_err.et

ss_err.h: ss_err.et

# XXX Wouldn't renaming some files make this unnecessary?
ct.tab.c ct.tab.h: ct.y
	rm -f ct.tab.* y.*
	yacc -d ct.y
	mv -f y.tab.c ct.tab.c
	mv -f y.tab.h ct.tab.h

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

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

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

Makefiles::

includes::

# DO NOT DELETE

invocation.o: ss_internal.h /usr/include/stdio.h /usr/include/ansi_compat.h
invocation.o: /usr/include/string.h ss.h ../ss/mit-sipb-copyright.h
invocation.o: ../ss/ss_err.h /usr/include/varargs.h copyright.h
help.o: /usr/include/sys/param.h /usr/include/ansi_compat.h
help.o: /usr/include/machine/param.h /usr/include/sys/signal.h
help.o: /usr/include/sys/types.h /usr/include/sys/smp_lock.h
help.o: /usr/include/sys/file.h /usr/include/sys/wait.h ss_internal.h
help.o: /usr/include/stdio.h /usr/include/string.h ss.h
help.o: ../ss/mit-sipb-copyright.h ../ss/ss_err.h /usr/include/varargs.h
help.o: copyright.h /usr/include/sys/dir.h
execute_cmd.o: ss_internal.h /usr/include/stdio.h /usr/include/ansi_compat.h
execute_cmd.o: /usr/include/string.h ss.h ../ss/mit-sipb-copyright.h
execute_cmd.o: ../ss/ss_err.h /usr/include/varargs.h copyright.h
listen.o: copyright.h ss_internal.h /usr/include/stdio.h
listen.o: /usr/include/ansi_compat.h /usr/include/string.h ss.h
listen.o: ../ss/mit-sipb-copyright.h ../ss/ss_err.h /usr/include/varargs.h
listen.o: /usr/include/setjmp.h /usr/include/sys/signal.h
listen.o: /usr/include/sys/param.h /usr/include/machine/param.h
listen.o: /usr/include/sys/types.h /usr/include/sys/smp_lock.h
parse.o: ss_internal.h /usr/include/stdio.h /usr/include/ansi_compat.h
parse.o: /usr/include/string.h ss.h ../ss/mit-sipb-copyright.h ../ss/ss_err.h
parse.o: /usr/include/varargs.h copyright.h
error.o: /usr/include/stdio.h /usr/include/ansi_compat.h copyright.h
error.o: ss_internal.h /usr/include/string.h ss.h ../ss/mit-sipb-copyright.h
error.o: ../ss/ss_err.h /usr/include/varargs.h
error.o: ../.././utils/include/com_err.h
prompt.o: copyright.h /usr/include/stdio.h /usr/include/ansi_compat.h
prompt.o: ss_internal.h /usr/include/string.h ss.h ../ss/mit-sipb-copyright.h
prompt.o: ../ss/ss_err.h /usr/include/varargs.h
request_tbl.o: copyright.h ss_internal.h /usr/include/stdio.h
request_tbl.o: /usr/include/ansi_compat.h /usr/include/string.h ss.h
request_tbl.o: ../ss/mit-sipb-copyright.h ../ss/ss_err.h
request_tbl.o: /usr/include/varargs.h
list_rqs.o: copyright.h ss_internal.h /usr/include/stdio.h
list_rqs.o: /usr/include/ansi_compat.h /usr/include/string.h ss.h
list_rqs.o: ../ss/mit-sipb-copyright.h ../ss/ss_err.h /usr/include/varargs.h
list_rqs.o: /usr/include/sys/signal.h /usr/include/setjmp.h
list_rqs.o: /usr/include/sys/types.h /usr/include/sys/wait.h
pager.o: ss_internal.h /usr/include/stdio.h /usr/include/ansi_compat.h
pager.o: /usr/include/string.h ss.h ../ss/mit-sipb-copyright.h ../ss/ss_err.h
pager.o: /usr/include/varargs.h copyright.h /usr/include/sys/file.h
pager.o: /usr/include/sys/signal.h
requests.o: mit-sipb-copyright.h /usr/include/stdio.h
requests.o: /usr/include/ansi_compat.h ss_internal.h /usr/include/string.h
requests.o: ss.h ../ss/mit-sipb-copyright.h ../ss/ss_err.h
requests.o: /usr/include/varargs.h
data.o: /usr/include/stdio.h /usr/include/ansi_compat.h ss_internal.h
data.o: /usr/include/string.h ss.h ../ss/mit-sipb-copyright.h ../ss/ss_err.h
data.o: /usr/include/varargs.h copyright.h
mk_cmds.o: copyright.h /usr/include/stdio.h /usr/include/ansi_compat.h
mk_cmds.o: /usr/include/sys/param.h /usr/include/machine/param.h
mk_cmds.o: /usr/include/sys/signal.h /usr/include/sys/types.h
mk_cmds.o: /usr/include/sys/smp_lock.h /usr/include/sys/file.h
mk_cmds.o: /usr/include/strings.h ss_internal.h /usr/include/string.h ss.h
mk_cmds.o: ../ss/mit-sipb-copyright.h ../ss/ss_err.h /usr/include/varargs.h
utils.o: /usr/include/string.h copyright.h ss_internal.h /usr/include/stdio.h
utils.o: /usr/include/ansi_compat.h ss.h ../ss/mit-sipb-copyright.h
utils.o: ../ss/ss_err.h /usr/include/varargs.h
options.o: copyright.h /usr/include/stdio.h /usr/include/ansi_compat.h ss.h
options.o: ../ss/mit-sipb-copyright.h ../ss/ss_err.h
ct.tab.o: /usr/include/stdio.h /usr/include/ansi_compat.h copyright.h ss.h
ct.tab.o: ../ss/mit-sipb-copyright.h ../ss/ss_err.h
cmd_tbl.o: /usr/include/stdio.h /usr/include/ansi_compat.h
cmd_tbl.o: /usr/include/string.h ct.tab.h copyright.h
test.o: /usr/include/stdio.h /usr/include/ansi_compat.h ss.h
test.o: ../ss/mit-sipb-copyright.h ../ss/ss_err.h
