xref: /plan9/sys/src/cmd/gs/src/dvx-gcc.mak (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1#    Copyright (C) 1997, 1998, 1999 Aladdin Enterprises.  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: dvx-gcc.mak,v 1.29 2004/12/10 23:48:48 giles Exp $
17# makefile for DesqView/X/gcc/X11 configuration.
18
19#include $(COMMONDIR)/gccdefs.mak
20#include $(COMMONDIR)/dvxdefs.mak
21#include $(COMMONDIR)/generic.mak
22include $(GLSRCDIR)/version.mak
23
24# ------------------------------- Options ------------------------------- #
25
26####### The following are the only parts of the file you should need to edit.
27
28# ------ Generic options ------ #
29
30# Define the directory for the final executable, and the
31# source, generated intermediate file, and object directories
32# for the graphics library (GL) and the PostScript/PDF interpreter (PS).
33
34BINDIR=bin
35GLSRCDIR=src
36GLGENDIR=obj
37GLOBJDIR=obj
38PSSRCDIR=src
39PSLIBDIR=lib
40PSGENDIR=obj
41PSOBJDIR=obj
42
43# Define the installation commands and target directories for
44# executables and files.  The commands are only relevant to `make install';
45# the directories also define the default search path for the
46# initialization files (gs_*.ps) and the fonts.
47
48INSTALL = $(GLSRCDIR)/instcopy -c
49INSTALL_PROGRAM = $(INSTALL) -m 755
50INSTALL_DATA = $(INSTALL) -m 644
51
52prefix = c:/bin
53bindir = c:/bin
54gsdatadir = c:/gs
55gsfontdir = c:/gsfonts
56
57docdir=$(gsdatadir)/doc
58exdir=$(gsdatadir)/examples
59GS_DOCDIR=$(docdir)
60
61# Define the default directory/ies for the runtime
62# initialization, resource and font files.  Separate multiple directories with a ;.
63
64GS_LIB_DEFAULT="$(gsdatadir)/lib;$(gsdatadir)/Resource;$(gsfontdir)"
65
66# Define whether or not searching for initialization files should always
67# look in the current directory first.  This leads to well-known security
68# and confusion problems, but users insist on it.
69# NOTE: this also affects searching for files named on the command line:
70# see the "File searching" section of Use.htm for full details.
71# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
72
73SEARCH_HERE_FIRST=1
74
75# Define the name of the interpreter initialization file.
76# (There is no reason to change this.)
77
78GS_INIT=gs_init.ps
79
80# Choose generic configuration options.
81
82# -DDEBUG
83#	includes debugging features (-Z switch) in the code.
84#	  Code runs substantially slower even if no debugging switches
85#	  are set.
86# -DNOPRIVATE
87#	makes private (static) procedures and variables public,
88#	  so they are visible to the debugger and profiler.
89#	  No execution time or space penalty.
90
91GENOPT=
92
93# Define the name of the executable file.
94
95GS=gs
96
97# Define the name of a pre-built executable that can be invoked at build
98# time.  Currently, this is only needed for compiled fonts.  The usual
99# alternatives are:
100#   - the standard name of Ghostscript on your system (typically `gs'):
101BUILD_TIME_GS=gs
102#   - the name of the executable you are building now.  If you choose this
103# option, then you must build the executable first without compiled fonts,
104# and then again with compiled fonts.
105#BUILD_TIME_GS=$(BINDIR)/$(GS) -I$(PSLIBDIR)
106
107# Define the directory where the IJG JPEG library sources are stored,
108# and the major version of the library that is stored there.
109# You may need to change this if the IJG library version changes.
110# See jpeg.mak for more information.
111
112JSRCDIR=jpeg
113JVERSION=6
114
115# Note: if a shared library is used, it may not contain the
116# D_MAX_BLOCKS_IN_MCU patch, and thus may not be able to read
117# some older JPEG streams that violate the standard. If the JPEG
118# library built from local sources, the patch will be applied.
119
120SHARE_JPEG=0
121JPEG_NAME=jpeg
122
123# Define the directory where the PNG library sources are stored,
124# and the version of the library that is stored there.
125# You may need to change this if the libpng version changes.
126# See libpng.mak for more information.
127
128PSRCDIR=libpng
129PVERSION=10208
130
131# Choose whether to use a shared version of the PNG library (-lpng).
132# See gs.mak and Make.htm for more information.
133
134SHARE_LIBPNG=0
135
136# Define the directory where the zlib sources are stored.
137# See zlib.mak for more information.
138
139ZSRCDIR=zlib
140
141# Choose whether to use a shared version of the zlib library (-lgz).
142# See gs.mak and Make.htm for more information.
143
144SHARE_ZLIB=0
145ZLIB_NAME=gz
146
147# Choose shared or compiled in libjbig2dec and source location
148
149SHARE_JBIG2=0
150JBIG2SRCDIR=jbig2dec
151
152# Define the directory where the icclib source are stored.
153# See icclib.mak for more information
154
155ICCSRCDIR=icclib
156
157# IJS has not been ported to DesqView/X. If you do the port,
158# you'll need to set these values. You'll also need to
159# include the ijs.mak makefile (right after icclib.mak).
160#
161# Define the directory where the ijs source is stored,
162# and the process forking method to use for the server.
163# See ijs.mak for more information.
164
165#IJSSRCDIR=ijs
166#IJSEXECTYPE=unix
167
168
169
170# ------ Platform-specific options ------ #
171
172# Define the name of the C compiler.
173
174CC=gcc
175
176# Define the other compilation flags.
177# Add -DBSD4_2 for 4.2bsd systems.
178# Add -DSYSV for System V or DG/UX.
179# Add -DSYSV -D__SVR3 for SCO ODT, ISC Unix 2.2 or before,
180#   or any System III Unix, or System V release 3-or-older Unix.
181# Add -DSVR4 (not -DSYSV) for System V release 4.
182# XCFLAGS can be set from the command line.
183# We don't include -ansi, because this gets in the way of the platform-
184#   specific stuff that <math.h> typically needs; nevertheless, we expect
185#   gcc to accept ANSI-style function prototypes and function definitions.
186XCFLAGS=
187
188# Under DJGPP, since we strip the executable by default, we may as
189# well *not* use '-g'.
190
191# CFLAGS=-g -O $(XCFLAGS)
192CFLAGS=-O $(XCFLAGS)
193
194# Define platform flags for ld.
195# Ultrix wants -x.
196# SunOS 4.n may need -Bstatic.
197# XLDFLAGS can be set from the command line.
198XLDFLAGS=
199
200LDFLAGS=$(XLDFLAGS)
201
202# Define any extra libraries to link into the executable.
203# ISC Unix 2.2 wants -linet.
204# SCO Unix needs -lsocket if you aren't including the X11 driver.
205# (Libraries required by individual drivers are handled automatically.)
206
207EXTRALIBS=-lsys -lc
208
209# Define the standard libraries to search at the end of linking.
210# All reasonable platforms require -lm, but Rhapsody and perhaps one or
211# two others fold libm into libc and require STDLIBS to be empty.
212
213STDLIBS=-lm
214
215# Define the include switch(es) for the X11 header files.
216# This can be null if handled in some other way (e.g., the files are
217# in /usr/include, or the directory is supplied by an environment variable);
218# in particular, SCO Xenix, Unix, and ODT just want
219#XINCLUDE=
220# Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
221# not in $(XINCLUDE).
222
223XINCLUDE=
224
225# Define the directory/ies and library names for the X11 library files.
226# The former can be null if these files are in the default linker search path.
227# Unfortunately, Quarterdeck's old libraries did not conform to the
228# X11 conventions for naming, in that the main Xlib library was called
229# libx.a, not libx11.a.  To make things worse, both are provided in
230# the v2.00 library.  Creation dates indicate that 'libx.a' is left
231# over from a previous build (or this could just be on my system, but
232# others who have upgraded from the early version will have the same
233# problem---SJT).  Thus I will make the default to look for
234# 'libx11.a', since v1.0x does *not* have it and the linker will
235# complain.  With the reverse default, the linker will find to the
236# obsolete library on some systems.
237
238# XLIBDIRS includes a prefix -L; XLIBDIR does not.
239XLIBDIRS=
240XLIBDIR=
241# reverse the comments if you have QDDVX10x or the prerelease version
242# of QDLIB200 (still available on some Simtel mirrors, unfortunately)
243# XLIBS=Xt Xext X
244XLIBS=Xt Xext X11
245
246# Define whether this platform has floating point hardware:
247#	FPU_TYPE=2 means floating point is faster than fixed point.
248# (This is the case on some RISCs with multiple instruction dispatch.)
249#	FPU_TYPE=1 means floating point is at worst only slightly slower
250# than fixed point.
251#	FPU_TYPE=0 means that floating point may be considerably slower.
252#	FPU_TYPE=-1 means that floating point is always much slower than
253# fixed point.
254
255FPU_TYPE=1
256
257# Define the .dev module that implements thread and synchronization
258# primitives for this platform.  Don't change this unless you really know
259# what you're doing.
260
261SYNC=posync
262
263# ------ Devices and features ------ #
264
265# Choose the language feature(s) to include.  See gs.mak for details.
266
267FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev $(PSD)fapi.dev
268
269# Choose whether to compile the .ps initialization files into the executable.
270# See gs.mak for details.
271
272COMPILE_INITS=0
273
274# Choose whether to store band lists on files or in memory.
275# The choices are 'file' or 'memory'.
276
277BAND_LIST_STORAGE=file
278
279# Choose which compression method to use when storing band lists in memory.
280# The choices are 'lzw' or 'zlib'.
281
282BAND_LIST_COMPRESSOR=zlib
283
284# Choose the implementation of file I/O: 'stdio', 'fd', or 'both'.
285# See gs.mak and sfxfd.c for more details.
286
287FILE_IMPLEMENTATION=stdio
288
289# Choose the implementation of stdio: '' for file I/O and 'c' for callouts
290# See gs.mak and ziodevs.c/ziodevsc.c for more details.
291
292STDIO_IMPLEMENTATION=c
293
294# Choose the device(s) to include.  See devs.mak for details,
295# devs.mak and contrib.mak for the list of available devices.
296
297DEVICE_DEVS=x11.dev
298DEVICE_DEVS1=
299DEVICE_DEVS2=
300DEVICE_DEVS3=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev ljet3d.dev ljet4.dev ljet4d.dev
301DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev pj.dev pjxl.dev pjxl300.dev
302DEVICE_DEVS5=paintjet.dev pjetxl.dev uniprint.dev
303DEVICE_DEVS6=
304DEVICE_DEVS7=
305DEVICE_DEVS8=
306DEVICE_DEVS9=pbm.dev pbmraw.dev pgm.dev pgmraw.dev pgnm.dev pgnmraw.dev pnm.dev pnmraw.dev ppm.dev ppmraw.dev
307DEVICE_DEVS10=tiffcrle.dev tiffg3.dev tiffg32d.dev tiffg4.dev tifflzw.dev tiffpack.dev
308DEVICE_DEVS11=tiff12nc.dev tiff24nc.dev tiffgray.dev tiff32nc.dev tiffsep.dev
309DEVICE_DEVS12=psmono.dev psgray.dev bit.dev bitrgb.dev bitcmyk.dev
310DEVICE_DEVS13=
311DEVICE_DEVS14=
312DEVICE_DEVS15=pdfwrite.dev
313DEVICE_DEVS16=
314DEVICE_DEVS17=
315DEVICE_DEVS18=
316DEVICE_DEVS19=
317DEVICE_DEVS20=
318
319# ---------------------------- End of options --------------------------- #
320
321# Define the name of the partial makefile that specifies options --
322# used in dependencies.
323
324MAKEFILE=$(GLSRCDIR)/dvx-gcc.mak
325TOP_MAKEFILES=$(MAKEFILE) $(GLSRCDIR)/dvx-head.mak
326
327# Define the auxiliary programs dependency.
328
329AK=
330
331# Define the compilation rules and flags.
332
333CCFLAGS=$(GENOPT) $(CFLAGS)
334CC_=$(CC) $(CCFLAGS)
335CC_NO_WARN=$(CC_)
336
337# ---------------- End of platform-specific section ---------------- #
338
339include $(GLSRCDIR)/dvx-head.mak
340include $(GLSRCDIR)/gs.mak
341include $(GLSRCDIR)/lib.mak
342include $(PSSRCDIR)/int.mak
343include $(PSSRCDIR)/cfonts.mak
344include $(GLSRCDIR)/jpeg.mak
345# zlib.mak must precede libpng.mak
346include $(GLSRCDIR)/zlib.mak
347include $(GLSRCDIR)/libpng.mak
348include $(GLSRCDIR)/jbig2.mak
349include $(GLSRCDIR)/icclib.mak
350include $(GLSRCDIR)/ijs.mak
351include $(GLSRCDIR)/devs.mak
352include $(GLSRCDIR)/contrib.mak
353include $(GLSRCDIR)/dvx-tail.mak
354include $(GLSRCDIR)/unix-end.mak
355include $(GLSRCDIR)/unixinst.mak
356