1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
|
#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 You should point XFIGLIBDIR to the same directory you did when you compiled
XCOMM and installed xfig. This will be made automatic in the future.
XFIGLIBDIR = $(DESTDIR)/usr/lib/X11/xfig
XCOMM If your system has the strerror() function (doesn't have sys_errlist) then
XCOMM comment out NEED_STRERROR with an XCOMM comment.
XCOMM NEED_STRERROR = -DNEED_STRERROR
XCOMM uncomment the following line if your compiler supports
XCOMM inline functions. With the "INLINE" keyword, you should notice that
XCOMM the display will be a bit faster in complex figures
USEINLINE = -DUSE_INLINE
XCOMM Unomment the #define for USEXPM if you want to use the XPM
XCOMM (color pixmap) package.
XCOMM You need version 3.4c or newer of the XPM package.
XCOMM
XCOMM Change XPMLIBS if necessary to point to the xpm library (libXpm)
XCOMM Change XPMINC if necessary to point to the include file for xpm (xpm.h)
XCOMM
XCOMM Also change XPMRGB if necessary, to point to your rgb.txt color
XCOMM database file (for X11). This is needed for those XPM flies which
XCOMM have named colors (e.g. "white").
XCOMM You need version 3.4c of the XPM package.
XCOMM
#define USEXPM
XCOMM For Linux machines or any machines that have a separate library for
XCOMM the database management routines, uncomment the following line.
XCOMM For the Redhat distributions of Linux you may have to change DBMLIB to -ldb.
XCOMM For other Linux versions you may need -ldbm instead of -lgdbm.
XCOMM Slackware Linuxes use -lgdbm.
DBMLIB = -ldb
XCOMM If your system doesn't have ndbm ("New" database manager) comment the following
USE_NDBM = -DNDBM
XCOMM If don't want to use JPEG, comment out the following line
#define USEJPEG
XCOMM If you don't have the jpeg library in your system library area, comment
XCOMM out the USEINSTALLEDJPEG variable (using XCOMM), change the JPEGLIBDIR
XCOMM variable to the directory where your jpeg library resides and change
XCOMM the JPEGINCDIR to the directory where your jpeg header files (include)
XCOMM reside.
XCOMM You must have version 5b or newer of the jpeg library.
#define USEINSTALLEDJPEG
XCOMM uncomment the following to set paper size to A4
DDA4 = -DA4
XCOMM uncomment the following to set IBM Graphics Enhancement Cartridge
XCOMM DDIBMGEC = -DIBMGEC
XCOMM uncomment the following to set DVI-to-PostScript driver to dvip
DDDVIPS = -DDVIPS
XCOMM comment out the DDNFSS = ... line if you don't want NFSS2 font selection
XCOMM for LaTeX texts
XCOMM comment out the DDEPSF = ... line if you don't want epsfig macros as
XCOMM distributed w/ LaTeX2e
XCOMM
XCOMM Hint: Users of LaTeX2e will probably want to include both of these
XCOMM options; users of LaTeX 2.09 will probably want to include neither.
DDNFSS = -DNFSS
DDEPSF = -DEPSF
XCOMM If your system doesn't have strcasecmp and/or strncasecmp
XCOMM undefine the following two definitions
XCOMM HAVE_NO_STRCASECMP = -DHAVE_NO_STRCASECMP
XCOMM HAVE_NO_STRNCASECMP = -DHAVE_NO_STRNCASECMP
XCOMM Uncomment the next line if you want use Japanese (i18n) on xfig.
#define I18N
#ifdef I18N
I18N_DEFS = -DI18N
I18N_DEV_DEFS = $(I18N_DEFS) -DFIG2DEV_LIBDIR='\"/usr/lib/fig2dev\"'
#endif
DEFINES = $(NEED_STRERROR) $(HAVE_NO_STRCASECMP) $(HAVE_NO_STRNCASECMP) $(USEINLINE) \
$(I18N_DEFS)
XCOMM If your system doesn't have strstr() then uncomment the following line
XCOMM #define NOSTRSTR
XCOMM **************************************************************
XCOMM *** You shouldn't have to change anything below this point ***
XCOMM *** The one exception is to change JPEGLIBDIR if you have ***
XCOMM *** USEINSTALLEDJPEG commented out. ***
XCOMM **************************************************************
DIR_DEFS= -DBITMAPDIR=\\\"$(XFIGLIBDIR)/bitmaps\\\"
#ifdef USEXPM
DUSEXPM = -DUSE_XPM
XPMLIBDIR = $(USRLIBDIR)
XPMINC = -I$(INCDIR)/X11
XPMLIBS = -L$(XPMLIBDIR) -lXpm -lX11
XPMRGB = XPMRGB=$(LIBDIR)/rgb
XPMDBM = $(USE_NDBM)
#endif
#if defined(NOSTRSTR)
STRSTRC= strstr.c
STRSTRO= strstr.o
#endif
#ifdef USEJPEG
IMAKE_DEFINES = -DUSE_JPEG
DUSEJPEG = -DUSE_JPEG
#ifdef USEINSTALLEDJPEG
JPEGLIBDIR = /usr/lib
JPEGINCDIR = /usr/include
JPEGLIB = -L$(JPEGLIBDIR) -ljpeg
#else
XCOMM this is relative to this directory (transfig/fig2dev)
JPEGLIBDIR = ../../jpeg-6a
JPEGCONF = configure
XCOMM Don't change JPEGINCDIR.
JPEGINCDIR = ../$(JPEGLIBDIR)
JPEGLIB = $(JPEGLIBDIR)/libjpeg.a
DEPLIBJPEG = $(JPEGLIBDIR)/libjpeg.a
#endif /* USEINSTALLEDJPEG */
#endif /* USEJPEG */
DEVDEFINES = $(DUSEJPEG) $(DUSEXPM) $(XPMINC) $(XPMDBM) \
$(DDNFSS) $(DDEPSF) $(DDA4) $(DDIBMGEC) $(DDDVIPS) $(I18N_DEV_DEFS)
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
DEVDIR = dev
SUBDIRS = $(DEVDIR)
LIBTRANSFIG = $(DEVDIR)/libtransfig.a
INCLUDES = -I..
LOCAL_LIBRARIES = $(LIBTRANSFIG) $(JPEGLIB)
#if defined(NetBSDArchitecture)
SYS_LIBRARIES = $(XPMLIBS) $(DBMLIB) -lm -lcompat
#else
SYS_LIBRARIES = $(XPMLIBS) $(DBMLIB) -lm
#endif
DEPLIBS = $(LIBTRANSFIG)
#if !(defined(SunOSPlatform) && (OSMajorVersion>=5))
GETOPTC= getopt.c
GETOPTO= getopt.c
#endif
SRCS = fig2dev.c psfonts.c iso2tex.c arrow.c bound.c trans_spline.c \
free.c read.c read1_3.c latex_line.c $(STRSTRC) $(GETOPTC)
OBJS = fig2dev.o psfonts.o iso2tex.o arrow.o bound.o trans_spline.o \
free.o read.o read1_3.o latex_line.o $(STRSTRO) $(GETOPTO)
fig2dev: $(DEPLIBJPEG) $(DEPLIBS)
XCOMM only compile our jpeg if the use doesn't have one installed
#ifndef USEINSTALLEDJPEG
$(JPEGLIBDIR)/libjpeg.a: $(JPEGLIBDIR)/jconfig.h
cd $(JPEGLIBDIR); $(MAKE) libjpeg.a
$(JPEGLIBDIR)/jconfig.h:
cd $(JPEGLIBDIR) ; ./$(JPEGCONF) CC='$(CC)'
#endif
$(LIBTRANSFIG)::
cd $(DEVDIR); $(MAKE) JPEGINCDIR=$(JPEGINCDIR) \
DEFINES="$(DEVDEFINES) $(DIR_DEFS)" $(XPMRGB) libtransfig.a
PROGRAM = fig2dev
AllTarget(fig2dev)
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
ComplexProgramTarget(fig2dev)
all:: fig2dev.man fig2ps2tex.man pic2tpic.man
XCOMM Install the tk bitmaps here
install::
@(cd bitmaps ; \
if [ -d $(XFIGLIBDIR)/bitmaps ]; then set +x; \
else (set -x; $(MKDIRHIER) $(XFIGLIBDIR)/bitmaps ); fi ; \
echo Copying files for $$d library to $(XFIGLIBDIR)/bitmaps ; \
$(INSTALL) -c * $(XFIGLIBDIR)/bitmaps ; )
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
|