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.

103 lines
3.3 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. CPLUS = icpc
  27. CONLY = icc
  28. COMPILE_ONLY = -c -MMD
  29. PREPROC_ONLY = -E -x c++
  30. INCLUDE_KEY = -I
  31. DEFINE_KEY = -D
  32. OUTPUT_KEY = -o #
  33. OUTPUTOBJ_KEY = -o #
  34. PIC_KEY = -fPIC
  35. WARNING_AS_ERROR_KEY = -Werror
  36. WARNING_KEY = -w1
  37. DYLIB_KEY = -dynamiclib
  38. EXPORT_KEY = -Wl,-exported_symbols_list,
  39. LIBDL = -ldl
  40. OPENMP_FLAG = -openmp
  41. LIBS = -lpthread
  42. LINK_FLAGS =
  43. LIB_LINK_FLAGS = -dynamiclib -i-static
  44. C_FLAGS = $(CPLUS_FLAGS)
  45. # ICC 11.0 and higher support -std=c++0x
  46. ifneq (,$(shell icc -dumpversion | egrep "^1[1-9]\."))
  47. CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
  48. endif
  49. # ICC 12.0 and higher provide Intel(R) Cilk Plus
  50. ifneq (,$(shell icc -dumpversion | egrep "^1[2-9]\."))
  51. CILK_AVAILABLE = yes
  52. endif
  53. ifeq ($(cfg), release)
  54. CPLUS_FLAGS = -O2 -fno-omit-frame-pointer
  55. else
  56. CPLUS_FLAGS = -g -O0 -DTBB_USE_DEBUG
  57. endif
  58. CPLUS_FLAGS += -DUSE_PTHREAD
  59. ifneq (,$(codecov))
  60. CPLUS_FLAGS += -prof-genx
  61. endif
  62. ifneq (00,$(lambdas)$(cpp0x))
  63. CPLUS_FLAGS += $(CPP11_FLAGS)
  64. endif
  65. #------------------------------------------------------------------------------
  66. # Setting assembler data.
  67. #------------------------------------------------------------------------------
  68. ASM = as
  69. ifeq (intel64,$(arch))
  70. ASM_FLAGS += -arch x86_64
  71. endif
  72. ifeq (ia32,$(arch))
  73. CPLUS_FLAGS += -m32
  74. LINK_FLAGS += -m32
  75. LIB_LINK_FLAGS += -m32
  76. ASM_FLAGS += -arch i386
  77. endif
  78. ifeq ($(cfg), debug)
  79. ASM_FLAGS += -g
  80. endif
  81. #------------------------------------------------------------------------------
  82. # End of setting assembler data.
  83. #------------------------------------------------------------------------------
  84. #------------------------------------------------------------------------------
  85. # Setting tbbmalloc data.
  86. #------------------------------------------------------------------------------
  87. M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions
  88. #------------------------------------------------------------------------------
  89. # End of setting tbbmalloc data.
  90. #------------------------------------------------------------------------------