moz.build 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. EXPORTS.mozilla += [
  6. 'Hal.h',
  7. 'HalImpl.h',
  8. 'HalSandbox.h',
  9. 'HalScreenConfiguration.h',
  10. 'HalSensor.h',
  11. 'HalTypes.h',
  12. 'HalWakeLock.h',
  13. ]
  14. UNIFIED_SOURCES += [
  15. 'HalWakeLock.cpp',
  16. 'sandbox/SandboxHal.cpp',
  17. 'WindowIdentifier.cpp',
  18. ]
  19. # Hal.cpp cannot be built in unified mode because it relies on HalImpl.h.
  20. SOURCES += [
  21. 'Hal.cpp',
  22. ]
  23. if CONFIG['OS_TARGET'] == 'Linux':
  24. UNIFIED_SOURCES += [
  25. 'fallback/FallbackAlarm.cpp',
  26. 'fallback/FallbackScreenConfiguration.cpp',
  27. 'fallback/FallbackSensor.cpp',
  28. 'linux/LinuxMemory.cpp',
  29. 'linux/LinuxPower.cpp',
  30. ]
  31. elif CONFIG['OS_TARGET'] == 'WINNT':
  32. UNIFIED_SOURCES += [
  33. 'fallback/FallbackAlarm.cpp',
  34. 'fallback/FallbackMemory.cpp',
  35. 'fallback/FallbackPower.cpp',
  36. 'fallback/FallbackScreenConfiguration.cpp',
  37. 'windows/WindowsSensor.cpp',
  38. ]
  39. elif CONFIG['OS_TARGET'] in ('OpenBSD', 'NetBSD', 'FreeBSD', 'DragonFly'):
  40. UNIFIED_SOURCES += [
  41. 'fallback/FallbackAlarm.cpp',
  42. 'fallback/FallbackMemory.cpp',
  43. 'fallback/FallbackPower.cpp',
  44. 'fallback/FallbackScreenConfiguration.cpp',
  45. 'fallback/FallbackSensor.cpp',
  46. ]
  47. else:
  48. UNIFIED_SOURCES += [
  49. 'fallback/FallbackAlarm.cpp',
  50. 'fallback/FallbackMemory.cpp',
  51. 'fallback/FallbackPower.cpp',
  52. 'fallback/FallbackScreenConfiguration.cpp',
  53. 'fallback/FallbackSensor.cpp',
  54. ]
  55. UNIFIED_SOURCES += [
  56. 'fallback/FallbackFactoryReset.cpp',
  57. 'fallback/FallbackProcessPriority.cpp',
  58. 'fallback/FallbackScreenPower.cpp',
  59. 'fallback/FallbackSwitch.cpp',
  60. 'fallback/FallbackSystemService.cpp',
  61. 'fallback/FallbackThreadPriority.cpp',
  62. 'fallback/FallbackTime.cpp',
  63. 'fallback/FallbackWakeLocks.cpp',
  64. ]
  65. UNIFIED_SOURCES += [
  66. 'fallback/FallbackNetwork.cpp',
  67. ]
  68. IPDL_SOURCES = [
  69. 'sandbox/PHal.ipdl',
  70. ]
  71. include('/ipc/chromium/chromium-config.mozbuild')
  72. FINAL_LIBRARY = 'xul'
  73. if CONFIG['MOZ_GAMEPAD']:
  74. LOCAL_INCLUDES += [
  75. '/dom/base',
  76. ]
  77. CFLAGS += CONFIG['GLIB_CFLAGS']
  78. CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
  79. CXXFLAGS += CONFIG['GLIB_CFLAGS']
  80. CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']