#ifndef XCOMM
#define XCOMM #
#endif

XCOMM	Fig2dev : General Fig code translation program

XCOMM TransFig: Facility for Translating Fig code
XCOMM Copyright (c) 1985 Supoj Sutantavibul
XCOMM Copyright (c) 1991 Micah Beck

XCOMM THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
XCOMM INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
XCOMM EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
XCOMM CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
XCOMM DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
XCOMM TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
XCOMM PERFORMANCE OF THIS SOFTWARE.
XCOMM
XCOMM The X Consortium, and any party obtaining a copy of these files from
XCOMM the X Consortium, directly or indirectly, is granted, free of charge, a
XCOMM full and unrestricted irrevocable, world-wide, paid up, royalty-free,
XCOMM nonexclusive right and license to deal in this software and
XCOMM documentation files (the "Software"), including without limitation the
XCOMM rights to use, copy, modify, merge, publish, distribute, sublicense,
XCOMM and/or sell copies of the Software, and to permit persons who receive
XCOMM copies from any such party to do so, with the only requirement being
XCOMM that this copyright notice remain intact.  This license includes without
XCOMM limitation a license to do the foregoing actions under any patents of
XCOMM the party supplying this software to the X Consortium.

XCOMM Uncomment the XPMDEFINES variable here AND in dev/Imakefile if you have
XCOMM the XPM (color pixmap) package and you would like to allow XPM files.
XCOMM You need version 3.4c of the XPM package.

XCOMM XPMDEFINES = -DUSE_XPM
XCOMM XPMLIBDIR = -L/usr/local/X11/lib
XCOMM XPMINCDIR = -I/usr/local/X11/include/xpm
XCOMM XPMLIB = $(XPMLIBDIR) -lXpm -lX11

XCOMM For Linux machines or any machines that have a separate library for
XCOMM the database management routines, uncomment the following line
XCOMM DBMLIB = -ldbm

XCOMM To include drivers for the following languages, 
XCOMM add the corresponding symbol to the DEFINES list:
XCOMM
XCOMM -DEPIC -DIBMGL -DLATEX -DPIC -DPICTEX -DPS -DPSTEX -DTEXTYL -DTPIC
XCOMM

DEFINES = $(XPMDEFINES) -DEPIC -DIBMGL -DLATEX -DPIC -DPICTEX -DPS -DPSTEX -DTEXTYL -DTPIC -DMF
DEPLIBS =

#if (defined(VaxArchitecture) && !defined(UltrixArchitecture)) || \
    (defined(RtArchitecture) && !defined(AIXArchitecture)) || \
    (defined(MipsArchitecture)) || defined(SequentArchitecture) || \
    (defined(SunOSPlatform) && (OSMinorVersion==0))

STRSTRC=	strstr.c
STRSTRO=	strstr.o
#endif

#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'

SUBDIRS = dev

INCLUDES = -I..
EXTRA_INCLUDES = $(XPMINCDIR)

SRCS = fig2dev.c getopt.c psfonts.c iso2tex.c \
	arrow.c bound.c free.c read.c read1_3.c latex_line.c $(STRSTRC)
OBJS = fig2dev.o getopt.o psfonts.o iso2tex.o \
	arrow.o bound.o free.o read.o read1_3.o latex_line.o $(STRSTRO) \
	dev/libtransfig.a

SYS_LIBRARIES = $(XPMLIB) $(DBMLIB) -lm

MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))

ComplexProgramTarget(fig2dev)

all:: fig2dev.man fig2ps2tex.man pic2tpic.man

InstallScript(fig2ps2tex,$(BINDIR))
InstallScript(fig2ps2tex.sh,$(BINDIR))
InstallScript(pic2tpic,$(BINDIR))

InstallManPage(fig2ps2tex,$(MANDIR))
InstallManPage(pic2tpic,$(MANDIR))

fig2dev.man: ../doc/fig2dev.1
	ln -s ../doc/fig2dev.1 fig2dev.man

fig2ps2tex.man: ../doc/fig2ps2tex.1
	ln -s ../doc/fig2ps2tex.1 fig2ps2tex.man

pic2tpic.man: ../doc/pic2tpic.1
	ln -s ../doc/pic2tpic.1 pic2tpic.man
