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.

74 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. #------------------------------------------------------------------------------
  27. # Defines settings for building the TBB run-time as a static library.
  28. # Use these only on platforms where dynamic linking is impractical.
  29. #
  30. # IF YOU USE TBB AS A STATIC LIBRARY, YOU MUST GUARANTEE THAT ONLY ONE COPY OF
  31. # THE TBB RUN-TIME IS LINKED INTO AN APPLICATION! LINKING IN MULTIPLE COPIES
  32. # OF THE TBB RUN-TIME, DIRECTLY OR INDIRECTLY, MAY CAUSE PROGRAM FAILURE!
  33. #------------------------------------------------------------------------------
  34. # Note that ITT_NOTIFY allows to selectively remove the definition of
  35. # DO_ITT_NOTIFY without sabotaging deferred expansion of CPLUS_FLAGS.
  36. # TODO: currently only in linux.{gcc,xl}.inc
  37. # Note that -pthread with xl gives "1501-210 (W) command option t contains an incorrect subargument";
  38. # multithreading is instead achieved by using the _r affix in the compiler name.
  39. # TODO: is -lpthread still relevant/needed with XL and _r affix?
  40. # Note that -D__TBB_NO_DLOPEN is only for scalability,
  41. # and is not necessarily needed by any static build.
  42. # OS specific settings =>
  43. LIB_LINK_CMD = ar rcs
  44. LIB_LINK_FLAGS =
  45. LIB_LINK_LIBS =
  46. LIB_OUTPUT_KEY =
  47. ifeq ($(tbb_os),linux)
  48. ifeq ($(compiler),gcc)
  49. LIBS = -pthread -ldl -lrt
  50. endif
  51. ifeq ($(compiler),xl)
  52. LIBS = -lpthread -ldl -lrt
  53. endif
  54. LINK_FLAGS =
  55. endif
  56. override CXXFLAGS += -D__TBB_DYNAMIC_LOAD_ENABLED=0 -D__TBB_SOURCE_DIRECTLY_INCLUDED=1
  57. ITT_NOTIFY =
  58. LIBEXT = a
  59. LIBPREF = lib
  60. # <= OS specific settings
  61. TBB.DLL = $(LIBPREF)tbb$(DEBUG_SUFFIX).$(LIBEXT)
  62. TBB.LST =
  63. TBB.DEF =
  64. MALLOC.DLL = $(LIBPREF)tbbmalloc$(DEBUG_SUFFIX).$(LIBEXT)
  65. MALLOC.DEF =
  66. MALLOCPROXY.DLL =
  67. MALLOCPROXY.DEF =
  68. LINK_TBB.LIB = $(TBB.DLL)