1
$!------------------------------------------------------------------------------
2
$! make "PNG: The Definitive Guide" demo programs (for X) under OpenVMS
4
$! Script created by Martin Zinser for libpng; modified by Greg Roelofs
5
$! for standalone pngbook source distribution.
8
$! Set locations where zlib and libpng sources live.
13
$ if f$search("[---.zlib]zlib.h").nes."" then zpath = "[---.zlib]"
14
$ if f$search("[--]png.h").nes."" then pngpath = "[--]"
16
$ if f$search("[-.zlib]zlib.h").nes."" then zpath = "[-.zlib]"
17
$ if f$search("[-.libpng]png.h").nes."" then pngpath = "[-.libpng]"
21
$ write sys$output "zlib include not found. Exiting..."
27
$ write sys$output "libpng include not found. Exiting..."
31
$! Look for the compiler used.
33
$ ccopt="/include=(''zpath',''pngpath')"
34
$ if f$getsyi("HW_MODEL").ge.1024
36
$ ccopt = "/prefix=all"+ccopt
38
$ if f$trnlnm("SYS").eqs."" then define sys sys$library:
40
$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
42
$ if f$trnlnm("SYS").eqs."" then define sys sys$library:
43
$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs.""
51
$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
52
$ ccopt = "/decc/prefix=all"+ccopt
56
$ open/write lopt lib.opt
57
$ write lopt "''pngpath'libpng.olb/lib"
58
$ write lopt "''zpath'libz.olb/lib"
60
$ open/write xopt x11.opt
61
$ write xopt "sys$library:decw$xlibshr.exe/share"
66
$ write sys$output "Compiling PNG book programs ..."
67
$ CALL MAKE readpng.OBJ "cc ''CCOPT' readpng" -
69
$ CALL MAKE readpng2.OBJ "cc ''CCOPT' readpng2" -
71
$ CALL MAKE writepng.OBJ "cc ''CCOPT' writepng" -
73
$ write sys$output "Building rpng-x..."
74
$ CALL MAKE rpng-x.OBJ "cc ''CCOPT' rpng-x" -
76
$ call make rpng-x.exe -
77
"LINK rpng-x,readpng,lib.opt/opt,x11.opt/opt" -
78
rpng-x.obj readpng.obj
79
$ write sys$output "Building rpng2-x..."
80
$ CALL MAKE rpng2-x.OBJ "cc ''CCOPT' rpng2-x" -
82
$ call make rpng2-x.exe -
83
"LINK rpng2-x,readpng2,lib.opt/opt,x11.opt/opt" -
84
rpng2-x.obj readpng2.obj
85
$ write sys$output "Building wpng..."
86
$ CALL MAKE wpng.OBJ "cc ''CCOPT' wpng" -
88
$ call make wpng.exe -
89
"LINK wpng,writepng,lib.opt/opt" -
94
$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
96
$! P1 = What we are trying to make
97
$! P2 = Command to make it
98
$! P3 - P8 What it depends on
100
$ If F$Search(P1) .Eqs. "" Then Goto Makeit
101
$ Time = F$CvTime(F$File(P1,"RDT"))
105
$ If Argument .Eqs. "" Then Goto Exit
108
$ File = F$Element(El," ",Argument)
109
$ If File .Eqs. " " Then Goto Endl
113
$ AFile = F$Search(File)
114
$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
115
$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
122
$ If arg .Le. 8 Then Goto Loop
127
$ write sys$output P2
131
$ If V Then Set Verify