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.

77 lines
3.0 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. # Extra gmake command-line parameters for use with Android:
  28. #
  29. # dlopen_workaround: Some OS versions need workaround for dlopen to avoid recursive calls.
  30. #
  31. ####### Detections and Commands ###############################################
  32. ifeq (android,$(findstring android,$(tbb_os)))
  33. $(error TBB only supports cross-compilation for Android. Specify "target=android" instead.)
  34. endif
  35. ifneq ("command line","$(origin arch)")
  36. ifeq (icc,$(compiler))
  37. export COMPILER_VERSION := ICC: $(shell icc -V </dev/null 2>&1 | grep 'Version')
  38. ifneq (,$(findstring IA-32, $(COMPILER_VERSION)))
  39. export arch:=ia32
  40. else
  41. $(error "No support for Android in $(COMPILER_VERSION)")
  42. endif
  43. else
  44. ifdef ANDROID_SERIAL
  45. uname_m:=$(shell adb shell uname -m)
  46. ifeq (i686,$(uname_m))
  47. export arch:=ia32
  48. else
  49. export arch:=$(uname_m)
  50. endif
  51. else
  52. ifndef arch
  53. $(error "No target architecture specified and \'ANDROID_SERIAL\' environment variable specifying target device not set")
  54. endif
  55. endif
  56. endif
  57. endif
  58. ifneq (ia32,$(arch))
  59. ifneq (arm,$(findstring arm,$(arch)))
  60. $(error "Unsupported architecture for Android target build: arch=$(arch).\nPlease ensure target device is connected via \'adb\' and \'ANDROID_SERIAL\' is set to target device.")
  61. endif
  62. endif
  63. # Many OS versions (Android 4.0.[0-3] for example) need workaround for dlopen to avoid non-recursive loader lock hang
  64. export dlopen_workaround = 1
  65. # Android platform only supported from TBB 4.1 forward
  66. NO_LEGACY_TESTS = 1