
1: @echo off 2: 3: rem ======================================================================== 4: rem Batch file to automate building OpenSSL for NetWare. 5: rem 6: rem usage: 7: rem build [target] [debug opts] [assembly opts] [configure opts] 8: rem 9: rem target - "netware-clib" - CLib NetWare build (WinSock Sockets) 10: rem - "netware-libc" - LibC NKS NetWare build (WinSock Sockets) 11: rem - "netware-libc-bsdsock" - LibC NKS NetWare build (BSD Sockets) 12: rem 13: rem debug opts - "debug" - build debug 14: rem 15: rem assembly opts - "nw-mwasm" - use Metrowerks assembler 16: rem - "nw-nasm" - use NASM assembler 17: rem - "no-asm" - don't use assembly 18: rem 19: rem configure opts- all unrecognized arguments are passed to the 20: rem perl configure script 21: rem 22: rem If no arguments are specified the default is to build non-debug with 23: rem no assembly. NOTE: there is no default BLD_TARGET. 24: rem 25: 26: 27: 28: rem No assembly is the default - Uncomment section below to change 29: rem the assembler default 30: set ASM_MODE= 31: set ASSEMBLER= 32: set NO_ASM=no-asm 33: 34: rem Uncomment to default to the Metrowerks assembler 35: rem set ASM_MODE=nw-mwasm 36: rem set ASSEMBLER=Metrowerks 37: rem set NO_ASM= 38: 39: rem Uncomment to default to the NASM assembler 40: rem set ASM_MODE=nw-nasm 41: rem set ASSEMBLER=NASM 42: rem set NO_ASM= 43: 44: rem No default Bld target 45: set BLD_TARGET=no_target 46: rem set BLD_TARGET=netware-clib 47: rem set BLD_TARGET=netware-libc 48: 49: 50: rem Default to build non-debug 51: set DEBUG= 52: 53: rem Uncomment to default to debug build 54: rem set DEBUG=debug 55: 56: 57: set CONFIG_OPTS= 58: set ARG_PROCESSED=NO 59: 60: 61: rem Process command line args 62: :opts 63: if "a%1" == "a" goto endopt 64: if "%1" == "no-asm" set NO_ASM=no-asm 65: if "%1" == "no-asm" set ARG_PROCESSED=YES 66: if "%1" == "debug" set DEBUG=debug 67: if "%1" == "debug" set ARG_PROCESSED=YES 68: if "%1" == "nw-nasm" set ASM_MODE=nw-nasm 69: if "%1" == "nw-nasm" set ASSEMBLER=NASM 70: if "%1" == "nw-nasm" set NO_ASM= 71: if "%1" == "nw-nasm" set ARG_PROCESSED=YES 72: if "%1" == "nw-mwasm" set ASM_MODE=nw-mwasm 73: if "%1" == "nw-mwasm" set ASSEMBLER=Metrowerks 74: if "%1" == "nw-mwasm" set NO_ASM= 75: if "%1" == "nw-mwasm" set ARG_PROCESSED=YES 76: if "%1" == "netware-clib" set BLD_TARGET=netware-clib 77: if "%1" == "netware-clib" set ARG_PROCESSED=YES 78: if "%1" == "netware-libc" set BLD_TARGET=netware-libc 79: if "%1" == "netware-libc" set ARG_PROCESSED=YES 80: if "%1" == "netware-libc-bsdsock" set BLD_TARGET=netware-libc-bsdsock 81: if "%1" == "netware-libc-bsdsock" set ARG_PROCESSED=YES 82: 83: rem If we didn't recognize the argument, consider it an option for config 84: if "%ARG_PROCESSED%" == "NO" set CONFIG_OPTS=%CONFIG_OPTS% %1 85: if "%ARG_PROCESSED%" == "YES" set ARG_PROCESSED=NO 86: 87: shift 88: goto opts 89: :endopt 90: 91: rem make sure a valid BLD_TARGET was specified 92: if "%BLD_TARGET%" == "no_target" goto no_target 93: 94: rem build the nlm make file name which includes target and debug info 95: set NLM_MAKE= 96: if "%BLD_TARGET%" == "netware-clib" set NLM_MAKE=netware\nlm_clib 97: if "%BLD_TARGET%" == "netware-libc" set NLM_MAKE=netware\nlm_libc 98: if "%BLD_TARGET%" == "netware-libc-bsdsock" set NLM_MAKE=netware\nlm_libc_bsdsock 99: if "%DEBUG%" == "" set NLM_MAKE=%NLM_MAKE%.mak 100: if "%DEBUG%" == "debug" set NLM_MAKE=%NLM_MAKE%_dbg.mak 101: 102: if "%NO_ASM%" == "no-asm" set ASM_MODE= 103: if "%NO_ASM%" == "no-asm" set ASSEMBLER= 104: if "%NO_ASM%" == "no-asm" set CONFIG_OPTS=%CONFIG_OPTS% no-asm 105: if "%NO_ASM%" == "no-asm" goto do_config 106: 107: 108: rem ================================================== 109: echo Generating x86 for %ASSEMBLER% assembler 110: 111: echo Bignum 112: cd crypto\bn\asm 113: perl x86.pl %ASM_MODE% > bn-nw.asm 114: cd ..\..\.. 115: 116: echo DES 117: cd crypto\des\asm 118: perl des-586.pl %ASM_MODE% > d-nw.asm 119: cd ..\..\.. 120: 121: echo "crypt(3)" 122: 123: cd crypto\des\asm 124: perl crypt586.pl %ASM_MODE% > y-nw.asm 125: cd ..\..\.. 126: 127: echo Blowfish 128: 129: cd crypto\bf\asm 130: perl bf-586.pl %ASM_MODE% > b-nw.asm 131: cd ..\..\.. 132: 133: echo CAST5 134: cd crypto\cast\asm 135: perl cast-586.pl %ASM_MODE% > c-nw.asm 136: cd ..\..\.. 137: 138: echo RC4 139: cd crypto\rc4\asm 140: perl rc4-586.pl %ASM_MODE% > r4-nw.asm 141: cd ..\..\.. 142: 143: echo MD5 144: cd crypto\md5\asm 145: perl md5-586.pl %ASM_MODE% > m5-nw.asm 146: cd ..\..\.. 147: 148: echo SHA1 149: cd crypto\sha\asm 150: perl sha1-586.pl %ASM_MODE% > s1-nw.asm 151: cd ..\..\.. 152: 153: echo RIPEMD160 154: cd crypto\ripemd\asm 155: perl rmd-586.pl %ASM_MODE% > rm-nw.asm 156: cd ..\..\.. 157: 158: echo RC5\32 159: cd crypto\rc5\asm 160: perl rc5-586.pl %ASM_MODE% > r5-nw.asm 161: cd ..\..\.. 162: 163: rem =============================================================== 164: rem 165: :do_config 166: 167: echo . 168: echo configure options: %CONFIG_OPTS% %BLD_TARGET% 169: echo . 170: perl configure %CONFIG_OPTS% %BLD_TARGET% 171: 172: perl util\mkfiles.pl >MINFO 173: 174: echo . 175: echo mk1mf.pl options: %DEBUG% %ASM_MODE% %CONFIG_OPTS% %BLD_TARGET% 176: echo . 177: perl util\mk1mf.pl %DEBUG% %ASM_MODE% %CONFIG_OPTS% %BLD_TARGET% >%NLM_MAKE% 178: 179: echo The makefile "%NLM_MAKE%" has been created use your maketool to 180: echo build (ex: gmake -f %NLM_MAKE%) 181: goto end 182: 183: rem =============================================================== 184: rem 185: :no_target 186: echo . 187: echo . No build target specified!!! 188: echo . 189: echo . usage: build [target] [debug opts] [assembly opts] [configure opts] 190: echo . 191: echo . target - "netware-clib" - CLib NetWare build (WinSock Sockets) 192: echo . - "netware-libc" - LibC NKS NetWare build (WinSock Sockets) 193: echo . - "netware-libc-bsdsock" - LibC NKS NetWare build (BSD Sockets) 194: echo . 195: echo . debug opts - "debug" - build debug 196: echo . 197: echo . assembly opts - "nw-mwasm" - use Metrowerks assembler 198: echo . "nw-nasm" - use NASM assembler 199: echo . "no-asm" - don't use assembly 200: echo . 201: echo . configure opts- all unrecognized arguments are passed to the 202: echo . perl configure script 203: echo . 204: echo . If no debug or assembly opts are specified the default is to build 205: echo . non-debug without assembly 206: echo . 207: 208: 209: :end