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.

111 lines
3.8 KiB

  1. # Copyright 2005-2013 Intel Corporation. All Rights Reserved.
  2. #
  3. # This file is part of Threading Building Blocks.
  4. #
  5. # Threading Building Blocks is free software; you can redistribute it
  6. # and/or modify it under the terms of the GNU General Public License
  7. # version 2 as published by the Free Software Foundation.
  8. #
  9. # Threading Building Blocks is distributed in the hope that it will be
  10. # useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  11. # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with Threading Building Blocks; if not, write to the Free Software
  16. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. #
  18. # As a special exception, you may use this file as part of a free software
  19. # library without restriction. Specifically, if other files instantiate
  20. # templates or use macros or inline functions from this file, or you compile
  21. # this file and link it with other files to produce an executable, this
  22. # file does not by itself cause the resulting executable to be covered by
  23. # the GNU General Public License. This exception does not however
  24. # invalidate any other reasons why the executable file might be covered by
  25. # the GNU General Public License.
  26. export SHELL = cmd
  27. ifdef tbb_build_dir
  28. test_dir:=$(tbb_build_dir)
  29. else
  30. test_dir:=.
  31. endif
  32. # TODO give an error if archs doesn't match
  33. ifndef arch
  34. export arch:=$(shell cmd /C "cscript /nologo /E:jscript $(tbb_root)/build/detect.js /arch $(compiler)")
  35. endif
  36. ifndef runtime
  37. export runtime:=$(shell cmd /C "cscript /nologo /E:jscript $(tbb_root)/build/detect.js /runtime $(compiler)")
  38. endif
  39. native_compiler := cl
  40. export compiler ?= cl
  41. debugger ?= devenv /debugexe
  42. CMD=cmd /C
  43. CWD=$(shell cmd /C echo %CD%)
  44. RM=cmd /C del /Q /F
  45. RD=cmd /C rmdir
  46. MD=cmd /c mkdir
  47. SLASH=\\
  48. NUL = nul
  49. AR=lib
  50. AR_OUTPUT_KEY=/out:
  51. AR_FLAGS=/nologo /nodefaultlib
  52. OBJ = obj
  53. DLL = dll
  54. LIBEXT = lib
  55. ASMEXT = asm
  56. def_prefix = $(if $(findstring ia32,$(arch)),win32,win64)
  57. # Target Windows version. Do not increase beyond 0x0501 without prior discussion!
  58. # Used as the value for macro definition opiton in windows.cl.inc etc.
  59. _WIN32_WINNT=0x0501
  60. TBB.LST = $(tbb_root)/src/tbb/$(def_prefix)-tbb-export.lst
  61. TBB.DEF = $(TBB.LST:.lst=.def)
  62. TBB.DLL = tbb$(CPF_SUFFIX)$(DEBUG_SUFFIX).$(DLL)
  63. TBB.LIB = tbb$(CPF_SUFFIX)$(DEBUG_SUFFIX).$(LIBEXT)
  64. TBB.RES = tbb_resource.res
  65. # On Windows, we use #pragma comment to set the proper TBB lib to link with
  66. # But for cross-configuration testing, need to link explicitly
  67. LINK_TBB.LIB = $(if $(crosstest),$(TBB.LIB))
  68. TBB.MANIFEST =
  69. ifneq ($(filter vc8 vc9,$(runtime)),)
  70. TBB.MANIFEST = tbbmanifest.exe.manifest
  71. endif
  72. MALLOC.DEF = $(MALLOC_ROOT)/$(def_prefix)-tbbmalloc-export.def
  73. MALLOC.DLL = tbbmalloc$(DEBUG_SUFFIX).$(DLL)
  74. MALLOC.LIB = tbbmalloc$(DEBUG_SUFFIX).$(LIBEXT)
  75. MALLOC.RES = tbbmalloc.res
  76. MALLOC.MANIFEST =
  77. ifneq ($(filter vc8 vc9,$(runtime)),)
  78. MALLOC.MANIFEST = tbbmanifest.exe.manifest
  79. endif
  80. LINK_MALLOC.LIB = $(MALLOC.LIB)
  81. MALLOCPROXY.DLL = tbbmalloc_proxy$(DEBUG_SUFFIX).$(DLL)
  82. MALLOCPROXY.LIB = tbbmalloc_proxy$(DEBUG_SUFFIX).$(LIBEXT)
  83. LINK_MALLOCPROXY.LIB = $(MALLOCPROXY.LIB)
  84. PROXY.LIB = tbbproxy$(DEBUG_SUFFIX).$(LIBEXT)
  85. RML.DEF = $(RML_SERVER_ROOT)/$(def_prefix)-rml-export.def
  86. RML.DLL = irml$(DEBUG_SUFFIX).$(DLL)
  87. RML.LIB = irml$(DEBUG_SUFFIX).$(LIBEXT)
  88. RML.RES = irml.res
  89. ifneq ($(filter vc8 vc9,$(runtime)),)
  90. RML.MANIFEST = tbbmanifest.exe.manifest
  91. endif
  92. MAKE_VERSIONS = cmd /C cscript /nologo /E:jscript $(subst \,/,$(tbb_root))/build/version_info_windows.js $(compiler) $(arch) $(subst \,/,"$(CPLUS) $(CPLUS_FLAGS)") > version_string.ver
  93. MAKE_TBBVARS = cmd /C "$(subst /,\,$(tbb_root))\build\generate_tbbvars.bat"
  94. TEST_LAUNCHER = $(subst /,\,$(tbb_root))\build\test_launcher.bat $(largs)