#ifndef XCOMM
#define XCOMM #
#endif

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

TGIFVERSION	= 2.15
PROGRAMS	= tgif prtgif XCOMM frontend11.o testdrive
XCOMM CDEBUGFLAGS= -g
XCOMM INSTPGMFLAGS= -s
XCOMM BINDIR	= /u/tangram/$(MACHINE)/bin
XCOMM MANPATH	= /u/tangram/man
XCOMM TGIFDIR	= /u/tangram/lib/tgif
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=\"

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

XCOMM -D_NO_EXTERN
XCOMM    Include the above line in the DEFINES if you don't want to include
XCOMM    the extern definition for functions defined in a module.  For example,
XCOMM    if this option is set, then file "foo.c" will not include "foo.e",
XCOMM    and certain other extern definition in "foo.c" will be omitted.
XCOMM -D_NO_PROTO
XCOMM    Include the above line in the DEFINES if checking for function
XCOMM    prototypes is not desired.  Checking for function prototypes
XCOMM    are automatically enabled if you are using an ANSI or C++ compilor.
XCOMM    However, not all ANSI/C++ compilors are created equal.
XCOMM -D_BSD
XCOMM    Include the above line in the DEFINES if the select() function can
XCOMM    does not be found for AIX systems.
XCOMM -DNO_STRSTR
XCOMM    Include the above line in the DEFINES if you do not have the strstr()
XCOMM    function in your system's string library.
XCOMM -DINVERT_CTM_BUG
XCOMM    Include the above line in the DEFINES if you are using PostScript
XCOMM    utilities which fails when trying to invert non-invertible CTM
XCOMM    (e.g., muluti.ps from ftp.ucc.su.oz.au:/pub/ps_printing/multi).
XCOMM -DHP_LINE_BUG
XCOMM    Include the above line in the DEFINES if two-vertices horizontal and
XCOMM    verticle line segments don't draw properly on a buggy HP server.
XCOMM -DDONTFREECOLORS
XCOMM    Include the above line in the DEFINES if you don't want the black and
XCOMM    the white colors to be freed when tgif initializes itself.  You should
XCOMM    not need to do this unless you need to get around some server bugs.
XCOMM -DUSE_XAPPLRESDIR
XCOMM    Include the above line in the DEFINES if $XAPPLRESDIR/Tgif is used to
XCOMM    specify the resource file.  If your system does not have putenv()
XCOMM    (such as IBM-RT), then this won't work.
XCOMM -DXAPPLOADDIR_DEF
XCOMM    If you define USE_XAPPLRESDIR, define this to a default directory
XCOMM    to use in case $XAPPLRESDIR isn't set.
XCOMM -DUSE_XT_INITIALIZE
XCOMM    This will cause the XToolkit to be initialized so that the X defaults
XCOMM    are obtained from the Xt directories.  This should only be used when
XCOMM    USE_XAPPLRESDIR option is NOT used.  Please remember to use the
XCOMM    LOCAL_LIBRARIES with $(XTOOLLIB) $(XMULIB) above.
XCOMM -DNO_THIN_LINE
XCOMM    Include the above line in the DEFINES if a line width of 0 causes
XCOMM    your server to crash.  This is to get around a bug in some X servers.
XCOMM -DTHIN_OVAL_AND_ARC
XCOMM    Include the above line in the DEFINES if you want 0 width arcs to
XCOMM    be used when the width of an arc is less than or equal to 1.
XCOMM    (Sun3 server has a bug that makes drawing ovals and arcs with
XCOMM    width other than 0 VERY slow).
XCOMM -DKEEP_WHEN_PRINT
XCOMM    Include the above line in the DEFINES if you don't want the temp
XCOMM    file to be deleted after sending the print job to the printer.
XCOMM    (Some VMS systems might require this flag to be used.)
XCOMM -DPRINT_CMD=\"lpr\"
XCOMM    Include the above line in the DEFINES if you want to configure tgif
XCOMM    to use a default print command.
XCOMM -DNOTR4MODE
XCOMM    Include the above line in the DEFINES if you are running X11R3.
XCOMM    This will cause tgif NOT to use some X11R4 window manager related
XCOMM    functions that's not present in R3.
XCOMM -DMAPBEFORESELECT
XCOMM    Include the above line in the DEFINES to call XMapWindow() before
XCOMM    calling XSelectInput().  This might be needed to get around some
XCOMM    server bugs.
XCOMM -DDONT_FREE_COLORMAP
XCOMM    Include the above line in the DEFINES if you don't want the colormap
XCOMM    to be freed when tgif exits.
XCOMM -DA4PAPER
XCOMM    Include the above line in the DEFINES if you want to print on A4 paper
XCOMM    (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 cmd.o color.o copypaste.o cursor.o \
	dialog.o drawing.o dup.o \
	edit.o eps.o exec.o \
	file.o font.o \
	grid.o group.o \
	mainloop.o mainmenu.o mark.o menu.o move.o msg.o \
	names.o \
	obj.o oval.o \
	page.o pattern.o poly.o polygon.o ps.o \
	raster.o rcbox.o rect.o ruler.o \
	scroll.o select.o setup.o shortcut.o \
		special.o spline.o stk.o stretch.o \
	text.o \
	version.o vms_compat.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 = 

ComplexProgramTarget_1(tgif,$(LOCAL_LIBRARIES),)
ComplexProgramTarget_2(prtgif,,)
/*
 * ComplexProgramTarget_3(testdrive,$(LOCAL_LIBRARIES),)
 */

/*
 * NormalRelocatableTarget(frontend11,$(FRONTENDOBJS))
 */

MakeDirectories(install,$(TGIFDIR))
InstallNonExec(tgif.Xdefaults,$(TGIFDIR))
InstallNonExec(tgificon.eps,$(TGIFDIR))
InstallNonExec(tgificon.obj,$(TGIFDIR))
InstallNonExec(tgificon.xbm,$(TGIFDIR))
InstallNonExec(tgificon.xpm,$(TGIFDIR))
InstallNonExec(tangram.sym,$(TGIFDIR))
InstallNonExec(keys.obj,$(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 version

uu:
	rm -f /**/*.uu /**/*.cat /**/*.cat.Z
	nroff -t -man tgif.man > tgif.cat; compress tgif.cat
	nroff -t -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

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

version:
	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)
