# Makefile generated by imake - do not edit!
# $XConsortium: imake.c /main/90 1996/11/13 14:43:23 lehors $

# -------------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and <Imakefile>.
#
# Platform-specific parameters may be set in the appropriate .cf and
# .p-cf configuration files.  Site-wide parameters may be set in the
# files site.def and site.p-def.  Full rebuilds are recommended if
# any parameters are changed.

# -------------------------------------------------------------------------
# site-specific configuration parameters that need to come before the
# platform-specific parameters - edit site.def or site.p-def to change

# site:  Primate Center 89/12/22

# -------------------------------------------------------------------------
# platform-specific configuration parameters specific to this project
# edit hp.p-cf to change

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

# platform:  hp.cf 95/07/15
# operating system:  HP-UX 9.05

# -------------------------------------------------------------------------
# site-specific configuration parameters that go after the
# platform-specific parameters - edit site.def or site.p-def to change

# site:  Primate Center 89/12/22

# -------------------------------------------------------------------------
# project-specific system and project description parameters
# Edit Imake.p-params to change

      HASVOIDTYPE = 1
      ETMVOIDTYPE = void

      ABORTSIGNAL = SIGABRT

# -------------------------------------------------------------------------
# Standard system and project description parameters
# Edit Imake.params to change

# -------------------------------------------------------------------------
# definitions common to all Makefiles

          PATHSEP = /

           MFLAGS = -$(MAKEFLAGS)

            SHELL = /bin/sh

  VARARGS_DEFINES =  -DVARARGS

              TOP = .
      CURRENT_DIR = .

# Configuration file identification - name and release level

         CONFIGNAME = WRPRC2
 CONFIGMAJORRELEASE = 2
 CONFIGMINORRELEASE = 10
      CONFIGRELEASE = $(CONFIGMAJORRELEASE).$(CONFIGMINORRELEASE)
      CONFIGROOTDIR = /usr/local/lib/config

# Project identfication - name and release level

        PROJECTNAME = Exception and Termination Manager
PROJECTMAJORRELEASE = 1
PROJECTMINORRELEASE = 09
     PROJECTRELEASE = $(PROJECTMAJORRELEASE).$(PROJECTMINORRELEASE)

           BINDIR = /usr/bin
        USRLIBDIR = /usr/lib
       LINTLIBDIR = $(USRLIBDIR)/lint

           ETCDIR = /usr/etc
      INCLUDEROOT = /usr/include
           TMPDIR = /tmp
     SPOOLROOTDIR = /usr/spool

     LOCALROOTDIR = /usr/local
      LOCALBINDIR = $(LOCALROOTDIR)/bin
   LOCALUSRLIBDIR = $(LOCALROOTDIR)/lib
  LOCALLINTLIBDIR = $(LOCALUSRLIBDIR)/lint
      LOCALADMDIR = $(LOCALROOTDIR)/adm
      LOCALETCDIR = $(LOCALROOTDIR)/etc
 LOCALINCLUDEROOT = $(LOCALROOTDIR)/include

          MANROOT = /usr/local/man
    MANSOURCEPATH = $(MANROOT)/man
       MAN1SUFFIX = 1
       MAN2SUFFIX = 2
       MAN3SUFFIX = 3
       MAN4SUFFIX = 4
       MAN5SUFFIX = 5
       MAN6SUFFIX = 6
       MAN7SUFFIX = 7
       MAN8SUFFIX = 8
       MANLSUFFIX = l
       MANNSUFFIX = n
        MANSUFFIX = $(MAN1SUFFIX)
          MAN1DIR = $(MANSOURCEPATH)$(MAN1SUFFIX)
          MAN2DIR = $(MANSOURCEPATH)$(MAN2SUFFIX)
          MAN3DIR = $(MANSOURCEPATH)$(MAN3SUFFIX)
          MAN4DIR = $(MANSOURCEPATH)$(MAN4SUFFIX)
          MAN5DIR = $(MANSOURCEPATH)$(MAN5SUFFIX)
          MAN6DIR = $(MANSOURCEPATH)$(MAN6SUFFIX)
          MAN7DIR = $(MANSOURCEPATH)$(MAN7SUFFIX)
          MAN8DIR = $(MANSOURCEPATH)$(MAN8SUFFIX)
          MANLDIR = $(MANSOURCEPATH)$(MANLSUFFIX)
          MANNDIR = $(MANSOURCEPATH)$(MANNSUFFIX)
           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)

           IMBOOT = imboot
           DEPEND = makedepend
             MSUB = msub
        MKDIRHIER = mkdirhier

               AR = ar clq
               CC = cc
              CPP = /lib/cpp $(STD_CPP_DEFINES)
               LD = ld
             LINT = lint
      LINTLIBFLAG = -o
         LINTOPTS = -ax -DSYSV
         LINTLIBS =
               LN = ln -s
             MAKE = make
               MV = mv -f
               CP = cp
              CMP = cmp

               RM = rm -f
             TAGS = ctags
             PERL = perl
         PERLPATH = $(LOCALBINDIR)/perl
            PERL5 = perl5
        PERL5PATH = $(LOCALBINDIR)/perl5
              AWK = awk
              SED = sed
             COMM = comm
              CAT = cat
             SORT = sort
             UNIQ = uniq
            CHMOD = chmod
            CHDIR = cd
     SENDMAILPATH = /usr/lib/sendmail

# Important local programs

              FIGEN = figen
             DISTAR = distar

# Standard system include file directories, defines, etc.

  STD_CPP_DEFINES =

     STD_INCLUDES = -I$(LOCALINCLUDEROOT)
      STD_DEFINES = -DSYSV
       STD_LDLIBS =
      STD_LDFLAGS = -L$(LOCALUSRLIBDIR)

# Project-specific include file directories, defines, etc.

 PROJECT_INCLUDES =
  PROJECT_DEFINES =
   PROJECT_LDLIBS =
  PROJECT_LDFLAGS =

  LOADERLIBPREFIX =
      CDEBUGFLAGS = -O
        CCOPTIONS =

      ALLINCLUDES = $(INCLUDES) $(PROJECT_INCLUDES) $(STD_INCLUDES)
       ALLDEFINES = $(STD_DEFINES) $(PROJECT_DEFINES) $(DEFINES)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLINCLUDES) $(ALLDEFINES)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLINCLUDES) $(ALLDEFINES)
     EXTRA_LDLIBS = $(LDLIBS) $(PROJECT_LDLIBS) $(STD_LDLIBS)
           LDOPTS = $(CDEBUGFLAGS) $(CCOPTIONS) 			$(LDFLAGS) $(PROJECT_LDFLAGS) $(STD_LDFLAGS)

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

          INSTALL = install.sh
         INSTCOPY = -c
        INSTSTRIP = -s
        INSTOWNER =
        INSTGROUP =
     INSTPROGMODE = -m 0755
  INSTUIDPROGMODE = -m 04755
  INSTGIDPROGMODE = -m 02755
 INSTUGIDPROGMODE = -m 06755
   INSTSCRIPTMODE = -m 0755
      INSTLIBMODE = -m 0644
      INSTDATMODE = -m 0444
      INSTMANMODE = -m 0444
      INSTINCMODE = -m 0444
    INSTPROGFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTPROGMODE) $(INSTSTRIP)
 INSTUIDPROGFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTUIDPROGMODE) $(INSTSTRIP)
 INSTGIDPROGFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTGIDPROGMODE) $(INSTSTRIP)
INSTUGIDPROGFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTUGIDPROGMODE) $(INSTSTRIP)
  INSTSCRIPTFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTSCRIPTMODE)
     INSTLIBFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTLIBMODE)
     INSTDATFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTDATMODE)
     INSTMANFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTMANMODE)
     INSTINCFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTINCMODE)

           SOELIM = soelim
            TROFF = groff
            NROFF = nroff
              TBL = gtbl
              EQN = geqn
             NEQN = neqn
              PIC = pic
        MANMACROS = -man
         MEMACROS = -me
         MMMACROS = -mm
         MSMACROS = -mgs

# Library link and dependency specifiers

      BIBSTUFFLIB = -lbibstuff
   DEPBIBSTUFFLIB =
           ETMLIB = $(LOADERLIBPREFIX)$(TOP)/libetm.a
        DEPETMLIB = $(TOP)/libetm.a
           FPLLIB = -lfpl
        DEPFPLLIB =
           FQLLIB = -lfql
        DEPFQLLIB =
         GECOSLIB = -lgecos
      DEPGECOSLIB =
        LOGMGRLIB = -llogmgr
     DEPLOGMGRLIB =
        MEMMGRLIB = -lmemmgr
     DEPMEMMGRLIB =
           NDSLIB = -lnds
        DEPNDSLIB =
           NIOLIB = -lnio
        DEPNIOLIB =
         ORDERLIB = -lorder
      DEPORDERLIB =
        SEQNUMLIB = -lseqnum
     DEPSEQNUMLIB =
        SIMSCRLIB = -lsimscr
     DEPSIMSCRLIB =
           TFMLIB = -ltfm
        DEPTFMLIB =
            TSLIB = -ltokenscan
         DEPTSLIB =
          PORTLIB = -lport
       DEPPORTLIB =

# Makefile-generating commands and parameters

   IMBOOT_DEFINES =
       IMBOOT_CMD = $(IMBOOT) -C $(CONFIGNAME) $(IMBOOT_DEFINES)

# -------------------------------------------------------------------------
# Project-specific imake rules
# Edit Imake.p-rules to change

# -------------------------------------------------------------------------
# Standard imake rules
# Edit Imake.rules to change

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

# Exception and Termination Manager Makefile

# Use "make World" to build the distribution.  But before you do that,
# look at the files in the config subdirectory to see if you want
# to change anything.

# Requires imake, makedepend, mkdirhier, and the WRPRC2 imake
# configuration files.

LIBNAME = etm

DEFINES= $(VARARGS_DEFINES) $(SIGNAL_DEFINES) -DHASVOIDTYPE=$(HASVOIDTYPE)

LIBSRCS = etm.c
LIBOBJS = etm.o

TESTSRCS = etmtest.c
TESTOBJS = etmtest.o

SRCS = $(LIBSRCS) $(TESTSRCS)

all::

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

all:: lib$(LIBNAME).a
lib$(LIBNAME).a: $(LIBOBJS)
	$(RM) $@
	$(AR) $@ $(LIBOBJS)

clean::
	$(RM) lib$(LIBNAME).a

lint:: lint.lib$(LIBNAME).a
lint.lib$(LIBNAME).a:
	$(LINT) $(LINTFLAGS) $(LIBSRCS) $(LINTLIBS)

help_aux::
	@echo "'make "lint.lib$(LIBNAME).a"' to "lint sources for lib$(LIBNAME).a

help_aux::
	@echo "'make "lib$(LIBNAME).a"' to "build the lib$(LIBNAME).a library

install:: i.lib$(LIBNAME).a

help_aux::
	@echo "'make "i.lib$(LIBNAME).a"' to "install lib$(LIBNAME).a
i.lib$(LIBNAME).a:: lib$(LIBNAME).a
	@if [ -d $(LOCALUSRLIBDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(LOCALUSRLIBDIR)); fi
	$(INSTALL) $(INSTLIBFLAGS) lib$(LIBNAME).a $(LOCALUSRLIBDIR)/lib$(LIBNAME).a

lintlib:: llib-l$(LIBNAME).ln

llib-l$(LIBNAME).ln:: $(LIBSRCS)
	$(RM) $@
	$(LINT) $(LINTLIBFLAG)$(LIBNAME) $(LINTFLAGS) $(LIBSRCS)

clean::
	$(RM) llib-l$(LIBNAME).ln

help_aux::
	@echo "'make "llib-l$(LIBNAME).ln"' to "build the llib-l$(LIBNAME).ln lint library

install.lint:: i.llib-l$(LIBNAME).ln

help_aux::
	@echo "'make "i.llib-l$(LIBNAME).ln"' to "install llib-l$(LIBNAME).ln
i.llib-l$(LIBNAME).ln:: llib-l$(LIBNAME).ln
	@if [ -d $(LOCALLINTLIBDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(LOCALLINTLIBDIR)); fi
	$(INSTALL) $(INSTLIBFLAGS) llib-l$(LIBNAME).ln $(LOCALLINTLIBDIR)/llib-l$(LIBNAME).ln

#	Header file stuff

# The trouble with regenerating etm.h directly from etm.h.dist is that it
# triggers excessive recompiles.  Therefore, an intermediary file is
# generated and compared with etm.h.  If they don't differ, etm.h isn't
# updated.  Similarly for etm.internal.h.

all:: etm.h
etm.h:: etm.h.dist
	$(MAKE) $(MFLAGS) etm.h.new
	-@$(CMP) -s etm.h etm.h.new; \
	if [ $$? -ne 0 ]; then \
	echo "$(MV) "etm.h.new etm.h; \
	$(MV) etm.h.new etm.h; \
	echo etm.h" updated"; \
	else \
	echo etm.h" not updated." ; \
	fi

clean::
	$(RM) etm.h

help_aux::
	@echo "'make "etm.h"' to "build etm.h

install:: i.etm.h

help_aux::
	@echo "'make "i.etm.h"' to "install etm.h
i.etm.h:: etm.h
	@if [ -d $(LOCALINCLUDEROOT) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(LOCALINCLUDEROOT)); fi
	$(INSTALL) $(INSTINCFLAGS) etm.h $(LOCALINCLUDEROOT)/etm.h
depend:: etm.h

all:: etm.h.new
etm.h.new:: etm.h.dist
	$(RM) $@
	$(MSUB) etm.h.dist > $@

clean::
	$(RM) etm.h.new

help_aux::
	@echo "'make "etm.h.new"' to "build etm.h.new

all:: etm.internal.h
etm.internal.h:: etm.internal.h.dist
	$(MAKE) $(MFLAGS) etm.internal.h.new
	-@$(CMP) -s etm.internal.h etm.internal.h.new; \
	if [ $$? -ne 0 ]; then \
	echo "$(MV) "etm.internal.h.new etm.internal.h; \
	$(MV) etm.internal.h.new etm.internal.h; \
	echo etm.internal.h" updated"; \
	else \
	echo etm.internal.h" not updated." ; \
	fi

clean::
	$(RM) etm.internal.h

help_aux::
	@echo "'make "etm.internal.h"' to "build etm.internal.h

install:: i.etm.internal.h
i.etm.internal.h::
	@echo etm.internal.h is not installed anywhere.
depend:: etm.internal.h

all:: etm.internal.h.new
etm.internal.h.new:: etm.internal.h.dist
	$(RM) $@
	$(MSUB) etm.internal.h.dist > $@

clean::
	$(RM) etm.internal.h.new

help_aux::
	@echo "'make "etm.internal.h.new"' to "build etm.internal.h.new

# test program

all:: etmtest

help_aux::
	@echo "'make "etmtest"' to "build etmtest
etmtest: $(TESTOBJS) $(DEPETMLIB)
	$(RM) $@
	$(CC) -o $@ $(TESTOBJS) $(LDOPTS) $(ETMLIB) $(EXTRA_LDLIBS)

clean::
	$(RM) etmtest

lint:: lint.etmtest
lint.etmtest:
	$(LINT) $(LINTFLAGS) $(TESTSRCS) $(LINTLIBS)

help_aux::
	@echo "'make "lint.etmtest"' to "lint sources for etmtest

install:: i.etmtest
i.etmtest::
	@echo etmtest is not installed anywhere.

test:: etmtest
	-./etmtest 1
	-./etmtest 2
	-./etmtest 3
	-./etmtest 4
	-./etmtest 5
	-./etmtest 6

all::
World::
	@echo "Building "$(PROJECTNAME)", Release "$(PROJECTRELEASE)
	@echo ""
	@date
	@echo ""
	$(MAKE) $(MFLAGS) Makefile
	$(MAKE) $(MFLAGS) Makefiles
	$(MAKE) $(MFLAGS) clean
	$(MAKE) $(MFLAGS) depend
	$(MAKE) $(MFLAGS) all
	@echo ""
	@date
	@echo ""
	@echo "Done building "$(PROJECTNAME)

help_aux::
	@echo "'make "World"' to "build the entire $(PROJECTNAME) distribution

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

# documentation

etm.ps:: etm.ms
	$(SOELIM) etm.ms  | $(TROFF) $(MSMACROS) $(TROFFOPTS) > etm.ps

clean::
	$(RM) etm.ps

help_aux::
	@echo "'make "etm.ps"' to "format etm.ps in PostScript

# -------------------------------------------------------------------------
# common rules for all Makefiles

emptyrule::

clean::
	$(RM_CMD) "#"*

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

Makefile::
	$(IMBOOT_CMD) $(TOP) $(CURRENT_DIR)

help::
	@echo "'make Makefile' to rebuild Makefile"
	@echo "'make all' to make everything"
	@echo "'make target' to make a single target"
	@echo "'make depend' to generate header file dependencies"
	@echo "'make install' to install everything (except manual pages)"
	@echo "'make install.man' to install all manual pages"
	@echo "'make i.target' to install a single target"
	@echo "'make lint' to lint source files"
	@echo "'make lint.target' to lint source files for a single target"
	@echo "'make clean' to clean up"
	@make help_aux

help_aux::

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

all::
depend::
lint::

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

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

Makefiles::

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

# DO NOT DELETE

etm.o: /usr/include/stdio.h /usr/include/sys/stdsyms.h /usr/include/signal.h
etm.o: /usr/include/sys/signal.h /usr/include/sys/types.h
etm.o: /usr/include/stdarg.h /usr/include/varargs.h etm.internal.h etm.h
etm.o: /usr/include/stdlib.h
etmtest.o: /usr/include/stdio.h /usr/include/sys/stdsyms.h etm.h
