|
1 # -*- Mode: python; c-basic-offset: 4; 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 EXPORTS += [ |
|
8 'nsIIPCBackgroundChildCreateCallback.h', |
|
9 'nsIIPCSerializableInputStream.h', |
|
10 'nsIIPCSerializableURI.h', |
|
11 ] |
|
12 |
|
13 EXPORTS.mozilla.ipc += [ |
|
14 'BackgroundChild.h', |
|
15 'BackgroundParent.h', |
|
16 'BrowserProcessSubThread.h', |
|
17 'CrossProcessMutex.h', |
|
18 'FileDescriptor.h', |
|
19 'FileDescriptorUtils.h', |
|
20 'GeckoChildProcessHost.h', |
|
21 'InputStreamUtils.h', |
|
22 'IOThreadChild.h', |
|
23 'MessageChannel.h', |
|
24 'MessageLink.h', |
|
25 'ProcessChild.h', |
|
26 'ProtocolUtils.h', |
|
27 'ScopedXREEmbed.h', |
|
28 'SharedMemory.h', |
|
29 'SharedMemoryBasic.h', |
|
30 'SharedMemorySysV.h', |
|
31 'Shmem.h', |
|
32 'Transport.h', |
|
33 'URIUtils.h', |
|
34 'WindowsMessageLoop.h', |
|
35 ] |
|
36 |
|
37 if CONFIG['OS_ARCH'] == 'WINNT': |
|
38 EXPORTS.mozilla.ipc += [ |
|
39 'Transport_win.h', |
|
40 ] |
|
41 SOURCES += [ |
|
42 'SharedMemory_windows.cpp', |
|
43 'Transport_win.cpp', |
|
44 'WindowsMessageLoop.cpp', |
|
45 ] |
|
46 else: |
|
47 EXPORTS.mozilla.ipc += [ |
|
48 'Transport_posix.h', |
|
49 ] |
|
50 UNIFIED_SOURCES += [ |
|
51 'SharedMemory_posix.cpp', |
|
52 'Transport_posix.cpp', |
|
53 ] |
|
54 |
|
55 if CONFIG['OS_ARCH'] == 'WINNT': |
|
56 SOURCES += [ |
|
57 'CrossProcessMutex_windows.cpp', |
|
58 ] |
|
59 elif CONFIG['OS_ARCH'] == 'Linux': |
|
60 UNIFIED_SOURCES += [ |
|
61 'CrossProcessMutex_posix.cpp', |
|
62 ] |
|
63 else: |
|
64 UNIFIED_SOURCES += [ |
|
65 'CrossProcessMutex_unimplemented.cpp', |
|
66 ] |
|
67 |
|
68 # Android has its own, |
|
69 # almost-but-not-quite-compatible-with-POSIX-or-/dev/shm shared memory |
|
70 # impl. |
|
71 if CONFIG['OS_TARGET'] == 'Android': |
|
72 EXPORTS.mozilla.ipc += ['SharedMemoryBasic_android.h'] |
|
73 UNIFIED_SOURCES += [ |
|
74 'SharedMemoryBasic_android.cpp', |
|
75 ] |
|
76 else: |
|
77 EXPORTS.mozilla.ipc += ['SharedMemoryBasic_chromium.h'] |
|
78 |
|
79 if CONFIG['OS_ARCH'] == 'Linux': |
|
80 UNIFIED_SOURCES += [ |
|
81 'ProcessUtils_linux.cpp', |
|
82 ] |
|
83 elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD'): |
|
84 UNIFIED_SOURCES += [ |
|
85 'ProcessUtils_bsd.cpp' |
|
86 ] |
|
87 else: |
|
88 UNIFIED_SOURCES += [ |
|
89 'ProcessUtils_none.cpp', |
|
90 ] |
|
91 |
|
92 EXPORTS.ipc += [ |
|
93 'IPCMessageUtils.h', |
|
94 ] |
|
95 |
|
96 UNIFIED_SOURCES += [ |
|
97 'BackgroundImpl.cpp', |
|
98 'BrowserProcessSubThread.cpp', |
|
99 'FileDescriptor.cpp', |
|
100 'FileDescriptorUtils.cpp', |
|
101 'InputStreamUtils.cpp', |
|
102 'MessageChannel.cpp', |
|
103 'MessageLink.cpp', |
|
104 'MessagePump.cpp', |
|
105 'ProcessChild.cpp', |
|
106 'ProtocolUtils.cpp', |
|
107 'ScopedXREEmbed.cpp', |
|
108 'SharedMemory.cpp', |
|
109 'Shmem.cpp', |
|
110 'StringUtil.cpp', |
|
111 ] |
|
112 |
|
113 # GeckoChildProcessHost.cpp cannot be built in unified mode because it uses plarena.h. |
|
114 # URIUtils.cpp cannot be built in unified mode because of name clashes on strdup. |
|
115 SOURCES += [ |
|
116 'BackgroundChildImpl.cpp', |
|
117 'BackgroundParentImpl.cpp', |
|
118 'GeckoChildProcessHost.cpp', |
|
119 'URIUtils.cpp', |
|
120 ] |
|
121 |
|
122 LOCAL_INCLUDES += [ |
|
123 '/xpcom/build', |
|
124 ] |
|
125 |
|
126 IPDL_SOURCES = [ |
|
127 'InputStreamParams.ipdlh', |
|
128 'PBackground.ipdl', |
|
129 'PBackgroundTest.ipdl', |
|
130 'ProtocolTypes.ipdlh', |
|
131 'URIParams.ipdlh', |
|
132 ] |
|
133 |
|
134 |
|
135 LOCAL_INCLUDES += [ |
|
136 '/xpcom/threads', |
|
137 ] |
|
138 |
|
139 include('/ipc/chromium/chromium-config.mozbuild') |
|
140 |
|
141 FINAL_LIBRARY = 'xul' |
|
142 |
|
143 for var in ('MOZ_CHILD_PROCESS_NAME', 'MOZ_CHILD_PROCESS_BUNDLE'): |
|
144 DEFINES[var] = '"%s"' % CONFIG[var] |
|
145 |
|
146 LOCAL_INCLUDES += [ |
|
147 '/toolkit/crashreporter', |
|
148 ] |
|
149 |
|
150 if CONFIG['MOZ_CONTENT_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT': |
|
151 LOCAL_INCLUDES += [ |
|
152 '/security/sandbox/win/src/sandboxbroker', |
|
153 ] |