summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 15c18fec33666a15b33ad76739f8697eedf8be82 (plain)
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
# Copyright (C) 2001-2018 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
# implied.
#
# This software is distributed under license and may not be copied,
# modified or distributed except as expressly authorized under the terms
# of the license contained in the file LICENSE in this distribution.
#
# Refer to licensing information at http://www.artifex.com or contact
# Artifex Software, Inc.,  1305 Grant Avenue - Suite 200, Novato,
# CA 94945, U.S.A., +1(415)492-9861, for further information.
#
# makefile template for/from the autoconf build.
# @configure_input@

# ------------------------------- Options ------------------------------- #

####### The following are the only parts of the file you should need to edit.

# Define the directory for the final executable, and the
# source, generated intermediate file, and object directories
# for the graphics library (GL) and the PostScript/PDF interpreter (PS).

PACKAGE=ghostscript
BINDIR=./$(BUILDDIRPREFIX)bin
GLSRCDIR=@srcdir@/base
DEVSRCDIR=@srcdir@/devices
GENORDERED_SRCDIR=@srcdir@/toolbin/halftone/gen_ordered
GLGENDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
GLOBJDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
DEVGENDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
DEVOBJDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
AUXDIR=$(GLGENDIR)/aux@AUXDIRPOSTFIX@
PSSRCDIR=@srcdir@/psi
PSLIBDIR=@srcdir@/lib
PSRESDIR=@srcdir@/Resource
PSGENDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
PSOBJDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@

PCL5SRCDIR=@srcdir@/pcl/pcl
PCL5GENDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
PCL5OBJDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@

PXLSRCDIR=@srcdir@/pcl/pxl
PXLGENDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
PXLOBJDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@

PLSRCDIR=@srcdir@/pcl/pl
PLGENDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
PLOBJDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@

XPSSRCDIR=@srcdir@/xps
XPSGENDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
XPSOBJDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@

GPDLSRCDIR=@srcdir@/gpdl
GPDLGENDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@
GPDLOBJDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@


CONTRIBDIR=@srcdir@/contrib

# Do not edit the next group of lines.

include $(GLSRCDIR)/version.mak
DD=$(GLGENDIR)/
GLD=$(GLGENDIR)/
PSD=$(PSGENDIR)/

# ------ Generic options ------ #

# Define the installation commands and target directories for
# executables and files.  The commands are only relevant to `make install';
# the directories also define the default search path for the
# initialization files (gs_*.ps) and the fonts.

INSTALL = $(GLSRCDIR)/instcopy -c
INSTALL_PROGRAM = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_SHARED = @INSTALL_SHARED@

prefix = @prefix@
datarootdir = @datarootdir@
exec_prefix = @exec_prefix@
bindir = @bindir@
scriptdir = $(bindir)
includedir = @includedir@
libdir = @libdir@
mandir = @mandir@
man1ext = 1
man1dir = $(mandir)/man$(man1ext)
datadir = @datadir@
docdir = @docdir@@VERSIONED_PATH@

# The following must be substituted using @datadir@ and @libdir@
# to avoid adding RPM generation paths (CUPS STR #1112)
gsdir = @datadir@/ghostscript
gsdatadir = $(gsdir)@VERSIONED_PATH@
gssharedir = @libdir@/ghostscript@VERSIONED_PATH@
gsincludedir = @includedir@/ghostscript/

exdir=$(gsdatadir)/examples
GS_DOCDIR=$(docdir)

# Choose whether to compile the .ps initialization files into the executable.
# See gs.mak for details.

COMPILE_INITS=@COMPILE_INITS@

# Define the default directory/ies for the runtime
# initialization and font files.  Separate multiple directories with a :.

GS_LIB_DEFAULT=$(gsdatadir)/Resource/Init:$(gsdatadir)/lib:$(gsdatadir)/Resource/Font:$(gsdir)/fonts:@fontpath@

# Define the default directory for cached data files
# this must be a single path.

GS_CACHE_DIR="~/.ghostscript/cache/"

# Define whether or not searching for initialization files should always
# look in the current directory first.  This leads to well-known security
# and confusion problems,  but may be convenient sometimes.

SEARCH_HERE_FIRST=0

# Define the name of the interpreter initialization file.
# (There is no reason to change this.)

GS_INIT=gs_init.ps

# Choose generic configuration options.

TARGET_ARCH_FILE=@ARCH_CONF_HEADER@

# -DDEBUG
#	includes debugging features (-Z switch) in the code.
#	  Code runs substantially slower even if no debugging switches
#	  are set.

GENOPT=
GENOPTAUX=

# Choose capability options.

# -DHAVE_BSWAP32
#       use bswap32 intrinsic
# -DHAVE_BYTESWAP_H
#       use byteswap.h functions
#
# -DHAVE_MKSTEMP
#	uses mkstemp instead of mktemp
#		This uses the more secure temporary file creation call
#		Enable this if it is available on your platform.
# -DHAVE_FILE64
#	use marked versions of the stdio FILE calls, fopen64() et al.
#
# -DHAVE_MKSTEMP64
#	use non-standard function mkstemp64()
#
# -DHAVE_LIBIDN
#	use libidn to canonicalize Unicode passwords
#
# -DHAVE_SETLOCALE
#	call setlocale(LC_CTYPE) when running as a standalone app
# -DHAVE_SSE2
#       use sse2 intrinsics

CAPOPT= @HAVE_MKSTEMP@ @HAVE_FILE64@ @HAVE_FSEEKO@ @HAVE_MKSTEMP64@ @HAVE_FONTCONFIG@ @HAVE_LIBIDN@ @HAVE_SETLOCALE@ @HAVE_SSE2@ @HAVE_DBUS@ @HAVE_BSWAP32@ @HAVE_BYTESWAP_H@ @HAVE_STRERROR@ @HAVE_ISNAN@ @HAVE_ISINF@ @HAVE_FPCLASSIFY@ @HAVE_PREAD_PWRITE@ @RECURSIVE_MUTEXATTR@

# Define the name of the executable file.

GS=@GS@
GS_SO_BASE=@GS@

PCL=@PCL@
PCL_SO_BASE=@PCL@

XPS=@XPS@
XPS_SO_BASE=@XPS@

GPDL=@GPDL@
GPDL_SO_BASE=@GPDL@

XE=@EXEEXT@
XEAUX=@EXEEXT@

PCL_TARGET=@PCL_TARGET@
XPS_TARGET=@XPS_TARGET@
GPDL_TARGET=@GPDL_TARGET@

PCL_XPS_TARGETS=$(PCL_TARGET) $(XPS_TARGET)

# Define the directories for debugging and profiling binaries, relative to
# the standard binaries.

DEBUGDIRPREFIX=debug
MEMENTODIRPREFIX=mem
SANITIZEDIRPREFIX=san
PGDIRPREFIX=pg

# Define whether to compile in the FreeType library, and if so, where
# the source tree is location. Otherwise, what library name to use
# in linking to a shared implementation.

FT_BRIDGE=@FT_BRIDGE@
SHARE_FT=@SHARE_FT@
FTSRCDIR=@FTSRCDIR@
FT_CFLAGS=@FT_CFLAGS@ -DSHARE_FT=@SHARE_FT@
FT_LIBS=@FT_LIBS@
FT_CONFIG_SYSTEM_ZLIB=@FT_SYS_ZLIB@

# Define whether to compile in UFST.
# FAPI/UFST depends on UFST_BRIDGE being undefined - hence the construct below.
# (i.e. use "UFST_BRIDGE=1" or *not to define UFST_BRIDGE to anything*)
# As UFST is not used for fonts embedded in input files, we should still have
# Freetype enabled, above.
@INSERT_UFST_BRIDGE_EQUAL_ONE@
UFST_ROOT=@UFST_ROOT@
UFST_LIB_EXT=@UFST_LIB_EXT@

UFST_ROMFS_ARGS?=-b \
 -P $(UFST_ROOT)/fontdata/mtfonts/pcl45/mt3/ -d fontdata/mtfonts/pcl45/mt3/ pcl___xj.fco plug__xi.fco wd____xh.fco \
 -P $(UFST_ROOT)/fontdata/mtfonts/pclps2/mt3/ -d fontdata/mtfonts/pclps2/mt3/ pclp2_xj.fco \
 -c -P $(PSSRCDIR)/../lib/ -d Resource/Init/ FAPIconfig-FCO

UFSTROMFONTDIR=\"%rom%fontdata/\"
UFSTDISCFONTDIR?=\"$(UFST_ROOT)/fontdata/\"


UFST_CFLAGS=@UFST_CFLAGS@

# Define the directory where the IJG JPEG library sources are stored,
# and the major version of the library that is stored there.
# You may need to change this if the IJG library version changes.
# See jpeg.mak for more information.

JSRCDIR=@LIBJPEGDIR@

# Note: if a shared library is used, it may not contain the
# D_MAX_BLOCKS_IN_MCU patch, and thus may not be able to read
# some older JPEG streams that violate the standard. If the JPEG
# library built from local sources, the patch will be applied.

SHARE_JPEG=@SHARE_LIBJPEG@
JPEG_NAME=jpeg

# Define the directory where the PNG library sources are stored,
# and the version of the library that is stored there.
# You may need to change this if the libpng version changes.
# See png.mak for more information.

SHARE_LIBPNG=@SHARE_LIBPNG@
PNGSRCDIR=@LIBPNGDIR@
LIBPNG_NAME=png

# libtiff
SHARE_LIBTIFF=@SHARE_LIBTIFF@
TIFFSRCDIR=@LIBTIFFDIR@
TIFFCONFDIR=@LIBTIFFCONFDIR@
TIFFPLATFORM=unix
TIFFCONFIG_SUFFIX=
LIBTIFF_NAME=tiff
TIFF_CFLAGS=@TIFFCFLAGS@

# Define the directory where the zlib sources are stored.
# See zlib.mak for more information.

SHARE_ZLIB=@SHARE_ZLIB@
ZSRCDIR=@ZLIBDIR@
#ZLIB_NAME=gz
ZLIB_NAME=z
ZLIB_CFLAGS=@ZLIBCFLAGS@

# Choose shared or compiled in libjbig2dec and source location
# JBIG2_LIB=jbig2dec
JBIG2_LIB=@JBIG2_DECODER@
SHARE_JBIG2=@SHARE_JBIG2@
JBIG2SRCDIR=@JBIG2DIR@
JBIG2_CFLAGS=@JBIG2_AUTOCONF_CFLAGS@

# uncomment the following three lines and one of the last two to
# compile in the Luratech ldf_jb2 codec
#JBIG2_LIB=luratech
#SHARE_JBIG2=0
#JBIG2SRCDIR=ldf_jb2
#JBIG2_CFLAGS=-DUSE_LDF_JB2 -DLINUX
#JBIG2_CFLAGS=-DUSE_LDF_JB2 -DMAC -DMAC_OS_X_BUILD


# Choose the library to use for (JPXDecode support)
# whether to link to an external build or compile in from source
# and source location and configuration flags for compiling in
JPX_LIB=@JPX_DECODER@
SHARE_JPX=@SHARE_JPX@
JPXSRCDIR=@JPXDIR@
JPX_CFLAGS=-DSHARE_JPX=$(SHARE_JPX) @JPX_AUTOCONF_CFLAGS@ @JPX_SSE_CFLAGS@

# uncomment the following three lines and one of the last two to
# compile in the Luratech lwf_jp2 codec
#JPX_LIB=luratech
#SHARE_JPX=0
#JPXSRCDIR=lwf_jp2
#JPX_CFLAGS=-DUSE_LWF_JP2 -DLINUX
#JPX_CFLAGS=-DUSE_LWF_JP2 -DMAC -DMAC_OS_X_BUILD

# Uncomment the following 4 lines to to compile in OpenJPEG codec
#JPX_LIB=openjpeg
#SHARE_JPX=0
#JPXSRCDIR=openjpeg
#JPX_CFLAGS=-DUSE_OPENJPEG_JP2 -DOPJ_STATIC

# options for lcms color management library
SHARE_LCMS=@SHARELCMS@
LCMS2SRCDIR=@LCMS2DIR@
LCMS2MTSRCDIR=@LCMS2MTDIR@
LCMS2_CFLAGS=-DSHARE_LCMS=$(SHARE_LCMS) @LCMS2_ENDIAN@ @SQRTF_SUBST@  @LCMS2_PTR_ALIGNMENT@

# Which CMS are we using?
# Options are currently lcms or lcms2
WHICH_CMS=@WHICHLCMS@


EXPATSRCDIR=@EXPATDIR@
EXPAT_CFLAGS=@EXPAT_CFLAGS@
EXPATGENDIR=$(GLGENDIR)
EXPATOBJDIR=$(GLOBJDIR)
EXPATINCDIR = $(EXPATSRCDIR)$(D)lib
SHARE_EXPAT=@SHARE_EXPAT@

JPEGXR_SRCDIR=@SRCDIR@/jpegxr
SHARE_JPEGXR=0
JPEGXR_GENDIR=$(GLGENDIR)
JPEGXR_OBJDIR=$(GLOBJDIR)

# Define the directory where the ijs source is stored,
# and the process forking method to use for the server.
# See ijs.mak for more information.

SHARE_IJS=@SHAREIJS@
IJS_NAME=@IJSLIB@
IJSSRCDIR=@IJSDIR@
IJSEXECTYPE=unix

# Define install location for 'cups' device/filter support
CUPSLIBS=@CUPSLIBS@
CUPSLIBDIRS=@CUPSLIBDIRS@
CUPSSERVERBIN=@CUPSSERVERBIN@
CUPSSERVERROOT=@CUPSSERVERROOT@
CUPSDATA=@CUPSDATA@
CUPSPDFTORASTER=@CUPSPDFTORASTER@

SHARE_LCUPS=@SHARELCUPS@
LCUPS_NAME=cups
LCUPSSRCDIR=@CUPS_DIR@
LCUPSBUILDTYPE=@LCUPSBUILDTYPE@
CUPS_CC=$(CC)

SHARE_LCUPSI=@SHARELCUPSI@
LCUPSI_NAME=cupsimage
LCUPSISRCDIR=@CUPS_DIR@
CUPS_CC=$(CC)

CUPSCFLAGS=@CUPSCFLAGS@ -DSHARE_LCUPS=$(SHARE_LCUPS) -DSHARE_LCUPSI=$(SHARE_LCUPSI)

# Define how to build the library archives.  (These are not used in any
# standard configuration.)

AR=ar
ARFLAGS=qc
RANLIB=@RANLIB@
STRIP_XE=@STRIP_XE@
STRIP_XE_OPTS=

# ------ Platform-specific options ------ #

# Define the name of the C compiler (target and host (AUX))

CC=@CC@
CCAUX=@CCAUX@

# Define the name of the linker for the final link step.
# Normally this is the same as the C compiler.

CCLD=$(CC)
CCAUXLD=$(CCAUX)

# Define the default gcc flags.
GCFLAGS=@CPPFLAGS@ @GCFLAGS@ @CFLAGS@ @HAVE_POPEN_PROTO@
GCFLAGSAUX=@GCFLAGSAUX@ @HAVE_POPEN_PROTO@

# Define the added flags for standard, debugging, profiling
# and shared object builds.

CFLAGS_STANDARD=@OPT_CFLAGS@
CFLAGS_DEBUG=@DBG_CFLAGS@
CFLAGS_PROFILE=-pg @OPT_CFLAGS@
CFLAGS_SO=@DYNAMIC_CFLAGS@

CFLAGSAUX_STANDARD=@CFLAGSAUX_STANDARD@
CFLAGSAUX_DEBUG=@CFLAGSAUX_DEBUG@
CFLAGSAUX_PROFILE=-pg @CFLAGSAUX_STANDARD@

# Define the extra flags added for address sanitizer builds

CFLAGS_SANITIZE=@CFLAGS_SANITIZE@
LDFLAGS_SANITIZE=$(CFLAGS_SANITIZE)

# Define the other compilation flags.  Add at most one of the following:
#	-DBSD4_2 for 4.2bsd systems.
#	-DSYSV for System V or DG/UX.
# 	-DSYSV -D__SVR3 for SCO ODT, ISC Unix 2.2 or before,
#	   or any System III Unix, or System V release 3-or-older Unix.
#	-DSVR4 -DSVR4_0 (not -DSYSV) for System V release 4.0.
#	-DSVR4 (not -DSYSV) for System V release 4.2 (or later) and Solaris 2.
# XCFLAGS can be set from the command line.
# We don't include -ansi, because this gets in the way of the platform-
#   specific stuff that <math.h> typically needs; nevertheless, we expect
#   gcc to accept ANSI-style function prototypes and function definitions.
# CFLAGS from autoconf
AC_CFLAGS=@DYNAMIC_FLAGS@

# fontconfig flags, used by unix-aux.mak
FONTCONFIG_CFLAGS=@FONTCONFIG_CFLAGS@
FONTCONFIG_LIBS=@FONTCONFIG_LIBS@

# DBus flags, used by cups.mak
DBUS_CFLAGS=@DBUS_CFLAGS@
DBUS_LIBS=@DBUS_LIBS@

# defines from autoconf; note that we don't use all of these at present.
ACDEFS=@DEFS@

CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(AC_CFLAGS) $(XCFLAGS) @CLUSTER_CFLAGS@
CFLAGSAUX=$(CFLAGSAUX_STANDARD) $(GCFLAGSAUX) $(XCFLAGSAUX)

# Define platform flags for ld.
# SunOS 4.n may need -Bstatic.
# Solaris 2.6 (and possibly some other versions) with any of the SHARE_
# parameters set to 1 may need
#	-R /usr/local/xxx/lib:/usr/local/lib
# giving the full path names of the shared library directories.
# XLDFLAGS can be set from the command line.
# AC_LDFLAGS from autoconf
AC_LDFLAGS=@X_LDFLAGS@

LDFLAGS=@LDFLAGS@ $(AC_LDFLAGS) $(XLDFLAGS)

LDFLAGSAUX=@LDFLAGSAUX@

GS_LDFLAGS=$(LDFLAGS)
PCL_LDFLAGS=$(LDFLAGS)
XPS_LDFLAGS=$(LDFLAGS)
PDL_LDFLAGS=$(LDFLAGS)

GS_LDFLAGS_SO=@GS_DYNAMIC_LDFLAGS@
PCL_LDFLAGS_SO=@PCL_DYNAMIC_LDFLAGS@
XPS_LDFLAGS_SO=@XPS_DYNAMIC_LDFLAGS@
PDL_LDFLAGS_SO=@PDL_DYNAMIC_LDFLAGS@

# Define any extra libraries to link into the executable.
# ISC Unix 2.2 wants -linet.
# SCO Unix needs -lsocket if you aren't including the X11 driver.
# SVR4 may need -lnsl.
# Solaris may need -lnsl -lsocket -lposix4.
# (Libraries required by individual drivers are handled automatically.)

EXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ @EXPAT_LIBS@
AUXEXTRALIBS=@AUXEXTRALIBS@ @AUX_SHARED_ZLIB@

# Define the standard libraries to search at the end of linking.
# Most platforms require -lpthread for the POSIX threads library;
# on FreeBSD, change -lpthread to -lc_r; BSDI and perhaps some others
# include pthreads in libc and don't require any additional library.
# All reasonable platforms require -lm, but Rhapsody and perhaps one or
# two others fold libm into libc and don't require any additional library.

STDLIBS=@PTHREAD_LIBS@ -lm

# Define the include switch(es) for the X11 header files.
# This can be null if handled in some other way (e.g., the files are
# in /usr/include, or the directory is supplied by an environment variable)

XINCLUDE=@X_CFLAGS@

# Define the directory/ies and library names for the X11 library files.
# XLIBDIRS is for ld and should include -L; XLIBDIR is for LD_RUN_PATH
# (dynamic libraries on SVR4) and should not include -L.
# Newer SVR4 systems can use -R in XLIBDIRS rather than setting XLIBDIR.
# Both can be null if these files are in the default linker search path.

# Solaris and other SVR4 systems with dynamic linking probably want
#XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib
# X11R6 (on any platform) may need
#XLIBS=Xt SM ICE Xext X11

# We use the autoconf macro AC_PATH_XTRA which defines X_LIBS with
# the -L (or whatever). It also defines X_PRE_LIBS and X_EXTRA_LIBS
# all three of which are stripped and slotted into XLIBS below.
# Usually however, all but X_LIBS are empty on modern platforms.
XLIBDIRS=@X_LDFLAGS@
XLIBDIR=
#XLIBS=Xt Xext X11
XLIBS=@X_LIBS@

# Define the .dev module that implements thread and synchronization
# primitives for this platform.

# If POSIX sync primitives are used, also change the STDLIBS to include
# the pthread library. Otherwise use SYNC=nosync
#SYNC=posync
#SYNC=nosync
SYNC=@SYNC@

# programs we use
RM=rm -f

# ------ Dynamic loader options ------- #
SOC_CFLAGS	=	@SOC_CFLAGS@
SOC_LIBS	=	@SOC_LIBS@
SOC_LOADER	=	@SOC_LOADER@

# on virtually every Unix-a-like system, this is "so",
# but Apple just had to be different, so it's now set
# by configure
SO_LIB_EXT=@SO_LIB_EXT@
DLL_EXT=@DLL_EXT@
SO_LIB_VERSION_SEPARATOR=@SO_LIB_VERSION_SEPARATOR@

#CAIRO_CFLAGS	=	@CAIRO_CFLAGS@
#CAIRO_LIBS	=	@CAIRO_LIBS@

# ------ Devices and features ------ #

# Choose the language feature(s) to include.  See gs.mak for details.

# if it's included, $(PSD)gs_pdfwr.dev should always be one of the last in the list
PSI_FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)epsf.dev $(PSD)ttfont.dev \
                 @UTF8DEVS@ $(PSD)fapi_ps.dev $(PSD)jpx.dev $(PSD)jbig2.dev $(PSD)gs_pdfwr.dev


PCL_FEATURE_DEVS=$(PLOBJDIR)/pl.dev $(PLOBJDIR)/pjl.dev $(PXLOBJDIR)/pxl.dev $(PCL5OBJDIR)/pcl5c.dev \
             $(PCL5OBJDIR)/hpgl2c.dev

XPS_FEATURE_DEVS=$(XPSOBJDIR)/pl.dev $(XPSOBJDIR)/xps.dev

FEATURE_DEVS=$(GLD)pipe.dev $(GLD)gsnogc.dev $(GLD)htxlib.dev $(GLD)psl3lib.dev $(GLD)psl2lib.dev \
             $(GLD)dps2lib.dev $(GLD)path1lib.dev $(GLD)patlib.dev $(GLD)psl2cs.dev $(GLD)rld.dev $(GLD)gxfapiu$(UFST_BRIDGE).dev\
             $(GLD)ttflib.dev  $(GLD)cielib.dev $(GLD)pipe.dev $(GLD)htxlib.dev $(GLD)sdct.dev $(GLD)libpng.dev\
	     $(GLD)seprlib.dev $(GLD)translib.dev $(GLD)cidlib.dev $(GLD)psf0lib.dev $(GLD)psf1lib.dev\
             $(GLD)psf2lib.dev $(GLD)lzwd.dev $(GLD)sicclib.dev \
             $(GLD)sjbig2.dev $(GLD)sjpx.dev $(GLD)ramfs.dev \
             $(GLD)pwgd.dev

#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)ttfont.dev $(GLD)pipe.dev
# The following is strictly for testing.
FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)ttfont.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)stocht.dev $(GLD)pipe.dev $(GLD)gsnogc.dev $(GLD)htxlib.dev @JBIG2DEVS@ @JPXDEVS@ @UTF8DEVS@ $(GLD)ramfs.dev
#FEATURE_DEVS=$(FEATURE_DEVS_ALL)

# The list of resources to be included in the %rom% file system.
# This is in the top makefile since the file descriptors are platform specific
RESOURCE_LIST=Resource/CMap/ Resource/ColorSpace/ Resource/Decoding/ Resource/Font/ Resource/ProcSet/ Resource/IdiomSet/ Resource/CIDFont/

# Choose whether to store band lists on files or in memory.
# The choices are 'file' or 'memory'.

BAND_LIST_STORAGE=file

# Choose which compression method to use when storing band lists in memory.
# The choices are 'lzw' or 'zlib'.

BAND_LIST_COMPRESSOR=zlib

# Choose the implementation of file I/O: 'stdio', 'fd', or 'both'.
# See gs.mak and sfxfd.c for more details.

FILE_IMPLEMENTATION=stdio

# List of default devices, in order of priority. They need not be
# present in the actual build.
GS_DEV_DEFAULT="x11alpha bbox"

# Fallback default device.  This is set to 'display' by
# unix-dll.mak when building a shared object.
DISPLAY_DEV=$(DD)bbox.dev

# Choose the device(s) to include.  See devs.mak for details,
# devs.mak and contrib.mak for the list of available devices.

#DEVICE_DEVS=$(DISPLAY_DEV) $(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev
#DEVICE_DEVS=$(DISPLAY_DEV) @X11DEVS@
#DEVICE_DEVS=$(DISPLAY_DEV) @X_DEVS@

#DEVICE_DEVS1=$(DD)bmpmono.dev $(DD)bmpgray.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)bmp16.dev $(DD)bmp256.dev $(DD)bmp16m.dev $(DD)bmp32b.dev
#DEVICE_DEVS2=#$(DD)gdevjbig2.dev $(DD)gdevjpx.dev #$(DD)rinkj.dev
#DEVICE_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 $(DD)lj5mono.dev $(DD)lj5gray.dev
#DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev $(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev
#DEVICE_DEVS5=$(DD)uniprint.dev @IJSDEVS@
#DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev
#DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev $(DD)cfax.dev
#DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev
#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
#DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
#DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiff48nc.dev $(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiff64nc $(DD)tiffsep.dev $(DD)tiffsep1.dev
#DEVICE_DEVS12=$(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
#DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev
#DEVICE_DEVS13=@PNGDEVS@
#DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev
#DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)ps2write.dev $(DD)eps2write.dev $(DD)txtwrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
#DEVICE_DEVS16=$(DD)bbox.dev

#DEVICE_DEVS17=
#DEVICE_DEVS18=
#DEVICE_DEVS19=
#DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5c.dev
#DEVICE_DEVS21=$(DD)spotcmyk.dev $(DD)devicen.dev $(DD)xcf.dev $(DD)psdcmyk.dev $(DD)psdrgb.dev $(DD)psdcmykog.dev $(DD)fpng.dev
DEVICE_DEVS=$(DISPLAY_DEV) @X11_DEVS@
DEVICE_DEVS1=@F_DEVS@
DEVICE_DEVS2=@P_DEVS@
DEVICE_DEVS3=@CUPS_DEVS@
DEVICE_DEVS4=@IJS_DEVS@
DEVICE_DEVS5=
DEVICE_DEVS6=@PNG_DEVS@
DEVICE_DEVS7=@JBIG2_DEVS@
DEVICE_DEVS8=
DEVICE_DEVS9=@XPS_DEVS@
DEVICE_DEVS10=
DEVICE_DEVS11=
DEVICE_DEVS12=
DEVICE_DEVS13=
DEVICE_DEVS14=
DEVICE_DEVS15=
DEVICE_DEVS16=
DEVICE_DEVS17=
DEVICE_DEVS18=
DEVICE_DEVS19=
DEVICE_DEVS20=
DEVICE_DEVS21=


# Shared library target to build.
GS_SHARED_OBJS=@DYNAMIC_DEVS@

# ---------------------------- End of options --------------------------- #

# Define the name of the partial makefile that specifies options --
# used in dependencies.

MAKEFILE=Makefile
TOP_MAKEFILES=$(MAKEFILE) $(GLSRCDIR)/unixhead.mak

# for use in unix-dll.mak and unix-end.mak
# if you rename the Makefile, you *must* also set this to the new name
SUB_MAKE_OPTION=@SUB_MAKE_OPTION@

# Define the auxiliary program dependency. We don't use this.

AK=

# Define the compilation rules and flags.

CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS)
CC_=$(CC) $(CCFLAGS)
CC_LEAF=$(CC_)

CCFLAGSAUX=$(GENOPTAUX) $(CAPOPTAUX) $(CFLAGSAUX)
CCAUX_=$(CCAUX) $(CCFLAGSAUX)

# note gcc can't use -fomit-frame-pointer with -pg.
CC_LEAF_PG=$(CC_)
# These are the specific warnings we have to turn off to compile those
# specific few files that need this.  We may turn off others in the future.
CC_NO_WARN=$(CC_)
CCAUX_NO_WARN=$(CCAUX_)
CC_SHARED=$(CC_) @DYNAMIC_CFLAGS@

LD_SET_DT_SONAME=@SET_DT_SONAME@

# MAKEDIRS = the dependency on ALL object files (must be the last one on
# the line. Requires GNU make to make it an 'order only' dependency
# MAKEDIRSTOP = the topmost dependency - set this if you can't set MAKEDIRS

MAKEDIRS=@ORDER_ONLY@ directories
MAKEDIRSTOP=

# ---------------- End of platform-specific section ---------------- #

INSTALL_CONTRIB=@INSTALL_CONTRIB@
include $(GLSRCDIR)/unixhead.mak
include $(GLSRCDIR)/gs.mak
# *romfs.mak must precede lib.mak
include @PLROMFS_MAK@   # plromfs.mak
include @XPSROMFS_MAK@ # xpsromfs.mak

include $(PSSRCDIR)/psromfs.mak
include $(GLSRCDIR)/lib.mak
include $(PSSRCDIR)/int.mak

include @PL_MAK@ # pl.mak
include @PCL_MAK@ # pcl.mak
include @PCL_TOP_MAK@ # pcl_top.mak
include @PXL_MAK@ # pxl.mak

include @XPS_MAK@ # xps.mak

include @GPDL_MAK@ # gpdl.mak

include $(GLSRCDIR)/freetype.mak
include @FAPIUFST_MAK@
include $(GLSRCDIR)/jpeg.mak
# zlib.mak must precede png.mak
include $(GLSRCDIR)/zlib.mak
include $(GLSRCDIR)/png.mak
include $(GLSRCDIR)/tiff.mak
include $(GLSRCDIR)/jbig2.mak
include $(GLSRCDIR)/ldf_jb2.mak
include $(GLSRCDIR)/lwf_jp2.mak
include $(GLSRCDIR)/openjpeg.mak

include $(GLSRCDIR)/jpegxr.mak
include $(GLSRCDIR)/expat.mak

include $(GLSRCDIR)/$(WHICH_CMS).mak
include $(GLSRCDIR)/ijs.mak
@LCUPSINCLUDE@
@LCUPSIINCLUDE@
include $(DEVSRCDIR)/devs.mak
include $(DEVSRCDIR)/contrib.mak
include $(GLSRCDIR)/unix-aux.mak
include $(GLSRCDIR)/unixlink.mak
include $(GLSRCDIR)/unix-dll.mak
include $(GLSRCDIR)/unix-end.mak
include $(GLSRCDIR)/unixinst.mak
@CONTRIBINCLUDE@
@CUPSINCLUDE@

# Clean up after the autotools scripts
distclean : clean config-clean soclean pgclean debugclean mementoclean
	-$(RM_) -r $(BINDIR) $(GLOBJDIR) $(PSOBJDIR) $(AUXDIR)
	-$(RM_) -r autom4te.cache
	-$(RM_) config.log config.status
	-$(RM_) -r $(TIFFCONFDIR)
	-$(RM_) Makefile

# a debug-clean target for consistency with the ghostpdl builds
debug-clean : debugclean

memento-clean : mementoclean

maintainer-clean : distclean
	-$(RM_) configure

check : default
	$(NO_OP)