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 9334 2009-01-08 09:17:18Z ghostgum $
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:[RESOURCE.INIT],GS_ROOT:[LIB],GS_ROOT:[RESOURCE.FONT],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 directory where the IJG JPEG library sources are stored,
104
# and the major version of the library that is stored there.
105
# You may need to change this if the IJG library version changes.
106
# See jpeg.mak for more information.
110
# Define the directory where the PNG library sources are stored,
111
# and the version of the library that is stored there.
112
# You may need to change this if the libpng version changes.
113
# See libpng.mak for more information.
117
# Define the directory where the zlib sources are stored.
118
# See zlib.mak for more information.
122
# Define the jbig2 library and source location.
123
# See jbig2.mak for more information.
126
JBIG2SRCDIR=[.jbig2dec]
128
# Define the jpeg2k library and source location.
133
# Define the directory where the icclib source are stored.
134
# See icclib.mak for more information
138
# IJS has not been ported to OpenVMS. If you do the port,
139
# you'll need to set these values. You'll also need to
140
# include the ijs.mak makefile (right after icclib.mak).
142
# Define the directory where the ijs source is stored,
143
# and the process forking method to use for the server.
144
# See ijs.mak for more information.
149
# Define the directory where the imdi source are stored.
150
# See imdi.mak for more information
154
# Note that built-in third-party libraries aren't available.
162
# Define the path to X11 include files
164
X_INCLUDE=DECW$$INCLUDE
166
# ------ Platform-specific options ------ #
168
# Define the drive, directory, and compiler name for the 'C' compiler.
169
# COMP is the full compiler path name.
174
COMP:=$(COMP)/DEBUG/NOOPTIMIZE
176
# This should include /OPTIMIZE, but some OpenVMS compilers have an
177
# optimizer bug that causes them to generate incorrect code for gdevpsfx.c,
178
# so we must disable optimization. (Eventually we will check for the bug
179
# in genarch and enable optimization if it is safe.)
180
#COMP:=$(COMP)/NODEBUG/OPTIMIZE
181
COMP:=$(COMP)/NODEBUG/NOOPTIMIZE
184
COMP:=$(COMP)/DECC/PREFIX=ALL/NESTED_INCLUDE=PRIMARY/NAMES=SHORTENED
186
# Define any other compilation flags.
187
# Including defines for A4 paper size
190
COMP:=$(COMP)/DEFINE=("A4")
193
# LINK is the full linker path name
196
LINKER=LINK/DEBUG/TRACEBACK
198
LINKER=LINK/NODEBUG/NOTRACEBACK
201
# INCDIR contains the include files
204
# LIBDIR contains the library files
207
# Define the .dev module that implements thread and synchronization
208
# primitives for this platform. Don't change this unless you really know
213
# ------ Devices and features ------ #
215
# Choose the device(s) to include. See devs.mak for details,
216
# devs.mak and contrib.mak for the list of available devices.
218
DEVICE_DEVS=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev
221
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
222
DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev $(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev
223
DEVICE_DEVS5=$(DD)uniprint.dev
224
DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev
225
DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev
226
DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev
227
DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev
228
DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
229
DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiffsep.dev
230
DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
231
DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev $(DD)pngalpha.dev
232
DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev $(DD)jpegcmyk.dev
233
DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)ps2write.dev $(DD)epswrite.dev $(DD)txtwrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
234
DEVICE_DEVS16=$(DD)bbox.dev
235
# Overflow from DEVS9
236
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
242
# Choose the language feature(s) to include. See gs.mak for details.
244
FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(PSD)fapi.dev
246
# Choose whether to compile the .ps initialization files into the executable.
247
# See gs.mak for details.
251
# Choose whether to store band lists on files or in memory.
252
# The choices are 'file' or 'memory'.
254
BAND_LIST_STORAGE=file
256
# Choose which compression method to use when storing band lists in memory.
257
# The choices are 'lzw' or 'zlib'.
259
BAND_LIST_COMPRESSOR=zlib
261
# Choose the implementation of file I/O: 'stdio', 'fd', or 'both'.
262
# See gs.mak and sfxfd.c for more details.
264
FILE_IMPLEMENTATION=stdio
266
# Choose the implementation of stdio: '' for file I/O and 'c' for callouts
267
# See gs.mak and ziodevs.c/ziodevsc.c for more details.
269
STDIO_IMPLEMENTATION=c
271
# Define the platform name.
275
# Define the name of the makefile -- used in dependencies.
277
MAKEFILE=$(GLSRCDIR)openvms.mak
278
TOP_MAKEFILES=$(MAKEFILE)
280
# Define the platform options
284
# It is very unlikely that anyone would want to edit the remaining
285
# symbols, but we describe them here for completeness:
287
# Define the suffix for command files (e.g., null or .bat).
291
# Define the directory separator character (\ for MS-DOS, / for Unix,
292
# nothing for OpenVMS).
296
# Define the brackets for passing preprocessor definitions to the C compiler.
304
# Define the syntax of search paths for the C compiler.
305
# The OpenVMS compilers uses /INCLUDE=(dir1, dir2, ...dirn),
306
# and only a single /INCLUDE switch is allowed in the command line.
312
# Define the string for specifying the output file from the C compiler.
316
# Define the quoting string for mixed-case arguments.
317
# (OpenVMS is the only platform where this isn't an empty string.)
321
# Define the extension for executable files (e.g., null or .exe).
325
# Define the extension for executable files for the auxiliary programs
326
# (e.g., null or .exe).
330
# Define the list of files that `make clean' removes.
332
BEGINFILES=$(GLGENDIR)OPENVMS.OPT $(GLGENDIR)OPENVMS.COM
334
# Define the C invocation for auxiliary programs (echogs, genarch).
338
# Define the C invocation for normal compilation.
342
# Define the Link invocation.
344
LINK=$(LINKER)/EXE=$@ $^,$(GLGENDIR)OPENVMS.OPT/OPTION
346
# Define the auxiliary program dependency. We don't need this.
350
# Define the syntax for command, object, and executable files.
354
# Define the prefix for image invocations.
358
# Define the prefix for shell invocations.
362
# Define generic commands.
364
CP_=$$ @$(GLSRCDIR)COPY_ONE
366
# Define the command for deleting (a) file(s) (including wild cards)
368
RM_=$$ @$(GLSRCDIR)RM_ONE
370
# Define the command for deleting multiple files / patterns.
372
RMN_=$$ @$(GLSRCDIR)RM_ALL
374
# Define the arguments for genconf.
379
# Define the generic compilation rules.
381
..suffixes: .c .obj .exe
386
# ---------------------------- End of options ---------------------------- #
388
# Define the default build rule, so the object directories get created
391
# I wasn't able to find a "do nothing" command in the DCL manual!
393
WRITE SYS$$OUTPUT "Done."
396
$$ If F$$Search("$(BIN_DIR)") .EQS. "" Then Create/Directory/Log $(BINDIR)
397
$$ If F$$Search("$(OBJ_DIR)") .EQS. "" Then Create/Directory/Log $(GLOBJDIR)
399
# ------------------- Include the generic makefiles ---------------------- #
401
#include $(COMMONDIR)/ansidefs.mak
402
#include $(COMMONDIR)/vmsdefs.mak
403
#include $(COMMONDIR)/generic.mak
404
include $(GLSRCDIR)gs.mak
406
# ***********************************************************************************
408
# The following should be kept up to date with src/psromfs.mak -- we can't
409
# use the shared one because of VMS directory syntax strangeness.
411
# This enumeration of the Resource/* directories probably won't work without
412
# code changes to src/mkromfs.c to change the VMS style of directory references
413
# to PostScript style, but we will need this when (if) mkromfs is changed for VMS
415
# ***********************************************************************************
416
# The list of resources to be included in the %rom% file system.
417
# This is in the top makefile since the file descriptors are platform specific
418
RESOURCE_LIST=[Resource.CMap] [Resource.ColorSpace] [Resource.Decoding] [Resource.Fonts] [Resource.ProcSet] [Resource.IdiomSet] [Resource.CIDFont]
420
PS_ROMFS_ARGS=-c -d Resource/ $(RESOURCE_LIST) -d lib/ -P $(PSLIBDIR) $(EXTRA_INIT_FILES)
422
include $(GLSRCDIR)lib.mak
423
include $(PSSRCDIR)int.mak
424
include $(GLSRCDIR)jpeg.mak
425
# zlib.mak must precede libpng.mak
426
include $(GLSRCDIR)zlib.mak
427
include $(GLSRCDIR)libpng.mak
428
include $(GLSRCDIR)jbig2.mak
429
include $(GLSRCDIR)icclib.mak
430
include $(GLSRCDIR)devs.mak
431
include $(GLSRCDIR)contrib.mak
433
# Define various incantations of the 'c' compiler.
440
# ----------------------------- Main program ------------------------------ #
442
$(GS_XE) : openvms $(GLOBJDIR)gs.$(OBJ) $(INT_ALL) $(LIB_ALL)
443
$(LINKER)/EXE=$@ $(GLOBJ)gs.$(OBJ),$(ld_tr)/OPTIONS,$(GLGENDIR)OPENVMS.OPT/OPTION
447
openvms__=$(GLOBJ)gp_getnv.$(OBJ) $(GLOBJ)gp_paper.$(OBJ) $(GLOBJ)gp_vms.$(OBJ) $(GLOBJ)gp_stdia.$(OBJ)
448
$(GLGEN)openvms_.dev : $(openvms__) $(GLGEN)nosync.dev
449
$(SETMOD) $(GLGEN)openvms_ $(openvms__) -include $(GLGEN)nosync
451
$(GLOBJ)gp_vms.$(OBJ) : $(GLSRC)gp_vms.c $(string__h) $(memory__h) $(gx_h) $(gp_h) $(gpmisc_h) $(gsstruct_h)
452
$(CC_)/include=($(GLGENDIR),$(GLSRCDIR))/obj=$(GLOBJ)gp_vms.$(OBJ) $(GLSRC)gp_vms.c
454
$(GLOBJ)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.c $(AK) $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h)
455
$(CC_)/obj=$(GLOBJ)gp_stdia.$(OBJ) $(GLSRC)gp_stdia.c
457
# Interpreter AUX programs
459
$(ECHOGS_XE) : $(GLOBJ)echogs.$(OBJ)
460
LINK/EXE=$@ $(GLOBJ)echogs.$(OBJ)
462
$(GLOBJ)echogs.$(OBJ) : $(GLSRC)echogs.c
463
$(CCAUX)/obj=$(GLOBJ)echogs.$(OBJ) $(GLSRC)echogs.c
465
$(GENARCH_XE) : $(GLOBJ)genarch.$(OBJ)
466
LINK/EXE=$@ $(GLOBJ)genarch.$(OBJ)
468
$(GLOBJ)genarch.$(OBJ) : $(GLSRC)genarch.c $(GENARCH_DEPS)
469
$(CCAUX)/obj=$(GLOBJ)genarch.$(OBJ) $(GLSRC)genarch.c
471
$(GENCONF_XE) : $(GLOBJDIR)genconf.$(OBJ)
472
LINK/EXE=$@ $(GLOBJ)genconf.$(OBJ)
474
$(GLOBJ)genconf.$(OBJ) : $(GLSRC)genconf.c $(GENCONF_DEPS)
475
$(CCAUX)/obj=$(GLOBJ)genconf.$(OBJ) $(GLSRC)genconf.c
477
$(GENDEV_XE) : $(GLOBJDIR)gendev.$(OBJ)
478
LINK/EXE=$@ $(GLOBJ)gendev.$(OBJ)
480
$(GLOBJ)gendev.$(OBJ) : $(GLSRC)gendev.c $(GENDEV_DEPS)
481
$(CCAUX)/obj=$(GLOBJ)gendev.$(OBJ) $(GLSRC)gendev.c
483
$(GENHT_XE) : $(GLOBJDIR)genht.$(OBJ)
484
LINK/EXE=$@ $(GLOBJ)genht.$(OBJ)
486
$(GLOBJ)genht.$(OBJ) : $(GLSRC)genht.c $(GENHT_DEPS)
487
$(CCAUX)/obj=$(GLOBJ)genht.$(OBJ) $(GENHT_CFLAGS) $(GLSRC)genht.c
489
$(GENINIT_XE) : $(GLOBJDIR)geninit.$(OBJ)
490
LINK/EXE=$@ $(GLOBJ)geninit.$(OBJ)
492
$(GLOBJ)geninit.$(OBJ) : $(GLSRC)geninit.c $(GENINIT_DEPS)
493
$(CCAUX)/obj=$(GLOBJ)geninit.$(OBJ) $(GLSRC)geninit.c
495
$(GLOBJ)mkromfs.$(OBJ) : $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS)
496
$(CCAUX)/obj=$(GLOBJ)mkromfs.$(OBJ) $(I_)$(GLI_) $(II)$(ZI_)$(_I) $(GLSRC)mkromfs.c
498
MKROMFS_OBJS=$(MKROMFS_ZLIB_OBJS) $(GLOBJ)gp_vms.$(OBJ)
499
$(MKROMFS_XE): $(GLSRC)mkromfs.c $(MKROMFS_OBJS)
500
LINK/EXE=$@ $(GLOBJ)mkromfs.$(OBJ) $(MKROMFS_OBJS)
502
# Preliminary definitions
504
openvms : $(GLGENDIR)openvms.com $(GLGENDIR)openvms.opt
505
$$ @$(GLGENDIR)OPENVMS
507
$(GLGENDIR)openvms.com : $(GLSRCDIR)append_l.com $(GLOBJDIR)gsromfs$(COMPILE_INITS).$(OBJ)
508
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB X11 $(X_INCLUDE)"
509
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB GS_LIB ''F$$ENVIRONMENT(""DEFAULT"")'"
510
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB GS_DOC ''F$$ENVIRONMENT(""DEFAULT"")'"
511
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB DECC$$USER_INCLUDE ''F$$ENVIRONMENT(""DEFAULT"")', DECW$$INCLUDE, DECC$$LIBRARY_INCLUDE, SYS$$LIBRARY"
512
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB DECC$$SYSTEM_INCLUDE ''F$$ENVIRONMENT(""DEFAULT"")', DECW$$INCLUDE, DECC$$LIBRARY_INCLUDE, SYS$$LIBRARY"
513
$$ @$(GLSRCDIR)APPEND_L $@ "$$ DEFINE/JOB SYS "DECC$$LIBRARY_INCLUDE,SYS$$LIBRARY"
515
$(GLGENDIR)openvms.opt:
516
ifeq "$(DECWINDOWS)" "1.2"
517
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XMLIBSHR12.EXE/SHARE"
518
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XTLIBSHRR5.EXE/SHARE"
519
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XLIBSHR.EXE/SHARE"
521
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XMLIBSHR.EXE/SHARE"
522
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XTSHR.EXE/SHARE"
523
$$ @$(GLSRCDIR)APPEND_L $@ "SYS$$SHARE:DECW$$XLIBSHR.EXE/SHARE"
525
$$ @$(GLSRCDIR)APPEND_L $@ ""Ident="""""GS $(GS_DOT_VERSION)"""""
527
# The platform-specific makefiles must also include rules for creating
528
# certain dynamically generated files:
529
# gconfig_.h - this indicates the presence or absence of
530
# certain system header files that are located in different
531
# places on different systems. (It could be generated by
532
# the GNU `configure' program.)
534
$(gconfig__h) : $(TOP_MAKEFILES) $(ECHOGS_XE)
535
$(EXP)$(ECHOGS_XE) -w $(gconfig__h) -x 23 define "HAVE_SYS_TIME_H"