blob: d0f4909c4b0c8fec5f298640ed5f87eccd1b0edd [file] [log] [blame]
Alexei Podtelezhnikov22a7f5b2017-09-07 22:36:02 -04001$! make FreeType 2 under OpenVMS
Werner Lemberg282637f2003-05-21 07:39:42 +00002$!
Werner Lemberge5038be2020-01-19 17:05:19 +01003$! Copyright (C) 2003-2020 by
Werner Lemberg60a04df2005-06-04 23:04:30 +00004$! David Turner, Robert Wilhelm, and Werner Lemberg.
5$!
6$! This file is part of the FreeType project, and may only be used, modified,
7$! and distributed under the terms of the FreeType project license,
8$! LICENSE.TXT. By continuing to use, modify, or distribute this file you
9$! indicate that you have read the license and understand and accept it
10$! fully.
11$!
12$!
Alexei Podtelezhnikov22a7f5b2017-09-07 22:36:02 -040013$! External libraries (like FreeType, XPM, etc.) are supported via the
Werner Lembergbbdee282004-11-17 08:19:27 +000014$! config file VMSLIB.DAT. Please check the sample file, which is part of this
15$! distribution, for the information you need to provide
Werner Lemberg282637f2003-05-21 07:39:42 +000016$!
17$! This procedure currently does support the following commandline options
David Turner26bb2e22006-09-27 07:58:43 +000018$! in arbitrary order
Werner Lemberg282637f2003-05-21 07:39:42 +000019$!
David Turner26bb2e22006-09-27 07:58:43 +000020$! * DEBUG - Compile modules with /noopt/debug and link shareable image
Werner Lemberg282637f2003-05-21 07:39:42 +000021$! with /debug
22$! * LOPTS - Options to be passed to the link command
23$! * CCOPT - Options to be passed to the C compiler
Werner Lemberg282637f2003-05-21 07:39:42 +000024$!
Werner Lembergbbdee282004-11-17 08:19:27 +000025$! In case of problems with the install you might contact me at
Werner Lemberg3e587792015-03-11 07:14:15 +010026$! zinser@zinser.no-ip.info (preferred) or
Werner Lembergbbdee282004-11-17 08:19:27 +000027$! zinser@sysdev.deutsche-boerse.com (work)
28$!
Alexei Podtelezhnikov22a7f5b2017-09-07 22:36:02 -040029$! Make procedure history for FreeType 2
David Turner26bb2e22006-09-27 07:58:43 +000030$!
Werner Lembergbbdee282004-11-17 08:19:27 +000031$!------------------------------------------------------------------------------
32$! Version history
33$! 0.01 20040401 First version to receive a number
Alexei Podtelezhnikov22a7f5b2017-09-07 22:36:02 -040034$! 0.02 20041030 Add error handling, FreeType 2.1.9
David Turner26bb2e22006-09-27 07:58:43 +000035$!
Werner Lembergbbdee282004-11-17 08:19:27 +000036$ on error then goto err_exit
37$ true = 1
38$ false = 0
39$ tmpnam = "temp_" + f$getjpi("","pid")
40$ tt = tmpnam + ".txt"
41$ tc = tmpnam + ".c"
42$ th = tmpnam + ".h"
43$ its_decc = false
44$ its_vaxc = false
45$ its_gnuc = false
Werner Lemberg282637f2003-05-21 07:39:42 +000046$!
47$! Setup variables holding "config" information
48$!
Werner Lembergbbdee282004-11-17 08:19:27 +000049$ Make = ""
Werner Lemberg787db7c2019-05-13 22:22:57 +020050$ ccopt = "/name=(as_is,short)/float=ieee"
Werner Lembergbbdee282004-11-17 08:19:27 +000051$ lopts = ""
52$ dnsrl = ""
53$ aconf_in_file = "config.hin"
Werner Lemberg282637f2003-05-21 07:39:42 +000054$ name = "Freetype2"
Werner Lemberg65e49252019-05-02 07:21:34 +020055$ mapfile = name + ".map"
56$ optfile = name + ".opt"
Werner Lemberg282637f2003-05-21 07:39:42 +000057$ s_case = false
Werner Lemberg282637f2003-05-21 07:39:42 +000058$ liblist = ""
Werner Lembergbbdee282004-11-17 08:19:27 +000059$!
Werner Lembergfe334082007-02-12 14:35:15 +000060$ whoami = f$parse(f$environment("Procedure"),,,,"NO_CONCEAL")
Werner Lembergbbdee282004-11-17 08:19:27 +000061$ mydef = F$parse(whoami,,,"DEVICE")
62$ mydir = f$parse(whoami,,,"DIRECTORY") - "]["
63$ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type")
Werner Lemberg282637f2003-05-21 07:39:42 +000064$!
65$! Check for MMK/MMS
66$!
67$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
68$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
69$!
70$! Which command parameters were given
71$!
72$ gosub check_opts
73$!
74$! Create option file
75$!
76$ open/write optf 'optfile'
77$!
78$! Pull in external libraries
79$!
Werner Lemberg26fb1bc2003-05-28 06:27:26 +000080$ create libs.opt
Werner Lemberg71e5a592004-11-27 08:18:10 +000081$ open/write libsf libs.opt
Werner Lemberg282637f2003-05-21 07:39:42 +000082$ gosub check_create_vmslib
83$!
84$! Create objects
85$!
David Turner26bb2e22006-09-27 07:58:43 +000086$ if libdefs .nes. ""
87$ then
Werner Lembergbbdee282004-11-17 08:19:27 +000088$ ccopt = ccopt + "/define=(" + f$extract(0,f$length(libdefs)-1,libdefs) + ")"
89$ endif
Werner Lemberg282637f2003-05-21 07:39:42 +000090$!
David Turner26bb2e22006-09-27 07:58:43 +000091$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) -
Werner Lemberg282637f2003-05-21 07:39:42 +000092 then s_case = true
93$ gosub crea_mms
94$!
95$ 'Make' /macro=(comp_flags="''ccopt'")
Werner Lemberg282637f2003-05-21 07:39:42 +000096$ purge/nolog [...]descrip.mms
97$!
98$! Add them to options
99$!
100$FLOOP:
101$ file = f$edit(f$search("[...]*.obj"),"UPCASE")
102$ if (file .nes. "")
103$ then
104$ if f$locate("DEMOS",file) .eqs. f$length(file) then write optf file
105$ goto floop
David Turner26bb2e22006-09-27 07:58:43 +0000106$ endif
Werner Lemberg282637f2003-05-21 07:39:42 +0000107$!
Werner Lemberg282637f2003-05-21 07:39:42 +0000108$ close optf
109$!
110$!
111$! Alpha gets a shareable image
112$!
113$ If f$getsyi("HW_MODEL") .gt. 1024
114$ Then
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000115$ write sys$output "Creating freetype2shr.exe"
Werner Lemberg787db7c2019-05-13 22:22:57 +0200116$ If f$getsyi("HW_MODEL") .le. 2048
117$ Then
118$ call anal_obj_axp 'optfile' _link.opt
119$ Else
120$ copy _link.opt_ia64 _link.opt
121$ close libsf
122$ copy libs.opt_ia64 libs.opt
123$ endif
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000124$ open/append optf 'optfile'
125$ if s_case then WRITE optf "case_sensitive=YES"
126$ close optf
David Turner26bb2e22006-09-27 07:58:43 +0000127$ LINK_/NODEB/SHARE=[.lib]freetype2shr.exe -
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000128 'optfile'/opt,libs.opt/opt,_link.opt/opt
Werner Lemberg282637f2003-05-21 07:39:42 +0000129$ endif
130$!
131$ exit
132$!
Werner Lembergbbdee282004-11-17 08:19:27 +0000133$
134$ERR_LIB:
135$ write sys$output "Error reading config file vmslib.dat"
136$ goto err_exit
137$FT2_ERR:
Alexei Podtelezhnikov22a7f5b2017-09-07 22:36:02 -0400138$ write sys$output "Could not locate FreeType 2 include files"
Werner Lembergbbdee282004-11-17 08:19:27 +0000139$ goto err_exit
140$ERR_EXIT:
141$ set message/facil/ident/sever/text
142$ close/nolog optf
143$ close/nolog out
144$ close/nolog libdata
145$ close/nolog in
146$ close/nolog atmp
147$ close/nolog xtmp
148$ write sys$output "Exiting..."
149$ exit 2
150$!
Werner Lemberg282637f2003-05-21 07:39:42 +0000151$!------------------------------------------------------------------------------
152$!
David Turner26bb2e22006-09-27 07:58:43 +0000153$! If MMS/MMK are available dump out the descrip.mms if required
Werner Lemberg282637f2003-05-21 07:39:42 +0000154$!
155$CREA_MMS:
156$ write sys$output "Creating descrip.mms files ..."
157$ write sys$output "... Main directory"
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000158$ create descrip.mms
159$ open/append out descrip.mms
160$ copy sys$input: out
Werner Lemberg282637f2003-05-21 07:39:42 +0000161$ deck
162#
163# FreeType 2 build system -- top-level Makefile for OpenVMS
164#
165
166
Werner Lemberg65e49252019-05-02 07:21:34 +0200167# Copyright 2001-2019 by
Werner Lemberg282637f2003-05-21 07:39:42 +0000168# David Turner, Robert Wilhelm, and Werner Lemberg.
169#
170# This file is part of the FreeType project, and may only be used, modified,
171# and distributed under the terms of the FreeType project license,
172# LICENSE.TXT. By continuing to use, modify, or distribute this file you
173# indicate that you have read the license and understand and accept it
174# fully.
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000175$ EOD
176$ write out "CFLAGS = ", ccopt
177$ copy sys$input: out
178$ deck
David Turner26bb2e22006-09-27 07:58:43 +0000179
Werner Lemberg282637f2003-05-21 07:39:42 +0000180
181all :
Werner Lemberg787db7c2019-05-13 22:22:57 +0200182 define config [--.include.freetype.config]
183 define internal [--.include.freetype.internal]
David Turner26bb2e22006-09-27 07:58:43 +0000184 define autofit [-.autofit]
David Turner26bb2e22006-09-27 07:58:43 +0000185 define base [-.base]
186 define cache [-.cache]
187 define cff [-.cff]
188 define cid [-.cid]
Werner Lemberg787db7c2019-05-13 22:22:57 +0200189 define freetype [--.include.freetype]
David Turner26bb2e22006-09-27 07:58:43 +0000190 define pcf [-.pcf]
Werner Lemberg65e49252019-05-02 07:21:34 +0200191 define psaux [-.psaux]
David Turner26bb2e22006-09-27 07:58:43 +0000192 define psnames [-.psnames]
193 define raster [-.raster]
194 define sfnt [-.sfnt]
195 define smooth [-.smooth]
196 define truetype [-.truetype]
197 define type1 [-.type1]
198 define winfonts [-.winfonts]
Werner Lemberg282637f2003-05-21 07:39:42 +0000199 if f$search("lib.dir") .eqs. "" then create/directory [.lib]
200 set default [.builds.vms]
201 $(MMS)$(MMSQUALIFIERS)
Werner Lemberg787db7c2019-05-13 22:22:57 +0200202 set default [--.src.autofit]
Werner Lemberg282637f2003-05-21 07:39:42 +0000203 $(MMS)$(MMSQUALIFIERS)
204 set default [-.base]
205 $(MMS)$(MMSQUALIFIERS)
206 set default [-.bdf]
207 $(MMS)$(MMSQUALIFIERS)
208 set default [-.cache]
209 $(MMS)$(MMSQUALIFIERS)
210 set default [-.cff]
211 $(MMS)$(MMSQUALIFIERS)
212 set default [-.cid]
213 $(MMS)$(MMSQUALIFIERS)
Werner Lemberg65e49252019-05-02 07:21:34 +0200214 set default [-.gxvalid]
215 $(MMS)$(MMSQUALIFIERS)
Werner Lemberg282637f2003-05-21 07:39:42 +0000216 set default [-.gzip]
217 $(MMS)$(MMSQUALIFIERS)
Werner Lemberg787db7c2019-05-13 22:22:57 +0200218 set default [-.bzip2]
219 $(MMS)$(MMSQUALIFIERS)
Werner Lembergdfa46192004-03-05 09:26:24 +0000220 set default [-.lzw]
221 $(MMS)$(MMSQUALIFIERS)
Werner Lemberg71e5a592004-11-27 08:18:10 +0000222 set default [-.otvalid]
223 $(MMS)$(MMSQUALIFIERS)
Werner Lemberg282637f2003-05-21 07:39:42 +0000224 set default [-.pcf]
225 $(MMS)$(MMSQUALIFIERS)
226 set default [-.pfr]
227 $(MMS)$(MMSQUALIFIERS)
228 set default [-.psaux]
229 $(MMS)$(MMSQUALIFIERS)
230 set default [-.pshinter]
231 $(MMS)$(MMSQUALIFIERS)
232 set default [-.psnames]
233 $(MMS)$(MMSQUALIFIERS)
234 set default [-.raster]
235 $(MMS)$(MMSQUALIFIERS)
236 set default [-.sfnt]
237 $(MMS)$(MMSQUALIFIERS)
238 set default [-.smooth]
239 $(MMS)$(MMSQUALIFIERS)
240 set default [-.truetype]
241 $(MMS)$(MMSQUALIFIERS)
242 set default [-.type1]
243 $(MMS)$(MMSQUALIFIERS)
244 set default [-.type42]
245 $(MMS)$(MMSQUALIFIERS)
246 set default [-.winfonts]
247 $(MMS)$(MMSQUALIFIERS)
248 set default [--]
249
250# EOF
251$ eod
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000252$ close out
253$ write sys$output "... [.builds.vms] directory"
254$ create [.builds.vms]descrip.mms
255$ open/append out [.builds.vms]descrip.mms
256$ copy sys$input: out
257$ deck
258#
259# FreeType 2 system rules for VMS
260#
261
262
Werner Lemberg65e49252019-05-02 07:21:34 +0200263# Copyright 2001-2019 by
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000264# David Turner, Robert Wilhelm, and Werner Lemberg.
265#
266# This file is part of the FreeType project, and may only be used, modified,
267# and distributed under the terms of the FreeType project license,
268# LICENSE.TXT. By continuing to use, modify, or distribute this file you
269# indicate that you have read the license and understand and accept it
270# fully.
271
272
Werner Lemberg787db7c2019-05-13 22:22:57 +0200273CFLAGS=$(COMP_FLAGS)$(DEBUG)/list/show=all/include=([],[--.include],[--.src.base])
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000274
275OBJS=ftsystem.obj
276
277all : $(OBJS)
278 library/create [--.lib]freetype.olb $(OBJS)
279
280ftsystem.obj : ftsystem.c ftconfig.h
281
282# EOF
283$ eod
284$ close out
Werner Lembergbbdee282004-11-17 08:19:27 +0000285$ write sys$output "... [.src.autofit] directory"
286$ create [.src.autofit]descrip.mms
287$ open/append out [.src.autofit]descrip.mms
288$ copy sys$input: out
289$ deck
290#
291# FreeType 2 auto-fit module compilation rules for VMS
292#
293
294
Werner Lemberg65e49252019-05-02 07:21:34 +0200295# Copyright 2002-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000296# David Turner, Robert Wilhelm, and Werner Lemberg.
297#
298# This file is part of the FreeType project, and may only be used, modified,
299# and distributed under the terms of the FreeType project license,
300# LICENSE.TXT. By continuing to use, modify, or distribute this file you
301# indicate that you have read the license and understand and accept it
302# fully.
303
304CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.autofit])
305
Werner Lemberg65e49252019-05-02 07:21:34 +0200306OBJS=autofit.obj
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000307
308all : $(OBJS)
309 library [--.lib]freetype.olb $(OBJS)
310
311# EOF
312$ eod
313$ close out
Werner Lembergbbdee282004-11-17 08:19:27 +0000314$ write sys$output "... [.src.base] directory"
315$ create [.src.base]descrip.mms
316$ open/append out [.src.base]descrip.mms
317$ copy sys$input: out
318$ deck
319#
320# FreeType 2 base layer compilation rules for VMS
321#
322
323
Werner Lemberg65e49252019-05-02 07:21:34 +0200324# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000325# David Turner, Robert Wilhelm, and Werner Lemberg.
326#
327# This file is part of the FreeType project, and may only be used, modified,
328# and distributed under the terms of the FreeType project license,
329# LICENSE.TXT. By continuing to use, modify, or distribute this file you
330# indicate that you have read the license and understand and accept it
331# fully.
332
333
334CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.builds.vms],[--.include],[--.src.base])
335
Werner Lemberg65e49252019-05-02 07:21:34 +0200336OBJS=ftbase.obj,\
337 ftbbox.obj,\
338 ftbdf.obj,\
339 ftbitmap.obj,\
340 ftcid.obj,\
341 ftdebug.obj,\
342 ftfstype.obj,\
343 ftgasp.obj,\
344 ftglyph.obj,\
345 ftinit.obj,\
346 ftmm.obj,\
347 ftpfr.obj,\
348 ftstroke.obj,\
349 ftsynth.obj,\
350 fttype1.obj,\
351 ftwinfnt.obj
Werner Lembergbbdee282004-11-17 08:19:27 +0000352
353all : $(OBJS)
354 library [--.lib]freetype.olb $(OBJS)
355
356# EOF
357$ eod
358$ close out
359$ write sys$output "... [.src.bdf] directory"
360$ create [.src.bdf]descrip.mms
361$ open/append out [.src.bdf]descrip.mms
362$ copy sys$input: out
363$ deck
364#
365# FreeType 2 BDF driver compilation rules for VMS
366#
367
368
Werner Lemberg65e49252019-05-02 07:21:34 +0200369# Copyright 2002-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000370# David Turner, Robert Wilhelm, and Werner Lemberg.
371#
372# This file is part of the FreeType project, and may only be used, modified,
373# and distributed under the terms of the FreeType project license,
374# LICENSE.TXT. By continuing to use, modify, or distribute this file you
375# indicate that you have read the license and understand and accept it
376# fully.
377
378
379CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.bdf])
380
381OBJS=bdf.obj
382
383all : $(OBJS)
384 library [--.lib]freetype.olb $(OBJS)
385
386# EOF
387$ eod
388$ close out
389$ write sys$output "... [.src.cache] directory"
390$ create [.src.cache]descrip.mms
391$ open/append out [.src.cache]descrip.mms
392$ copy sys$input: out
393$ deck
394#
395# FreeType 2 Cache compilation rules for VMS
396#
397
398
Werner Lemberg65e49252019-05-02 07:21:34 +0200399# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000400# David Turner, Robert Wilhelm, and Werner Lemberg.
401#
402# This file is part of the FreeType project, and may only be used, modified,
403# and distributed under the terms of the FreeType project license,
404# LICENSE.TXT. By continuing to use, modify, or distribute this file you
405# indicate that you have read the license and understand and accept it
406# fully.
407
408
Werner Lemberg787db7c2019-05-13 22:22:57 +0200409CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cache])/nowarn
Werner Lembergbbdee282004-11-17 08:19:27 +0000410
411OBJS=ftcache.obj
412
413all : $(OBJS)
414 library [--.lib]freetype.olb $(OBJS)
415
Werner Lembergbbdee282004-11-17 08:19:27 +0000416# EOF
417$ eod
418$ close out
419$ write sys$output "... [.src.cff] directory"
420$ create [.src.cff]descrip.mms
421$ open/append out [.src.cff]descrip.mms
422$ copy sys$input: out
423$ deck
424#
425# FreeType 2 OpenType/CFF driver compilation rules for VMS
426#
427
428
Werner Lemberg65e49252019-05-02 07:21:34 +0200429# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000430# David Turner, Robert Wilhelm, and Werner Lemberg.
431#
432# This file is part of the FreeType project, and may only be used, modified,
433# and distributed under the terms of the FreeType project license,
434# LICENSE.TXT. By continuing to use, modify, or distribute this file you
435# indicate that you have read the license and understand and accept it
436# fully.
437
438
439CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cff])
440
441OBJS=cff.obj
442
443all : $(OBJS)
444 library [--.lib]freetype.olb $(OBJS)
445
446# EOF
447$ eod
448$ close out
449$ write sys$output "... [.src.cid] directory"
450$ create [.src.cid]descrip.mms
451$ open/append out [.src.cid]descrip.mms
452$ copy sys$input: out
453$ deck
454#
455# FreeType 2 CID driver compilation rules for VMS
456#
457
458
Werner Lemberg65e49252019-05-02 07:21:34 +0200459# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000460# David Turner, Robert Wilhelm, and Werner Lemberg.
461#
462# This file is part of the FreeType project, and may only be used, modified,
463# and distributed under the terms of the FreeType project license,
464# LICENSE.TXT. By continuing to use, modify, or distribute this file you
465# indicate that you have read the license and understand and accept it
466# fully.
467
468
469CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cid])
470
471OBJS=type1cid.obj
472
473all : $(OBJS)
474 library [--.lib]freetype.olb $(OBJS)
475
476# EOF
477$ eod
478$ close out
Werner Lemberg65e49252019-05-02 07:21:34 +0200479$ write sys$output "... [.src.gxvalid] directory"
480$ create [.src.gxvalid]descrip.mms
481$ open/append out [.src.gxvalid]descrip.mms
482$ copy sys$input: out
483$ deck
484#
485# FreeType 2 TrueTypeGX/AAT validation driver configuration rules for VMS
486#
487
488
489# Copyright 2004-2019 by
490# David Turner, Robert Wilhelm, and Werner Lemberg.
491#
492# This file is part of the FreeType project, and may only be used, modified,
493# and distributed under the terms of the FreeType project license,
494# LICENSE.TXT. By continuing to use, modify, or distribute this file you
495# indicate that you have read the license and understand and accept it
496# fully.
497
498
499CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.gxvalid])
500
501OBJS=gxvalid.obj
502
503all : $(OBJS)
504 library [--.lib]freetype.olb $(OBJS)
505
506# EOF
507$ eod
508$ close out
Werner Lemberg282637f2003-05-21 07:39:42 +0000509$ write sys$output "... [.src.gzip] directory"
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000510$ create [.src.gzip]descrip.mms
511$ open/append out [.src.gzip]descrip.mms
512$ copy sys$input: out
Werner Lemberg282637f2003-05-21 07:39:42 +0000513$ deck
514#
515# FreeType 2 GZip support compilation rules for VMS
516#
517
518
Werner Lemberg65e49252019-05-02 07:21:34 +0200519# Copyright 2002-2019 by
Werner Lemberg282637f2003-05-21 07:39:42 +0000520# David Turner, Robert Wilhelm, and Werner Lemberg.
521#
522# This file is part of the FreeType project, and may only be used, modified,
523# and distributed under the terms of the FreeType project license,
524# LICENSE.TXT. By continuing to use, modify, or distribute this file you
525# indicate that you have read the license and understand and accept it
526# fully.
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000527$EOD
Werner Lembergbbdee282004-11-17 08:19:27 +0000528$ if libincs .nes. "" then write out "LIBINCS = ", libincs - ",", ","
529$ write out "COMP_FLAGS = ", ccopt
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000530$ copy sys$input: out
531$ deck
Werner Lemberg282637f2003-05-21 07:39:42 +0000532
533CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.gzip])
534
535OBJS=ftgzip.obj
536
537all : $(OBJS)
538 library [--.lib]freetype.olb $(OBJS)
539
540# EOF
541$ eod
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000542$ close out
Werner Lemberg787db7c2019-05-13 22:22:57 +0200543$ write sys$output "... [.src.bzip2] directory"
544$ create [.src.bzip2]descrip.mms
545$ open/append out [.src.bzip2]descrip.mms
546$ copy sys$input: out
547$ deck
548#
549# FreeType 2 BZIP2 support compilation rules for VMS
550#
551
552
553# Copyright 2010-2019 by
554# Joel Klinghed.
555#
556# based on `src/lzw/rules.mk'
557#
558# This file is part of the FreeType project, and may only be used, modified,
559# and distributed under the terms of the FreeType project license,
560# LICENSE.TXT. By continuing to use, modify, or distribute this file you
561# indicate that you have read the license and understand and accept it
562# fully.
563$EOD
564$ if libincs .nes. "" then write out "LIBINCS = ", libincs - ",", ","
565$ write out "COMP_FLAGS = ", ccopt
566$ copy sys$input: out
567$ deck
568
569CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.bzip2])
570
571OBJS=ftbzip2.obj
572
573all : $(OBJS)
574 library [--.lib]freetype.olb $(OBJS)
575
576# EOF
577$ eod
578$ close out
Werner Lembergdfa46192004-03-05 09:26:24 +0000579$ write sys$output "... [.src.lzw] directory"
580$ create [.src.lzw]descrip.mms
581$ open/append out [.src.lzw]descrip.mms
582$ copy sys$input: out
583$ deck
584#
585# FreeType 2 LZW support compilation rules for VMS
586#
587
588
Werner Lemberg65e49252019-05-02 07:21:34 +0200589# Copyright 2004-2019 by
Werner Lembergdfa46192004-03-05 09:26:24 +0000590# David Turner, Robert Wilhelm, and Werner Lemberg.
591#
592# This file is part of the FreeType project, and may only be used, modified,
593# and distributed under the terms of the FreeType project license,
594# LICENSE.TXT. By continuing to use, modify, or distribute this file you
595# indicate that you have read the license and understand and accept it
596# fully.
597$EOD
Werner Lembergbbdee282004-11-17 08:19:27 +0000598$ if libincs .nes. "" then write out "LIBINCS = ", libincs - ",", ","
599$ write out "COMP_FLAGS = ", ccopt
Werner Lembergdfa46192004-03-05 09:26:24 +0000600$ copy sys$input: out
601$ deck
602
603CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.lzw])
604
605OBJS=ftlzw.obj
606
607all : $(OBJS)
608 library [--.lib]freetype.olb $(OBJS)
609
610# EOF
611$ eod
612$ close out
Werner Lemberg71e5a592004-11-27 08:18:10 +0000613$ write sys$output "... [.src.otvalid] directory"
614$ create [.src.otvalid]descrip.mms
615$ open/append out [.src.otvalid]descrip.mms
616$ copy sys$input: out
617$ deck
618#
619# FreeType 2 OpenType validation module compilation rules for VMS
620#
621
622
Werner Lemberg65e49252019-05-02 07:21:34 +0200623# Copyright 2004-2019 by
Werner Lemberg71e5a592004-11-27 08:18:10 +0000624# David Turner, Robert Wilhelm, and Werner Lemberg.
625#
626# This file is part of the FreeType project, and may only be used, modified,
627# and distributed under the terms of the FreeType project license,
628# LICENSE.TXT. By continuing to use, modify, or distribute this file you
629# indicate that you have read the license and understand and accept it
630# fully.
631
632
633CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.otvalid])
634
635OBJS=otvalid.obj
636
637all : $(OBJS)
638 library [--.lib]freetype.olb $(OBJS)
639
640# EOF
641$ eod
642$ close out
Werner Lembergbbdee282004-11-17 08:19:27 +0000643$ write sys$output "... [.src.pcf] directory"
644$ create [.src.pcf]descrip.mms
645$ open/append out [.src.pcf]descrip.mms
646$ copy sys$input: out
647$ deck
648#
649# FreeType 2 pcf driver compilation rules for VMS
650#
651
652
653# Copyright (C) 2001, 2002 by
654# Francesco Zappa Nardelli
655#
656# Permission is hereby granted, free of charge, to any person obtaining a copy
657# of this software and associated documentation files (the "Software"), to deal
658# in the Software without restriction, including without limitation the rights
659# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
660# copies of the Software, and to permit persons to whom the Software is
661# furnished to do so, subject to the following conditions:
662#
663# The above copyright notice and this permission notice shall be included in
664# all copies or substantial portions of the Software.
665#
666# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
667# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
668# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
669# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
670# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
671# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
672# THE SOFTWARE.
673
674
675CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.pcf])
676
677OBJS=pcf.obj
678
679all : $(OBJS)
680 library [--.lib]freetype.olb $(OBJS)
681
682# EOF
683$ eod
684$ close out
685$ write sys$output "... [.src.pfr] directory"
686$ create [.src.pfr]descrip.mms
687$ open/append out [.src.pfr]descrip.mms
688$ copy sys$input: out
689$ deck
690#
691# FreeType 2 PFR driver compilation rules for VMS
692#
693
694
Werner Lemberg65e49252019-05-02 07:21:34 +0200695# Copyright 2002-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000696# David Turner, Robert Wilhelm, and Werner Lemberg.
697#
698# This file is part of the FreeType project, and may only be used, modified,
699# and distributed under the terms of the FreeType project license,
700# LICENSE.TXT. By continuing to use, modify, or distribute this file you
701# indicate that you have read the license and understand and accept it
702# fully.
703
704
705CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.pfr])
706
707OBJS=pfr.obj
708
709all : $(OBJS)
710 library [--.lib]freetype.olb $(OBJS)
711
712# EOF
713$ eod
714$ close out
715$ write sys$output "... [.src.psaux] directory"
716$ create [.src.psaux]descrip.mms
717$ open/append out [.src.psaux]descrip.mms
718$ copy sys$input: out
719$ deck
720#
721# FreeType 2 PSaux driver compilation rules for VMS
722#
723
724
Werner Lemberg65e49252019-05-02 07:21:34 +0200725# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000726# David Turner, Robert Wilhelm, and Werner Lemberg.
727#
728# This file is part of the FreeType project, and may only be used, modified,
729# and distributed under the terms of the FreeType project license,
730# LICENSE.TXT. By continuing to use, modify, or distribute this file you
731# indicate that you have read the license and understand and accept it
732# fully.
733
734
735CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psaux])
736
737OBJS=psaux.obj
738
739all : $(OBJS)
740 library [--.lib]freetype.olb $(OBJS)
741
742# EOF
743$ eod
744$ close out
745$ write sys$output "... [.src.pshinter] directory"
746$ create [.src.pshinter]descrip.mms
747$ open/append out [.src.pshinter]descrip.mms
748$ copy sys$input: out
749$ deck
750#
751# FreeType 2 PSHinter driver compilation rules for OpenVMS
752#
753
754
Werner Lemberg65e49252019-05-02 07:21:34 +0200755# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000756# David Turner, Robert Wilhelm, and Werner Lemberg.
757#
758# This file is part of the FreeType project, and may only be used, modified,
759# and distributed under the terms of the FreeType project license,
760# LICENSE.TXT. By continuing to use, modify, or distribute this file you
761# indicate that you have read the license and understand and accept it
762# fully.
763
764
765CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psnames])
766
767OBJS=pshinter.obj
768
769all : $(OBJS)
770 library [--.lib]freetype.olb $(OBJS)
771
772# EOF
773$ eod
774$ close out
775$ write sys$output "... [.src.psnames] directory"
776$ create [.src.psnames]descrip.mms
777$ open/append out [.src.psnames]descrip.mms
778$ copy sys$input: out
779$ deck
780#
Werner Lemberg76a52462018-09-03 09:08:47 +0200781# FreeType 2 psnames driver compilation rules for VMS
Werner Lembergbbdee282004-11-17 08:19:27 +0000782#
783
784
Werner Lemberg65e49252019-05-02 07:21:34 +0200785# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000786# David Turner, Robert Wilhelm, and Werner Lemberg.
787#
788# This file is part of the FreeType project, and may only be used, modified,
789# and distributed under the terms of the FreeType project license,
790# LICENSE.TXT. By continuing to use, modify, or distribute this file you
791# indicate that you have read the license and understand and accept it
792# fully.
793
794
795CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psnames])
796
797OBJS=psnames.obj
798
799all : $(OBJS)
800 library [--.lib]freetype.olb $(OBJS)
801
802# EOF
803$ eod
804$ close out
805$ write sys$output "... [.src.raster] directory"
806$ create [.src.raster]descrip.mms
807$ open/append out [.src.raster]descrip.mms
808$ copy sys$input: out
809$ deck
810#
811# FreeType 2 renderer module compilation rules for VMS
812#
813
814
Werner Lemberg65e49252019-05-02 07:21:34 +0200815# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000816# David Turner, Robert Wilhelm, and Werner Lemberg.
817#
818# This file is part of the FreeType project, and may only be used, modified,
819# and distributed under the terms of the FreeType project license,
820# LICENSE.TXT. By continuing to use, modify, or distribute this file you
821# indicate that you have read the license and understand and accept it
822# fully.
823
824
825CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.raster])
826
827OBJS=raster.obj
828
829all : $(OBJS)
830 library [--.lib]freetype.olb $(OBJS)
831
832# EOF
833$ eod
834$ close out
835$ write sys$output "... [.src.sfnt] directory"
836$ create [.src.sfnt]descrip.mms
837$ open/append out [.src.sfnt]descrip.mms
838$ copy sys$input: out
839$ deck
840#
841# FreeType 2 SFNT driver compilation rules for VMS
842#
843
844
Werner Lemberg65e49252019-05-02 07:21:34 +0200845# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000846# David Turner, Robert Wilhelm, and Werner Lemberg.
847#
848# This file is part of the FreeType project, and may only be used, modified,
849# and distributed under the terms of the FreeType project license,
850# LICENSE.TXT. By continuing to use, modify, or distribute this file you
851# indicate that you have read the license and understand and accept it
852# fully.
853
854
855CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.sfnt])
856
857OBJS=sfnt.obj
858
859all : $(OBJS)
860 library [--.lib]freetype.olb $(OBJS)
861
862# EOF
863$ eod
864$ close out
865$ write sys$output "... [.src.smooth] directory"
866$ create [.src.smooth]descrip.mms
867$ open/append out [.src.smooth]descrip.mms
868$ copy sys$input: out
869$ deck
870#
871# FreeType 2 smooth renderer module compilation rules for VMS
872#
873
874
Werner Lemberg65e49252019-05-02 07:21:34 +0200875# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000876# David Turner, Robert Wilhelm, and Werner Lemberg.
877#
878# This file is part of the FreeType project, and may only be used, modified,
879# and distributed under the terms of the FreeType project license,
880# LICENSE.TXT. By continuing to use, modify, or distribute this file you
881# indicate that you have read the license and understand and accept it
882# fully.
883
884
885CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.smooth])
886
887OBJS=smooth.obj
888
889all : $(OBJS)
890 library [--.lib]freetype.olb $(OBJS)
891
892# EOF
893$ eod
894$ close out
895$ write sys$output "... [.src.truetype] directory"
896$ create [.src.truetype]descrip.mms
897$ open/append out [.src.truetype]descrip.mms
898$ copy sys$input: out
899$ deck
900#
901# FreeType 2 TrueType driver compilation rules for VMS
902#
903
904
Werner Lemberg65e49252019-05-02 07:21:34 +0200905# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000906# David Turner, Robert Wilhelm, and Werner Lemberg.
907#
908# This file is part of the FreeType project, and may only be used, modified,
909# and distributed under the terms of the FreeType project license,
910# LICENSE.TXT. By continuing to use, modify, or distribute this file you
911# indicate that you have read the license and understand and accept it
912# fully.
913
914
915CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.truetype])
916
917OBJS=truetype.obj
918
919all : $(OBJS)
920 library [--.lib]freetype.olb $(OBJS)
921
922# EOF
923$ eod
924$ close out
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000925$ write sys$output "... [.src.type1] directory"
926$ create [.src.type1]descrip.mms
927$ open/append out [.src.type1]descrip.mms
928$ copy sys$input: out
929$ deck
930#
931# FreeType 2 Type1 driver compilation rules for VMS
932#
933
934
Werner Lemberg65e49252019-05-02 07:21:34 +0200935# Copyright 1996-2019 by
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000936# David Turner, Robert Wilhelm, and Werner Lemberg.
937#
938# This file is part of the FreeType project, and may only be used, modified,
939# and distributed under the terms of the FreeType project license,
940# LICENSE.TXT. By continuing to use, modify, or distribute this file you
941# indicate that you have read the license and understand and accept it
942# fully.
943
944
945CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type1])
946
947OBJS=type1.obj
948
949all : $(OBJS)
950 library [--.lib]freetype.olb $(OBJS)
951
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000952# EOF
953$ eod
954$ close out
Werner Lembergbbdee282004-11-17 08:19:27 +0000955$ write sys$output "... [.src.type42] directory"
956$ create [.src.type42]descrip.mms
957$ open/append out [.src.type42]descrip.mms
958$ copy sys$input: out
959$ deck
960#
961# FreeType 2 Type 42 driver compilation rules for VMS
962#
963
964
Werner Lemberg65e49252019-05-02 07:21:34 +0200965# Copyright 2002-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000966# David Turner, Robert Wilhelm, and Werner Lemberg.
967#
968# This file is part of the FreeType project, and may only be used, modified,
969# and distributed under the terms of the FreeType project license,
970# LICENSE.TXT. By continuing to use, modify, or distribute this file you
971# indicate that you have read the license and understand and accept it
972# fully.
973
974
975CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type42])
976
977OBJS=type42.obj
978
979all : $(OBJS)
980 library [--.lib]freetype.olb $(OBJS)
981
982# EOF
983$ eod
984$ close out
985$ write sys$output "... [.src.winfonts] directory"
986$ create [.src.winfonts]descrip.mms
987$ open/append out [.src.winfonts]descrip.mms
988$ copy sys$input: out
989$ deck
990#
991# FreeType 2 Windows FNT/FON driver compilation rules for VMS
992#
993
994
Werner Lemberg65e49252019-05-02 07:21:34 +0200995# Copyright 2001-2019 by
Werner Lembergbbdee282004-11-17 08:19:27 +0000996# David Turner, Robert Wilhelm, and Werner Lemberg.
997#
998# This file is part of the FreeType project, and may only be used, modified,
999# and distributed under the terms of the FreeType project license,
1000# LICENSE.TXT. By continuing to use, modify, or distribute this file you
1001# indicate that you have read the license and understand and accept it
1002# fully.
1003
1004
1005CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.winfonts])
1006
1007OBJS=winfnt.obj
1008
1009all : $(OBJS)
1010 library [--.lib]freetype.olb $(OBJS)
1011
1012# EOF
1013$ eod
1014$ close out
Werner Lemberg282637f2003-05-21 07:39:42 +00001015$ return
1016$!------------------------------------------------------------------------------
1017$!
1018$! Check command line options and set symbols accordingly
1019$!
1020$ CHECK_OPTS:
1021$ i = 1
1022$ OPT_LOOP:
1023$ if i .lt. 9
1024$ then
1025$ cparm = f$edit(p'i',"upcase")
1026$ if cparm .eqs. "DEBUG"
1027$ then
1028$ ccopt = ccopt + "/noopt/deb"
1029$ lopts = lopts + "/deb"
1030$ endif
Werner Lembergbbdee282004-11-17 08:19:27 +00001031$ if f$locate("CCOPT=",cparm) .lt. f$length(cparm)
1032$ then
1033$ start = f$locate("=",cparm) + 1
1034$ len = f$length(cparm) - start
1035$ ccopt = ccopt + f$extract(start,len,cparm)
1036$ endif
1037$ if cparm .eqs. "LINK" then linkonly = true
David Turner26bb2e22006-09-27 07:58:43 +00001038$ if f$locate("LOPTS=",cparm) .lt. f$length(cparm)
Werner Lemberg282637f2003-05-21 07:39:42 +00001039$ then
1040$ start = f$locate("=",cparm) + 1
1041$ len = f$length(cparm) - start
1042$ lopts = lopts + f$extract(start,len,cparm)
1043$ endif
David Turner26bb2e22006-09-27 07:58:43 +00001044$ if f$locate("CC=",cparm) .lt. f$length(cparm)
Werner Lemberg282637f2003-05-21 07:39:42 +00001045$ then
Werner Lembergbbdee282004-11-17 08:19:27 +00001046$ start = f$locate("=",cparm) + 1
1047$ len = f$length(cparm) - start
1048$ cc_com = f$extract(start,len,cparm)
David Turner26bb2e22006-09-27 07:58:43 +00001049 if (cc_com .nes. "DECC") .and. -
1050 (cc_com .nes. "VAXC") .and. -
Werner Lembergbbdee282004-11-17 08:19:27 +00001051 (cc_com .nes. "GNUC")
1052$ then
1053$ write sys$output "Unsupported compiler choice ''cc_com' ignored"
1054$ write sys$output "Use DECC, VAXC, or GNUC instead"
David Turner26bb2e22006-09-27 07:58:43 +00001055$ else
1056$ if cc_com .eqs. "DECC" then its_decc = true
1057$ if cc_com .eqs. "VAXC" then its_vaxc = true
1058$ if cc_com .eqs. "GNUC" then its_gnuc = true
1059$ endif
Werner Lembergbbdee282004-11-17 08:19:27 +00001060$ endif
David Turner26bb2e22006-09-27 07:58:43 +00001061$ if f$locate("MAKE=",cparm) .lt. f$length(cparm)
Werner Lembergbbdee282004-11-17 08:19:27 +00001062$ then
1063$ start = f$locate("=",cparm) + 1
1064$ len = f$length(cparm) - start
1065$ mmks = f$extract(start,len,cparm)
David Turner26bb2e22006-09-27 07:58:43 +00001066$ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS")
Werner Lembergbbdee282004-11-17 08:19:27 +00001067$ then
1068$ make = mmks
David Turner26bb2e22006-09-27 07:58:43 +00001069$ else
Werner Lembergbbdee282004-11-17 08:19:27 +00001070$ write sys$output "Unsupported make choice ''mmks' ignored"
1071$ write sys$output "Use MMK or MMS instead"
David Turner26bb2e22006-09-27 07:58:43 +00001072$ endif
Werner Lemberg282637f2003-05-21 07:39:42 +00001073$ endif
1074$ i = i + 1
1075$ goto opt_loop
1076$ endif
1077$ return
1078$!------------------------------------------------------------------------------
1079$!
1080$! Take care of driver file with information about external libraries
1081$!
Werner Lembergbbdee282004-11-17 08:19:27 +00001082$! Version history
1083$! 0.01 20040220 First version to receive a number
1084$! 0.02 20040229 Echo current procedure name; use general error exit handler
David Turner26bb2e22006-09-27 07:58:43 +00001085$! Remove xpm hack -> Replaced by more general dnsrl handling
Werner Lemberg282637f2003-05-21 07:39:42 +00001086$CHECK_CREATE_VMSLIB:
1087$!
1088$ if f$search("VMSLIB.DAT") .eqs. ""
1089$ then
1090$ type/out=vmslib.dat sys$input
1091!
Werner Lembergbbdee282004-11-17 08:19:27 +00001092! This is a simple driver file with information used by vms_make.com to
Alexei Podtelezhnikov22a7f5b2017-09-07 22:36:02 -04001093! check if external libraries (like t1lib and FreeType) are available on
Werner Lemberg282637f2003-05-21 07:39:42 +00001094! the system.
1095!
1096! Layout of the file:
1097!
1098! - Lines starting with ! are treated as comments
1099! - Elements in a data line are separated by # signs
1100! - The elements need to be listed in the following order
David Turner26bb2e22006-09-27 07:58:43 +00001101! 1.) Name of the Library (only used for informative messages
Werner Lembergbbdee282004-11-17 08:19:27 +00001102! from vms_make.com)
Werner Lemberg282637f2003-05-21 07:39:42 +00001103! 2.) Location where the object library can be found
1104! 3.) Location where the include files for the library can be found
1105! 4.) Include file used to verify library location
David Turner26bb2e22006-09-27 07:58:43 +00001106! 5.) CPP define to pass to the build to indicate availability of
Werner Lemberg282637f2003-05-21 07:39:42 +00001107! the library
1108!
David Turner26bb2e22006-09-27 07:58:43 +00001109! Example: The following lines show how definitions
1110! might look like. They are site specific and the locations of the
Werner Lemberg282637f2003-05-21 07:39:42 +00001111! library and include files need almost certainly to be changed.
David Turner26bb2e22006-09-27 07:58:43 +00001112!
Alexei Podtelezhnikovbbb60962016-04-07 01:29:44 -04001113! Location: All of the libraries can be found at the following addresses
Werner Lemberg282637f2003-05-21 07:39:42 +00001114!
Werner Lembergbbdee282004-11-17 08:19:27 +00001115! ZLIB: http://zinser.no-ip.info/vms/sw/zlib.htmlx
Werner Lemberg282637f2003-05-21 07:39:42 +00001116!
Werner Lemberg71e5a592004-11-27 08:18:10 +00001117ZLIB # sys$library:libz.olb # sys$library: # zlib.h # FT_CONFIG_OPTION_SYSTEM_ZLIB
Werner Lemberg282637f2003-05-21 07:39:42 +00001118$ write sys$output "New driver file vmslib.dat created."
Alexei Podtelezhnikove8542262016-04-08 23:21:34 -04001119$ write sys$output "Please customize library locations for your site"
Werner Lembergbbdee282004-11-17 08:19:27 +00001120$ write sys$output "and afterwards re-execute ''myproc'"
1121$ goto err_exit
Werner Lemberg282637f2003-05-21 07:39:42 +00001122$ endif
1123$!
Werner Lemberg4b2e83d2007-02-01 07:58:02 +00001124$! Init symbols used to hold CPP definitions and include path
Werner Lembergbbdee282004-11-17 08:19:27 +00001125$!
Werner Lemberg787db7c2019-05-13 22:22:57 +02001126$ libdefs = "FT2_BUILD_LIBRARY,FT_CONFIG_OPTION_OLD_INTERNALS,"
Werner Lembergbbdee282004-11-17 08:19:27 +00001127$ libincs = ""
1128$!
Werner Lemberg282637f2003-05-21 07:39:42 +00001129$! Open data file with location of libraries
1130$!
Werner Lembergbbdee282004-11-17 08:19:27 +00001131$ open/read/end=end_lib/err=err_lib libdata VMSLIB.DAT
Werner Lemberg282637f2003-05-21 07:39:42 +00001132$LIB_LOOP:
1133$ read/end=end_lib libdata libline
1134$ libline = f$edit(libline, "UNCOMMENT,COLLAPSE")
1135$ if libline .eqs. "" then goto LIB_LOOP ! Comment line
1136$ libname = f$edit(f$element(0,"#",libline),"UPCASE")
Werner Lemberg282637f2003-05-21 07:39:42 +00001137$ write sys$output "Processing ''libname' setup ..."
1138$ libloc = f$element(1,"#",libline)
1139$ libsrc = f$element(2,"#",libline)
1140$ testinc = f$element(3,"#",libline)
1141$ cppdef = f$element(4,"#",libline)
1142$ old_cpp = f$locate("=1",cppdef)
1143$ if old_cpp.lt.f$length(cppdef) then cppdef = f$extract(0,old_cpp,cppdef)
1144$ if f$search("''libloc'").eqs. ""
1145$ then
1146$ write sys$output "Can not find library ''libloc' - Skipping ''libname'"
1147$ goto LIB_LOOP
1148$ endif
1149$ libsrc_elem = 0
1150$ libsrc_found = false
1151$LIBSRC_LOOP:
1152$ libsrcdir = f$element(libsrc_elem,",",libsrc)
1153$ if (libsrcdir .eqs. ",") then goto END_LIBSRC
1154$ if f$search("''libsrcdir'''testinc'") .nes. "" then libsrc_found = true
1155$ libsrc_elem = libsrc_elem + 1
1156$ goto LIBSRC_LOOP
1157$END_LIBSRC:
1158$ if .not. libsrc_found
1159$ then
1160$ write sys$output "Can not find includes at ''libsrc' - Skipping ''libname'"
1161$ goto LIB_LOOP
1162$ endif
Werner Lembergbbdee282004-11-17 08:19:27 +00001163$ if (cppdef .nes. "") then libdefs = libdefs + cppdef + ","
Werner Lemberg282637f2003-05-21 07:39:42 +00001164$ libincs = libincs + "," + libsrc
1165$ lqual = "/lib"
Werner Lembergbbdee282004-11-17 08:19:27 +00001166$ libtype = f$edit(f$parse(libloc,,,"TYPE"),"UPCASE")
Werner Lemberg282637f2003-05-21 07:39:42 +00001167$ if f$locate("EXE",libtype) .lt. f$length(libtype) then lqual = "/share"
Werner Lembergbbdee282004-11-17 08:19:27 +00001168$ write optf libloc , lqual
1169$ if (f$trnlnm("topt") .nes. "") then write topt libloc , lqual
1170$!
Alexei Podtelezhnikov22a7f5b2017-09-07 22:36:02 -04001171$! Nasty hack to get the FreeType includes to work
Werner Lembergbbdee282004-11-17 08:19:27 +00001172$!
1173$ ft2def = false
1174$ if ((libname .eqs. "FREETYPE") .and. -
1175 (f$locate("FREETYPE2",cppdef) .lt. f$length(cppdef)))
1176$ then
1177$ if ((f$search("freetype:freetype.h") .nes. "") .and. -
1178 (f$search("freetype:[internal]ftobjs.h") .nes. ""))
1179$ then
1180$ write sys$output "Will use local definition of freetype logical"
1181$ else
David Turner26bb2e22006-09-27 07:58:43 +00001182$ ft2elem = 0
Werner Lembergbbdee282004-11-17 08:19:27 +00001183$FT2_LOOP:
1184$ ft2srcdir = f$element(ft2elem,",",libsrc)
1185$ if f$search("''ft2srcdir'''testinc'") .nes. ""
1186$ then
1187$ if f$search("''ft2srcdir'internal.dir") .nes. ""
1188$ then
1189$ ft2dev = f$parse("''ft2srcdir'",,,"device","no_conceal")
1190$ ft2dir = f$parse("''ft2srcdir'",,,"directory","no_conceal")
1191$ ft2conc = f$locate("][",ft2dir)
1192$ ft2len = f$length(ft2dir)
1193$ if ft2conc .lt. ft2len
1194$ then
1195$ ft2dir = f$extract(0,ft2conc,ft2dir) + -
1196 f$extract(ft2conc+2,ft2len-2,ft2dir)
1197$ endif
1198$ ft2dir = ft2dir - "]" + ".]"
1199$ define freetype 'ft2dev''ft2dir','ft2srcdir'
1200$ ft2def = true
1201$ else
1202$ goto ft2_err
1203$ endif
1204$ else
1205$ ft2elem = ft2elem + 1
1206$ goto ft2_loop
1207$ endif
David Turner26bb2e22006-09-27 07:58:43 +00001208$ endif
Werner Lembergbbdee282004-11-17 08:19:27 +00001209$ endif
Werner Lemberg282637f2003-05-21 07:39:42 +00001210$ goto LIB_LOOP
1211$END_LIB:
1212$ close libdata
Werner Lemberg282637f2003-05-21 07:39:42 +00001213$ return
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001214$!------------------------------------------------------------------------------
Werner Lemberg282637f2003-05-21 07:39:42 +00001215$!
David Turner26bb2e22006-09-27 07:58:43 +00001216$! Analyze Object files for OpenVMS AXP to extract Procedure and Data
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001217$! information to build a symbol vector for a shareable image
1218$! All the "brains" of this logic was suggested by Hartmut Becker
1219$! (Hartmut.Becker@compaq.com). All the bugs were introduced by me
Werner Lemberg3e587792015-03-11 07:14:15 +01001220$! (zinser@zinser.no-ip.info), so if you do have problem reports please do not
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001221$! bother Hartmut/HP, but get in touch with me
Werner Lemberg282637f2003-05-21 07:39:42 +00001222$!
Werner Lembergbbdee282004-11-17 08:19:27 +00001223$! Version history
1224$! 0.01 20040006 Skip over shareable images in option file
1225$!
David Turner26bb2e22006-09-27 07:58:43 +00001226$ ANAL_OBJ_AXP: Subroutine
Werner Lemberg282637f2003-05-21 07:39:42 +00001227$ V = 'F$Verify(0)
Werner Lemberg282637f2003-05-21 07:39:42 +00001228$ SAY := "WRITE_ SYS$OUTPUT"
David Turner26bb2e22006-09-27 07:58:43 +00001229$
Werner Lemberg282637f2003-05-21 07:39:42 +00001230$ IF F$SEARCH("''P1'") .EQS. ""
1231$ THEN
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001232$ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available"
Werner Lemberg282637f2003-05-21 07:39:42 +00001233$ goto exit_aa
1234$ ENDIF
1235$ IF "''P2'" .EQS. ""
1236$ THEN
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001237$ SAY "ANAL_OBJ_AXP: Error, no output file provided"
Werner Lemberg282637f2003-05-21 07:39:42 +00001238$ goto exit_aa
1239$ ENDIF
1240$
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001241$ open/read in 'p1
1242$ create a.tmp
1243$ open/append atmp a.tmp
1244$ loop:
1245$ read/end=end_loop in line
Werner Lembergbbdee282004-11-17 08:19:27 +00001246$ if f$locate("/SHARE",f$edit(line,"upcase")) .lt. f$length(line)
1247$ then
1248$ write sys$output "ANAL_SKP_SHR-i-skipshare, ''line'"
1249$ goto loop
1250$ endif
Werner Lemberg71e5a592004-11-27 08:18:10 +00001251$ if f$locate("/LIB",f$edit(line,"upcase")) .lt. f$length(line)
1252$ then
1253$ write libsf line
1254$ write sys$output "ANAL_SKP_LIB-i-skiplib, ''line'"
1255$ goto loop
1256$ endif
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001257$ f= f$search(line)
1258$ if f .eqs. ""
1259$ then
1260$ write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'"
1261$ goto loop
1262$ endif
1263$ def/user sys$output nl:
1264$ def/user sys$error nl:
1265$ anal/obj/gsd 'f /out=x.tmp
1266$ open/read xtmp x.tmp
1267$ XLOOP:
1268$ read/end=end_xloop xtmp xline
1269$ xline = f$edit(xline,"compress")
1270$ write atmp xline
1271$ goto xloop
1272$ END_XLOOP:
1273$ close xtmp
1274$ goto loop
1275$ end_loop:
1276$ close in
1277$ close atmp
1278$ if f$search("a.tmp") .eqs. "" -
1279 then $ exit
1280$ ! all global definitions
1281$ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp
1282$ ! all procedures
1283$ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp
1284$ search c.tmp "symbol:"/out=d.tmp
1285$ def/user sys$output nl:
1286$ edito/edt/command=sys$input d.tmp
1287sub/symbol: "/symbol_vector=(/whole
Werner Lemberg71e5a592004-11-27 08:18:10 +00001288sub/"/=PROCEDURE)/whole
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001289exit
1290$ ! all data
1291$ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp
1292$ search e.tmp "symbol:"/out=f.tmp
1293$ def/user sys$output nl:
1294$ edito/edt/command=sys$input f.tmp
1295sub/symbol: "/symbol_vector=(/whole
Werner Lemberg71e5a592004-11-27 08:18:10 +00001296sub/"/=DATA)/whole
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001297exit
1298$ sort/nodupl d.tmp,f.tmp 'p2'
1299$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*
1300$ if f$search("x.tmp") .nes. "" -
1301 then $ delete x.tmp;*
Werner Lemberg282637f2003-05-21 07:39:42 +00001302$!
Werner Lemberg71e5a592004-11-27 08:18:10 +00001303$ close libsf
Werner Lemberg282637f2003-05-21 07:39:42 +00001304$ EXIT_AA:
1305$ if V then set verify
David Turner26bb2e22006-09-27 07:58:43 +00001306$ endsubroutine