$! make libbz2 under VMS $! written by Jean-Francois Pieronne $! Use bzip2.c, spewG.c and unzcrash.c from GNV $! small patch of bzip2.c to change envar BZIP2 and BZIP to $! BZIP2_FLAGS and BZIP_FLAGS $! $ 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' $ $ 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" $ cflags = cflags + "/debug/noopt" $ 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 $ $ cc 'cflags' blocksort $ cc 'cflags' huffman $ cc 'cflags' crctable $ cc 'cflags' randtable $ cc 'cflags' compress $ cc 'cflags' decompress $ cc 'cflags' bzlib $ $ library/create libbz2.olb - blocksort, - huffman, - crctable, - randtable, - compress, - decompress, - bzlib $ $ cc 'cflags' bzip2.c $ cc 'cflags' bzip2recover.c $ link bzip2, libbz2.olb/lib $ link bzip2recover, libbz2.olb/lib $ $ if f$getsyi("ARCH_TYPE").gt. 1 $ then $ link/share=libbz2shr-1_0_2.exe libbz2-1_0_2.opt/options $ if p1 .eqs. "LONG" $ then $ rename libbz2shr-1_0_2.exe libbz2shr64-1_0_2.exe $ rename libbz2.olb libbz2_64.olb $ rename bzip2.exe bzip2_64.exe $ rename bzip2recover.exe bzip2recover_64.exe $ else $ rename libbz2shr-1_0_2.exe libbz2shr32-1_0_2.exe $ rename libbz2.olb libbz2_32.olb $ rename bzip2.exe bzip2_32.exe $ rename bzip2recover.exe bzip2recover_32.exe $ endif $ endif $ $ delete *.obj;* $ $ exit