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.

138 lines
4.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. #------------------------------------------------------------------------------
  27. # Define compiler-specific variables.
  28. #------------------------------------------------------------------------------
  29. #------------------------------------------------------------------------------
  30. # Setting compiler flags.
  31. #------------------------------------------------------------------------------
  32. CPLUS = cl /nologo
  33. LINK_FLAGS = /link /nologo
  34. LIB_LINK_FLAGS=/link /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DYNAMICBASE /NXCOMPAT
  35. ifeq ($(arch), ia32)
  36. LIB_LINK_FLAGS += /SAFESEH
  37. endif
  38. ifeq ($(runtime), vc_mt)
  39. MS_CRT_KEY = /MT$(if $(findstring debug,$(cfg)),d)
  40. else
  41. MS_CRT_KEY = /MD$(if $(findstring debug,$(cfg)),d)
  42. endif
  43. EH_FLAGS = /EHsc /GR
  44. ifeq ($(cfg), release)
  45. CPLUS_FLAGS = $(MS_CRT_KEY) /O2 /Zi $(EH_FLAGS) /Zc:forScope /Zc:wchar_t /D__TBB_LIB_NAME=$(TBB.LIB)
  46. ASM_FLAGS =
  47. endif
  48. ifeq ($(cfg), debug)
  49. CPLUS_FLAGS = $(MS_CRT_KEY) /Od /Ob0 /Zi $(EH_FLAGS) /Zc:forScope /Zc:wchar_t /DTBB_USE_DEBUG /D__TBB_LIB_NAME=$(TBB.LIB)
  50. ASM_FLAGS = /DUSE_FRAME_POINTER
  51. endif
  52. ifeq ($(target_ui), win8ui)
  53. CPLUS_FLAGS += /D "_UNICODE" /D "UNICODE" /D "WINAPI_FAMILY=WINAPI_FAMILY_APP"
  54. _WIN32_WINNT=0x0602
  55. ifeq ($(target_ui_mode), production)
  56. LIB_LINK_FLAGS += /APPCONTAINER
  57. endif
  58. else
  59. CPLUS_FLAGS += /DDO_ITT_NOTIFY
  60. endif
  61. CPLUS_FLAGS += /GS
  62. COMPILE_ONLY = /c
  63. PREPROC_ONLY = /TP /EP
  64. INCLUDE_KEY = /I
  65. DEFINE_KEY = /D
  66. OUTPUT_KEY = /Fe
  67. OUTPUTOBJ_KEY = /Fo
  68. WARNING_AS_ERROR_KEY = /WX
  69. ifeq ($(runtime),vc7.1)
  70. WARNING_KEY = /W3
  71. else
  72. WARNING_KEY = /W4
  73. OPENMP_FLAG = /openmp
  74. endif
  75. DYLIB_KEY = /DLL
  76. EXPORT_KEY = /DEF:
  77. NODEFAULTLIB_KEY = /Zl
  78. NOINTRINSIC_KEY = /Oi-
  79. ifeq ($(runtime),vc8)
  80. WARNING_KEY += /Wp64
  81. CPLUS_FLAGS += /D_USE_RTM_VERSION
  82. endif
  83. CPLUS_FLAGS += /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE \
  84. /D_WIN32_WINNT=$(_WIN32_WINNT)
  85. C_FLAGS = $(CPLUS_FLAGS)
  86. #------------------------------------------------------------------------------
  87. # End of setting compiler flags.
  88. #------------------------------------------------------------------------------
  89. #------------------------------------------------------------------------------
  90. # Setting assembler data.
  91. #------------------------------------------------------------------------------
  92. ASSEMBLY_SOURCE=$(arch)-masm
  93. ifeq (intel64,$(arch))
  94. ASM=ml64 /nologo
  95. ASM_FLAGS += /DEM64T=1 /c /Zi
  96. TBB_ASM.OBJ = atomic_support.obj intel64_misc.obj
  97. MALLOC_ASM.OBJ = atomic_support.obj
  98. else
  99. ASM=ml /nologo
  100. ASM_FLAGS += /c /coff /Zi /safeseh
  101. TBB_ASM.OBJ = atomic_support.obj lock_byte.obj
  102. endif
  103. #------------------------------------------------------------------------------
  104. # End of setting assembler data.
  105. #------------------------------------------------------------------------------
  106. #------------------------------------------------------------------------------
  107. # Setting tbbmalloc data.
  108. #------------------------------------------------------------------------------
  109. ifneq ($(target_ui), win8ui)
  110. M_CPLUS_FLAGS = $(subst $(EH_FLAGS),/EHs-,$(CPLUS_FLAGS))
  111. else
  112. M_CPLUS_FLAGS = $(CPLUS_FLAGS)
  113. endif
  114. #------------------------------------------------------------------------------
  115. # End of setting tbbmalloc data.
  116. #------------------------------------------------------------------------------
  117. #------------------------------------------------------------------------------
  118. # End of define compiler-specific variables.
  119. #------------------------------------------------------------------------------