1
# Copyright (C) 2001-2007 Artifex Software, Inc.
4
# This software is provided AS-IS with no warranty, either express or
7
# This software is distributed under license and may not be copied, modified
8
# or distributed except as expressly authorized under the terms of that
9
# license. Refer to licensing information at http://www.artifex.com/
10
# or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
11
# San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
13
# $Id: macosx.mak 9126 2008-10-02 19:33:22Z giles $
14
# makefile for MacOS X/darwin/gcc/framework configuration.
16
# ------------------------------- Options ------------------------------- #
18
####### The following are the only parts of the file you should need to edit.
20
# Define the directory for the final executable, and the
21
# source, generated intermediate file, and object directories
22
# for the graphics library (GL) and the PostScript/PDF interpreter (PS).
34
# Do not edit the next group of lines.
36
#include $(COMMONDIR)/gccdefs.mak
37
#include $(COMMONDIR)/unixdefs.mak
38
#include $(COMMONDIR)/generic.mak
39
include $(GLSRCDIR)/version.mak
44
# ------ Generic options ------ #
46
# Define the installation commands and target directories for
47
# executables and files. The commands are only relevant to `make install';
48
# the directories also define the default search path for the
49
# initialization files (gs_*.ps) and the fonts.
51
INSTALL = $(GLSRCDIR)/instcopy -c
52
INSTALL_PROGRAM = $(INSTALL) -m 755
53
INSTALL_DATA = $(INSTALL) -m 644
55
FRAMEWORK_NAME=Ghostscript
56
FRAMEWORK_EXT=.framework
57
prefix = /Library/Frameworks/$(FRAMEWORK_NAME)$(FRAMEWORK_EXT)
58
exec_prefix = $(prefix)
59
bindir = $(exec_prefix)/bin
61
includedir = $(prefix)/include
62
libdir = $(exec_prefix)/lib
63
mandir = $(prefix)/man
65
datadir = $(prefix)/Resources
66
gsdatadir = $(prefix)/Versions/$(GS_DOT_VERSION)/Resources
67
gssharedir = $(libdir)/ghostscript/$(GS_DOT_VERSION)
68
gsincludedir = $(includedir)/ghostscript/
70
docdir=$(gsdatadir)/doc
71
exdir=$(gsdatadir)/examples
74
# Define the default directory/ies for the runtime
75
# initialization, resource and font files. Separate multiple directories with a :.
77
GS_LIB_DEFAULT=$(gsdatadir)/Resource/Init:$(gsdatadir)/lib:$(gsdatadir)/Resource/Font:$(datadir)/fonts:/Library/Fonts:/System/Library/Fonts
79
# Define whether or not searching for initialization files should always
80
# look in the current directory first. This leads to well-known security
81
# and confusion problems, but users insist on it.
82
# NOTE: this also affects searching for files named on the command line:
83
# see the "File searching" section of Use.htm for full details.
84
# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
88
# Define the name of the interpreter initialization file.
89
# (There is no reason to change this.)
93
# Choose generic configuration options.
96
# includes debugging features (-Z switch) in the code.
97
# Code runs substantially slower even if no debugging switches
102
# Choose capability options.
105
# uses mkstemp instead of mktemp
106
# This uses the more secure temporary file creation call
107
# Enable this if it is available on your platform.
109
# use the system hypot() call
111
CAPOPT= -DHAVE_MKSTEMP
113
# Define the name of the executable file.
117
# Define the directories for debugging and profiling binaries, relative to
118
# the standard binaries.
120
DEBUGRELDIR=../debugobj
124
# Define the directory where the IJG JPEG library sources are stored,
125
# and the major version of the library that is stored there.
126
# You may need to change this if the IJG library version changes.
127
# See jpeg.mak for more information.
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.
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.
146
# Choose whether to use a shared version of the PNG library, and if so,
148
# See gs.mak and Make.htm for more information.
153
# Define the directory where the zlib sources are stored.
154
# See zlib.mak for more information.
158
# Choose whether to use a shared version of the zlib library, and if so,
159
# what its name is (usually libz, but sometimes libgz).
160
# See gs.mak and Make.htm for more information.
166
# Choose shared or compiled in libjbig2dec and source location
172
# Define the directory where the icclib source are stored.
173
# See icclib.mak for more information
177
# Define the directory where the ijs source is stored,
178
# and the process forking method to use for the server.
179
# See ijs.mak for more information.
184
# Define the directory where the imdi library source is stored.
185
# See devs.mak for more information
189
# Define how to build the library archives. (These are not used in any
190
# standard configuration.)
196
# ------ Platform-specific options ------ #
198
# Define the name of the C compiler.
202
# Define the name of the linker for the final link step.
203
# Normally this is the same as the C compiler.
207
# Define the default gcc flags.
208
# Note that depending whether or not we are running a version of gcc with
209
# the 2.7.0-2.7.2 optimizer bug, either "-Dconst=" or
210
# "-Wcast-qual -Wwrite-strings" is automatically included.
212
GCFLAGS=-Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes \
213
-fno-builtin -fno-common -DHAVE_STDINT_H
215
# Define the added flags for standard, debugging, profiling
216
# and shared object builds.
220
CFLAGS_PROFILE=-pg -O2
223
# Define the other compilation flags. Add at most one of the following:
224
# -DBSD4_2 for 4.2bsd systems.
225
# -DSYSV for System V or DG/UX.
226
# -DSYSV -D__SVR3 for SCO ODT, ISC Unix 2.2 or before,
227
# or any System III Unix, or System V release 3-or-older Unix.
228
# -DSVR4 -DSVR4_0 (not -DSYSV) for System V release 4.0.
229
# -DSVR4 (not -DSYSV) for System V release 4.2 (or later) and Solaris 2.
230
# XCFLAGS can be set from the command line.
231
# We don't include -ansi, because this gets in the way of the platform-
232
# specific stuff that <math.h> typically needs; nevertheless, we expect
233
# gcc to accept ANSI-style function prototypes and function definitions.
236
CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)
238
# Define platform flags for ld.
239
# SunOS 4.n may need -Bstatic.
240
# Solaris 2.6 (and possibly some other versions) with any of the SHARE_
241
# parameters set to 1 may need
242
# -R /usr/local/xxx/lib:/usr/local/lib
243
# giving the full path names of the shared library directories.
244
# XLDFLAGS can be set from the command line.
249
# Define any extra libraries to link into the executable.
250
# ISC Unix 2.2 wants -linet.
251
# SCO Unix needs -lsocket if you aren't including the X11 driver.
252
# SVR4 may need -lnsl.
253
# Solaris may need -lnsl -lsocket -lposix4.
254
# (Libraries required by individual drivers are handled automatically.)
258
# Define the standard libraries to search at the end of linking.
259
# Most platforms require -lpthread for the POSIX threads library;
260
# on FreeBSD, change -lpthread to -lc_r; BSDI and perhaps some others
261
# include pthreads in libc and don't require any additional library.
262
# All reasonable platforms require -lm, but Rhapsody and perhaps one or
263
# two others fold libm into libc and don't require any additional library.
265
# both of these are included in the stdlib on darwin/osx
266
#STDLIBS=-lpthread -lm
268
# Define the include switch(es) for the X11 header files.
269
# This can be null if handled in some other way (e.g., the files are
270
# in /usr/include, or the directory is supplied by an environment variable);
271
# in particular, SCO Xenix, Unix, and ODT just want
273
# Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
274
# not in $(XINCLUDE).
276
#XINCLUDE=-I/usr/X11R6/include
278
# Define the directory/ies and library names for the X11 library files.
279
# XLIBDIRS is for ld and should include -L; XLIBDIR is for LD_RUN_PATH
280
# (dynamic libraries on SVR4) and should not include -L.
281
# Newer SVR4 systems can use -R in XLIBDIRS rather than setting XLIBDIR.
282
# Both can be null if these files are in the default linker search path;
283
# in particular, SCO Xenix, Unix, and ODT just want
285
# Solaris and other SVR4 systems with dynamic linking probably want
286
#XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib
287
# X11R6 (on any platform) may need
288
#XLIBS=Xt SM ICE Xext X11
290
#XLIBDIRS=-L/usr/local/X/lib
291
#XLIBDIRS=-L/usr/X11R6/lib
296
# Define the .dev module that implements thread and synchronization
297
# primitives for this platform.
299
# If POSIX sync primitives are used, also change the STDLIBS to include
300
# the pthread library.
303
# Default is No sync primitives since some platforms don't have it (HP-UX)
306
# ------ Devices and features ------ #
308
# Choose the language feature(s) to include. See gs.mak for details.
310
FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev
311
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev
312
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(GLD)pipe.dev
313
# The following is strictly for testing.
314
FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)stocht.dev $(GLD)pipe.dev
315
#FEATURE_DEVS=$(FEATURE_DEVS_ALL)
317
# Choose whether to compile the .ps initialization files into the executable.
318
# See gs.mak for details.
322
# Choose whether to store band lists on files or in memory.
323
# The choices are 'file' or 'memory'.
325
BAND_LIST_STORAGE=file
327
# Choose which compression method to use when storing band lists in memory.
328
# The choices are 'lzw' or 'zlib'.
330
BAND_LIST_COMPRESSOR=zlib
332
# Choose the implementation of file I/O: 'stdio', 'fd', or 'both'.
333
# See gs.mak and sfxfd.c for more details.
335
FILE_IMPLEMENTATION=stdio
337
# Choose the implementation of stdio: '' for file I/O and 'c' for callouts
338
# See gs.mak and ziodevs.c/ziodevsc.c for more details.
340
STDIO_IMPLEMENTATION=c
342
# Override the default device. This is set to 'display' by
343
# unix-dll.mak when building a shared object.
346
# Choose the device(s) to include. See devs.mak for details,
347
# devs.mak and contrib.mak for the list of available devices.
349
# use png output by default
350
DEVICE_DEVS=$(DD)png16m.dev $(DD)pnggray.dev $(DD)pngmono.dev
351
#DEVICE_DEVS=$(DISPLAY_DEV)
353
# most devices are disabled by default since file conversion is the
354
# the major demand on macos
363
DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev $(DD)pamcmyk32.dev
367
#DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev $(DD)pngalpha.dev
368
DEVICE_DEVS13=$(DD)png16.dev $(DD)png256.dev $(DD)pngalpha.dev
369
DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev $(DD)jpegcmyk.dev
370
DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)ps2write.dev $(DD)epswrite.dev $(DD)txtwrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
371
DEVICE_DEVS16=$(DD)bbox.dev
377
# ---------------------------- End of options --------------------------- #
379
# Define the name of the partial makefile that specifies options --
380
# used in dependencies.
382
MAKEFILE=$(GLSRCDIR)/macosx.mak
383
TOP_MAKEFILES=$(MAKEFILE) $(GLSRCDIR)/unixhead.mak
385
# Define the auxiliary programs dependency. We don't use this.
389
# Define the compilation rules and flags.
391
CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS)
394
# These are the specific warnings we have to turn off to compile those
395
# specific few files that need this. We may turn off others in the future.
396
CC_NO_WARN=$(CC_) -Wno-cast-qual -Wno-traditional
398
# ---------------- End of platform-specific section ---------------- #
400
include $(GLSRCDIR)/unixhead.mak
401
include $(GLSRCDIR)/gs.mak
402
# psromfs.mak must precede lib.mak
403
include $(PSSRCDIR)/psromfs.mak
404
include $(GLSRCDIR)/lib.mak
405
include $(PSSRCDIR)/int.mak
406
include $(GLSRCDIR)/jpeg.mak
407
# zlib.mak must precede libpng.mak
408
include $(GLSRCDIR)/zlib.mak
409
include $(GLSRCDIR)/libpng.mak
410
include $(GLSRCDIR)/jbig2.mak
411
include $(GLSRCDIR)/icclib.mak
412
include $(GLSRCDIR)/ijs.mak
413
include $(GLSRCDIR)/devs.mak
414
include $(GLSRCDIR)/contrib.mak
415
include $(GLSRCDIR)/unix-aux.mak
416
include $(GLSRCDIR)/unixlink.mak
417
#include $(GLSRCDIR)/unix-dll.mak
418
include $(GLSRCDIR)/macos-fw.mak
419
include $(GLSRCDIR)/unix-end.mak
420
include $(GLSRCDIR)/unixinst.mak