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.

145 lines
4.8 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. #------------------------------------------------------------------------------
  27. # Overriding settings from windows.inc
  28. #------------------------------------------------------------------------------
  29. SLASH= $(strip \)
  30. OBJ = o
  31. LIBEXT = dll # MinGW allows linking with DLLs directly
  32. TBB.RES =
  33. MALLOC.RES =
  34. RML.RES =
  35. TBB.MANIFEST =
  36. MALLOC.MANIFEST =
  37. RML.MANIFEST =
  38. ifeq (ia32,$(arch))
  39. TBB.LST = $(tbb_root)/src/tbb/lin32-tbb-export.lst
  40. else
  41. TBB.LST = $(tbb_root)/src/tbb/win64-gcc-tbb-export.lst
  42. endif
  43. MALLOC.DEF = $(MALLOC_ROOT)/$(def_prefix)-gcc-tbbmalloc-export.def
  44. RML.DEF = $(RML_SERVER_ROOT)/lin-rml-export.def
  45. LINK_TBB.LIB = $(TBB.LIB)
  46. # no TBB proxy for the configuration
  47. PROXY.LIB =
  48. #------------------------------------------------------------------------------
  49. # End of overridden settings
  50. #------------------------------------------------------------------------------
  51. # Compiler-specific variables
  52. #------------------------------------------------------------------------------
  53. CPLUS = g++
  54. COMPILE_ONLY = -c -MMD
  55. PREPROC_ONLY = -E -x c++
  56. INCLUDE_KEY = -I
  57. DEFINE_KEY = -D
  58. OUTPUT_KEY = -o #
  59. OUTPUTOBJ_KEY = -o #
  60. PIC_KEY =
  61. WARNING_AS_ERROR_KEY = -Werror
  62. WARNING_KEY = -Wall
  63. TEST_WARNING_KEY = -Wextra -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -Wno-uninitialized
  64. WARNING_SUPPRESS = -Wno-parentheses -Wno-uninitialized
  65. DYLIB_KEY = -shared
  66. LIBDL =
  67. EXPORT_KEY = -Wl,--version-script,
  68. LIBS = -lpsapi
  69. #------------------------------------------------------------------------------
  70. # End of compiler-specific variables
  71. #------------------------------------------------------------------------------
  72. # Command lines
  73. #------------------------------------------------------------------------------
  74. LINK_FLAGS = -Wl,--enable-auto-import
  75. LIB_LINK_FLAGS = $(DYLIB_KEY)
  76. # gcc 4.4 and higher support -std=c++0x
  77. ifeq (ok,$(shell cmd /C "cscript /nologo /E:jscript $(tbb_root)/build/detect.js /minversion gcc 4.4"))
  78. CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
  79. endif
  80. ifeq ($(cfg), release)
  81. CPLUS_FLAGS = -O2
  82. endif
  83. ifeq ($(cfg), debug)
  84. CPLUS_FLAGS = -g -O0 -DTBB_USE_DEBUG
  85. endif
  86. ifneq (00,$(lambdas)$(cpp0x))
  87. CXX_ONLY_FLAGS += $(CPP11_FLAGS)
  88. endif
  89. CPLUS_FLAGS += -DUSE_WINTHREAD
  90. CPLUS_FLAGS += -D_WIN32_WINNT=$(_WIN32_WINNT)
  91. # MinGW specific
  92. CPLUS_FLAGS += -DMINGW_HAS_SECURE_API=1 -D__MSVCRT_VERSION__=0x0700 -msse -mthreads
  93. CONLY = gcc
  94. debugger = gdb
  95. C_FLAGS = $(CPLUS_FLAGS)
  96. ifeq (intel64,$(arch))
  97. CPLUS_FLAGS += -m64
  98. LIB_LINK_FLAGS += -m64
  99. endif
  100. ifeq (ia32,$(arch))
  101. CPLUS_FLAGS += -m32 -march=i686
  102. LIB_LINK_FLAGS += -m32
  103. endif
  104. # For examples
  105. export UNIXMODE = 1
  106. #------------------------------------------------------------------------------
  107. # End of command lines
  108. #------------------------------------------------------------------------------
  109. # Setting assembler data
  110. #------------------------------------------------------------------------------
  111. ASM=
  112. ASM_FLAGS=
  113. TBB_ASM.OBJ=
  114. ASSEMBLY_SOURCE=$(arch)-gas
  115. #------------------------------------------------------------------------------
  116. # End of setting assembler data
  117. #------------------------------------------------------------------------------
  118. # Setting tbbmalloc data
  119. #------------------------------------------------------------------------------
  120. M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions
  121. #------------------------------------------------------------------------------
  122. # End of setting tbbmalloc data
  123. #------------------------------------------------------------------------------