netware.bat 2.1 KB

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