You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.3 KiB

  1. @echo off
  2. REM
  3. REM Copyright 2005-2013 Intel Corporation. All Rights Reserved.
  4. REM
  5. REM This file is part of Threading Building Blocks.
  6. REM
  7. REM Threading Building Blocks is free software; you can redistribute it
  8. REM and/or modify it under the terms of the GNU General Public License
  9. REM version 2 as published by the Free Software Foundation.
  10. REM
  11. REM Threading Building Blocks is distributed in the hope that it will be
  12. REM useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  13. REM of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. REM GNU General Public License for more details.
  15. REM
  16. REM You should have received a copy of the GNU General Public License
  17. REM along with Threading Building Blocks; if not, write to the Free Software
  18. REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  19. REM
  20. REM As a special exception, you may use this file as part of a free software
  21. REM library without restriction. Specifically, if other files instantiate
  22. REM templates or use macros or inline functions from this file, or you compile
  23. REM this file and link it with other files to produce an executable, this
  24. REM file does not by itself cause the resulting executable to be covered by
  25. REM the GNU General Public License. This exception does not however
  26. REM invalidate any other reasons why the executable file might be covered by
  27. REM the GNU General Public License.
  28. REM
  29. setlocal
  30. for %%D in ("%tbb_root%") do set actual_root=%%~fD
  31. set fslash_root=%actual_root:\=/%
  32. set bin_dir=%CD%
  33. set fslash_bin_dir=%bin_dir:\=/%
  34. set _INCLUDE=INCLUDE& set _LIB=LIB
  35. if not x%UNIXMODE%==x set _INCLUDE=CPATH& set _LIB=LIBRARY_PATH
  36. if exist tbbvars.bat goto skipbat
  37. echo Generating local tbbvars.bat
  38. echo @echo off>tbbvars.bat
  39. echo SET TBBROOT=%actual_root%>>tbbvars.bat
  40. echo SET TBB_ARCH_PLATFORM=%arch%\%runtime%>>tbbvars.bat
  41. echo SET TBB_TARGET_ARCH=%arch%>>tbbvars.bat
  42. echo SET %_INCLUDE%=%%TBBROOT%%\include;%%%_INCLUDE%%%>>tbbvars.bat
  43. echo SET %_LIB%=%bin_dir%;%%%_LIB%%%>>tbbvars.bat
  44. echo SET PATH=%bin_dir%;%%PATH%%>>tbbvars.bat
  45. if not x%UNIXMODE%==x echo SET LD_LIBRARY_PATH=%bin_dir%;%%LD_LIBRARY_PATH%%>>tbbvars.bat
  46. :skipbat
  47. if exist tbbvars.sh goto skipsh
  48. echo Generating local tbbvars.sh
  49. echo #!/bin/sh>tbbvars.sh
  50. echo export TBBROOT="%fslash_root%">>tbbvars.sh
  51. echo export TBB_ARCH_PLATFORM="%arch%\%runtime%">>tbbvars.sh
  52. echo export TBB_TARGET_ARCH="%arch%">>tbbvars.sh
  53. echo export %_INCLUDE%="${TBBROOT}/include;$%_INCLUDE%">>tbbvars.sh
  54. echo export %_LIB%="%fslash_bin_dir%;$%_LIB%">>tbbvars.sh
  55. echo export PATH="%fslash_bin_dir%;$PATH">>tbbvars.sh
  56. if not x%UNIXMODE%==x echo export LD_LIBRARY_PATH="%fslash_bin_dir%;$LD_LIBRARY_PATH">>tbbvars.sh
  57. :skipsh
  58. if exist tbbvars.csh goto skipcsh
  59. echo Generating local tbbvars.csh
  60. echo #!/bin/csh>tbbvars.csh
  61. echo setenv TBBROOT "%actual_root%">>tbbvars.csh
  62. echo setenv TBB_ARCH_PLATFORM "%arch%\%runtime%">>tbbvars.csh
  63. echo setenv TBB_TARGET_ARCH "%arch%">>tbbvars.csh
  64. echo setenv %_INCLUDE% "${TBBROOT}\include;$%_INCLUDE%">>tbbvars.csh
  65. echo setenv %_LIB% "%bin_dir%;$%_LIB%">>tbbvars.csh
  66. echo setenv PATH "%bin_dir%;$PATH">>tbbvars.csh
  67. if not x%UNIXMODE%==x echo setenv LD_LIBRARY_PATH "%bin_dir%;$LD_LIBRARY_PATH">>tbbvars.csh
  68. :skipcsh
  69. REM Workaround for copying Android* specific libgnustl_shared.so library to work folder
  70. if not x%LIB_GNU_STL_ANDROID%==x copy /Y "%LIB_GNU_STL_ANDROID%"\libgnustl_shared.so
  71. endlocal
  72. exit