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