Bug 1452182 [wpt PR 9921] - [css-grid] Minimum width items should include margins...
[gecko.git] / hal / moz.build
blobe415eb9f866bd8267d7b850fc3b0ebbab63deb79
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6  
7 with Files('**'):
8     BUG_COMPONENT = ('Core', 'Hardware Abstraction Layer (HAL)')
10 EXPORTS.mozilla += [
11     'Hal.h',
12     'HalImpl.h',
13     'HalSandbox.h',
14     'HalScreenConfiguration.h',
15     'HalSensor.h',
16     'HalTypes.h',
17     'HalWakeLock.h',
20 EXPORTS.mozilla.fallback += [
21     'fallback/FallbackScreenConfiguration.h',
24 UNIFIED_SOURCES += [
25     'HalWakeLock.cpp',
26     'sandbox/SandboxHal.cpp',
27     'WindowIdentifier.cpp',
30 # Hal.cpp cannot be built in unified mode because it relies on HalImpl.h.
31 SOURCES += [
32     'Hal.cpp',
35 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
36     LOCAL_INCLUDES += [
37         '/widget/android',
38     ]
39     UNIFIED_SOURCES += [
40         'android/AndroidSensor.cpp',
41     ]
42     # AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
43     SOURCES += [
44         'android/AndroidHal.cpp',
45     ]
46 elif CONFIG['OS_TARGET'] == 'Linux':
47     UNIFIED_SOURCES += [
48         'fallback/FallbackScreenConfiguration.cpp',
49         'fallback/FallbackSensor.cpp',
50         'fallback/FallbackVibration.cpp',
51     ]
52     if CONFIG['MOZ_ENABLE_DBUS']:
53         UNIFIED_SOURCES += [
54             'linux/UPowerClient.cpp',
55         ]
56     else:
57         UNIFIED_SOURCES += [
58             'fallback/FallbackBattery.cpp',
59         ]
60 elif CONFIG['OS_TARGET'] == 'WINNT':
61     UNIFIED_SOURCES += [
62         'fallback/FallbackScreenConfiguration.cpp',
63         'fallback/FallbackVibration.cpp',
64         'windows/WindowsSensor.cpp',
65     ]
66     # WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
67     SOURCES += [
68         'windows/WindowsBattery.cpp',
69     ]
70 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
71     UNIFIED_SOURCES += [
72         'cocoa/CocoaBattery.cpp',
73         'fallback/FallbackScreenConfiguration.cpp',
74         'fallback/FallbackVibration.cpp',
75     ]
76 elif CONFIG['OS_TARGET'] in ('OpenBSD', 'NetBSD', 'FreeBSD', 'DragonFly'):
77     UNIFIED_SOURCES += [
78         'fallback/FallbackScreenConfiguration.cpp',
79         'fallback/FallbackSensor.cpp',
80         'fallback/FallbackVibration.cpp',
81     ]
82     if CONFIG['MOZ_ENABLE_DBUS']:
83         UNIFIED_SOURCES += [
84             'linux/UPowerClient.cpp',
85         ]
86     else:
87         UNIFIED_SOURCES += [
88             'fallback/FallbackBattery.cpp',
89         ]
90 else:
91     UNIFIED_SOURCES += [
92         'fallback/FallbackBattery.cpp',
93         'fallback/FallbackScreenConfiguration.cpp',
94         'fallback/FallbackSensor.cpp',
95         'fallback/FallbackVibration.cpp',
96     ]
98 # Fallbacks for backends no longer implemented.
99 UNIFIED_SOURCES += [
100     'fallback/FallbackDiskSpaceWatcher.cpp',
101     'fallback/FallbackProcessPriority.cpp',
102     'fallback/FallbackSwitch.cpp',
103     'fallback/FallbackThreadPriority.cpp',
106 # Fallbacks for backends implemented on Android only.
107 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
108     UNIFIED_SOURCES += [
109         'fallback/FallbackNetwork.cpp',
110     ]
112 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
113     UNIFIED_SOURCES += [
114         'cocoa/CocoaSensor.mm',
115         'cocoa/smslib.mm',
116     ]
118 IPDL_SOURCES = [
119     'sandbox/PHal.ipdl',
122 include('/ipc/chromium/chromium-config.mozbuild')
124 FINAL_LIBRARY = 'xul'
126 LOCAL_INCLUDES += [
127     '/dom/base',
130 CFLAGS += CONFIG['GLIB_CFLAGS']
131 CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
132 CXXFLAGS += CONFIG['GLIB_CFLAGS']
133 CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']