| OLD | NEW |
| (Empty) |
| 1 @echo off | |
| 2 rem batch file to build multi-thread test ( mttest.nlm ) | |
| 3 | |
| 4 rem command line arguments: | |
| 5 rem debug => build using debug settings | |
| 6 | |
| 7 rem | |
| 8 rem After building, copy mttest.nlm to the server and run it, you'll probably | |
| 9 rem want to redirect stdout and stderr. An example command line would be | |
| 10 rem "mttest.nlm -thread 20 -loops 10 -CAfile \openssl\apps\server.pem >mttest.ou
t 2>mttest.err" | |
| 11 rem | |
| 12 | |
| 13 del mttest.nlm | |
| 14 | |
| 15 set BLD_DEBUG= | |
| 16 set CFLAGS= | |
| 17 set LFLAGS= | |
| 18 set LIBS= | |
| 19 | |
| 20 if "%1" == "DEBUG" set BLD_DEBUG=YES | |
| 21 if "%1" == "debug" set BLD_DEBUG=YES | |
| 22 | |
| 23 if "%MWCIncludes%" == "" goto inc_error | |
| 24 if "%PRELUDE%" == "" goto prelude_error | |
| 25 if "%IMPORTS%" == "" goto imports_error | |
| 26 | |
| 27 set CFLAGS=-c -I..\..\outinc_nw -nosyspath -DOPENSSL_SYS_NETWARE -opt off -g -sy
m internal -maxerrors 20 | |
| 28 | |
| 29 if "%BLD_DEBUG%" == "YES" set LIBS=..\..\out_nw.dbg\ssl.lib ..\..\out_nw.dbg\cry
pto.lib | |
| 30 if "%BLD_DEBUG%" == "" set LIBS=..\..\out_nw\ssl.lib ..\..\out_nw\crypto.lib | |
| 31 | |
| 32 set LFLAGS=-msgstyle gcc -zerobss -stacksize 32768 -nostdlib -sym internal | |
| 33 | |
| 34 rem generate command file for metrowerks | |
| 35 echo. | |
| 36 echo Generating Metrowerks command file: mttest.def | |
| 37 echo # dynamically generated command file for metrowerks build > mttest.def | |
| 38 echo IMPORT @%IMPORTS%\clib.imp >> mttest.def | |
| 39 echo IMPORT @%IMPORTS%\threads.imp >> mttest.def | |
| 40 echo IMPORT @%IMPORTS%\ws2nlm.imp >> mttest.def | |
| 41 echo IMPORT GetProcessSwitchCount >> mttest.def | |
| 42 echo MODULE clib >> mttest.def | |
| 43 | |
| 44 rem compile | |
| 45 echo. | |
| 46 echo Compiling mttest.c | |
| 47 mwccnlm.exe mttest.c %CFLAGS% | |
| 48 if errorlevel 1 goto end | |
| 49 | |
| 50 rem link | |
| 51 echo. | |
| 52 echo Linking mttest.nlm | |
| 53 mwldnlm.exe %LFLAGS% -screenname mttest -commandfile mttest.def mttest.o "%PRELU
DE%" %LIBS% -o mttest.nlm | |
| 54 if errorlevel 1 goto end | |
| 55 | |
| 56 goto end | |
| 57 | |
| 58 :inc_error | |
| 59 echo. | |
| 60 echo Environment variable MWCIncludes is not set - see install.nw | |
| 61 goto end | |
| 62 | |
| 63 :prelude_error | |
| 64 echo. | |
| 65 echo Environment variable PRELUDE is not set - see install.nw | |
| 66 goto end | |
| 67 | |
| 68 :imports_error | |
| 69 echo. | |
| 70 echo Environment variable IMPORTS is not set - see install.nw | |
| 71 goto end | |
| 72 | |
| 73 | |
| 74 :end | |
| 75 set BLD_DEBUG= | |
| 76 set CFLAGS= | |
| 77 set LFLAGS= | |
| 78 set LIBS= | |
| 79 | |
| OLD | NEW |