/**/#
/**/# Author:	William Chia-Wei Cheng (william@cs.ucla.edu)
/**/#
/**/# Copyright (C) 1990, 1991, 1992, William Cheng.
/**/# 
/**/# Permission limited to the use, copy, modify, and distribute this software
/**/# and its documentation for any purpose is hereby granted by the Author
/**/# without fee, provided that the above copyright notice appear in all
/**/# copies 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 are reserved by the Author.
/**/# 
/**/# THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
/**/# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
/**/# 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: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/Imakefile,v 2.84.1.3 1992/10/26 06:41:11 william Exp $
/**/#

TGIFVERSION	= 2.12-p12
PROGRAMS	= tgif prtgif /**/#frontend11.o testdrive
/**/#CDEBUGFLAGS= -g
/**/#INSTPGMFLAGS= -s
/**/#BINDIR	= /u/tangram/$(MACHINE)/bin
/**/#MANPATH	= /u/tangram/man
/**/#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\" \
                  -DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\"

/**/#-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.
/**/#-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).
LOCAL_LIBRARIES	= $(XLIB)
DEPLIBS		= $(DEPXLIB)
SYS_LIBRARIES	= -lm

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

SPICEDIR =spice/
XBMDIR =xbm/

OBJDEMO = an-sr-flip-flop.obj fonts.obj slide-demo.obj keys.obj $(SPICEDIR)*.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 \
	 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 \
		> VersionInfo/Distribution/tgif-$(TGIFVERSION)
