This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathkernel.gyp
More file actions
316 lines (292 loc) · 8.25 KB
/
kernel.gyp
File metadata and controls
316 lines (292 loc) · 8.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
{
'includes':
[
'../common.gypi',
'engine-sources.gypi',
],
'targets':
[
{
'target_name': 'kernel',
'type': 'static_library',
'dependencies':
[
'../libfoundation/libfoundation.gyp:libFoundation',
'../libgraphics/libgraphics.gyp:libGraphics',
'../libscript/libscript.gyp:libScript',
'../libscript/libscript.gyp:stdscript',
'../libbrowser/libbrowser.gyp:libbrowser',
'../thirdparty/libgif/libgif.gyp:libgif',
'../thirdparty/libjpeg/libjpeg.gyp:libjpeg',
'../thirdparty/libopenssl/libopenssl.gyp:libopenssl_stubs',
'../thirdparty/libpcre/libpcre.gyp:libpcre',
'../thirdparty/libpng/libpng.gyp:libpng',
'../thirdparty/libz/libz.gyp:libz',
'../prebuilt/libopenssl.gyp:libopenssl_headers',
'engine-common.gyp:encode_version',
'engine-common.gyp:quicktime_stubs',
],
'include_dirs':
[
'include',
'src',
],
'sources':
[
'<@(engine_common_source_files)',
'<@(engine_desktop_source_files)',
'<@(engine_module_source_files)',
'<@(engine_java_source_files)',
],
'conditions':
[
[
'OS == "linux"',
{
'include_dirs':
[
'../thirdparty/headers/linux/include/cairo',
],
'defines':
[
# We use some features that are behind config macros in old versions of Pango
'PANGO_ENABLE_BACKEND',
'PANGO_ENABLE_ENGINE',
],
},
],
[
'OS == "android"',
{
'dependencies':
[
'../thirdparty/libfreetype/libfreetype.gyp:libfreetype',
'../thirdparty/libskia/libskia.gyp:libskia',
],
'sources!':
[
# Not yet supported on Android
'src/mblactivityindicator.cpp',
'src/mblcamera.cpp',
],
'link_settings':
{
'ldflags':
[
# Force the entry point to be included in the output
'-Wl,--undefined,Java_com_runrev_android_Engine_doCreate',
# mblandroidlcb.cpp contains nothing other than the LCB Invocation Handler
# native callback function, so force the symbol to be included as otherwise it
# will be discarded by the linker because nothing in the file is used statically
'-Wl,--undefined,Java_com_runrev_android_LCBInvocationHandler_doNativeListenerCallback',
],
},
},
],
[
'OS == "emscripten"',
{
'dependencies':
[
'../thirdparty/libskia/libskia.gyp:libskia',
],
'sources':
[
'<@(engine_minizip_source_files)',
],
},
],
[
'OS == "mac"',
{
'defines':
[
# We want to use the new prototypes for the Objective-C
# dispatch methods as it helps catch certain errors at
# compile time rather than run time.
'OBJC_OLD_DISPATCH_PROTOTYPES=0',
],
},
],
],
'link_settings':
{
'conditions':
[
[
'OS == "mac" or OS == "ios"',
{
'libraries':
[
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreMedia.framework',
'$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
'$(SDKROOT)/System/Library/Frameworks/Security.framework',
'$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
],
},
],
[
'OS == "mac"',
{
'libraries':
[
'$(SDKROOT)/usr/lib/libcups.dylib',
'$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
'$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
'$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
'$(SDKROOT)/System/Library/Frameworks/MediaToolbox.framework',
'$(SDKROOT)/System/Library/Frameworks/Quartz.framework',
],
},
],
[
'OS == "mac" and target_sdk != "macosx10.6"',
{
# Adding AVFoundation in the list of libraries does not allow
# us to weak link it. Only adding the linking flag does the job
'xcode_settings':
{
'OTHER_LDFLAGS':
[
'-weak_framework AVFoundation',
]
},
},
],
[
'OS == "mac" and target_sdk == "macosx10.6"',
{
'libraries!':
[
'$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
'$(SDKROOT)/System/Library/Frameworks/AVFoundation.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreMedia.framework',
'$(SDKROOT)/System/Library/Frameworks/MediaToolbox.framework',
],
},
],
[
'OS == "ios"',
{
'libraries':
[
'$(SDKROOT)/System/Library/Frameworks/AddressBook.framework',
'$(SDKROOT)/System/Library/Frameworks/AddressBookUI.framework',
'$(SDKROOT)/System/Library/Frameworks/AVFoundation.framework',
'$(SDKROOT)/System/Library/Frameworks/CFNetwork.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreLocation.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreMedia.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreMotion.framework',
'$(SDKROOT)/System/Library/Frameworks/EventKit.framework',
'$(SDKROOT)/System/Library/Frameworks/EventKitUI.framework',
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
'$(SDKROOT)/System/Library/Frameworks/MediaPlayer.framework',
'$(SDKROOT)/System/Library/Frameworks/MessageUI.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenGLES.framework',
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
'$(SDKROOT)/System/Library/Frameworks/StoreKit.framework',
'$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
],
},
],
[
'OS == "linux"',
{
'dependencies':
[
#'engine.gyp:create_linux_stubs',
],
'sources':
[
'<(SHARED_INTERMEDIATE_DIR)/src/linux.stubs.cpp',
],
'libraries':
[
'-ldl',
'-lpthread',
],
},
],
[
'OS == "android"',
{
'libraries':
[
'-lGLESv1_CM',
'-lEGL',
'-ljnigraphics',
'-llog',
'-lm',
],
},
],
[
'OS == "win"',
{
'libraries':
[
'-ladvapi32',
'-lcomdlg32',
'-lcrypt32',
'-lgdi32',
'-liphlpapi',
'-limm32',
'-lmscms',
'-lmsimg32',
'-lpsapi',
'-lole32',
'-loleaut32',
'-lrpcrt4',
'-lshell32',
'-lshlwapi',
'-lstrmiids',
'-luser32',
'-lusp10',
'-lversion',
'-lwinmm',
'-lwinspool',
'-lws2_32',
],
},
],
],
},
},
{
'target_name': 'kernel-java',
'type': 'none',
'conditions':
[
[
'OS == "android"',
{
'variables':
{
'java_classes_dir_name': 'classes_livecode_community',
},
# Include the rules for compiling Java
'includes':
[
'../config/java.gypi',
],
# A little indirection needed to get INTERMEDIATE_DIR escaped properly
'intermediate_dir_escaped': '<!(["sh", "-c", "echo $1 | sed -e $2", "echo", "<(INTERMEDIATE_DIR)", "s/\\\\$/\\\\\\$/g"])',
'sources':
[
'<@(engine_aidl_source_files)',
# Outputs from a rule don't get considered as
# inputs to another rule in Gyp, unfortunately
'<!@((for x in <@(engine_aidl_source_files); do echo "<(_intermediate_dir_escaped)/${x}"; done) | sed -e "s/\\.aidl$/\\.java/g")',
# Some of the Java sources depend on the output
# from AIDL so they come last
'<@(engine_java_source_files)',
],
}
]
],
},
],
}