]> git.saurik.com Git - apple/javascriptcore.git/blob - gyp/JavaScriptCore.gyp
8a93f1d5332bf36d5567642a3adeff048a0edee1
[apple/javascriptcore.git] / gyp / JavaScriptCore.gyp
1 {
2 'includes': [
3 '../../gyp/common.gypi',
4 '../JavaScriptCore.gypi',
5 ],
6 'configurations': {
7 'Production': {
8 'xcode_config_file': '<(project_dir)/Configurations/Base.xcconfig',
9 },
10 'Profiling': {
11 'xcode_config_file': '<(project_dir)/Configurations/DebugRelease.xcconfig',
12 'xcode_settings': {
13 'STRIP_INSTALLED_PRODUCT': 'NO',
14 },
15 },
16 'Release': {
17 'xcode_config_file': '<(project_dir)/Configurations/DebugRelease.xcconfig',
18 'xcode_settings': {
19 'STRIP_INSTALLED_PRODUCT': 'NO',
20 },
21 },
22 'Debug': {
23 'xcode_config_file': '<(project_dir)/Configurations/DebugRelease.xcconfig',
24 'xcode_settings': {
25 'DEAD_CODE_STRIPPING': '$(DEAD_CODE_STRIPPING_debug)',
26 'DEBUG_DEFINES': '$(DEBUG_DEFINES_debug)',
27 'GCC_OPTIMIZATION_LEVEL': '$(GCC_OPTIMIZATION_LEVEL_debug)',
28 'STRIP_INSTALLED_PRODUCT': '$(STRIP_INSTALLED_PRODUCT_debug)',
29 },
30 },
31 },
32 'variables': {
33 'javascriptcore_include_dirs': [
34 '<(project_dir)',
35 '<(project_dir)/icu',
36 ],
37 },
38 'target_defaults': {
39 'configurations': {
40 'Profiling': {},
41 },
42 },
43 'targets': [
44 {
45 'target_name': 'JavaScriptCore',
46 'type': 'shared_library',
47 'dependencies': [
48 'Derived Sources',
49 'Update Version',
50 ],
51 'include_dirs': [
52 '<@(javascriptcore_include_dirs)',
53 '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore',
54 ],
55 'configurations': {
56 'Production': {
57 'INSTALL_PATH': '$(BUILT_PRODUCTS_DIR)',
58 },
59 },
60 'sources': [
61 '<@(javascriptcore_files)',
62 '<@(javascriptcore_publicheader_files)',
63 '<@(javascriptcore_privateheader_files)',
64 '<@(javascriptcore_derived_source_files)',
65 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
66 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
67 '/usr/lib/libicucore.dylib',
68 '/usr/lib/libobjc.dylib',
69 ],
70 'mac_framework_headers': [
71 '<@(javascriptcore_publicheader_files)',
72 ],
73 'mac_framework_private_headers': [
74 '<@(javascriptcore_privateheader_files)',
75 ],
76 'xcode_config_file': '<(project_dir)/Configurations/JavaScriptCore.xcconfig',
77 'sources/': [
78 ['exclude', 'API/tests/'],
79 ['exclude', 'ForwardingHeaders/'],
80 ['exclude', '(?<!unicode)/icu/'],
81 ['exclude', 'os-win32/'],
82 ['exclude', 'qt/'],
83 ['exclude', 'wtf/(efl|gtk|qt|wince|wx)/'],
84 ['exclude', 'wtf/unicode/glib/'],
85 ['exclude', 'wtf/unicode/qt4/'],
86 ['exclude', 'wtf/unicode/wince/'],
87 ['exclude', 'wtf/url/'],
88 ['exclude', '/(gtk|glib|gobject)/.*\\.(cpp|h)$'],
89 ['exclude', '(Default|Gtk|Chromium|None|Qt|Win|Wx|Symbian)\\.(cpp|mm|h)$'],
90 ['exclude', 'GCActivityCallback\.cpp$'],
91 ['exclude', 'BSTR[^/]*$'],
92 ],
93 'postbuilds': [
94 {
95 'postbuild_name': 'Check For Global Initializers',
96 'action': [
97 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-global-initializers'
98 ],
99 },
100 {
101 'postbuild_name': 'Check For Exit Time Destructors',
102 'action': [
103 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-exit-time-destructors'
104 ],
105 },
106 {
107 'postbuild_name': 'Check For Weak VTables and Externals',
108 'action': [
109 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-weak-vtables-and-externals'
110 ],
111 },
112 ],
113 'conditions': [
114 ['OS=="mac"', {
115 'mac_bundle': 1,
116 'xcode_settings': {
117 # FIXME: Remove these overrides once JavaScriptCore.xcconfig is
118 # used only by this project.
119 'GCC_PREFIX_HEADER': '<(project_dir)/JavaScriptCorePrefix.h',
120 'INFOPLIST_FILE': '<(project_dir)/Info.plist',
121 },
122 }],
123 ],
124 },
125 {
126 'target_name': 'Derived Sources',
127 'type': 'none',
128 'actions': [
129 {
130 'action_name': 'Generate Derived Sources',
131 'inputs': [],
132 'outputs': [
133 '<@(javascriptcore_derived_source_files)',
134 ],
135 'action': [
136 'sh', 'generate-derived-sources.sh'
137 ],
138 },
139 {
140 'action_name': 'Generate DTrace Header',
141 'inputs': [],
142 'outputs': [],
143 'action': [
144 'sh', '<(project_dir)/gyp/generate-dtrace-header.sh', '<(project_dir)'
145 ]
146 }
147 ],
148 },
149 {
150 'target_name': 'Update Version',
151 'type': 'none',
152 'actions': [{
153 'action_name': 'Update Info.plist with version information',
154 'inputs': [],
155 'outputs': [],
156 'action': [
157 'sh', '<(project_dir)/gyp/update-info-plist.sh', '<(project_dir)/Info.plist'
158 ]
159 }],
160 },
161 {
162 'target_name': 'minidom',
163 'type': 'executable',
164 'dependencies': [
165 'JavaScriptCore',
166 ],
167 # FIXME: We should use a header map instead of listing these explicitly.
168 'include_dirs': [
169 '<@(javascriptcore_include_dirs)',
170 ],
171 'sources': [
172 '<@(minidom_files)',
173 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
174 ],
175 'copies': [{
176 'destination': '<(PRODUCT_DIR)',
177 'files': [
178 '<@(minidom_support_files)',
179 ],
180 }],
181 },
182 {
183 'target_name': 'testapi',
184 'type': 'executable',
185 'dependencies': [
186 'JavaScriptCore',
187 ],
188 # FIXME: We should use a header map instead of listing these explicitly.
189 'include_dirs': [
190 '<@(javascriptcore_include_dirs)',
191 ],
192 'sources': [
193 '<@(testapi_files)',
194 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
195 ],
196 'copies': [{
197 'destination': '<(PRODUCT_DIR)',
198 'files': [
199 '<@(testapi_support_files)',
200 ],
201 }],
202 },
203 {
204 'target_name': 'jsc',
205 'type': 'executable',
206 'dependencies': [
207 'JavaScriptCore',
208 ],
209 # FIXME: We should use a header map instead of listing these explicitly.
210 'include_dirs': [
211 '<@(javascriptcore_include_dirs)',
212 ],
213 'configurations': {
214 'Production': {
215 'xcode_settings': {
216 'INSTALL_PATH': '$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources',
217 },
218 },
219 },
220 'sources': [
221 '<@(jsc_files)',
222 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
223 '/usr/lib/libedit.dylib',
224 ],
225 },
226 ], # targets
227 }