summaryrefslogtreecommitdiff
path: root/make_vms.com
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2012-03-09 18:43:50 -0800
committerMark Adler <madler@alumni.caltech.edu>2012-03-09 18:43:50 -0800
commit2cd90d2bf5e23f2e663086fdbec1075c9c771f57 (patch)
treeccce8495972a44300758d213a65802887f1a1f4d /make_vms.com
parent2e04ce09154a078910a7878f2e36905f458f309f (diff)
downloadzlib-2cd90d2bf5e23f2e663086fdbec1075c9c771f57.tar.gz
zlib-2cd90d2bf5e23f2e663086fdbec1075c9c771f57.tar.bz2
zlib-2cd90d2bf5e23f2e663086fdbec1075c9c771f57.zip
Add ability to choose the builder in make_vms.com [Schweda].
Diffstat (limited to 'make_vms.com')
-rw-r--r--make_vms.com81
1 files changed, 45 insertions, 36 deletions
diff --git a/make_vms.com b/make_vms.com
index 059c50d..65e9d0c 100644
--- a/make_vms.com
+++ b/make_vms.com
@@ -20,6 +20,8 @@ $! 0.07 20120115 Triggered by work done by Alexey Chupahin completly redesigned
20$! shared image creation 20$! shared image creation
21$! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared 21$! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared
22$! image 22$! image
23$! 0.09 20120305 SMS. P1 sets builder ("MMK", "MMS", " " (built-in)).
24$! "" -> automatic, preference: MMK, MMS, built-in.
23$! 25$!
24$ on error then goto err_exit 26$ on error then goto err_exit
25$! 27$!
@@ -37,12 +39,12 @@ $ s_case = False
37$! 39$!
38$! Setup variables holding "config" information 40$! Setup variables holding "config" information
39$! 41$!
40$ Make = "" 42$ Make = "''p1'"
41$ name = "Zlib" 43$ name = "Zlib"
42$ version = "?.?.?" 44$ version = "?.?.?"
43$ v_string = "ZLIB_VERSION" 45$ v_string = "ZLIB_VERSION"
44$ v_file = "zlib.h" 46$ v_file = "zlib.h"
45$ ccopt = "" 47$ ccopt = "/include = []"
46$ lopts = "" 48$ lopts = ""
47$ dnsrl = "" 49$ dnsrl = ""
48$ aconf_in_file = "zconf.h.in#zconf.h_in#zconf_h.in" 50$ aconf_in_file = "zconf.h.in#zconf.h_in#zconf_h.in"
@@ -55,17 +57,25 @@ $ vax = f$getsyi("HW_MODEL").lt.1024
55$ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096 57$ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096
56$ ia64 = f$getsyi("HW_MODEL").ge.4096 58$ ia64 = f$getsyi("HW_MODEL").ge.4096
57$! 59$!
58$ if axp .or. ia64 then set proc/parse=extended 60$! 2012-03-05 SMS.
59$ whoami = f$parse(f$enviornment("Procedure"),,,,"NO_CONCEAL") 61$! Why is this needed? And if it is needed, why not simply ".not. vax"?
62$!
63$!!! if axp .or. ia64 then set proc/parse=extended
64$!
65$ whoami = f$parse(f$environment("Procedure"),,,,"NO_CONCEAL")
60$ mydef = F$parse(whoami,,,"DEVICE") 66$ mydef = F$parse(whoami,,,"DEVICE")
61$ mydir = f$parse(whoami,,,"DIRECTORY") - "][" 67$ mydir = f$parse(whoami,,,"DIRECTORY") - "]["
62$ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type") 68$ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type")
63$! 69$!
64$! Check for MMK/MMS 70$! Check for MMK/MMS
65$! 71$!
66$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" 72$ if (Make .eqs. "")
67$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK" 73$ then
68$! 74$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
75$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
76$ else
77$ Make = f$edit( Make, "trim")
78$ endif
69$! 79$!
70$ gosub find_version 80$ gosub find_version
71$! 81$!
@@ -93,6 +103,10 @@ $ ccopt = "/decc" + ccopt
93$ define sys decc$library_include: 103$ define sys decc$library_include:
94$ endif 104$ endif
95$ endif 105$ endif
106$!
107$! 2012-03-05 SMS.
108$! Why /NAMES = AS_IS? Why not simply ".not. vax"? And why not on VAX?
109$!
96$ if axp .or. ia64 110$ if axp .or. ia64
97$ then 111$ then
98$ ccopt = ccopt + "/name=as_is/opt=(inline=speed)" 112$ ccopt = ccopt + "/name=as_is/opt=(inline=speed)"
@@ -137,15 +151,20 @@ $ gosub check_config
137$ endif 151$ endif
138$ goto aconf_loop 152$ goto aconf_loop
139$ACONF_EXIT: 153$ACONF_EXIT:
154$ write aconf ""
155$ write aconf "/* VMS specifics added by make_vms.com: */"
140$ write aconf "#define VMS 1" 156$ write aconf "#define VMS 1"
141$ write aconf "#include <unistd.h>" 157$ write aconf "#include <unistd.h>"
142$ write aconf "#include <unixio.h>" 158$ write aconf "#include <unixio.h>"
143$ write aconf "#ifdef _LARGEFILE" 159$ write aconf "#ifdef _LARGEFILE"
144$ write aconf "#define off64_t __off64_t" 160$ write aconf "# define off64_t __off64_t"
145$ write aconf "#define fopen64 fopen" 161$ write aconf "# define fopen64 fopen"
146$ write aconf "#define fseeko64 fseeko" 162$ write aconf "# define fseeko64 fseeko"
147$ write aconf "#define lseek64 lseek" 163$ write aconf "# define lseek64 lseek"
148$ write aconf "#define ftello64 ftell" 164$ write aconf "# define ftello64 ftell"
165$ write aconf "#endif"
166$ write aconf "#if !defined( __VAX) && (__CRTL_VER >= 70312000)"
167$ write aconf "# define HAVE_VSNPRINTF"
149$ write aconf "#endif" 168$ write aconf "#endif"
150$ close aconf_in 169$ close aconf_in
151$ close aconf 170$ close aconf
@@ -154,8 +173,9 @@ $! Build the thing plain or with mms
154$! 173$!
155$ write sys$output "Compiling Zlib sources ..." 174$ write sys$output "Compiling Zlib sources ..."
156$ if make.eqs."" 175$ if make.eqs.""
157$ then 176$ then
158$ dele example.obj;*,minigzip.obj;* 177$ if (f$search( "example.obj;*") .nes. "") then delete example.obj;*
178$ if (f$search( "minigzip.obj;*") .nes. "") then delete minigzip.obj;*
159$ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" - 179$ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" -
160 adler32.c zlib.h zconf.h 180 adler32.c zlib.h zconf.h
161$ CALL MAKE compress.OBJ "CC ''CCOPT' compress" - 181$ CALL MAKE compress.OBJ "CC ''CCOPT' compress" -
@@ -189,23 +209,20 @@ $ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
189$ write sys$output "Building Zlib ..." 209$ write sys$output "Building Zlib ..."
190$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ 210$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
191$ write sys$output "Building example..." 211$ write sys$output "Building example..."
192$ CALL MAKE example.OBJ "CC ''CCOPT'/include=[] [.test]example" - 212$ CALL MAKE example.OBJ "CC ''CCOPT' [.test]example" -
193 [.test]example.c zlib.h zconf.h 213 [.test]example.c zlib.h zconf.h
194$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb 214$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
195$ if f$search("x11vms:xvmsutils.olb") .nes. "" 215$ write sys$output "Building minigzip..."
196$ then 216$ CALL MAKE minigzip.OBJ "CC ''CCOPT' [.test]minigzip" -
197$ write sys$output "Building minigzip..." 217 [.test]minigzip.c zlib.h zconf.h
198$ CALL MAKE minigzip.OBJ "CC ''CCOPT'/include=[] [.test]minigzip" - 218$ call make minigzip.exe -
199 [.test]minigzip.c zlib.h zconf.h 219 "LINK minigzip,libz.olb/lib" -
200$ call make minigzip.exe - 220 minigzip.obj libz.olb
201 "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" - 221$ else
202 minigzip.obj libz.olb
203$ endif
204$ else
205$ gosub crea_mms 222$ gosub crea_mms
206$ write sys$output "Make ''name' ''version' with ''Make' " 223$ write sys$output "Make ''name' ''version' with ''Make' "
207$ 'make' 224$ 'make'
208$ endif 225$ endif
209$! 226$!
210$! Create shareable image 227$! Create shareable image
211$! 228$!
@@ -227,7 +244,6 @@ $ERR_EXIT:
227$ set message/facil/ident/sever/text 244$ set message/facil/ident/sever/text
228$ close/nolog optf 245$ close/nolog optf
229$ close/nolog topt 246$ close/nolog topt
230$ close/nolog conf_hin
231$ close/nolog aconf_in 247$ close/nolog aconf_in
232$ close/nolog aconf 248$ close/nolog aconf
233$ close/nolog out 249$ close/nolog out
@@ -418,12 +434,7 @@ OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\
418$ eod 434$ eod
419$ write out "CFLAGS=", ccopt 435$ write out "CFLAGS=", ccopt
420$ write out "LOPTS=", lopts 436$ write out "LOPTS=", lopts
421$ if f$search("x11vms:xvmsutils.olb") .nes. "" 437$ write out "all : example.exe minigzip.exe libz.olb"
422$ then
423$ write out "all : example.exe minigzip.exe libz.olb"
424$ else
425$ write out "all : example.exe libz.olb"
426$ endif
427$ copy sys$input: out 438$ copy sys$input: out
428$ deck 439$ deck
429 @ write sys$output " Example applications available" 440 @ write sys$output " Example applications available"
@@ -435,7 +446,7 @@ example.exe : example.obj libz.olb
435 link $(LOPTS) example,libz.olb/lib 446 link $(LOPTS) example,libz.olb/lib
436 447
437minigzip.exe : minigzip.obj libz.olb 448minigzip.exe : minigzip.obj libz.olb
438 link $(LOPTS) minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib 449 link $(LOPTS) minigzip,libz.olb/lib
439 450
440clean : 451clean :
441 delete *.obj;*,libz.olb;*,*.opt;*,*.exe;* 452 delete *.obj;*,libz.olb;*,*.opt;*,*.exe;*
@@ -447,7 +458,6 @@ compress.obj : compress.c zlib.h zconf.h
447crc32.obj : crc32.c zutil.h zlib.h zconf.h 458crc32.obj : crc32.c zutil.h zlib.h zconf.h
448deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h 459deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h
449example.obj : [.test]example.c zlib.h zconf.h 460example.obj : [.test]example.c zlib.h zconf.h
450 cc $(CFLAGS)/include=[] [.test]example.c
451gzclose.obj : gzclose.c zutil.h zlib.h zconf.h 461gzclose.obj : gzclose.c zutil.h zlib.h zconf.h
452gzlib.obj : gzlib.c zutil.h zlib.h zconf.h 462gzlib.obj : gzlib.c zutil.h zlib.h zconf.h
453gzread.obj : gzread.c zutil.h zlib.h zconf.h 463gzread.obj : gzread.c zutil.h zlib.h zconf.h
@@ -456,7 +466,6 @@ inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h
456inflate.obj : inflate.c zutil.h zlib.h zconf.h 466inflate.obj : inflate.c zutil.h zlib.h zconf.h
457inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h 467inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h
458minigzip.obj : [.test]minigzip.c zlib.h zconf.h 468minigzip.obj : [.test]minigzip.c zlib.h zconf.h
459 cc $(CFLAGS)/include=[] [.test]minigzip.c
460trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h 469trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h
461uncompr.obj : uncompr.c zlib.h zconf.h 470uncompr.obj : uncompr.c zlib.h zconf.h
462zutil.obj : zutil.c zutil.h zlib.h zconf.h 471zutil.obj : zutil.c zutil.h zlib.h zconf.h