2 rem batch file to build multi-thread test ( mttest.nlm )
4 rem command line arguments:
5 rem debug => build using debug settings
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.out 2>mttest.err"
20 if "%1" == "DEBUG" set BLD_DEBUG=YES
21 if "%1" == "debug" set BLD_DEBUG=YES
23 if "%MWCIncludes%" == "" goto inc_error
24 if "%PRELUDE%" == "" goto prelude_error
25 if "%IMPORTS%" == "" goto imports_error
27 set CFLAGS=-c -I..\..\outinc_nw -nosyspath -DOPENSSL_SYS_NETWARE -opt off -g -sym internal -maxerrors 20
29 if "%BLD_DEBUG%" == "YES" set LIBS=..\..\out_nw.dbg\ssl.lib ..\..\out_nw.dbg\crypto.lib
30 if "%BLD_DEBUG%" == "" set LIBS=..\..\out_nw\ssl.lib ..\..\out_nw\crypto.lib
32 set LFLAGS=-msgstyle gcc -zerobss -stacksize 32768 -nostdlib -sym internal
34 rem generate command file for metrowerks
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
46 echo Compiling mttest.c
47 mwccnlm.exe mttest.c %CFLAGS%
48 if errorlevel 1 goto end
52 echo Linking mttest.nlm
53 mwldnlm.exe %LFLAGS% -screenname mttest -commandfile mttest.def mttest.o "%PRELUDE%" %LIBS% -o mttest.nlm
54 if errorlevel 1 goto end
60 echo Environment variable MWCIncludes is not set - see install.nw
65 echo Environment variable PRELUDE is not set - see install.nw
70 echo Environment variable IMPORTS is not set - see install.nw