1*a67afe4dSAndroid Build Coastguard Worker$!------------------------------------------------------------------------------ 2*a67afe4dSAndroid Build Coastguard Worker$! make Contrib programs of libpng under OpenVMS 3*a67afe4dSAndroid Build Coastguard Worker$! 4*a67afe4dSAndroid Build Coastguard Worker$! 5*a67afe4dSAndroid Build Coastguard Worker$! Look for the compiler used 6*a67afe4dSAndroid Build Coastguard Worker$! 7*a67afe4dSAndroid Build Coastguard Worker$ zlibsrc = "[---.zlib]" 8*a67afe4dSAndroid Build Coastguard Worker$ ccopt="/include=(''zlibsrc',[--])" 9*a67afe4dSAndroid Build Coastguard Worker$ if f$getsyi("HW_MODEL").ge.1024 10*a67afe4dSAndroid Build Coastguard Worker$ then 11*a67afe4dSAndroid Build Coastguard Worker$ ccopt = "/prefix=all"+ccopt 12*a67afe4dSAndroid Build Coastguard Worker$ comp = "__decc__=1" 13*a67afe4dSAndroid Build Coastguard Worker$ if f$trnlnm("SYS").eqs."" then define sys sys$library: 14*a67afe4dSAndroid Build Coastguard Worker$ else 15*a67afe4dSAndroid Build Coastguard Worker$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" 16*a67afe4dSAndroid Build Coastguard Worker$ then 17*a67afe4dSAndroid Build Coastguard Worker$ if f$trnlnm("SYS").eqs."" then define sys sys$library: 18*a67afe4dSAndroid Build Coastguard Worker$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" 19*a67afe4dSAndroid Build Coastguard Worker$ then 20*a67afe4dSAndroid Build Coastguard Worker$ comp = "__gcc__=1" 21*a67afe4dSAndroid Build Coastguard Worker$ CC :== GCC 22*a67afe4dSAndroid Build Coastguard Worker$ else 23*a67afe4dSAndroid Build Coastguard Worker$ comp = "__vaxc__=1" 24*a67afe4dSAndroid Build Coastguard Worker$ endif 25*a67afe4dSAndroid Build Coastguard Worker$ else 26*a67afe4dSAndroid Build Coastguard Worker$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: 27*a67afe4dSAndroid Build Coastguard Worker$ ccopt = "/decc/prefix=all"+ccopt 28*a67afe4dSAndroid Build Coastguard Worker$ comp = "__decc__=1" 29*a67afe4dSAndroid Build Coastguard Worker$ endif 30*a67afe4dSAndroid Build Coastguard Worker$ endif 31*a67afe4dSAndroid Build Coastguard Worker$ open/write lopt lib.opt 32*a67afe4dSAndroid Build Coastguard Worker$ write lopt "[--]libpng.olb/lib" 33*a67afe4dSAndroid Build Coastguard Worker$ write lopt "''zlibsrc'libz.olb/lib" 34*a67afe4dSAndroid Build Coastguard Worker$ close lopt 35*a67afe4dSAndroid Build Coastguard Worker$ open/write xopt x11.opt 36*a67afe4dSAndroid Build Coastguard Worker$ write xopt "sys$library:decw$xlibshr.exe/share" 37*a67afe4dSAndroid Build Coastguard Worker$ close xopt 38*a67afe4dSAndroid Build Coastguard Worker$ write sys$output "Compiling PNG contrib programs ..." 39*a67afe4dSAndroid Build Coastguard Worker$ write sys$output "Building pnm2png..." 40*a67afe4dSAndroid Build Coastguard Worker$ CALL MAKE pnm2png.OBJ "cc ''CCOPT' pnm2png" - 41*a67afe4dSAndroid Build Coastguard Worker pnm2png.c 42*a67afe4dSAndroid Build Coastguard Worker$ call make pnm2png.exe - 43*a67afe4dSAndroid Build Coastguard Worker "LINK pnm2png,lib.opt/opt" - 44*a67afe4dSAndroid Build Coastguard Worker pnm2png.obj 45*a67afe4dSAndroid Build Coastguard Worker$ write sys$output "Building png2pnm..." 46*a67afe4dSAndroid Build Coastguard Worker$ CALL MAKE png2pnm.OBJ "cc ''CCOPT' png2pnm" - 47*a67afe4dSAndroid Build Coastguard Worker png2pnm.c 48*a67afe4dSAndroid Build Coastguard Worker$ call make png2pnm.exe - 49*a67afe4dSAndroid Build Coastguard Worker "LINK png2pnm,lib.opt/opt" - 50*a67afe4dSAndroid Build Coastguard Worker png2pnm.obj 51*a67afe4dSAndroid Build Coastguard Worker$ exit 52*a67afe4dSAndroid Build Coastguard Worker$! 53*a67afe4dSAndroid Build Coastguard Worker$! 54*a67afe4dSAndroid Build Coastguard Worker$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES 55*a67afe4dSAndroid Build Coastguard Worker$ V = 'F$Verify(0) 56*a67afe4dSAndroid Build Coastguard Worker$! P1 = What we are trying to make 57*a67afe4dSAndroid Build Coastguard Worker$! P2 = Command to make it 58*a67afe4dSAndroid Build Coastguard Worker$! P3 - P8 What it depends on 59*a67afe4dSAndroid Build Coastguard Worker$ 60*a67afe4dSAndroid Build Coastguard Worker$ If F$Search(P1) .Eqs. "" Then Goto Makeit 61*a67afe4dSAndroid Build Coastguard Worker$ Time = F$CvTime(F$File(P1,"RDT")) 62*a67afe4dSAndroid Build Coastguard Worker$arg=3 63*a67afe4dSAndroid Build Coastguard Worker$Loop: 64*a67afe4dSAndroid Build Coastguard Worker$ Argument = P'arg 65*a67afe4dSAndroid Build Coastguard Worker$ If Argument .Eqs. "" Then Goto Exit 66*a67afe4dSAndroid Build Coastguard Worker$ El=0 67*a67afe4dSAndroid Build Coastguard Worker$Loop2: 68*a67afe4dSAndroid Build Coastguard Worker$ File = F$Element(El," ",Argument) 69*a67afe4dSAndroid Build Coastguard Worker$ If File .Eqs. " " Then Goto Endl 70*a67afe4dSAndroid Build Coastguard Worker$ AFile = "" 71*a67afe4dSAndroid Build Coastguard Worker$Loop3: 72*a67afe4dSAndroid Build Coastguard Worker$ OFile = AFile 73*a67afe4dSAndroid Build Coastguard Worker$ AFile = F$Search(File) 74*a67afe4dSAndroid Build Coastguard Worker$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl 75*a67afe4dSAndroid Build Coastguard Worker$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit 76*a67afe4dSAndroid Build Coastguard Worker$ Goto Loop3 77*a67afe4dSAndroid Build Coastguard Worker$NextEL: 78*a67afe4dSAndroid Build Coastguard Worker$ El = El + 1 79*a67afe4dSAndroid Build Coastguard Worker$ Goto Loop2 80*a67afe4dSAndroid Build Coastguard Worker$EndL: 81*a67afe4dSAndroid Build Coastguard Worker$ arg=arg+1 82*a67afe4dSAndroid Build Coastguard Worker$ If arg .Le. 8 Then Goto Loop 83*a67afe4dSAndroid Build Coastguard Worker$ Goto Exit 84*a67afe4dSAndroid Build Coastguard Worker$ 85*a67afe4dSAndroid Build Coastguard Worker$Makeit: 86*a67afe4dSAndroid Build Coastguard Worker$ VV=F$VERIFY(0) 87*a67afe4dSAndroid Build Coastguard Worker$ write sys$output P2 88*a67afe4dSAndroid Build Coastguard Worker$ 'P2 89*a67afe4dSAndroid Build Coastguard Worker$ VV='F$Verify(VV) 90*a67afe4dSAndroid Build Coastguard Worker$Exit: 91*a67afe4dSAndroid Build Coastguard Worker$ If V Then Set Verify 92*a67afe4dSAndroid Build Coastguard Worker$ENDSUBROUTINE 93