3 rem ========================================================================
4 rem Batch file to assist in setting up the necessary enviroment for
5 rem building OpenSSL for NetWare.
10 rem target - "netware-clib" - Clib build
11 rem - "netware-libc" - LibC build
15 if "a%1" == "a" goto usage
21 if "%1" == "netware-clib" set CLIB_BUILD=Y
22 if "%1" == "netware-clib" set LIBC_BUILD=
24 if "%1" == "netware-libc" set LIBC_BUILD=Y
25 if "%1" == "netware-libc" set CLIB_BUILD=
27 if "%2" == "gnuc" set GNUC=Y
28 if "%2" == "codewarrior" set GNUC=
30 rem Location of tools (compiler, linker, etc)
31 if "%NDKBASE%" == "" set NDKBASE=c:\Novell
33 rem If Perl for Win32 is not already in your path, add it here
36 rem Define path to the Metrowerks command line tools
37 rem or GNU Crosscompiler gcc / nlmconv
38 rem ( compiler, assembler, linker)
39 if "%GNUC%" == "Y" set COMPILER_PATH=c:\usr\i586-netware\bin;c:\usr\bin
40 if "%GNUC%" == "" set COMPILER_PATH=c:\prg\cwcmdl40
42 rem If using gnu make define path to utility
43 rem set GNU_MAKE_PATH=%NDKBASE%\gnu
44 set GNU_MAKE_PATH=c:\prg\tools
46 rem If using ms nmake define path to nmake
47 rem set MS_NMAKE_PATH=%NDKBASE%\msvc\600\bin
49 rem If using NASM assembler define path
50 rem set NASM_PATH=%NDKBASE%\nasm
51 set NASM_PATH=c:\prg\tools
53 rem Update path to include tool paths
54 set path=%path%;%COMPILER_PATH%
55 if not "%GNU_MAKE_PATH%" == "" set path=%path%;%GNU_MAKE_PATH%
56 if not "%MS_NMAKE_PATH%" == "" set path=%path%;%MS_NMAKE_PATH%
57 if not "%NASM_PATH%" == "" set path=%path%;%NASM_PATH%
58 if not "%PERL_PATH%" == "" set path=%path%;%PERL_PATH%
60 rem Set INCLUDES to location of Novell NDK includes
61 if "%LIBC_BUILD%" == "Y" set INCLUDE=%NDKBASE%\ndk\libc\include;%NDKBASE%\ndk\libc\include\winsock
62 if "%CLIB_BUILD%" == "Y" set INCLUDE=%NDKBASE%\ndk\nwsdk\include\nlm;%NDKBASE%\ws295sdk\include
64 rem Set Imports to location of Novell NDK import files
65 if "%LIBC_BUILD%" == "Y" set IMPORTS=%NDKBASE%\ndk\libc\imports
66 if "%CLIB_BUILD%" == "Y" set IMPORTS=%NDKBASE%\ndk\nwsdk\imports
68 rem Set PRELUDE to the absolute path of the prelude object to link with in
69 rem the Metrowerks NetWare PDK - NOTE: for Clib builds "clibpre.o" is
70 rem recommended, for LibC NKS builds libcpre.o must be used
71 if "%GNUC%" == "Y" goto gnuc
72 if "%LIBC_BUILD%" == "Y" set PRELUDE=%IMPORTS%\libcpre.o
73 rem if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\clibpre.o
74 if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\prelude.o
75 echo using MetroWerks CodeWarrior
79 if "%LIBC_BUILD%" == "Y" set PRELUDE=%IMPORTS%\libcpre.gcc.o
80 rem if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\clibpre.gcc.o
81 if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\prelude.gcc.o
82 echo using GNU GCC Compiler
87 if "%LIBC_BUILD%" == "Y" echo Enviroment configured for LibC build
88 if "%LIBC_BUILD%" == "Y" echo use "netware\build.bat netware-libc ..."
90 if "%CLIB_BUILD%" == "Y" echo Enviroment configured for CLib build
91 if "%CLIB_BUILD%" == "Y" echo use "netware\build.bat netware-clib ..."
96 rem ===============================================================
98 echo No target build specified!
100 echo usage: set_env [target] [compiler]
102 echo target - "netware-clib" - Clib build
103 echo - "netware-libc" - LibC build
105 echo compiler - "gnuc" - GNU GCC Compiler
106 echo - "codewarrior" - MetroWerks CodeWarrior (default)