$! make libjpeg under VMS $! written by Jean-Francois Pieronne $! $ $ proc = f$environment("PROCEDURE") $ cur_dev = f$parse(proc,,,"DEVICE","SYNTAX_ONLY") $ cur_dir = f$parse(proc,,,"DIRECTORY","SYNTAX_ONLY") $ set default 'cur_dev''cur_dir' $ set default [-] $ $ if f$getsyi("ARCH_TYPE").gt. 1 $ then $ if p1 .eqs. "" $ then $ @'proc' long $ @'proc' nolong $ exit $ endif $ endif $ $ if f$getsyi("ARCH_TYPE").gt. 1 $ then $ cflags = "/prefix=all/names=(as_is)/accept=novaxc_keywords/float=ieee" $ version = F$GETSYI("VERSION") $ version_number = F$EXTRACT(1,3,version) $ if f$extract(0,1,version) .eqs. "V" .or. - f$extract(0,1,version) .eqs. "T" .or. - f$extract(0,1,version) .eqs. "E" .or. - f$extract(0,1,version) .eqs. "X" $ then $ if (version_number .GES. "7.2") $ then $ cflags = cflags + "/def=(_LARGEFILE)" $ endif $ endif $ if p1 .eqs. "LONG" $ then $ cflags = cflags + "/pointer=long" $ endif $ else $ cflags = "/prefix=all/accept=novaxc_keywords" $ endif $ $ cflags = cflags + "/include=libz:" $ $! $ cc 'cflags' png.c $ cc 'cflags' pngerror.c $ cc 'cflags' pngget.c $ cc 'cflags' pngmem.c $ cc 'cflags' pngpread.c $ cc 'cflags' pngread.c $ cc 'cflags' pngrio.c $ cc 'cflags' pngrtran.c $ cc 'cflags' pngrutil.c $ cc 'cflags' pngset.c $ cc 'cflags' pngtrans.c $ cc 'cflags' pngwio.c $ cc 'cflags' pngwrite.c $ cc 'cflags' pngwtran.c $ cc 'cflags' pngwutil.c $ $! $ library /create libpng.olb png.obj, pngset.obj, pngget.obj, - pngrutil.obj, pngtrans.obj, pngwutil.obj, pngread.obj, - pngmem.obj, pngwrite.obj, pngrtran.obj, pngwtran.obj, - pngrio.obj, pngwio.obj, pngerror.obj, pngpread.obj $! $ cc 'cflags' pngtest.c $ if f$getsyi("ARCH_TYPE") .gt. 1 $ then $ if p1 .eqs. "LONG" $ then $ zlib = "libz:libz64.olb" $ else $ zlib = "libz:libz32.olb" $ endif $ else $ zlib = "libz:libz.olb" $ endif $ link/exec=pngtest.exe pngtest.obj, libpng.olb/lib, 'zlib'/lib $! $! Run the self-test $! $ mcr sys$disk:[]pngtest $! $ if f$getsyi("ARCH_TYPE").gt. 1 $ then $ copy [.scripts]libpng-1_2_5.opt_vms [.scripts]libpng-1_2_5.opt $ if p1 .eqs. "LONG" $ then $ append sys$input [.scripts]libpng-1_2_5.opt libz_shr64/share $ else $ append sys$input [.scripts]libpng-1_2_5.opt libz_shr32/share $ endif $ link/share=libpngshr-1_2_5.exe [.scripts]libpng-1_2_5.opt/options $ if p1 .eqs. "LONG" $ then $ rename libpngshr-1_2_5.exe libpngshr64-1_2_5.exe $ rename libpng.olb libpng64.olb $ rename pngtest.exe pngtest64.exe $ else $ rename libpngshr-1_2_5.exe libpngshr32-1_2_5.exe $ rename libpng.olb libpng32.olb $ rename pngtest.exe pngtest32.exe $ endif $ endif $ $ delete *.obj;*, pngout.png;*, [.scripts]libpng-1_2_5.opt;* $ $end: $ exit