@echo off rem (C) Copyright 2001 TELOGY Networks, Inc. rem We can use either the clearcase version of perl "ccperl", or the rem cygwin version of perl, "perl". Under windows, "ccperl" is MUCH faster. rem Make sure path defined in next sextion contains your selected version. rem If no perl is available, then set to blank. This will disable tools rem validation and command line validation. rem rem Use this if you want to use clearcase perl set PERL=ccperl set PERLDOS=ccperl rem Use this if you want to use active perl rem set PERL=//c/perl/bin/perl rem PERLDOS=c:\perl\bin\perl rem ************************** Environment Configuration ********************* rem Configure the environment variables for DSP builds rem ************************************************************************** rem MAKE_MODE=WINDOWS|UNIX tells GNU make to use CMD.EXE or SH.EXE set MAKE_MODE=WINDOWS rem CYGWIN sets default options for all cygnus gnu ports set CYGWIN= rem Set a defined path which has no other compilers or unix tools rem the makefiles will specify tools with their whole path, but the tools rem require themselves to be in the path to work right. rem rem This is done because windows does not hash the path, so path search rem performance is very poor. Lets avoid path searches. rem set PATH=c:\tools\c54x\ti-c\ccs1-20\cgtools\bin; set PATH=%PATH%;c:\tools\c5xx\ccs220\c5500\cgtools\bin; set PATH=%PATH%;c:\tools\c6xx\cgen436\c6000\cgtools\bin; set PATH=%PATH%;c:\tools;t:\gen\gnu\99-11-01\cygwin-b20\H-i586-cygwin32\bin; set PATH=%PATH%;c:\winnt\system32;c:\winnt;c:\windows;C:\windows\system32 set PATH=%PATH%;c:\apln\atria\bin;c:\progra~1\Rational\clearcase\bin rem r9.0 requires tools from ccs1-20. set TOOLC54XSRC=t:\c54x\ti-c\ccs1-20 set TOOLC54XDST=c:\tools\c54x\ti-c\ccs1-20 rem r9.1 requires C55X tools codegen 230. set TOOLC55XSRC=t:\c5xx\ccs220 set TOOLC55XDST=c:\tools\c5xx\ccs220 rem r9.0 requires linker from v3.65 set SRC365=t:\c54x\ti-c\3-65a set DST365=c:\tools\c54x\ti-c\3-65a rem currently tools ver 4.36 are being used for c64x set TOOLC64XSRC=T:\c6xx\cgen436\c6000 set TOOLC64XDST=c:\tools\c6xx\cgen436\c6000 rem following two lines is added to copy xdais&bios tools from ccs set TOOLCCSC64XSRC=T:\c6xx\ccs220\c6000 set TOOLCCSC64XDST=c:\tools\c6xx\ccs220\c6000 rem ************************* Tools Copy/Validation ************************** rem If the "bypass" option is not provided, validate/copy the tools rem ********************************************************************* if "%PERLDOS%" == "" goto environment rem ************************* Tools Copy/Validation ************************** rem If the "bypass" option is not provided, validate/copy the tools rem ********************************************************************* if "%1" == "bypass" goto environment rem check, but don't copy tools if "%1" == "" goto toolcheck rem copy tools if check fails if "%1" == "enable_write" goto toolcopy rem error: invalid argument echo =========================== INVALID ARGUMENT ============================ echo Option "%1" is invalid. Valid options are: echo "bypass": configure environment without checking tools echo "enable_write": *****ERASE***** all files in %TOOLDST%, echo and replace with correct tools echo =========================== INVALID ARGUMENT ============================ goto end :toolcheck echo Verifying local tools goto toolperl :toolcopy echo UPDATING local tools :toolperl %PERLDOS% cpytools.pl %TOOLC54XSRC% %TOOLC54XDST% %1 rem note: windows is stupid; "errorlevel 1" means "retval >= 1" if errorlevel 1 goto error %PERLDOS% cpytools.pl %TOOLC55XSRC% %TOOLC55XDST% %1 rem note: windows is stupid; "errorlevel 1" means "retval >= 1" if errorlevel 1 goto error %PERLDOS% cpytools.pl %SRC365% %DST365% %1 rem note: windows is stupid; "errorlevel 1" means "retval >= 1" if errorlevel 1 goto error %PERLDOS% cpytools.pl %TOOLC64XSRC% %TOOLC64XDST% %1 rem note: windows is stupid; "errorlevel 1" means "retval >= 1" if errorlevel 1 goto error %PERLDOS% cpytools.pl %TOOLCCSC64XSRC% %TOOLCCSC64XDST% %1 rem note: windows is stupid; "errorlevel 1" means "retval >= 1" if errorlevel 1 goto error echo Local tools are good. :environment rem Clean up variables which affect the tools to avoid side effects set C54X_A_DIR= set C54X_C_DIR= set C55X_A_DIR= set C55X_C_DIR= set C6X_C_DIR= set C6X_A_DIR= set A_DIR= set C_DIR= rem Path to tools, in unix format set TOOLSC54X=//c/tools/c54x/ti-c/ccs1-20 set TOOLSC55X=//c/tools/c5xx/ccs220/c5500 set TOOLSC64X=//c/tools/c6xx/cgen436/c6000 rem Path to tools, in DOS format set TOOLSC54XDOS=c:\tools\c54x\ti-c\ccs1-20 set TOOLSC55XDOS=c:\tools\c5xx\ccs220\c5500 set TOOLSC64XDOS=c:\tools\c6xx\cgen436\c6000 rem following line is added to use xdais&bios tools from ccs set TOOLSCCSC64XDOS=c:\tools\c6xx\ccs220\c6000 rem Path to 'makedep.exe', in UNIX format set TOOLSC54X365=//c/tools/c54x/ti-c/3-65a set TOOLSC54X365DOS=c:\tools\c54x\ti-c\3-65a set CYGWINPATH=//t/gen/gnu/99-11-01/cygwin-b20/H-i586-cygwin32/bin rem Generate path to makedep, then set it rm -f mkdeppath.bat sh -c "makedepdir=`pwd`;echo set MAKEDEPPATH=`dirname $makedepdir`/mkrel/makedep.exe" >mkdeppath.bat call mkdeppath.bat echo ================== ENVIRONMENT SUCESSFULLY CONFIGURED ================== goto end rem ************************** Bad Tools ************************************* rem Tools are bad; deconfigure environment and print error rem ************************************************************************** :error set TOOLS= set TOOLSDOS= set MAKEDEPPATH= echo ============================== BAD TOOLS ================================= echo * Build environment is NOT configured. You may rerun script with: echo * echo * %0 bypass echo * configure environment without checking tools. This option is echo * is used when the user will manually configure the tools. echo * echo * %0 enable_write echo * [*** DANGEROUS OPTION ***] echo * This option echo * 1) *** DANGER *** Recursively deletes all files in subdirectories echo * a. %DST365%, echo * b. %TOOLC54XDST%, echo * c. %TOOLC55XDST% and echo * d. %TOOLC64XDST% echo * 2) Copies correct tools from the subdirectories echo * a. %SRC365%, echo * b. %TOOLC54XSRC%, echo * c. %TOOLC55XSRC% and echo * d. %TOOLC64XSRC% echo * echo ============================== BAD TOOLS ================================= goto end :end rem remove unused environent variables set TOOLC54XDST= set TOOLC54XSRC= set TOOLC55XDST= set TOOLC55XSRC= set TOOLC64XSRC= set TOOLC64XDST= set TOOLCCSC64XSRC= set TOOLCCSC64XDST= set SRC365= set DST365= set TOOLS= set TOOLSDOS= set PERLDOS=