# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.86 93/10/11 12:12:36 rws Exp $

# -------------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and <Imakefile>
# $XConsortium: Imake.tmpl,v 1.160 92/11/18 14:11:25 rws Exp $
#
# Platform-specific parameters may be set in the appropriate <vendor>.cf
# configuration files.  Site-specific parameters should be set in the file
# site.def.  Full rebuilds are recommended if any parameters are changed.
#
# If your C preprocessor does not define any unique symbols, you will need
# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
# "make World" the first time).
#

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

# site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $

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

# platform:  $XConsortium: sun.cf,v 1.80 92/12/17 19:48:17 rws Exp $

# operating system:  SunOS 5.1

# $XConsortium: sv4Lib.rules,v 1.9 92/11/18 14:12:05 rws Exp $

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

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

# site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $

            SHELL = /bin/sh

              TOP = .
      CURRENT_DIR = .

               AR = /usr/ccs/bin/ar cq
  BOOTSTRAPCFLAGS = -DSVR4
               CC = /usr/gcc/bin/gcc -traditional
               AS = /usr/ccs/bin/as

         COMPRESS = compress
              CPP = /usr/ccs/lib/cpp $(STD_CPP_DEFINES)
    PREPROCESSCMD = /usr/gcc/bin/gcc -traditional -E $(STD_CPP_DEFINES)
          INSTALL = $(BINDIR)/bsdinst
               LD = /usr/ccs/bin/ld
              LEX = /usr/ccs/bin/lex
             YACC = /usr/ccs/bin/yacc
             LINT = lint
      LINTLIBFLAG = -o
         LINTOPTS = -ax
               LN = ln -s
             MAKE = make
               MV = mv
               CP = cp

               RM = rm -f
            TROFF = psroff -t
         MSMACROS = -ms
              TBL = tbl
              EQN = eqn
     STD_INCLUDES =
  STD_CPP_DEFINES = -DSVR4
      STD_DEFINES = -DSVR4
 EXTRA_LOAD_FLAGS =
  EXTRA_LDOPTIONS =
  EXTRA_LIBRARIES = -lsocket -lnsl
             TAGS = ctags

    PROTO_DEFINES =

     INSTPGMFLAGS =

     INSTBINFLAGS = -m 0755
     INSTUIDFLAGS = -m 4755
     INSTLIBFLAGS = -m 0644
     INSTINCFLAGS = -m 0444
     INSTMANFLAGS = -m 0444
     INSTDATFLAGS = -m 0444
    INSTKMEMFLAGS = -g sys -m 2755

      PROJECTROOT = /usr/athena

     TOP_INCLUDES = -I$(INCROOT)

      CDEBUGFLAGS = -O2
        CCOPTIONS =

      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)

           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)

        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)

   LDCOMBINEFLAGS = -r
      DEPENDFLAGS =

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

    IMAKE_DEFINES =

         IRULESRC = $(CONFIGDIR)
        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)

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

# -------------------------------------------------------------------------
# X Window System Build Parameters
# $XConsortium: Project.tmpl,v 1.157 93/06/24 10:51:47 dpw Exp $

# -------------------------------------------------------------------------
# X Window System make variables; this need to be coordinated with rules

          PATHSEP = /
        USRLIBDIR = /usr/athena/lib
         SHLIBDIR = /usr/athena/lib
           BINDIR = /usr/athena/bin
          INCROOT = /usr/athena/include
     BUILDINCROOT = $(TOP)
      BUILDINCDIR = $(BUILDINCROOT)/X11
      BUILDINCTOP = ..
           INCDIR = $(INCROOT)/X11
           ADMDIR = /usr/adm
           LIBDIR = $(USRLIBDIR)/X11
        CONFIGDIR = $(LIBDIR)/config
       LINTLIBDIR = $(USRLIBDIR)/lint

          FONTDIR = $(LIBDIR)/fonts
         XINITDIR = $(LIBDIR)/xinit
           XDMDIR = $(LIBDIR)/xdm
           TWMDIR = $(LIBDIR)/twm
          MANPATH = /usr/athena/man
    MANSOURCEPATH = $(MANPATH)/man
        MANSUFFIX = n
     LIBMANSUFFIX = 3
           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
        LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
           NLSDIR = $(LIBDIR)/nls
        PEXAPIDIR = $(LIBDIR)/PEX
      XAPPLOADDIR = $(LIBDIR)/app-defaults
       FONTCFLAGS = -t

     INSTAPPFLAGS = $(INSTDATFLAGS)

            IMAKE = imake
           DEPEND = makedepend
              RGB = rgb

            FONTC = bdftopcf

        MKFONTDIR = mkfontdir
        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier

        CONFIGSRC = $(TOP)/config
       DOCUTILSRC = $(TOP)/doc/util
        CLIENTSRC = $(TOP)/clients
          DEMOSRC = $(TOP)/demos
           LIBSRC = $(TOP)/lib
          FONTSRC = $(TOP)/fonts
       INCLUDESRC = $(TOP)/X11
        SERVERSRC = $(TOP)/server
          UTILSRC = $(TOP)/util
        SCRIPTSRC = $(UTILSRC)/scripts
       EXAMPLESRC = $(TOP)/examples
       CONTRIBSRC = $(TOP)/../contrib
           DOCSRC = $(TOP)/doc
           RGBSRC = $(TOP)/rgb
        DEPENDSRC = $(UTILSRC)/makedepend
         IMAKESRC = $(CONFIGSRC)
         XAUTHSRC = $(LIBSRC)/Xau
          XLIBSRC = $(LIBSRC)/X
           XMUSRC = $(LIBSRC)/Xmu
       TOOLKITSRC = $(LIBSRC)/Xt
       AWIDGETSRC = $(LIBSRC)/Xaw
       OLDXLIBSRC = $(LIBSRC)/oldX
      XDMCPLIBSRC = $(LIBSRC)/Xdmcp

      BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf

     MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
         FSLIBSRC = $(FONTSRC)/lib/fs
    FONTSERVERSRC = $(FONTSRC)/server
     EXTENSIONSRC = $(TOP)/extensions
         XILIBSRC = $(EXTENSIONSRC)/lib/xinput
      XTESTLIBSRC = $(EXTENSIONSRC)/lib/xtest
        PEXLIBSRC = $(EXTENSIONSRC)/lib/PEXlib
      PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX

# $XConsortium: sv4Lib.tmpl,v 1.8 92/06/28 17:43:23 rws Exp $

SHLIBLDFLAGS = -G -z text
PICFLAGS = -fpic

  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
     EXTENSIONLIB =  -lXext

          DEPXLIB = $(DEPEXTENSIONLIB) $(USRLIBDIR)/libX11.a
         XLIBONLY =  -lX11
             XLIB = $(EXTENSIONLIB) $(XLIBONLY)

      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
         XAUTHLIB =  -lXau
      DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
         XDMCPLIB =  -lXdmcp

        DEPXMULIB = $(USRLIBDIR)/libXmu.a
           XMULIB =  -lXmu

       DEPOLDXLIB = $(USRLIBDIR)/liboldX.a
          OLDXLIB =  -loldX

      DEPXTOOLLIB = $(USRLIBDIR)/libXt.a
         XTOOLLIB =  -lXt

        DEPXAWLIB = $(USRLIBDIR)/libXaw.a
           XAWLIB =  -lXaw

        DEPXILIB = $(USRLIBDIR)/libXi.a
           XILIB =  -lXi

     DEPXTESTLIB = $(USRLIBDIR)/libXtst.a
        XTESTLIB =  -lXtst

       DEPPEXLIB = $(USRLIBDIR)/libPEX5.a
          PEXLIB =  -lPEX5

        DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
           PHIGSLIB =  -lphigs

       DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
          XBSDLIB =  -lXbsd

 LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
         LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
          LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
        LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
          LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
           LINTXI = $(LINTLIBDIR)/llib-lXi.ln
          LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln
        LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln

          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)

         DEPLIBS1 = $(DEPLIBS)
         DEPLIBS2 = $(DEPLIBS)
         DEPLIBS3 = $(DEPLIBS)

# -------------------------------------------------------------------------
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $XConsortium: Imake.rules,v 1.129 92/05/29 17:01:19 rws Exp $

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

#
#  Author:      William Chia-Wei Cheng (william@cs.ucla.edu)
#
#  Copyright (C) 1990-1996, William Chia-Wei Cheng.
#
#  Permission limited to the use, copy, display, distribute without
#  charging for a fee, and produce derivative works of "tgif" and
#  its documentation for not-for-profit purpose is hereby granted by
#  the Author, provided that the above copyright notice appears in
#  all copies made of "tgif" and that both the copyright notice
#  and this permission notice appear in supporting documentation,
#  and that the name of the Author not be used in advertising or
#  publicity pertaining to distribution of the software without
#  specific, written prior permission.  The Author makes no
#  representations about the suitability of this software for any
#  purpose.  It is provided "as is" without express or implied
#  warranty.  All other rights (including, but not limited to, the
#  right to sell "tgif", the right to sell derivative works of
#  "tgif", and the right to distribute "tgif" for a fee) are
#  reserved by the Author.
#
#  THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN 0
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
#  USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
#  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
#  PERFORMANCE OF THIS SOFTWARE.
#
#  @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/Imakefile,v 3.10 1996/05/30 14:29:07 william Exp $
#

# On Solaris, you probably need to uncomment the next few lines:
#
# CC		= cc
# PREPROCESSCMD	= cc -E $(STD_CPP_DEFINES)
# EXTRA_LDOPTIONS	=

TGIFVERSION	= 3.0-p7
PROGRAMS	= tgif prtgif # frontend11.o testdrive
# CDEBUGFLAGS= -g
# INSTPGMFLAGS= -s
BINDIR	= /mit/sipb/arch/@sys/bin
LIBDIR	= /mit/sipb/share
MANPATH	= /mit/sipb/man
TGIFDIR		= $(LIBDIR)/tgif
DEFINES		= -DTGIF_PATH=\"$(TGIFDIR)\" -DPSFILE_MOD=0664 \
\
                  -DEPSF_FILE_EXT=\"eps\" -DPS_FILE_EXT=\"ps\" \
\
                  -DXBM_FILE_EXT=\"xbm\" -DXPM_FILE_EXT=\"xpm\" \
\
                  -DOBJ_FILE_EXT=\"obj\" -DSYM_FILE_EXT=\"sym\" \
\
                  -DTEXT_FILE_EXT=\"txt\" \
\
                  -DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\" \
\
                  -DLAUNCH_ATTR=\"launch=\" -DEXEC_ATTR=\"exec=\" \
\
                  -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT

# Things to try to add to the DEFINES line above:
#
#    RS6000:  -D_BSD
#    Solaris:
#    Irix:    -D_NO_PROTO
#    SunOS:
#    HP-UX:
#    VMS:     -D_NO_GETTIMEOFDAY
#    Linux:
#    FreeBSD:

LOCAL_LIBRARIES	= $(XLIB)
# LOCAL_LIBRARIES	= $(XMULIB) $(XTOOLLIB) $(XLIB)
DEPLIBS		= $(DEPXLIB)
SYS_LIBRARIES	= -lm

# -D_NO_GETTIMEOFDAY
#    Include the above line if you do not have the gettimeofday()
#    function but have the ftime() function.
# -D_TGIF_WB
#    Include the above line if you want to include the whiteboard feature
#    by Renato Santana <renato@nce.ufrj.br>.
# -DBSD_COMP
#    Include the above line if you are compiling on a Solaris (or
#    possibly an SGI) machine which requires it in <sys/ioctl.h>.
#    (If you see the error that FIONBIO is not defined when compiling
#    tcp.c, then you probably need this.)
# -D_BACKGROUND_DONT_FORK
#    Try the above line if there are defunct tgif child processes.
# -D_NO_LSTAT
#    Include the above line if lstat() is not available.  In this case,
#    using BrowseXBitmap and BrowseXPixmap under the File Menu may cause
#    infinite loop if the directory structure is infinitely recursive.
# -D_USE_XDRAWPOINT_TO_PUT_A_POINT
#    Include the above line if the grid points are not visible.  This can
#    be used to bypass some X server bugs (such as certain Linux X server
#    using VGA16 screen) where the XDrawLine() Xlib call does not work
#    properly.
# -D_NO_EXTERN
#    Include the above line in the DEFINES if you don't want to include
#    the extern definition for functions defined in a module.  For example,
#    if this option is set, then file "foo.c" will not include "foo.e",
#    and certain other extern definition in "foo.c" will be omitted.
# -D_NO_PROTO
#    Include the above line in the DEFINES if checking for function
#    prototypes is not desired.  Checking for function prototypes
#    are automatically enabled if you are using an ANSI or C++ compilor.
#    However, not all ANSI/C++ compilors are created equal.
# -D_BSD
#    Include the above line in the DEFINES if the select() function can
#    does not be found for AIX systems (such as RS6000).  Also, on AIX
#    systems, if you see garbage file names when you try to open files,
#    try this flag to make direct and dirent equivalent (in <sys/dir.h>).
# -DNO_STRSTR
#    Include the above line in the DEFINES if you do not have the strstr()
#    function in your system's string library.
# -DINVERT_CTM_BUG
#    Include the above line in the DEFINES if you are using PostScript
#    utilities which fails when trying to invert non-invertible CTM
#    (e.g., muluti.ps from ftp.ucc.su.oz.au:/pub/ps_printing/multi).
# -DHP_LINE_BUG
#    Include the above line in the DEFINES if two-vertices horizontal and
#    verticle line segments don't draw properly on a buggy HP server.
# -DDONTFREECOLORS
#    Include the above line in the DEFINES if you don't want the black and
#    the white colors to be freed when tgif initializes itself.  You should
#    not need to do this unless you need to get around some server bugs.
# -DUSE_XAPPLRESDIR
#    Include the above line in the DEFINES if $XAPPLRESDIR/Tgif is used to
#    specify the resource file.  If your system does not have putenv()
#    (such as IBM-RT), then this won't work.
# -DXAPPLOADDIR_DEF
#    If you define USE_XAPPLRESDIR, define this to a default directory
#    to use in case $XAPPLRESDIR isn't set.
# -DUSE_XT_INITIALIZE
#    This will cause the XToolkit to be initialized so that the X defaults
#    are obtained from the Xt directories.  This should only be used when
#    USE_XAPPLRESDIR option is NOT used.  Please remember to use the
#    LOCAL_LIBRARIES with $(XTOOLLIB) $(XMULIB) above.
# -DNO_THIN_LINE
#    Include the above line in the DEFINES if a line width of 0 causes
#    your server to crash.  This is to get around a bug in some X servers.
# -DTHIN_OVAL_AND_ARC
#    Include the above line in the DEFINES if you want 0 width arcs to
#    be used when the width of an arc is less than or equal to 1.
#    (Sun3 server has a bug that makes drawing ovals and arcs with
#    width other than 0 VERY slow).
# -DKEEP_WHEN_PRINT
#    Include the above line in the DEFINES if you don't want the temp
#    file to be deleted after sending the print job to the printer.
#    (Some VMS systems might require this flag to be used.)
# -DPRINT_CMD=\"lpr\"
#    Include the above line in the DEFINES if you want to configure tgif
#    to use a default print command.
# -DNOTR4MODE
#    Include the above line in the DEFINES if you are running X11R3.
#    This will cause tgif NOT to use some X11R4 window manager related
#    functions that's not present in R3.
# -DMAPBEFORESELECT
#    Include the above line in the DEFINES to call XMapWindow() before
#    calling XSelectInput().  This might be needed to get around some
#    server bugs.
# -DDONT_FREE_COLORMAP
#    Include the above line in the DEFINES if you don't want the colormap
#    to be freed when tgif exits.
# -DA4PAPER
#    Include the above line in the DEFINES if you want to print on A4 paper
#    (8.25in by 11.7in or about 21cm by 29.7cm).

OBJ1 =	align.o animate.o arc.o attr.o auxtext.o \
	box.o button.o \
	choice.o choose.o cmd.o color.o cutpaste.o cursor.o \
	dialog.o drawing.o dup.o \
	edit.o eps.o exec.o expr.o \
	file.o font.o ftp.o \
	grid.o group.o \
	help.o http.o \
	imgproc.o import.o \
	mainloop.o mainmenu.o mark.o menu.o move.o msg.o \
	names.o navigate.o \
	obj.o oval.o \
	page.o pattern.o poly.o polygon.o ps.o \
	raster.o rcbox.o rect.o remote.o ruler.o \
	scroll.o select.o setup.o shape.o shortcut.o \
		special.o spline.o stk.o stretch.o \
	tgif_dbg.o \
	tcp.o text.o \
	util.o \
	version.o vms_comp.o \
	wb1.o wb2.o wb3.o \
	xbitmap.o xpixmap.o

OBJS1 = tgif.o $(OBJ1)
OBJS2 = prtgif.o
OBJS3 = testdrive.o $(OBJ1)
FRONTENDOBJS = frontend.o $(OBJ1)

CURRENTDIR =./

SRCS1 = $(CURRENTDIR)*.c
SRCS2 =
SRCS3 =

 OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
 SRCS = $(SRCS1) $(SRCS2) $(SRCS3)

all:: $(PROGRAMS)

tgif: $(OBJS1) $(DEPLIBS1)
	$(RM) $@
	$(CC) -o $@ $(LDOPTIONS) $(OBJS1) $(LOCAL_LIBRARIES) $(LDLIBS)  $(EXTRA_LOAD_FLAGS)

install:: tgif
	@if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
	$(INSTALL) -c $(INSTPGMFLAGS)  tgif $(DESTDIR)$(BINDIR)

install.man:: tgif.man
	@if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
	$(INSTALL) -c $(INSTMANFLAGS) tgif.man $(DESTDIR)$(MANDIR)/tgif.$(MANSUFFIX)

saber_tgif:: $(SRCS1)
	# load $(ALLDEFINES) $(SRCS1) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)

osaber_tgif:: $(OBJS1)
	# load $(ALLDEFINES) $(OBJS1) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)

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

lint:
	$(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
lint1:
	$(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)

clean::
	$(RM) $(PROGRAMS)

prtgif: $(OBJS2) $(DEPLIBS2)
	$(RM) $@
	$(CC) -o $@ $(LDOPTIONS) $(OBJS2)  $(LDLIBS)  $(EXTRA_LOAD_FLAGS)

saber_prtgif:: $(SRCS2)
	# load $(ALLDEFINES) $(SRCS2) $(LDOPTIONS)  $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)

osaber_prtgif:: $(OBJS2)
	# load $(ALLDEFINES) $(OBJS2) $(LDOPTIONS)  $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)

install:: prtgif
	@if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
	$(INSTALL) -c $(INSTPGMFLAGS)  prtgif $(DESTDIR)$(BINDIR)

install.man:: prtgif.man
	@if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
	$(INSTALL) -c $(INSTMANFLAGS) prtgif.man $(DESTDIR)$(MANDIR)/prtgif.$(MANSUFFIX)

install::
	@case '${MFLAGS}' in *[i]*) set +e;; esac;
	@for i in $(TGIFDIR); do if [ -d $(DESTDIR)$$i ]; then \
	set +x; else (set -x; $(MKDIRHIER) $(DESTDIR)$$i); fi \
	done

install:: tgif.Xdefaults
	$(INSTALL) -c $(INSTDATFLAGS) tgif.Xdefaults $(DESTDIR)$(TGIFDIR)

install:: tgificon.eps
	$(INSTALL) -c $(INSTDATFLAGS) tgificon.eps $(DESTDIR)$(TGIFDIR)

install:: tgificon.obj
	$(INSTALL) -c $(INSTDATFLAGS) tgificon.obj $(DESTDIR)$(TGIFDIR)

install:: tgificon.xbm
	$(INSTALL) -c $(INSTDATFLAGS) tgificon.xbm $(DESTDIR)$(TGIFDIR)

install:: tgificon.xpm
	$(INSTALL) -c $(INSTDATFLAGS) tgificon.xpm $(DESTDIR)$(TGIFDIR)

install:: tangram.sym
	$(INSTALL) -c $(INSTDATFLAGS) tangram.sym $(DESTDIR)$(TGIFDIR)

install:: keys.obj
	$(INSTALL) -c $(INSTDATFLAGS) keys.obj $(DESTDIR)$(TGIFDIR)

.SUFFIXES: .l .man

.l.man:
	rm -f $*.man
	cp $*.l $*.man

.e.o:

SPICEDIR =spice/
XBMDIR =xbm/

OBJDEMO = an-sr-flip-flop.obj fonts.obj slide-demo.obj keys.obj \
	  $(SPICEDIR)*.obj launch-demo.obj launch-demo-1.obj
SYMDEMO = flip-flop.sym nand2.sym pin.sym tangram.sym $(SPICEDIR)*.sym
MISCTAR = *.man README Copyright tgif.pl $(SPICEDIR)*.mod example.tex \
		HISTORY *.uu testdrive.pl frontend.pl

distr: tar versioninfo

uu:
	rm -f *.uu *.cat *.cat.Z
	groff -Tascii -man tgif.man > tgif.cat; compress tgif.cat
	groff -Tascii -man prtgif.man > prtgif.cat; compress prtgif.cat
	uuencode tgif.cat.Z tgif.cat.Z > tgif.cat.Z.uu
	uuencode prtgif.cat.Z prtgif.cat.Z > prtgif.cat.Z.uu

rcstar:
	@rm -f home/RCS3.tar.gz.save
	@if [ -f home/RCS3.tar.gz ]; then \
		mv home/RCS3.tar.gz home/RCS3.tar.gz.save; \
	       fi
	tar cf home/RCS3.tar RCS xbm.RCS
	gzip home/RCS3.tar
	ls -l home/RCS3.tar.gz

tar: uu
	rm -f tgif-$(TGIFVERSION).tar*
	tar cvf tgif-$(TGIFVERSION).tar *.c *.e *.h \
		Makefile.noimake Imakefile descrip.??? VMS_MAKE_TGIF.COM \
		tgificon.obj $(XBMDIR)*.xbm \
		tgificon.xbm tgificon.xpm tgif.Xdefaults tgificon.eps \
		$(OBJDEMO) \
		$(SYMDEMO) \
		$(MISCTAR)
	rm -rf tgif-$(TGIFVERSION)
	mkdir tgif-$(TGIFVERSION)
	cd tgif-$(TGIFVERSION); tar xvf ../tgif-$(TGIFVERSION).tar; cd ..
	rm -f tgif-$(TGIFVERSION).tar
	tar cvf tgif-$(TGIFVERSION).tar tgif-$(TGIFVERSION)
	rm -rf tgif-$(TGIFVERSION)
	gzip -c tgif-$(TGIFVERSION).tar > tgif-$(TGIFVERSION).tar.gz
	compress tgif-$(TGIFVERSION).tar

MAN_1 = README *.man Imakefile Copyright
BASIC_1 = Makefile.noimake descrip.* HISTORY tgif.Xdefaults \
	  VMS_MAKE_TGIF.COM

MISC_1 = an-sr-flip-flop.obj fonts.obj slide-demo.obj keys.obj \
	 launch-demo.obj launch-demo-1.obj \
	 flip-flop.sym nand2.sym pin.sym tangram.sym tgificon.xbm
MISC_2 = tgif.pl testdrive.pl frontend.pl tgificon.obj example.tex tangram.sym
MISC_3 = tgificon.xpm tgificon.eps *.uu
SPICE_1 = spice $(SPICEDIR)*.obj $(SPICEDIR)*.sym $(SPICEDIR)*.mod

shar: uu
	rm -f tgif-$(TGIFVERSION).shar.*
	shar -otgif-$(TGIFVERSION).shar.1 -n1 -e38 $(MAN_1)
	shar -otgif-$(TGIFVERSION).shar.2 -n2 -e38 $(BASIC_1)
	shar -otgif-$(TGIFVERSION).shar.3 -n3 -e38 a[a-n]*.c
	shar -otgif-$(TGIFVERSION).shar.4 -n4 -e38 a[o-s]*.c
	shar -otgif-$(TGIFVERSION).shar.5 -n5 -e38 a[t-z]*.c
	shar -otgif-$(TGIFVERSION).shar.6 -n6 -e38 b*.c
	shar -otgif-$(TGIFVERSION).shar.7 -n7 -e38 c[a-m]*.c
	shar -otgif-$(TGIFVERSION).shar.8 -n8 -e38 c[n-z]*.c
	shar -otgif-$(TGIFVERSION).shar.9 -n9 -e38 d*.c
	shar -otgif-$(TGIFVERSION).shar.10 -n10 -e38 e[a-d]*.c
	shar -otgif-$(TGIFVERSION).shar.11 -n11 -e38 e[e-z]*.c
	shar -otgif-$(TGIFVERSION).shar.12 -n12 -e38 f[a-i]*.c
	shar -otgif-$(TGIFVERSION).shar.13 -n13 -e38 f[j-z]*.c
	shar -otgif-$(TGIFVERSION).shar.14 -n14 -e38 [g-l]*.c
	shar -otgif-$(TGIFVERSION).shar.15 -n15 -e38 ma*.c
	shar -otgif-$(TGIFVERSION).shar.16 -n16 -e38 m[b-e]*.c
	shar -otgif-$(TGIFVERSION).shar.17 -n17 -e38 m[f-z]*.c
	shar -otgif-$(TGIFVERSION).shar.18 -n18 -e38 n*.c
	shar -otgif-$(TGIFVERSION).shar.19 -n19 -e38 o*.c p[a-n]*.c
	shar -otgif-$(TGIFVERSION).shar.20 -n20 -e38 poly.c
	shar -otgif-$(TGIFVERSION).shar.21 -n21 -e38 polygon.c p[p-z]*.c
	shar -otgif-$(TGIFVERSION).shar.22 -n22 -e38 r[a-c]*.c stk*.c
	shar -otgif-$(TGIFVERSION).shar.23 -n23 -e38 r[d-z]*.c
	shar -otgif-$(TGIFVERSION).shar.24 -n24 -e38 sc*.c sel*.c
	shar -otgif-$(TGIFVERSION).shar.25 -n25 -e38 set*.c s[f-p]*.c
	shar -otgif-$(TGIFVERSION).shar.26 -n26 -e38 str*.c
	shar -otgif-$(TGIFVERSION).shar.27 -n27 -e38 text.c
	shar -otgif-$(TGIFVERSION).shar.28 -n28 -e38 testdrive.c t[f-z]*.c \
				[u-w]*.c
	shar -otgif-$(TGIFVERSION).shar.29 -n29 -e38 x[a-m]*.c
	shar -otgif-$(TGIFVERSION).shar.30 -n30 -e38 x[n-z]*.c
	shar -otgif-$(TGIFVERSION).shar.31 -n31 -e38 [a-n]*.e
	shar -otgif-$(TGIFVERSION).shar.32 -n32 -e38 [o-z]*.e *.h
	shar -otgif-$(TGIFVERSION).shar.33 -n33 -e38 xbm xbm/[a-k]*.xbm \
				xbm/l[a-s]*.xbm
	shar -otgif-$(TGIFVERSION).shar.34 -n34 -e38 xbm/l[t-z]*.xbm \
				xbm/[m-z]*.xbm
	shar -otgif-$(TGIFVERSION).shar.35 -n35 -e38 $(MISC_1)
	shar -otgif-$(TGIFVERSION).shar.36 -n36 -e38 $(MISC_2)
	shar -otgif-$(TGIFVERSION).shar.37 -n37 -e38 $(MISC_3)
	shar -otgif-$(TGIFVERSION).shar.38 -n38 -e38 $(SPICE_1)

versioninfo:
	what .psmac *.c *.e *.h Makefile.noimake Imakefile \
		*.man tgif.pl README example.tex HISTORY \
		tgificon.obj an-sr-flip-flop.obj fonts.obj slide-demo.obj \
		keys.obj flip-flop.sym nand2.sym pin.sym tangram.sym \
		$(SPICEDIR)*.obj $(SPICEDIR)*.sym testdrive.pl frontend.pl \
		descrip.mms descrip.opt tgifmacro.ps $(XBMDIR)*.xbm \
		tgificon.xbm tgificon.xpm tgif.Xdefaults tgificon.eps \
		VMS_MAKE_TGIF.COM launch-demo.obj launch-demo-1.obj \
		Copyright \
		> VersionInfo/Distribution/tgif-$(TGIFVERSION)

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

emptyrule::

clean::
	$(RM_CMD) "#"*

Makefile::
	-@if [ -f Makefile ]; then set -x; \
	$(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

saber:: $(SRCS)
	# load $(ALLDEFINES) $(SRCS)

osaber:: $(OBJS)
	# load $(ALLDEFINES) $(OBJS)

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

