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.

95 lines
3.1 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. DYLIB_KEY = -shared
  36. TBB_NOSTRICT = 1
  37. CPLUS = g++
  38. CONLY = gcc
  39. LIB_LINK_FLAGS = -shared
  40. LIBS = -lpthread
  41. C_FLAGS = $(CPLUS_FLAGS)
  42. ifeq ($(cfg), release)
  43. CPLUS_FLAGS = -O2 -DUSE_PTHREAD
  44. endif
  45. ifeq ($(cfg), debug)
  46. CPLUS_FLAGS = -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD
  47. endif
  48. ASM=
  49. ASM_FLAGS=
  50. TBB_ASM.OBJ=
  51. MALLOC_ASM.OBJ=
  52. ifeq (ia64,$(arch))
  53. # Position-independent code (PIC) is a must on IA-64, even for regular (not shared) executables
  54. CPLUS_FLAGS += $(PIC_KEY)
  55. endif
  56. ifeq (intel64,$(arch))
  57. CPLUS_FLAGS += -m64
  58. LIB_LINK_FLAGS += -m64
  59. endif
  60. ifeq (ia32,$(arch))
  61. CPLUS_FLAGS += -m32
  62. LIB_LINK_FLAGS += -m32
  63. endif
  64. #------------------------------------------------------------------------------
  65. # Setting assembler data.
  66. #------------------------------------------------------------------------------
  67. ASSEMBLY_SOURCE=$(arch)-gas
  68. ifeq (ia64,$(arch))
  69. ASM=as
  70. TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
  71. MALLOC_ASM.OBJ = atomic_support.o lock_byte.o pause.o
  72. endif
  73. #------------------------------------------------------------------------------
  74. # End of setting assembler data.
  75. #------------------------------------------------------------------------------
  76. #------------------------------------------------------------------------------
  77. # Setting tbbmalloc data.
  78. #------------------------------------------------------------------------------
  79. M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions -fno-schedule-insns2
  80. #------------------------------------------------------------------------------
  81. # End of setting tbbmalloc data.
  82. #------------------------------------------------------------------------------