1 $! make libpng under VMS
6 $! This procedure accepts one parameter (contrib), which causes it to build
7 $! the programs from the contrib directory instead of libpng.
9 $ p1 = f$edit(p1,"UPCASE")
10 $ if p1 .eqs. "CONTRIB"
12 $ set def [.contrib.gregbook]
14 $ set def [-.pngminus]
20 $ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
21 $ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
23 $! Look for the compiler used
25 $ zlibsrc = "[-.zlib]"
26 $ ccopt="/include=''zlibsrc'"
27 $ if f$getsyi("HW_MODEL").ge.1024
29 $ ccopt = "/prefix=all"+ccopt
31 $ if f$trnlnm("SYS").eqs."" then define sys sys$library:
33 $ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
35 $ if f$trnlnm("SYS").eqs."" then define sys sys$library:
36 $ if f$search("SYS$SYSTEM:VAXC.EXE").eqs.""
44 $ if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
45 $ ccopt = "/decc/prefix=all"+ccopt
50 $! Build the thing plain or with mms/mmk
52 $ write sys$output "Compiling Libpng sources ..."
56 $ CALL MAKE png.OBJ "cc ''CCOPT' png" -
57 png.c png.h pngconf.h pngpriv.h
58 $ CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" -
59 pngset.c png.h pngconf.h pngpriv.h
60 $ CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" -
61 pngget.c png.h pngconf.h pngpriv.h
62 $ CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" -
63 pngread.c png.h pngconf.h pngpriv.h
64 $ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" -
65 pngpread.c png.h pngconf.h pngpriv.h
66 $ CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" -
67 pngrtran.c png.h pngconf.h pngpriv.h
68 $ CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" -
69 pngrutil.c png.h pngconf.h pngpriv.h
70 $ CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" -
71 pngerror.c png.h pngconf.h pngpriv.h
72 $ CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" -
73 pngmem.c png.h pngconf.h pngpriv.h
74 $ CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" -
75 pngrio.c png.h pngconf.h pngpriv.h
76 $ CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" -
77 pngwio.c png.h pngconf.h pngpriv.h
78 $ CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" -
79 pngtrans.c png.h pngconf.h pngpriv.h
80 $ CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" -
81 pngwrite.c png.h pngconf.h pngpriv.h
82 $ CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" -
83 pngwtran.c png.h pngconf.h pngpriv.h
84 $ CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" -
85 pngwutil.c png.h pngconf.h pngpriv.h
86 $ write sys$output "Building Libpng ..."
87 $ CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ
88 $ write sys$output "Building pngtest..."
89 $ CALL MAKE pngtest.OBJ "cc ''CCOPT' pngtest" -
90 pngtest.c png.h pngconf.h
91 $ call make pngtest.exe -
92 "LINK pngtest,libpng.olb/lib,''zlibsrc'libz.olb/lib" -
93 pngtest.obj libpng.olb
94 $ write sys$output "Testing Libpng..."
97 $ if f$search("DESCRIP.MMS") .eqs. "" then copy/nolog [.SCRIPTS]DESCRIP.MMS []
98 $ 'make'/macro=('comp',zlibsrc='zlibsrc')
100 $ write sys$output "Libpng build completed"
104 $MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
106 $! P1 = What we are trying to make
107 $! P2 = Command to make it
108 $! P3 - P8 What it depends on
110 $ If F$Search(P1) .Eqs. "" Then Goto Makeit
111 $ Time = F$CvTime(F$File(P1,"RDT"))
115 $ If Argument .Eqs. "" Then Goto Exit
118 $ File = F$Element(El," ",Argument)
119 $ If File .Eqs. " " Then Goto Endl
123 $ AFile = F$Search(File)
124 $ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
125 $ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
132 $ If arg .Le. 8 Then Goto Loop
137 $ write sys$output P2
141 $ If V Then Set Verify