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.

102 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. COMPILE_ONLY = -c -MMD
  27. PREPROC_ONLY = -E -x c++
  28. INCLUDE_KEY = -I
  29. DEFINE_KEY = -D
  30. OUTPUT_KEY = -o #
  31. OUTPUTOBJ_KEY = -o #
  32. PIC_KEY = -fPIC
  33. WARNING_AS_ERROR_KEY = -Werror
  34. WARNING_KEY = -Wall
  35. TEST_WARNING_KEY = -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor $(if $(findstring cc4., $(runtime)),-Wextra)
  36. WARNING_SUPPRESS = -Wno-parentheses -Wno-non-virtual-dtor
  37. DYLIB_KEY = -shared
  38. LIBDL = -ldl
  39. TBB_NOSTRICT = 1
  40. CPLUS = g++
  41. CONLY = gcc
  42. LIB_LINK_FLAGS = -shared
  43. LIBS = -lpthread -lrt -ldl
  44. C_FLAGS = $(CPLUS_FLAGS) -x c
  45. ifeq ($(cfg), release)
  46. CPLUS_FLAGS = -O2 -DUSE_PTHREAD
  47. endif
  48. ifeq ($(cfg), debug)
  49. CPLUS_FLAGS = -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD
  50. endif
  51. ASM=
  52. ASM_FLAGS=
  53. TBB_ASM.OBJ=
  54. ifeq (ia64,$(arch))
  55. # Position-independent code (PIC) is a must for IA-64
  56. CPLUS_FLAGS += $(PIC_KEY)
  57. endif
  58. ifeq (intel64,$(arch))
  59. CPLUS_FLAGS += -m64
  60. LIB_LINK_FLAGS += -m64
  61. endif
  62. ifeq (ia32,$(arch))
  63. CPLUS_FLAGS += -m32
  64. LIB_LINK_FLAGS += -m32
  65. endif
  66. # for some gcc versions on Solaris, -m64 may imply V9, but perhaps not everywhere (TODO: verify)
  67. ifeq (sparc,$(arch))
  68. CPLUS_FLAGS += -mcpu=v9 -m64
  69. LIB_LINK_FLAGS += -mcpu=v9 -m64
  70. endif
  71. #------------------------------------------------------------------------------
  72. # Setting assembler data.
  73. #------------------------------------------------------------------------------
  74. ASSEMBLY_SOURCE=$(arch)-gas
  75. ifeq (ia64,$(arch))
  76. ASM=ias
  77. TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
  78. endif
  79. #------------------------------------------------------------------------------
  80. # End of setting assembler data.
  81. #------------------------------------------------------------------------------
  82. #------------------------------------------------------------------------------
  83. # Setting tbbmalloc data.
  84. #------------------------------------------------------------------------------
  85. M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions -fno-schedule-insns2
  86. #------------------------------------------------------------------------------
  87. # End of setting tbbmalloc data.
  88. #------------------------------------------------------------------------------