1# Copyright (C) 1997-2002 artofcode LLC. All rights reserved. 2# 3# This software is provided AS-IS with no warranty, either express or 4# implied. 5# 6# This software is distributed under license and may not be copied, 7# modified or distributed except as expressly authorized under the terms 8# of the license contained in the file LICENSE in this distribution. 9# 10# For more information about licensing, please refer to 11# http://www.ghostscript.com/licensing/. For information on 12# commercial licensing, go to http://www.artifex.com/licensing/ or 13# contact Artifex Software, Inc., 101 Lucas Valley Road #110, 14# San Rafael, CA 94903, U.S.A., +1(415)492-9861. 15# 16# $Id: unixansi.mak,v 1.41 2005/08/31 05:52:32 ray Exp $ 17# makefile for Unix/ANSI C/X11 configuration. 18 19# ------------------------------- Options ------------------------------- # 20 21####### The following are the only parts of the file you should need to edit. 22 23# Define the directory for the final executable, and the 24# source, generated intermediate file, and object directories 25# for the graphics library (GL) and the PostScript/PDF interpreter (PS). 26 27BINDIR=./bin 28GLSRCDIR=./src 29GLGENDIR=./obj 30GLOBJDIR=./obj 31PSSRCDIR=./src 32PSLIBDIR=./lib 33PSGENDIR=./obj 34PSOBJDIR=./obj 35 36# Do not edit the next group of lines. 37 38#include $(COMMONDIR)/ansidefs.mak 39#include $(COMMONDIR)/unixdefs.mak 40#include $(COMMONDIR)/generic.mak 41include $(GLSRCDIR)/version.mak 42DD=$(GLGENDIR)/ 43GLD=$(GLGENDIR)/ 44PSD=$(PSGENDIR)/ 45 46# ------ Generic options ------ # 47 48# Define the installation commands and target directories for 49# executables and files. The commands are only relevant to `make install'; 50# the directories also define the default search path for the 51# initialization files (gs_*.ps) and the fonts. 52 53INSTALL = $(GLSRCDIR)/instcopy -c 54INSTALL_PROGRAM = $(INSTALL) -m 755 55INSTALL_DATA = $(INSTALL) -m 644 56 57prefix = /usr/local 58exec_prefix = $(prefix) 59bindir = $(exec_prefix)/bin 60scriptdir = $(bindir) 61mandir = $(prefix)/man 62man1ext = 1 63datadir = $(prefix)/share 64gsdir = $(datadir)/ghostscript 65gsdatadir = $(gsdir)/$(GS_DOT_VERSION) 66 67docdir=$(gsdatadir)/doc 68exdir=$(gsdatadir)/examples 69GS_DOCDIR=$(docdir) 70 71# Define the default directory/ies for the runtime initialization, resource and 72# font files. Separate multiple directories with a :. 73 74GS_LIB_DEFAULT=$(gsdatadir)/lib:$(gsdatadir)/Resource:$(gsdir)/fonts 75 76# Define whether or not searching for initialization files should always 77# look in the current directory first. This leads to well-known security 78# and confusion problems, but users insist on it. 79# NOTE: this also affects searching for files named on the command line: 80# see the "File searching" section of Use.htm for full details. 81# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended. 82 83SEARCH_HERE_FIRST=1 84 85# Define the name of the interpreter initialization file. 86# (There is no reason to change this.) 87 88GS_INIT=gs_init.ps 89 90# Choose generic configuration options. 91 92# -DDEBUG 93# includes debugging features (-Z switch) in the code. 94# Code runs substantially slower even if no debugging switches 95# are set. 96# -DNOPRIVATE 97# makes private (static) procedures and variables public, 98# so they are visible to the debugger and profiler. 99# No execution time or space penalty. 100 101GENOPT= 102 103# Define the name of the executable file. 104 105GS=gs 106 107# Define the name of a pre-built executable that can be invoked at build 108# time. Currently, this is only needed for compiled fonts. The usual 109# alternatives are: 110# - the standard name of Ghostscript on your system (typically `gs'): 111BUILD_TIME_GS=gs 112# - the name of the executable you are building now. If you choose this 113# option, then you must build the executable first without compiled fonts, 114# and then again with compiled fonts. 115#BUILD_TIME_GS=$(BINDIR)/$(GS) -I$(PSLIBDIR) 116 117# Define the directories for debugging and profiling binaries, relative to 118# the standard binaries. 119 120DEBUGRELDIR=../debugobj 121PGRELDIR=../pgobj 122 123# Define the directory where the IJG JPEG library sources are stored, 124# and the major version of the library that is stored there. 125# You may need to change this if the IJG library version changes. 126# See jpeg.mak for more information. 127 128JSRCDIR=jpeg 129JVERSION=6 130 131# Note: if a shared library is used, it may not contain the 132# D_MAX_BLOCKS_IN_MCU patch, and thus may not be able to read 133# some older JPEG streams that violate the standard. If the JPEG 134# library built from local sources, the patch will be applied. 135 136SHARE_JPEG=0 137JPEG_NAME=jpeg 138 139# Define the directory where the PNG library sources are stored, 140# and the version of the library that is stored there. 141# You may need to change this if the libpng version changes. 142# See libpng.mak for more information. 143 144PSRCDIR=libpng 145PVERSION=10208 146 147# Choose whether to use a shared version of the PNG library, and if so, 148# what its name is. 149# See gs.mak and Make.htm for more information. 150 151SHARE_LIBPNG=0 152LIBPNG_NAME=png 153 154# Define the directory where the zlib sources are stored. 155# See zlib.mak for more information. 156 157ZSRCDIR=zlib 158 159# Choose whether to use a shared version of the zlib library, and if so, 160# what its name is (usually libz, but sometimes libgz). 161# See gs.mak and Make.htm for more information. 162 163SHARE_ZLIB=0 164#ZLIB_NAME=gz 165ZLIB_NAME=z 166 167# Choose shared or compiled in libjbig2dec and source location 168SHARE_JBIG2=0 169JBIG2SRCDIR=jbig2dec 170 171# Define the directory where the icclib source are stored. 172# See icclib.mak for more information 173 174ICCSRCDIR=icclib 175 176# Define the directory where the ijs source is stored, 177# and the process forking method to use for the server. 178# See ijs.mak for more information. 179 180IJSSRCDIR=ijs 181IJSEXECTYPE=unix 182 183# Define how to build the library archives. (These are not used in any 184# standard configuration.) 185 186AR=ar 187ARFLAGS=qc 188RANLIB=ranlib 189 190# ------ Platform-specific options ------ # 191 192# Define the name of the C compiler. If the standard compiler for your 193# platform is ANSI-compatible, leave this line commented out; if not, 194# uncomment the line and insert the proper definition. 195 196#CC=some_C_compiler 197 198# Define the name of the linker for the final link step. 199# Normally this is the same as the C compiler. 200 201CCLD=$(CC) 202 203# Define the added flags for standard, debugging, and profiling builds. 204 205CFLAGS_STANDARD=-O 206CFLAGS_DEBUG=-g 207CFLAGS_PROFILE=-pg -O 208 209# Define the other compilation flags. Add at most one of the following: 210# -Aa -w -D_HPUX_SOURCE for the HP 400. 211# -DBSD4_2 for 4.2bsd systems. 212# -DSYSV for System V or DG/UX. 213# -DSVR4 -DSVR4_0 (not -DSYSV) for System V release 4.0. 214# -DSVR4 (not -DSYSV) for System V release 4.2 (or later) and Solaris 2. 215# XCFLAGS can be set from the command line. 216XCFLAGS= 217 218CFLAGS=$(CFLAGS_STANDARD) $(XCFLAGS) 219 220# Define platform flags for ld. 221# SunOS and some others want -X; Ultrix wants -x. 222# SunOS 4.n may need -Bstatic. 223# Solaris 2.6 (and possibly some other versions) with any of the SHARE_ 224# parameters set to 1 may need 225# -R /usr/local/xxx/lib:/usr/local/lib 226# giving the full path names of the shared library directories. 227# Apollos running DomainOS don't support -X (and -x has no effect). 228# XLDFLAGS can be set from the command line. 229XLDFLAGS= 230 231LDFLAGS=$(XLDFLAGS) 232 233# Define any extra libraries to link into the executable. 234# ISC Unix 2.2 wants -linet. 235# SCO Unix needs -lsocket if you aren't including the X11 driver. 236# SVR4 may need -lnsl. 237# Solaris may need -lnsl -lsocket -lposix4. 238# (Libraries required by individual drivers are handled automatically.) 239 240EXTRALIBS= 241 242# Define the standard libraries to search at the end of linking. 243# Most platforms require -lpthread for the POSIX threads library; 244# on FreeBSD, change -lpthread to -lc_r; BSDI and perhaps some others 245# include pthreads in libc and don't require any additional library. 246# All reasonable platforms require -lm, but Rhapsody and perhaps one or 247# two others fold libm into libc and don't require any additional library. 248 249#STDLIBS=-lpthread -lm 250 251# Since the default build is for nosync, don't include pthread lib 252STDLIBS=-lm 253 254# Define the include switch(es) for the X11 header files. 255# This can be null if handled in some other way (e.g., the files are 256# in /usr/include, or the directory is supplied by an environment variable); 257# in particular, SCO Xenix, Unix, and ODT just want 258#XINCLUDE= 259# Note that x_.h expects to find the header files in $(XINCLUDE)/X11, 260# not in $(XINCLUDE). 261 262XINCLUDE=-I/usr/X11R6/include 263 264# Define the directory/ies and library names for the X11 library files. 265# XLIBDIRS is for ld and should include -L; XLIBDIR is for LD_RUN_PATH 266# (dynamic libraries on SVR4) and should not include -L. 267# Newer SVR4 systems can use -R in XLIBDIRS rather than setting XLIBDIR. 268# Both can be null if these files are in the default linker search path; 269# in particular, SCO Xenix, Unix, and ODT just want 270#XLIBDIRS= 271# Solaris and other SVR4 systems with dynamic linking probably want 272#XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib 273# X11R6 (on any platform) may need 274#XLIBS=Xt SM ICE Xext X11 275 276XLIBDIRS=-L/usr/X11R6/lib 277XLIBDIR= 278XLIBS=Xt Xext X11 279 280# Define whether this platform has floating point hardware: 281# FPU_TYPE=2 means floating point is faster than fixed point. 282# (This is the case on some RISCs with multiple instruction dispatch.) 283# FPU_TYPE=1 means floating point is at worst only slightly slower 284# than fixed point. 285# FPU_TYPE=0 means that floating point may be considerably slower. 286# FPU_TYPE=-1 means that floating point is always much slower than 287# fixed point. 288 289FPU_TYPE=1 290 291# Define the .dev module that implements thread and synchronization 292# primitives for this platform. Don't change this unless you really know 293# what you're doing. 294 295# If POSIX sync primitives are used, also change the STDLIBS to include 296# the pthread library. 297#SYNC=posync 298 299# Default is No sync primitives since some platforms don't have it (HP-UX) 300SYNC=nosync 301 302# ------ Devices and features ------ # 303 304# Choose the language feature(s) to include. See gs.mak for details. 305 306FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev $(PSD)fapi.dev 307 308# Choose whether to compile the .ps initialization files into the executable. 309# See gs.mak for details. 310 311COMPILE_INITS=0 312 313# Choose whether to store band lists on files or in memory. 314# The choices are 'file' or 'memory'. 315 316BAND_LIST_STORAGE=file 317 318# Choose which compression method to use when storing band lists in memory. 319# The choices are 'lzw' or 'zlib'. 320 321BAND_LIST_COMPRESSOR=zlib 322 323# Choose the implementation of file I/O: 'stdio', 'fd', or 'both'. 324# See gs.mak and sfxfd.c for more details. 325 326FILE_IMPLEMENTATION=stdio 327 328# Choose the implementation of stdio: '' for file I/O and 'c' for callouts 329# See gs.mak and ziodevs.c/ziodevsc.c for more details. 330 331STDIO_IMPLEMENTATION=c 332 333# Choose the device(s) to include. See devs.mak for details, 334# devs.mak and contrib.mak for the list of available devices. 335 336DEVICE_DEVS=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev 337DEVICE_DEVS1= 338DEVICE_DEVS2= 339DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev 340DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev $(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev 341DEVICE_DEVS5=$(DD)uniprint.dev 342DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev 343DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev 344DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev 345DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev 346DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev 347DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiffsep.dev 348DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev 349DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev $(DD)pngalpha.dev 350DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev $(DD)jpegcmyk.dev 351DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)ps2write.dev $(DD)epswrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev 352DEVICE_DEVS16=$(DD)bbox.dev 353# Overflow from DEVS9 354DEVICE_DEVS17=$(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev 355DEVICE_DEVS18= 356DEVICE_DEVS19= 357DEVICE_DEVS20= 358 359# ---------------------------- End of options --------------------------- # 360 361# Define the name of the partial makefile that specifies options -- 362# used in dependencies. 363 364MAKEFILE=$(GLSRCDIR)/unixansi.mak 365TOP_MAKEFILES=$(MAKEFILE) $(GLSRCDIR)/unixhead.mak 366 367# Define the auxilary program dependency. 368 369AK= 370 371# Define the compilation rules and flags. 372 373# If you system has a 64 bit type you should pass it through 374# CCFLAGS to improve support for multiple colorants. e.g.: 375# -DGX_COLOR_INDEX_TYPE='unsigned long long' 376# or use the autoconf build, which sets this automatically. 377# If you do not define a 64 bit type, there may be some warnings 378# about oversize shifts. It's a bug if these are not harmless. 379 380CCFLAGS=$(GENOPT) $(CFLAGS) 381CC_=$(CC) $(CCFLAGS) 382CCAUX=$(CC) 383CC_NO_WARN=$(CC_) 384 385# ---------------- End of platform-specific section ---------------- # 386 387include $(GLSRCDIR)/unixhead.mak 388include $(GLSRCDIR)/gs.mak 389include $(GLSRCDIR)/lib.mak 390include $(PSSRCDIR)/int.mak 391include $(PSSRCDIR)/cfonts.mak 392include $(GLSRCDIR)/jpeg.mak 393# zlib.mak must precede libpng.mak 394include $(GLSRCDIR)/zlib.mak 395include $(GLSRCDIR)/libpng.mak 396include $(GLSRCDIR)/jbig2.mak 397include $(GLSRCDIR)/icclib.mak 398include $(GLSRCDIR)/ijs.mak 399include $(GLSRCDIR)/devs.mak 400include $(GLSRCDIR)/contrib.mak 401include $(GLSRCDIR)/unix-aux.mak 402include $(GLSRCDIR)/unixlink.mak 403include $(GLSRCDIR)/unix-end.mak 404include $(GLSRCDIR)/unixinst.mak 405 406# platform-specific clean-up 407# this makefile is intended to be hand edited so we don't distribute 408# the (presumedly modified) version in the top level directory 409distclean : clean config-clean 410 -$(RM) Makefile 411 412maintainer-clean : distclean 413 # nothing special to do 414 415