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: openvms.mak 8559 2008-02-29 08:13:08Z ray $
14
# makefile for OpenVMS VAX and Alpha
16
# Please contact Jim Dunham (dunham@omtool.com) if you have questions.
17
# Support for VAX C on OpenVMS was removed in release 6.01 by Aladdin:
18
# DEC C is now used on both VAX and Alpha platforms.
20
# ------------------------------- Options ------------------------------- #
22
###### This section is the only part of the file you should need to edit.
24
# on the make command line specify:
25
# make -fopenvms.mak "OPENVMS={VAX,ALPHA}" "DECWINDOWS={1.2,<blank>}"
27
# Define the directory for the final executable, and the
28
# source, generated intermediate file, and object directories
29
# for the graphics library (GL) and the PostScript/PDF interpreter (PS).
30
# NOTE: If you use GNU make, GLGENDIR and PSGENDIR must not be the
31
# current directory ([]).
41
# Because of OpenVMS syntactic problems, the following redundant definitions
42
# are necessary. If you are using more than one GENDIR and/or OBJDIR,
43
# you will have to edit the code below that creates these directories.
47
# Do not edit the next group of lines.
49
#include $(COMMONDIR)/vmscdefs.mak
50
#include $(COMMONDIR)/vmsdefs.mak
51
#include $(COMMONDIR)/generic.mak
52
include $(GLSRCDIR)version.mak
57
# ------ Generic options ------ #
59
# Define the directory that will hold documentation at runtime.
62
#GS_DOCDIR=SYS$COMMON:[GS]
64
# Define the default directory/ies for the runtime
65
# initialization and font files. Separate multiple directories with ,.
67
GS_LIB_DEFAULT=GS_ROOT:[LIB],GS_ROOT:[RESOURCE],GS_ROOT:[FONT]
69
# Define whether or not searching for initialization files should always
70
# look in the current directory first. This leads to well-known security
71
# and confusion problems, but users insist on it.
72
# NOTE: this also affects searching for files named on the command line:
73
# see the "File searching" section of Use.htm for full details.
74
# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
78
# Define the name of the interpreter initialization file.
79
# (There is no reason to change this.)
83
# Choose generic configuration options.
85
# Setting DEBUG=1 includes debugging features in the code
89
# Setting TDEBUG=1 includes symbol table information for the debugger,
90
# and also enables stack tracing on failure.
94
# Setting CDEBUG=1 enables 'C' compiler debugging and turns off optimization
95
# Code is substantially slower and larger.
99
# Define the name of the executable file.
103
# Define the name of a pre-built executable that can be invoked at build
104
# time. Currently, this is only needed for compiled fonts. The usual
106
# - the standard name of Ghostscript on your system (typically `gs'):
108
# - the name of the executable you are building now. If you choose this
109
# option, then you must build the executable first without compiled fonts,
110
# and then again with compiled fonts.
111
#BUILD_TIME_GS=$(BINDIR)$(GS) -I$(PSLIBDIR)
113
# Define the directory where the IJG JPEG library sources are stored,
114
# and the major version of the library that is stored there.
115
# You may need to change this if the IJG library version changes.
116
# See jpeg.mak for more information.
120
# Define the directory where the PNG library sources are stored,
121
# and the version of the library that is stored there.
122
# You may need to change this if the libpng version changes.
123
# See libpng.mak for more information.
127
# Define the directory where the zlib sources are stored.
128
# See zlib.mak for more information.
132
# Define the jbig2 library and source location.
133
# See jbig2.mak for more information.
136
JBIG2SRCDIR=[.jbig2dec]
138
# Define the jpeg2k library and source location.
143
# Define the directory where the icclib source are stored.
144
# See icclib.mak for more information
148
# IJS has not been ported to OpenVMS. If you do the port,
149
# you'll need to set these values. You'll also need to
150
# include the ijs.mak makefile (right after icclib.mak).
152
# Define the directory where the ijs source is stored,
153
# and the process forking method to use for the server.
154
# See ijs.mak for more information.
159
# Define the directory where the imdi source are stored.
160
# See imdi.mak for more information
164
# Note that built-in third-party libraries aren't available.
172
# Define the path to X11 include files
174
X_INCLUDE=DECW$$INCLUDE
176
# ------ Platform-specific options ------ #
178
# Define the drive, directory, and compiler name for the 'C' compiler.
179
# COMP is the full compiler path name.
184
COMP:=$(COMP)/DEBUG/NOOPTIMIZE
186
# This should include /OPTIMIZE, but some OpenVMS compilers have an
187
# optimizer bug that causes them to generate incorrect code for gdevpsfx.c,
188
# so we must disable optimization. (Eventually we will check for the bug
189
# in genarch and enable optimization if it is safe.)
190
#COMP:=$(COMP)/NODEBUG/OPTIMIZE
191
COMP:=$(COMP)/NODEBUG/NOOPTIMIZE
194
COMP:=$(COMP)/DECC/PREFIX=ALL/NESTED_INCLUDE=PRIMARY/NAMES=SHORTENED
196
# Define any other compilation flags.
197
# Including defines for A4 paper size
200
COMP:=$(COMP)/DEFINE=("A4")
203
# LINK is the full linker path name
206
LINKER=LINK/DEBUG/TRACEBACK
208
LINKER=LINK/NODEBUG/NOTRACEBACK
211
# INCDIR contains the include files
214
# LIBDIR contains the library files
217
# Define the .dev module that implements thread and synchronization
218
# primitives for this platform. Don't change this unless you really know
223
# ------ Devices and features ------ #
225
# Choose the device(s) to include. See devs.mak for details,
226
# devs.mak and contrib.mak for the list of available devices.
228
DEVICE_DEVS=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev
231
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
232
DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev $(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev
233
DEVICE_DEVS5=$(DD)uniprint.dev
234
DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev
235
DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev
236
DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev
237
DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev
238
DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
239
DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiffsep.dev
240
DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
241
DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev $(DD)pngalpha.dev
242
DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev $(DD)jpegcmyk.dev
243
DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)ps2write.dev $(DD)epswrite.dev $(DD)txtwrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
244
DEVICE_DEVS16=$(DD)bbox.dev
245
# Overflow from DEVS9
246
DEVICE_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 $(DD)pamcmyk32.dev
252
# Choose the language feature(s) to include. See gs.mak for details.
254
FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(PSD)fapi.dev
256
# Choose whether to compile the .ps initialization files into the executable.
257
# See gs.mak for details.
261
# Choose whether to store band lists on files or in memory.
262
# The choices are 'file' or 'memory'.
264
BAND_LIST_STORAGE=file
266
# Choose which compression method to use when storing band lists in memory.
267
# The choices are 'lzw' or 'zlib'.
269
BAND_LIST_COMPRESSOR=zlib
271
# Choose the implementation of file I/O: 'stdio', 'fd', or 'both'.
272
# See gs.mak and sfxfd.c for more details.
274
FILE_IMPLEMENTATION=stdio
276
# Choose the implementation of stdio: '' for file I/O and 'c' for callouts
277
# See gs.mak and ziodevs.c/ziodevsc.c for more details.
279
STDIO_IMPLEMENTATION=c
281
# Define the platform name.
285
# Define the name of the makefile -- used in dependencies.
287
MAKEFILE=$(GLSRCDIR)openvms.mak
288
TOP_MAKEFILES=$(MAKEFILE)
290
# Define the platform options
294
# It is very unlikely that anyone would want to edit the remaining
295
# symbols, but we describe them here for completeness:
297
# Define the suffix for command files (e.g., null or .bat).
301
# Define the directory separator character (\ for MS-DOS, / for Unix,
302
# nothing for OpenVMS).
306
# Define the brackets for passing preprocessor definitions to the C compiler.
314
# Define the syntax of search paths for the C compiler.
315
# The OpenVMS compilers uses /INCLUDE=(dir1, dir2, ...dirn),
316
# and only a single /INCLUDE switch is allowed in the command line.
322
# Define the string for specifying the output file from the C compiler.
326
# Define the quoting string for mixed-case arguments.
327
# (OpenVMS is the only platform where this isn't an empty string.)
331
# Define the extension for executable files (e.g., null or .exe).
335
# Define the extension for executable files for the auxiliary programs
336
# (e.g., null or .exe).
340
# Define the list of files that `make clean' removes.
342
BEGINFILES=$(GLGENDIR)OPENVMS.OPT $(GLGENDIR)OPENVMS.COM
344
# Define the C invocation for auxiliary programs (echogs, genarch).
348
# Define the C invocation for normal compilation.
352
# Define the Link invocation.
354
LINK=$(LINKER)/EXE=$@ $^,$(GLGENDIR)OPENVMS.OPT/OPTION
356
# Define the auxiliary program dependency. We don't need this.
360
# Define the syntax for command, object, and executable files.
364
# Define the prefix for image invocations.
368
# Define the prefix for shell invocations.
372
# Define generic commands.
374
CP_=$$ @$(GLSRCDIR)COPY_ONE
376
# Define the command for deleting (a) file(s) (including wild cards)
378
RM_=$$ @$(GLSRCDIR)RM_ONE
380
# Define the command for deleting multiple files / patterns.
382
RMN_=$$ @$(GLSRCDIR)RM_ALL
384
# Define the arguments for genconf.
389
# Define the generic compilation rules.
391
..suffixes: .c .obj .exe
396
# ---------------------------- End of options ---------------------------- #
398
# Define the default build rule, so the object directories get created
401
# I wasn't able to find a "do nothing" command in the DCL manual!
403
WRITE SYS$$OUTPUT "Done."
406
$$ If F$$Search("$(BIN_DIR)") .EQS. "" Then Create/Directory/Log $(BINDIR)
407
$$ If F$$Search("$(OBJ_DIR)") .EQS. "" Then Create/Directory/Log $(GLOBJDIR)
409
# ------------------- Include the generic makefiles ---------------------- #
411
#include $(COMMONDIR)/ansidefs.mak
412
#include $(COMMONDIR)/vmsdefs.mak
413
#include $(COMMONDIR)/generic.mak
414
include $(GLSRCDIR)gs.mak
416
# ***********************************************************************************
418
# The following should be kept up to date with src/psromfs.mak -- we can't
419
# use the shared one because of VMS directory syntax strangeness.
421
# This enumeration of the Resource/* directories probably won't work without
422
# code changes to src/mkromfs.c to change the VMS style of directory references
423
# to PostScript style, but we will need this when (if) mkromfs is changed for VMS
425
# ***********************************************************************************
426
# The list of resources to be included in the %rom% file system.
427
# This is in the top makefile since the file descriptors are platform specific
428
RESOURCE_LIST=[Resource.CMap] [Resource.ColorSpace] [Resource.Decoding] [Resource.Fonts] [Resource.ProcSet] [Resource.IdiomSet] [Resource.CIDFont]
430
EXTRA_INIT_FILES= Fontmap cidfmap xlatmap FAPI FCOfontmap-PCLPS2 gs_cet.ps
431
PS_ROMFS_ARGS=-c -d Resource/ $(RESOURCE_LIST) -d lib/ -P $(PSGENDIR) $(GS_INIT) -P $(PSLIBDIR) $(EXTRA_INIT_FILES)
433
include $(GLSRCDIR)lib.mak
434
include $(PSSRCDIR)int.mak
435
include $(PSSRCDIR)cfonts.mak
436
include $(GLSRCDIR)jpeg.mak
437
# zlib.mak must precede libpng.mak
438
include $(GLSRCDIR)zlib.mak
439
include $(GLSRCDIR)libpng.mak
440
include $(GLSRCDIR)jbig2.mak
441
include $(GLSRCDIR)icclib.mak
442
include $(GLSRCDIR)devs.mak
443
include $(GLSRCDIR)contrib.mak
445
# Define various incantations of the 'c' compiler.
452
# ----------------------------- Main program ------------------------------ #
454
$(GS_XE) : openvms $(GLOBJDIR)gs.$(OBJ) $(INT_ALL) $(LIB_ALL)
455
$(LINKER)/EXE=$@ $(GLOBJ)gs.$(OBJ),$(ld_tr)/OPTIONS,$(GLGENDIR)OPENVMS.OPT/OPTION
459
openvms__=$(GLOBJ)gp_getnv.$(OBJ) $(GLOBJ)gp_vms.$(OBJ) $(GLOBJ)gp_stdia.$(OBJ)
460
$(GLGEN)openvms_.dev : $(openvms__) $(GLGEN)nosync.dev
461
$(SETMOD) $(GLGEN)openvms_ $(openvms__) -include $(GLGEN)nosync
463
$(GLOBJ)gp_vms.$(OBJ) : $(GLSRC)gp_vms.c $(string__h) $(memory__h) $(gx_h) $(gp_h) $(gpmisc_h) $(gsstruct_h)
464
$(CC_)/include=($(GLGENDIR),$(GLSRCDIR))/obj=$(GLOBJ)gp_vms.$(OBJ) $(GLSRC)gp_vms.c
466
$(GLOBJ)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.c $(AK) $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h)
467
$(CC_)/obj=$(GLOBJ)gp_stdia.$(OBJ) $(GLSRC)gp_stdia.c
469
# Interpreter AUX programs
471
$(ECHOGS_XE) : $(GLOBJ)echogs.$(OBJ)
472
LINK/EXE=$@ $(GLOBJ)echogs.$(OBJ)
474
$(GLOBJ)echogs.$(OBJ) : $(GLSRC)echogs.c
475
$(CCAUX)/obj=$(GLOBJ)echogs.$(OBJ) $(GLSRC)echogs.c
477
$(GENARCH_XE) : $(GLOBJ)genarch.$(OBJ)
478
LINK/EXE=$@ $(GLOBJ)genarch.$(OBJ)
480
$(GLOBJ)genarch.$(OBJ) : $(GLSRC)genarch.c $(GENARCH_DEPS)
481
$(CCAUX)/obj=$(GLOBJ)genarch.$(OBJ) $(GLSRC)genarch.c
483
$(GENCONF_XE) : $(GLOBJDIR)genconf.$(OBJ)
484
LINK/EXE=$@ $(GLOBJ)genconf.$(OBJ)
486
$(GLOBJ)genconf.$(OBJ) : $(GLSRC)genconf.c $(GENCONF_DEPS)
487
$(CCAUX)/obj=$(GLOBJ)genconf.$(OBJ) $(GLSRC)genconf.c
489
$(GENDEV_XE) : $(GLOBJDIR)gendev.$(OBJ)
490
LINK/EXE=$@ $(GLOBJ)gendev.$(OBJ)
492
$(GLOBJ)gendev.$(OBJ) : $(GLSRC)gendev.c $(GENDEV_DEPS)
493
$(CCAUX)/obj=$(GLOBJ)gendev.$(OBJ) $(GLSRC)gendev.c
495
$(GENHT_XE) : $(GLOBJDIR)genht.$(OBJ)
496
LINK/EXE=$@ $(GLOBJ)genht.$(OBJ)
498
$(GLOBJ)genht.$(OBJ) : $(GLSRC)genht.c $(GENHT_DEPS)
499
$(CCAUX)/obj=$(GLOBJ)genht.$(OBJ) $(GENHT_CFLAGS) $(GLSRC)genht.c
501
$(GENINIT_XE) : $(GLOBJDIR)geninit.$(OBJ)
502
LINK/EXE=$@ $(GLOBJ)geninit.$(OBJ)
504
$(GLOBJ)geninit.$(OBJ) : $(GLSRC)geninit.c $(GENINIT_DEPS)
505
$(CCAUX)/obj=$(GLOBJ)geninit.$(OBJ) $(GLSRC)geninit.c
507
$(GLOBJ)mkromfs.$(OBJ) : $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS)
508
$(CCAUX)/obj=$(GLOBJ)mkromfs.$(OBJ) $(I_)$(GLI_) $(II)$(ZI_)$(_I) $(GLSRC)mkromfs.c
510
MKROMFS_OBJS=$(MKROMFS_ZLIB_OBJS) $(GLOBJ)gp_vms.$(OBJ)
511
$(MKROMFS_XE): $(GLSRC)mkromfs.c $(MKROMFS_OBJS)
512
LINK/EXE=$@ $(GLOBJ)mkromfs.$(OBJ) $(MKROMFS_OBJS)
514
# Preliminary definitions
516
openvms : $(GLGENDIR)openvms.com $(GLGENDIR)openvms.opt
517
$$ @$(GLGENDIR)OPENVMS
519
$(GLGENDIR)openvms.com : $(GLSRCDIR)append_l.com $(GLOBJDIR)gsromfs$(COMPILE_INITS).$(OBJ)
520
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB X11 $(X_INCLUDE)"
521
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB GS_LIB ''F$$ENVIRONMENT(""DEFAULT"")'"
522
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB GS_DOC ''F$$ENVIRONMENT(""DEFAULT"")'"
523
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB DECC$$USER_INCLUDE ''F$$ENVIRONMENT(""DEFAULT"")', DECW$$INCLUDE, DECC$$LIBRARY_INCLUDE, SYS$$LIBRARY"
524
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB DECC$$SYSTEM_INCLUDE ''F$$ENVIRONMENT(""DEFAULT"")', DECW$$INCLUDE, DECC$$LIBRARY_INCLUDE, SYS$$LIBRARY"
525
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB SYS "DECC$$LIBRARY_INCLUDE,SYS$$LIBRARY"
527
$(GLGENDIR)openvms.opt:
528
ifeq "$(DECWINDOWS)" "1.2"
529
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XMLIBSHR12.EXE/SHARE"
530
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XTLIBSHRR5.EXE/SHARE"
531
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XLIBSHR.EXE/SHARE"
533
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XMLIBSHR.EXE/SHARE"
534
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XTSHR.EXE/SHARE"
535
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XLIBSHR.EXE/SHARE"
537
$$ @$(GLSRCDIR)APPEND_L $@ ""Ident="""""GS $(GS_DOT_VERSION)"""""
539
# The platform-specific makefiles must also include rules for creating
540
# certain dynamically generated files:
541
# gconfig_.h - this indicates the presence or absence of
542
# certain system header files that are located in different
543
# places on different systems. (It could be generated by
544
# the GNU `configure' program.)
546
$(gconfig__h) : $(TOP_MAKEFILES) $(ECHOGS_XE)
547
$(EXP)$(ECHOGS_XE) -w $(gconfig__h) -x 23 define "HAVE_SYS_TIME_H"