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.

134 lines
4.5 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. # Define rules for making the TBB shared library.
  28. #------------------------------------------------------------------------------
  29. tbb_root ?= "$(TBBROOT)"
  30. BUILDING_PHASE=1
  31. include $(tbb_root)/build/common.inc
  32. DEBUG_SUFFIX=$(findstring _debug,_$(cfg))
  33. #------------------------------------------------------------
  34. # Define static pattern rules dealing with .cpp source files
  35. #------------------------------------------------------------
  36. $(warning CONFIG: cfg=$(cfg) arch=$(arch) compiler=$(compiler) os=$(tbb_os) runtime=$(runtime))
  37. default_tbb: $(TBB.DLL)
  38. .PHONY: default_tbb tbbvars clean
  39. .PRECIOUS: %.$(OBJ)
  40. VPATH = $(tbb_root)/src/tbb/$(ASSEMBLY_SOURCE) $(tbb_root)/src/tbb $(tbb_root)/src/old $(tbb_root)/src/rml/client
  41. CPLUS_FLAGS += $(PIC_KEY) $(DEFINE_KEY)__TBB_BUILD=1
  42. # A template to switch off strict-ansi for certain compilation units
  43. # ifeq (1,$(TBB_NOSTRICT))
  44. # KNOWN_NOSTRICT = <object-file-name>
  45. # endif
  46. # suppress warnings for build of itt_notify by GCC3
  47. ifneq (,$(findstring gcc_cc3., $(compiler)_$(runtime)))
  48. KNOWN_WARNINGS += itt_notify.$(OBJ)
  49. endif
  50. # Object files (that were compiled from C++ code) that gmake up TBB
  51. TBB_CPLUS.OBJ = concurrent_hash_map.$(OBJ) \
  52. concurrent_queue.$(OBJ) \
  53. concurrent_vector.$(OBJ) \
  54. dynamic_link.$(OBJ) \
  55. itt_notify.$(OBJ) \
  56. cache_aligned_allocator.$(OBJ) \
  57. pipeline.$(OBJ) \
  58. queuing_mutex.$(OBJ) \
  59. queuing_rw_mutex.$(OBJ) \
  60. reader_writer_lock.$(OBJ) \
  61. spin_rw_mutex.$(OBJ) \
  62. spin_mutex.$(OBJ) \
  63. critical_section.$(OBJ) \
  64. task.$(OBJ) \
  65. tbb_misc.$(OBJ) \
  66. tbb_misc_ex.$(OBJ) \
  67. mutex.$(OBJ) \
  68. recursive_mutex.$(OBJ) \
  69. condition_variable.$(OBJ) \
  70. tbb_thread.$(OBJ) \
  71. concurrent_monitor.$(OBJ) \
  72. semaphore.$(OBJ) \
  73. private_server.$(OBJ) \
  74. rml_tbb.$(OBJ) \
  75. task_group_context.$(OBJ) \
  76. governor.$(OBJ) \
  77. market.$(OBJ) \
  78. arena.$(OBJ) \
  79. scheduler.$(OBJ) \
  80. observer_proxy.$(OBJ) \
  81. tbb_statistics.$(OBJ) \
  82. tbb_main.$(OBJ)
  83. # OLD/Legacy object files for backward binary compatibility
  84. ifeq (,$(findstring $(DEFINE_KEY)TBB_NO_LEGACY,$(CPLUS_FLAGS)))
  85. TBB_CPLUS_OLD.OBJ = \
  86. concurrent_vector_v2.$(OBJ) \
  87. concurrent_queue_v2.$(OBJ) \
  88. spin_rw_mutex_v2.$(OBJ) \
  89. task_v2.$(OBJ)
  90. endif
  91. # Object files that gmake up TBB (TBB_ASM.OBJ is platform-specific)
  92. TBB.OBJ = $(TBB_CPLUS.OBJ) $(TBB_CPLUS_OLD.OBJ) $(TBB_ASM.OBJ)
  93. # Suppress superfluous warnings for TBB compilation
  94. WARNING_KEY += $(WARNING_SUPPRESS)
  95. include $(tbb_root)/build/common_rules.inc
  96. ifneq (,$(TBB.DEF))
  97. tbb.def: $(TBB.DEF) $(TBB.LST)
  98. $(CPLUS) $(PREPROC_ONLY) $< $(CPLUS_FLAGS) $(INCLUDES) > $@
  99. LIB_LINK_FLAGS += $(EXPORT_KEY)tbb.def
  100. $(TBB.DLL): tbb.def
  101. endif
  102. tbbvars.sh:
  103. $(MAKE_TBBVARS)
  104. $(TBB.DLL): BUILDING_LIBRARY = $(TBB.DLL)
  105. $(TBB.DLL): $(TBB.OBJ) $(TBB.RES) tbbvars.sh $(TBB_NO_VERSION.DLL)
  106. $(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(TBB.DLL) $(TBB.OBJ) $(TBB.RES) $(LIB_LINK_LIBS) $(LIB_LINK_FLAGS)
  107. ifneq (,$(TBB_NO_VERSION.DLL))
  108. $(TBB_NO_VERSION.DLL):
  109. echo "INPUT ($(TBB.DLL))" > $(TBB_NO_VERSION.DLL)
  110. endif
  111. #clean:
  112. # $(RM) *.$(OBJ) *.$(DLL) *.res *.map *.ilk *.pdb *.exp *.manifest *.tmp *.d core core.*[0-9][0-9] *.ver
  113. # Include automatically generated dependences
  114. -include *.d