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.

93 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. #------------------------------------------------------------------------------
  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
  35. MS_CRT_KEY = /MT$(if $(findstring debug,$(cfg)),d)
  36. EH_FLAGS = /EHsc /GR
  37. ifeq ($(cfg), release)
  38. CPLUS_FLAGS = $(MS_CRT_KEY) /O2 /Zi $(EH_FLAGS) /Zc:forScope /D_XBOX /DTBB_NO_LEGACY=1
  39. ASM_FLAGS =
  40. endif
  41. ifeq ($(cfg), debug)
  42. CPLUS_FLAGS = $(MS_CRT_KEY) /Od /Ob0 /Zi $(EH_FLAGS) /Zc:forScope \
  43. /DTBB_USE_DEBUG /D_XBOX /DTBB_NO_LEGACY=1
  44. ASM_FLAGS = /DUSE_FRAME_POINTER
  45. endif
  46. COMPILE_ONLY = /c
  47. PREPROC_ONLY = /TP /EP
  48. INCLUDE_KEY = /I
  49. DEFINE_KEY = /D
  50. OUTPUT_KEY = /Fe
  51. OUTPUTOBJ_KEY = /Fo
  52. WARNING_AS_ERROR_KEY = /WX
  53. WARNING_KEY = /W3
  54. DYLIB_KEY = /DLL
  55. EXPORT_KEY = /DEF:
  56. ifeq (em64t,$(arch))
  57. CPLUS_FLAGS += /GS-
  58. endif
  59. CPLUS_FLAGS += /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=$(_WIN32_WINNT)
  60. C_FLAGS = $(CPLUS_FLAGS) /TC
  61. #------------------------------------------------------------------------------
  62. # End of setting compiler flags.
  63. #------------------------------------------------------------------------------
  64. #------------------------------------------------------------------------------
  65. # Setting assembler data.
  66. #------------------------------------------------------------------------------
  67. # nothing for XBOX360
  68. #------------------------------------------------------------------------------
  69. # End of setting assembler data.
  70. #------------------------------------------------------------------------------
  71. #------------------------------------------------------------------------------
  72. # Setting tbbmalloc data.
  73. #------------------------------------------------------------------------------
  74. M_CPLUS_FLAGS = $(subst $(EH_FLAGS),/EHs-,$(CPLUS_FLAGS))
  75. #------------------------------------------------------------------------------
  76. # End of setting tbbmalloc data.
  77. #------------------------------------------------------------------------------
  78. #------------------------------------------------------------------------------
  79. # End of define compiler-specific variables.
  80. #------------------------------------------------------------------------------