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.

109 lines
3.4 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 = g++
  27. CONLY = gcc
  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 (intel64,$(arch))
  53. CPLUS_FLAGS += -m64
  54. LINK_FLAGS += -m64
  55. LIB_LINK_FLAGS += -m64
  56. endif
  57. ifeq (ia32,$(arch))
  58. CPLUS_FLAGS += -m32
  59. LINK_FLAGS += -m32
  60. LIB_LINK_FLAGS += -m32
  61. endif
  62. ifeq (ppc64,$(arch))
  63. CPLUS_FLAGS += -arch ppc64
  64. LINK_FLAGS += -arch ppc64
  65. LIB_LINK_FLAGS += -arch ppc64
  66. endif
  67. ifeq (ppc32,$(arch))
  68. CPLUS_FLAGS += -arch ppc
  69. LINK_FLAGS += -arch ppc
  70. LIB_LINK_FLAGS += -arch ppc
  71. endif
  72. #------------------------------------------------------------------------------
  73. # Setting assembler data.
  74. #------------------------------------------------------------------------------
  75. ASM = as
  76. ifeq (intel64,$(arch))
  77. ASM_FLAGS += -arch x86_64
  78. endif
  79. ifeq (ia32,$(arch))
  80. ASM_FLAGS += -arch i386
  81. endif
  82. ifeq ($(cfg), debug)
  83. ASM_FLAGS += -g
  84. endif
  85. #------------------------------------------------------------------------------
  86. # End of setting assembler data.
  87. #------------------------------------------------------------------------------
  88. #------------------------------------------------------------------------------
  89. # Setting tbbmalloc data.
  90. #------------------------------------------------------------------------------
  91. M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions -fno-schedule-insns2
  92. #------------------------------------------------------------------------------
  93. # End of setting tbbmalloc data.
  94. #------------------------------------------------------------------------------