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.

114 lines
4.0 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. ####### Detections and Commands ###############################################
  27. COMPILE_ONLY = -c
  28. PREPROC_ONLY = -E -qsourcetype=c
  29. INCLUDE_KEY = -I
  30. DEFINE_KEY = -D
  31. OUTPUT_KEY = -o #
  32. OUTPUTOBJ_KEY = -o #
  33. PIC_KEY = -qpic
  34. WARNING_AS_ERROR_KEY = -qhalt=w
  35. WARNING_KEY =
  36. TEST_WARNING_KEY =
  37. WARNING_SUPPRESS =
  38. DYLIB_KEY = -qmkshrobj
  39. EXPORT_KEY = -Wl,--version-script,
  40. LIBDL = -ldl
  41. TBB_NOSTRICT = 1
  42. CPLUS = xlc++_r
  43. CONLY = xlc_r
  44. LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
  45. LIBS = -lpthread -lrt
  46. C_FLAGS = $(CPLUS_FLAGS)
  47. ifeq ($(cfg), release)
  48. CPLUS_FLAGS = $(ITT_NOTIFY) -O2 -DUSE_PTHREAD
  49. endif
  50. ifeq ($(cfg), debug)
  51. CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
  52. endif
  53. # Adding directly to CPLUS_FLAGS instead of to WARNING_SUPPRESS because otherwise it would not be used in several tests (why not?).
  54. # Suppress warnings like:
  55. # - "1500-029: (W) WARNING: subprogram [...] could not be inlined into [...]."
  56. # - "1501-201: (W) Maximum number of common component diagnostics, 10 has been exceeded."
  57. # see http://www-01.ibm.com/support/docview.wss?uid=swg1LI72843
  58. # it seems that the internal compiler error that would ensue has now been avoided, making the condition harmless
  59. # - "1540-0198 (W) The omitted keyword "private" is assumed for base class "no_copy"."
  60. # - "1540-0822 (W) The name "__FUNCTION__" must not be defined as a macro."
  61. CPLUS_FLAGS += -qsuppress=1500-029:1501-201:1540-0198:1540-0822
  62. ASM=
  63. ASM_FLAGS=
  64. TBB_ASM.OBJ=
  65. ifeq (intel64,$(arch))
  66. ITT_NOTIFY = -DDO_ITT_NOTIFY
  67. CPLUS_FLAGS += -q64
  68. LIB_LINK_FLAGS += -q64
  69. endif
  70. # TODO: equivalent for -march=pentium4 in CPLUS_FLAGS
  71. ifeq (ia32,$(arch))
  72. ITT_NOTIFY = -DDO_ITT_NOTIFY
  73. CPLUS_FLAGS += -q32 -qarch=pentium4
  74. LIB_LINK_FLAGS += -q32
  75. endif
  76. ifeq (ppc64,$(arch))
  77. CPLUS_FLAGS += -q64
  78. LIB_LINK_FLAGS += -q64
  79. endif
  80. ifeq (ppc32,$(arch))
  81. CPLUS_FLAGS += -q32
  82. LIB_LINK_FLAGS += -q32
  83. endif
  84. ifeq (bgp,$(arch))
  85. CPLUS = bgxlC_r
  86. CONLY = bgxlc_r
  87. endif
  88. #------------------------------------------------------------------------------
  89. # Setting tbbmalloc data.
  90. #------------------------------------------------------------------------------
  91. # Suppress innumerable warnings like "1540-1088 (W) The exception specification is being ignored."
  92. # Suppress warnings like "1540-1090 (I) The destructor of "lock" might not be called."
  93. # TODO: aren't these warnings an indication that -qnoeh might not be appropriate?
  94. M_CPLUS_FLAGS = $(CPLUS_FLAGS) -qnortti -qnoeh -qsuppress=1540-1088:1540-1090
  95. #------------------------------------------------------------------------------
  96. # End of setting tbbmalloc data.
  97. #------------------------------------------------------------------------------