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.

105 lines
3.3 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. ####### Detections and Commands ###############################################
  27. ifeq (icc,$(compiler))
  28. export COMPILER_VERSION := ICC: $(shell icc -V </dev/null 2>&1 | grep 'Version')
  29. ifneq (,$(findstring IA-32, $(COMPILER_VERSION)))
  30. export arch:=ia32
  31. endif
  32. ifneq (,$(findstring Intel(R) 64, $(COMPILER_VERSION)))
  33. export arch:=intel64
  34. endif
  35. ifeq (,$(arch))
  36. $(warning "Unknown Intel compiler")
  37. endif
  38. endif
  39. ifndef arch
  40. ifeq ($(shell /usr/sbin/sysctl -n hw.machine),Power Macintosh)
  41. ifeq ($(shell /usr/sbin/sysctl -n hw.optional.64bitops),1)
  42. export arch:=ppc64
  43. else
  44. export arch:=ppc32
  45. endif
  46. else
  47. ifeq ($(shell /usr/sbin/sysctl -n hw.optional.x86_64 2>/dev/null),1)
  48. export arch:=intel64
  49. else
  50. export arch:=ia32
  51. endif
  52. endif
  53. endif
  54. ifndef runtime
  55. gcc_version = $(shell gcc -dumpversion)
  56. os_version:=$(shell /usr/bin/sw_vers -productVersion)
  57. export runtime:=cc$(gcc_version)_os$(os_version)
  58. endif
  59. native_compiler := gcc
  60. export compiler ?= gcc
  61. debugger ?= gdb
  62. CMD=$(SHELL) -c
  63. CWD=$(shell pwd)
  64. RM?=rm -f
  65. RD?=rmdir
  66. MD?=mkdir -p
  67. NUL= /dev/null
  68. SLASH=/
  69. MAKE_VERSIONS=sh $(tbb_root)/build/version_info_macos.sh $(CPLUS) $(CPLUS_FLAGS) $(INCLUDES) >version_string.ver
  70. MAKE_TBBVARS=sh $(tbb_root)/build/generate_tbbvars.sh
  71. ifdef DYLD_LIBRARY_PATH
  72. export DYLD_LIBRARY_PATH := .:$(DYLD_LIBRARY_PATH)
  73. else
  74. export DYLD_LIBRARY_PATH := .
  75. endif
  76. ####### Build settings ########################################################
  77. OBJ=o
  78. DLL=dylib
  79. LIBEXT=dylib
  80. def_prefix = $(if $(findstring 64,$(arch)),mac64,mac32)
  81. TBB.LST = $(tbb_root)/src/tbb/$(def_prefix)-tbb-export.lst
  82. TBB.DEF = $(TBB.LST:.lst=.def)
  83. TBB.DLL = libtbb$(CPF_SUFFIX)$(DEBUG_SUFFIX).$(DLL)
  84. TBB.LIB = $(TBB.DLL)
  85. LINK_TBB.LIB = $(TBB.LIB)
  86. MALLOC.DEF = $(MALLOC_ROOT)/$(def_prefix)-tbbmalloc-export.def
  87. MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(DLL)
  88. MALLOC.LIB = $(MALLOC.DLL)
  89. LINK_MALLOC.LIB = $(MALLOC.LIB)
  90. TBB_NOSTRICT=1
  91. TEST_LAUNCHER=sh $(tbb_root)/build/test_launcher.sh $(largs)