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.

120 lines
3.5 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 = clang++
  27. CONLY = clang
  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 = -Wall
  37. TEST_WARNING_KEY = -Wextra -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor
  38. WARNING_SUPPRESS = -Wno-non-virtual-dtor
  39. DYLIB_KEY = -dynamiclib
  40. EXPORT_KEY = -Wl,-exported_symbols_list,
  41. LIBDL = -ldl
  42. LIBS = -lpthread
  43. LINK_FLAGS =
  44. LIB_LINK_FLAGS = -dynamiclib
  45. C_FLAGS = $(CPLUS_FLAGS)
  46. ifeq ($(cfg), release)
  47. CPLUS_FLAGS = -O2
  48. else
  49. CPLUS_FLAGS = -g -O0 -DTBB_USE_DEBUG
  50. endif
  51. CPLUS_FLAGS += -DUSE_PTHREAD
  52. ifeq (libc++,$(stdlib))
  53. LIBS += -stdlib=libc++
  54. CPLUS_FLAGS += -stdlib=libc++
  55. endif
  56. CPP11_FLAGS = -std=c++11 -D_TBB_CPP0X
  57. ifneq (00,$(lambdas)$(cpp0x))
  58. CXX_ONLY_FLAGS += $(CPP11_FLAGS)
  59. endif
  60. ifeq (intel64,$(arch))
  61. CPLUS_FLAGS += -m64
  62. LINK_FLAGS += -m64
  63. LIB_LINK_FLAGS += -m64
  64. endif
  65. ifeq (ia32,$(arch))
  66. CPLUS_FLAGS += -m32
  67. LINK_FLAGS += -m32
  68. LIB_LINK_FLAGS += -m32
  69. endif
  70. ifeq (ppc64,$(arch))
  71. CPLUS_FLAGS += -arch ppc64
  72. LINK_FLAGS += -arch ppc64
  73. LIB_LINK_FLAGS += -arch ppc64
  74. endif
  75. ifeq (ppc32,$(arch))
  76. CPLUS_FLAGS += -arch ppc
  77. LINK_FLAGS += -arch ppc
  78. LIB_LINK_FLAGS += -arch ppc
  79. endif
  80. #------------------------------------------------------------------------------
  81. # Setting assembler data.
  82. #------------------------------------------------------------------------------
  83. ASM = as
  84. ifeq (intel64,$(arch))
  85. ASM_FLAGS += -arch x86_64
  86. endif
  87. ifeq (ia32,$(arch))
  88. ASM_FLAGS += -arch i386
  89. endif
  90. ifeq ($(cfg), debug)
  91. ASM_FLAGS += -g
  92. endif
  93. #------------------------------------------------------------------------------
  94. # End of setting assembler data.
  95. #------------------------------------------------------------------------------
  96. #------------------------------------------------------------------------------
  97. # Setting tbbmalloc data.
  98. #------------------------------------------------------------------------------
  99. M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions
  100. #------------------------------------------------------------------------------
  101. # End of setting tbbmalloc data.
  102. #------------------------------------------------------------------------------