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" -
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..."
99 $ if f$search("DESCRIP.MMS") .eqs. "" then copy/nolog [.SCRIPTS]DESCRIP.MMS []
100 $ 'make'/macro=('comp',zlibsrc='zlibsrc')
102 $ write sys$output "Libpng build completed"
106 $MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
108 $! P1 = What we are trying to make
109 $! P2 = Command to make it
110 $! P3 - P8 What it depends on
112 $ If F$Search(P1) .Eqs. "" Then Goto Makeit
113 $ Time = F$CvTime(F$File(P1,"RDT"))
117 $ If Argument .Eqs. "" Then Goto Exit
120 $ File = F$Element(El," ",Argument)
121 $ If File .Eqs. " " Then Goto Endl
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
134 $ If arg .Le. 8 Then Goto Loop
139 $ write sys$output P2
143 $ If V Then Set Verify