2003-11-28 13:10:58 +00:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
rem ========================================================================
|
|
|
|
rem Batch file to assist in setting up the necessary enviroment for
|
|
|
|
rem building OpenSSL for NetWare.
|
|
|
|
rem
|
|
|
|
rem usage:
|
|
|
|
rem set_env [target]
|
|
|
|
rem
|
|
|
|
rem target - "netware-clib" - Clib build
|
|
|
|
rem - "netware-libc" - LibC build
|
|
|
|
rem
|
|
|
|
rem
|
|
|
|
|
|
|
|
if "a%1" == "a" goto usage
|
|
|
|
|
|
|
|
set LIBC_BUILD=
|
|
|
|
set CLIB_BUILD=
|
2008-01-03 22:43:04 +00:00
|
|
|
set GNUC=
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
if "%1" == "netware-clib" set CLIB_BUILD=Y
|
|
|
|
if "%1" == "netware-clib" set LIBC_BUILD=
|
|
|
|
|
2008-01-03 22:43:04 +00:00
|
|
|
if "%1" == "netware-libc" set LIBC_BUILD=Y
|
|
|
|
if "%1" == "netware-libc" set CLIB_BUILD=
|
|
|
|
|
|
|
|
if "%2" == "gnuc" set GNUC=Y
|
|
|
|
if "%2" == "codewarrior" set GNUC=
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
rem Location of tools (compiler, linker, etc)
|
2008-01-03 22:43:04 +00:00
|
|
|
if "%NDKBASE%" == "" set NDKBASE=c:\Novell
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
rem If Perl for Win32 is not already in your path, add it here
|
|
|
|
set PERL_PATH=
|
|
|
|
|
|
|
|
rem Define path to the Metrowerks command line tools
|
2008-01-03 22:43:04 +00:00
|
|
|
rem or GNU Crosscompiler gcc / nlmconv
|
2003-11-28 13:10:58 +00:00
|
|
|
rem ( compiler, assembler, linker)
|
2008-01-03 22:43:04 +00:00
|
|
|
if "%GNUC%" == "Y" set COMPILER_PATH=c:\usr\i586-netware\bin;c:\usr\bin
|
|
|
|
if "%GNUC%" == "" set COMPILER_PATH=c:\prg\cwcmdl40
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
rem If using gnu make define path to utility
|
2008-01-03 22:43:04 +00:00
|
|
|
rem set GNU_MAKE_PATH=%NDKBASE%\gnu
|
|
|
|
set GNU_MAKE_PATH=c:\prg\tools
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
rem If using ms nmake define path to nmake
|
2008-01-03 22:43:04 +00:00
|
|
|
rem set MS_NMAKE_PATH=%NDKBASE%\msvc\600\bin
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
rem If using NASM assembler define path
|
2008-01-03 22:43:04 +00:00
|
|
|
rem set NASM_PATH=%NDKBASE%\nasm
|
|
|
|
set NASM_PATH=c:\prg\tools
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
rem Update path to include tool paths
|
2008-01-03 22:43:04 +00:00
|
|
|
set path=%path%;%COMPILER_PATH%
|
2003-11-28 13:10:58 +00:00
|
|
|
if not "%GNU_MAKE_PATH%" == "" set path=%path%;%GNU_MAKE_PATH%
|
|
|
|
if not "%MS_NMAKE_PATH%" == "" set path=%path%;%MS_NMAKE_PATH%
|
|
|
|
if not "%NASM_PATH%" == "" set path=%path%;%NASM_PATH%
|
|
|
|
if not "%PERL_PATH%" == "" set path=%path%;%PERL_PATH%
|
|
|
|
|
2008-01-03 22:43:04 +00:00
|
|
|
rem Set INCLUDES to location of Novell NDK includes
|
|
|
|
if "%LIBC_BUILD%" == "Y" set INCLUDE=%NDKBASE%\ndk\libc\include;%NDKBASE%\ndk\libc\include\winsock
|
|
|
|
if "%CLIB_BUILD%" == "Y" set INCLUDE=%NDKBASE%\ndk\nwsdk\include\nlm;%NDKBASE%\ws295sdk\include
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
rem Set Imports to location of Novell NDK import files
|
2008-01-03 22:43:04 +00:00
|
|
|
if "%LIBC_BUILD%" == "Y" set IMPORTS=%NDKBASE%\ndk\libc\imports
|
|
|
|
if "%CLIB_BUILD%" == "Y" set IMPORTS=%NDKBASE%\ndk\nwsdk\imports
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
rem Set PRELUDE to the absolute path of the prelude object to link with in
|
2004-06-28 11:55:28 +00:00
|
|
|
rem the Metrowerks NetWare PDK - NOTE: for Clib builds "clibpre.o" is
|
2003-11-28 13:10:58 +00:00
|
|
|
rem recommended, for LibC NKS builds libcpre.o must be used
|
2008-01-03 22:43:04 +00:00
|
|
|
if "%GNUC%" == "Y" goto gnuc
|
2004-06-28 11:55:28 +00:00
|
|
|
if "%LIBC_BUILD%" == "Y" set PRELUDE=%IMPORTS%\libcpre.o
|
2008-01-03 22:43:04 +00:00
|
|
|
rem if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\clibpre.o
|
|
|
|
if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\prelude.o
|
|
|
|
echo using MetroWerks CodeWarrior
|
|
|
|
goto info
|
|
|
|
|
|
|
|
:gnuc
|
|
|
|
if "%LIBC_BUILD%" == "Y" set PRELUDE=%IMPORTS%\libcpre.gcc.o
|
|
|
|
rem if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\clibpre.gcc.o
|
|
|
|
if "%CLIB_BUILD%" == "Y" set PRELUDE=%IMPORTS%\prelude.gcc.o
|
|
|
|
echo using GNU GCC Compiler
|
2003-11-28 13:10:58 +00:00
|
|
|
|
2008-01-03 22:43:04 +00:00
|
|
|
:info
|
|
|
|
echo.
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
if "%LIBC_BUILD%" == "Y" echo Enviroment configured for LibC build
|
|
|
|
if "%LIBC_BUILD%" == "Y" echo use "netware\build.bat netware-libc ..."
|
|
|
|
|
|
|
|
if "%CLIB_BUILD%" == "Y" echo Enviroment configured for CLib build
|
|
|
|
if "%CLIB_BUILD%" == "Y" echo use "netware\build.bat netware-clib ..."
|
2008-01-03 22:43:04 +00:00
|
|
|
|
2003-11-28 13:10:58 +00:00
|
|
|
goto end
|
|
|
|
|
|
|
|
:usage
|
|
|
|
rem ===============================================================
|
2008-01-03 22:43:04 +00:00
|
|
|
echo.
|
|
|
|
echo No target build specified!
|
|
|
|
echo.
|
|
|
|
echo usage: set_env [target] [compiler]
|
|
|
|
echo.
|
|
|
|
echo target - "netware-clib" - Clib build
|
|
|
|
echo - "netware-libc" - LibC build
|
|
|
|
echo.
|
|
|
|
echo compiler - "gnuc" - GNU GCC Compiler
|
|
|
|
echo - "codewarrior" - MetroWerks CodeWarrior (default)
|
|
|
|
echo.
|
2003-11-28 13:10:58 +00:00
|
|
|
|
|
|
|
:end
|
2008-01-03 22:43:04 +00:00
|
|
|
echo.
|
|
|
|
|
2003-11-28 13:10:58 +00:00
|
|
|
|