forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlcb-modules.gyp
More file actions
126 lines (117 loc) · 2.97 KB
/
lcb-modules.gyp
File metadata and controls
126 lines (117 loc) · 2.97 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
{
'includes':
[
'../common.gypi',
'engine-sources.gypi', # LCB modules for the engine are listed here
'../libscript/stdscript-sources.gypi', # LCB modules for the stdscript library are listed here
],
'targets':
[
{
'target_name': 'engine_lcb_modules',
'type': 'static_library',
'dependencies':
[
'../libscript/libscript.gyp:stdscript',
'../toolchain/lc-compile/lc-compile.gyp:lc-compile',
],
'all_dependent_settings':
{
'variables':
{
'dist_aux_files':
[
# Gyp will only use a recursive xcopy on Windows if the path ends with '/'
'<(PRODUCT_DIR)/modules/',
],
},
},
'conditions':
[
[
'OS == "win"',
{
'all_dependent_settings':
{
'msvs_settings':
{
'VCLinkerTool':
{
'AdditionalOptions':
[
'/WHOLEARCHIVE:<(PRODUCT_DIR)/lib/engine_lcb_modules.lib',
],
},
},
},
},
],
[
'OS == "mac" or OS == "ios"',
{
'all_dependent_settings':
{
'xcode_settings':
{
'OTHER_LDFLAGS':
[
'-force_load <(PRODUCT_DIR)/libengine_lcb_modules.a',
],
},
},
},
],
[
'OS == "android" or OS == "linux"',
{
'direct_dependent_settings':
{
'link_settings':
{
'ldflags':
[
'-Wl,--whole-archive',
'-Wl,<(PRODUCT_DIR)/obj.target/engine/libengine_lcb_modules.a',
'-Wl,--no-whole-archive',
],
},
},
},
],
],
'actions':
[
{
'action_name': 'generate_builtin_list',
'message': 'Generating list of in-engine LCB modules',
'process_outputs_as_sources': 1,
'inputs':
[
'<@(engine_syntax_lcb_files)',
'<@(engine_other_lcb_files)',
'<@(stdscript_syntax_lcb_files)',
'<@(stdscript_other_lcb_files)',
],
'outputs':
[
'<(INTERMEDIATE_DIR)/engine_lcb_modules.cpp',
# A specific output file is required here to ensure that
# all build systems create the output directory while
# also preventing spurious rebuilds.
'<(PRODUCT_DIR)/modules/lci/com.livecode.type.lci',
],
'action':
[
# We don't need the output grammar, just the modules list and interface files
'>(lc-compile_host)',
'--bootstrap',
'--inputg', '../toolchain/lc-compile/src/grammar.g',
'--outputi', '<(PRODUCT_DIR)/modules/lci',
'--outputc', '<(INTERMEDIATE_DIR)/engine_lcb_modules.cpp',
'<@(_inputs)',
],
},
],
},
],
}