📄 build.bat
字号:
@echo offrem ========================================================================rem Batch file to automate building OpenSSL for NetWare.remrem usage:rem build [target] [debug opts] [assembly opts] [configure opts]remrem target - "netware-clib" - CLib NetWare build (WinSock Sockets)rem - "netware-libc" - LibC NKS NetWare build (WinSock Sockets)rem - "netware-libc-bsdsock" - LibC NKS NetWare build (BSD Sockets)rem rem debug opts - "debug" - build debugremrem assembly opts - "nw-mwasm" - use Metrowerks assemblerrem - "nw-nasm" - use NASM assemblerrem - "no-asm" - don't use assemblyremrem configure opts- all unrecognized arguments are passed to therem perl configure scriptremrem If no arguments are specified the default is to build non-debug withrem no assembly. NOTE: there is no default BLD_TARGET.remrem No assembly is the default - Uncomment section below to changerem the assembler defaultset ASM_MODE=set ASSEMBLER=set NO_ASM=no-asmrem Uncomment to default to the Metrowerks assemblerrem set ASM_MODE=nw-mwasmrem set ASSEMBLER=Metrowerksrem set NO_ASM=rem Uncomment to default to the NASM assemblerrem set ASM_MODE=nw-nasmrem set ASSEMBLER=NASMrem set NO_ASM=rem No default Bld targetset BLD_TARGET=no_targetrem set BLD_TARGET=netware-clibrem set BLD_TARGET=netware-libcrem Default to build non-debugset DEBUG= rem Uncomment to default to debug buildrem set DEBUG=debugset CONFIG_OPTS=set ARG_PROCESSED=NOrem Process command line args:optsif "a%1" == "a" goto endoptif "%1" == "no-asm" set NO_ASM=no-asmif "%1" == "no-asm" set ARG_PROCESSED=YESif "%1" == "debug" set DEBUG=debugif "%1" == "debug" set ARG_PROCESSED=YESif "%1" == "nw-nasm" set ASM_MODE=nw-nasmif "%1" == "nw-nasm" set ASSEMBLER=NASMif "%1" == "nw-nasm" set NO_ASM=if "%1" == "nw-nasm" set ARG_PROCESSED=YESif "%1" == "nw-mwasm" set ASM_MODE=nw-mwasmif "%1" == "nw-mwasm" set ASSEMBLER=Metrowerksif "%1" == "nw-mwasm" set NO_ASM=if "%1" == "nw-mwasm" set ARG_PROCESSED=YESif "%1" == "netware-clib" set BLD_TARGET=netware-clibif "%1" == "netware-clib" set ARG_PROCESSED=YESif "%1" == "netware-libc" set BLD_TARGET=netware-libcif "%1" == "netware-libc" set ARG_PROCESSED=YESif "%1" == "netware-libc-bsdsock" set BLD_TARGET=netware-libc-bsdsockif "%1" == "netware-libc-bsdsock" set ARG_PROCESSED=YESrem If we didn't recognize the argument, consider it an option for configif "%ARG_PROCESSED%" == "NO" set CONFIG_OPTS=%CONFIG_OPTS% %1if "%ARG_PROCESSED%" == "YES" set ARG_PROCESSED=NOshiftgoto opts:endoptrem make sure a valid BLD_TARGET was specifiedif "%BLD_TARGET%" == "no_target" goto no_targetrem build the nlm make file name which includes target and debug infoset NLM_MAKE=if "%BLD_TARGET%" == "netware-clib" set NLM_MAKE=netware\nlm_clibif "%BLD_TARGET%" == "netware-libc" set NLM_MAKE=netware\nlm_libcif "%BLD_TARGET%" == "netware-libc-bsdsock" set NLM_MAKE=netware\nlm_libc_bsdsockif "%DEBUG%" == "" set NLM_MAKE=%NLM_MAKE%.makif "%DEBUG%" == "debug" set NLM_MAKE=%NLM_MAKE%_dbg.makif "%NO_ASM%" == "no-asm" set ASM_MODE=if "%NO_ASM%" == "no-asm" set ASSEMBLER=if "%NO_ASM%" == "no-asm" set CONFIG_OPTS=%CONFIG_OPTS% no-asmif "%NO_ASM%" == "no-asm" goto do_configrem ==================================================echo Generating x86 for %ASSEMBLER% assemblerecho Bignumcd crypto\bn\asmperl x86.pl %ASM_MODE% > bn-nw.asmcd ..\..\..echo DEScd crypto\des\asmperl des-586.pl %ASM_MODE% > d-nw.asmcd ..\..\..echo "crypt(3)"cd crypto\des\asmperl crypt586.pl %ASM_MODE% > y-nw.asmcd ..\..\..echo Blowfishcd crypto\bf\asmperl bf-586.pl %ASM_MODE% > b-nw.asmcd ..\..\..echo CAST5cd crypto\cast\asmperl cast-586.pl %ASM_MODE% > c-nw.asmcd ..\..\..echo RC4cd crypto\rc4\asmperl rc4-586.pl %ASM_MODE% > r4-nw.asmcd ..\..\..echo MD5cd crypto\md5\asmperl md5-586.pl %ASM_MODE% > m5-nw.asmcd ..\..\..echo SHA1cd crypto\sha\asmperl sha1-586.pl %ASM_MODE% > s1-nw.asmcd ..\..\..echo RIPEMD160cd crypto\ripemd\asmperl rmd-586.pl %ASM_MODE% > rm-nw.asmcd ..\..\..echo RC5\32cd crypto\rc5\asmperl rc5-586.pl %ASM_MODE% > r5-nw.asmcd ..\..\..rem ===============================================================rem:do_configecho .echo configure options: %CONFIG_OPTS% %BLD_TARGET%echo .perl configure %CONFIG_OPTS% %BLD_TARGET%perl util\mkfiles.pl >MINFOecho .echo mk1mf.pl options: %DEBUG% %ASM_MODE% %CONFIG_OPTS% %BLD_TARGET%echo .perl util\mk1mf.pl %DEBUG% %ASM_MODE% %CONFIG_OPTS% %BLD_TARGET% >%NLM_MAKE%echo The makefile "%NLM_MAKE%" has been created use your maketool toecho build (ex: gmake -f %NLM_MAKE%)goto endrem ===============================================================rem:no_targetecho .echo . No build target specified!!!echo .echo . usage: build [target] [debug opts] [assembly opts] [configure opts]echo .echo . target - "netware-clib" - CLib NetWare build (WinSock Sockets)echo . - "netware-libc" - LibC NKS NetWare build (WinSock Sockets)echo . - "netware-libc-bsdsock" - LibC NKS NetWare build (BSD Sockets)echo .echo . debug opts - "debug" - build debugecho .echo . assembly opts - "nw-mwasm" - use Metrowerks assemblerecho . "nw-nasm" - use NASM assemblerecho . "no-asm" - don't use assemblyecho .echo . configure opts- all unrecognized arguments are passed to theecho . perl configure scriptecho .echo . If no debug or assembly opts are specified the default is to buildecho . non-debug without assemblyecho . :end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -