]> git.saurik.com Git - wxWidgets.git/blob - src/png/scripts/makevms.com
support for Mac Help Button added (wxID_HELP) is automatically translated
[wxWidgets.git] / src / png / scripts / makevms.com
1 $! make libpng under VMS
2 $!
3 $!
4 $! Check for MMK/MMS
5 $!
6 $! This procedure accepts one parameter (contrib), which causes it to build
7 $! the programs from the contrib directory instead of libpng.
8 $!
9 $ p1 = f$edit(p1,"UPCASE")
10 $ if p1 .eqs. "CONTRIB"
11 $ then
12 $ set def [.contrib.gregbook]
13 $ @makevms
14 $ set def [-.pngminus]
15 $ @makevms
16 $ set def [--]
17 $ exit
18 $ endif
19 $ Make = ""
20 $ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
21 $ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
22 $!
23 $! Look for the compiler used
24 $!
25 $ zlibsrc = "[-.zlib]"
26 $ ccopt="/include=''zlibsrc'"
27 $ if f$getsyi("HW_MODEL").ge.1024
28 $ then
29 $ ccopt = "/prefix=all"+ccopt
30 $ comp = "__decc__=1"
31 $ if f$trnlnm("SYS").eqs."" then define sys sys$library:
32 $ else
33 $ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
34 $ then
35 $ if f$trnlnm("SYS").eqs."" then define sys sys$library:
36 $ if f$search("SYS$SYSTEM:VAXC.EXE").eqs.""
37 $ then
38 $ comp = "__gcc__=1"
39 $ CC :== GCC
40 $ else
41 $ comp = "__vaxc__=1"
42 $ endif
43 $ else
44 $ if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
45 $ ccopt = "/decc/prefix=all"+ccopt
46 $ comp = "__decc__=1"
47 $ endif
48 $ endif
49 $!
50 $! Build the thing plain or with mms/mmk
51 $!
52 $ write sys$output "Compiling Libpng sources ..."
53 $ if make.eqs.""
54 $ then
55 $ dele pngtest.obj;*
56 $ CALL MAKE png.OBJ "cc ''CCOPT' png" -
57 png.c png.h pngconf.h
58 $ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" -
59 pngpread.c png.h pngconf.h
60 $ CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" -
61 pngset.c png.h pngconf.h
62 $ CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" -
63 pngget.c png.h pngconf.h
64 $ CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" -
65 pngread.c png.h pngconf.h
66 $ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" -
67 pngpread.c png.h pngconf.h
68 $ CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" -
69 pngrtran.c png.h pngconf.h
70 $ CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" -
71 pngrutil.c png.h pngconf.h
72 $ CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" -
73 pngerror.c png.h pngconf.h
74 $ CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" -
75 pngmem.c png.h pngconf.h
76 $ CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" -
77 pngrio.c png.h pngconf.h
78 $ CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" -
79 pngwio.c png.h pngconf.h
80 $ CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" -
81 pngtrans.c png.h pngconf.h
82 $ CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" -
83 pngwrite.c png.h pngconf.h
84 $ CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" -
85 pngwtran.c png.h pngconf.h
86 $ CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" -
87 pngwutil.c png.h pngconf.h
88 $ write sys$output "Building Libpng ..."
89 $ CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ
90 $ write sys$output "Building pngtest..."
91 $ CALL MAKE pngtest.OBJ "cc ''CCOPT' pngtest" -
92 pngtest.c png.h pngconf.h
93 $ call make pngtest.exe -
94 "LINK pngtest,libpng.olb/lib,''zlibsrc'libz.olb/lib" -
95 pngtest.obj libpng.olb
96 $ write sys$output "Testing Libpng..."
97 $ run pngtest
98 $ else
99 $ if f$search("DESCRIP.MMS") .eqs. "" then copy/nolog [.SCRIPTS]DESCRIP.MMS []
100 $ 'make'/macro=('comp',zlibsrc='zlibsrc')
101 $ endif
102 $ write sys$output "Libpng build completed"
103 $ exit
104 $!
105 $!
106 $MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
107 $ V = 'F$Verify(0)
108 $! P1 = What we are trying to make
109 $! P2 = Command to make it
110 $! P3 - P8 What it depends on
111 $
112 $ If F$Search(P1) .Eqs. "" Then Goto Makeit
113 $ Time = F$CvTime(F$File(P1,"RDT"))
114 $arg=3
115 $Loop:
116 $ Argument = P'arg
117 $ If Argument .Eqs. "" Then Goto Exit
118 $ El=0
119 $Loop2:
120 $ File = F$Element(El," ",Argument)
121 $ If File .Eqs. " " Then Goto Endl
122 $ AFile = ""
123 $Loop3:
124 $ OFile = AFile
125 $ AFile = F$Search(File)
126 $ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
127 $ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
128 $ Goto Loop3
129 $NextEL:
130 $ El = El + 1
131 $ Goto Loop2
132 $EndL:
133 $ arg=arg+1
134 $ If arg .Le. 8 Then Goto Loop
135 $ Goto Exit
136 $
137 $Makeit:
138 $ VV=F$VERIFY(0)
139 $ write sys$output P2
140 $ 'P2
141 $ VV='F$Verify(VV)
142 $Exit:
143 $ If V Then Set Verify
144 $ENDSUBROUTINE