2011-03-06 Adam Barth <abarth@webkit.org>
[WebKit-https.git] / Source / WebCore / gyp / WebCore.gyp
1 {
2   'includes': [
3     '../../gyp/common.gypi',
4     '../WebCore.gypi',
5   ],
6   'xcode_config_file': '../Configurations/DebugRelease.xcconfig',
7   'targets': [
8     {
9       'target_name': 'WebCore',
10       'type': 'shared_library',
11       'dependencies': [
12         'Derived Sources',
13         'Update Version',
14         # FIXME: Add 'Copy Generated Headers',
15         # FIXME: Add 'Copy Forwarding and ICU Headers',
16         # FIXME: Add 'Copy Inspector Resources',
17       ],
18       'include_dirs': [
19         '<(DEPTH)/WebCore/icu',
20         '<(DEPTH)/WebCore/ForwardingHeaders',
21         '<(PRODUCT_DIR)/usr/local/include',
22         '/usr/include/libxml2',
23       ],
24       'sources': [
25         '<@(webcore_files)',
26         '<@(webcore_publicheader_files)',
27         '<@(webcore_privateheader_files)',
28         '<@(webcore_derived_source_files)',
29         '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
30         '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
31         '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
32         '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
33         '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
34         '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
35         '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
36         '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
37         '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
38         '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
39         '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
40         '<(PRODUCT_DIR)/JavaScriptCore.framework',
41         'libicucore.dylib',
42         'libobjc.dylib',
43         'libxml2.dylib',
44         'libz.dylib',
45       ],
46       'sources/': [
47         ['exclude', 'accessibility/[^/]+/'],
48         ['include', 'accessibility/mac/'],
49         ['exclude', 'bindings/[^/]+/'],
50         ['include', 'bindings/generic/'],
51         ['include', 'bindings/js/'],
52         ['include', 'bindings/objc/'],
53         ['exclude', 'bridge/jni/v8/'],
54         ['exclude', 'bridge/qt/'],
55         # FIXME: These files shouldn't be in this directory.
56         ['exclude', 'bridge/testbindings\.cpp'],
57         ['exclude', 'bridge/testbindings\.mm'],
58         ['exclude', 'bridge/testqtbindings\.cpp'],
59         ['exclude', 'editing/[^/]+/'],
60         ['include', 'editing/mac/'],
61         ['exclude', 'history/[^/]+/'],
62         ['include', 'history/cf/'],
63         ['include', 'history/mac/'],
64         ['exclude', 'loader/[^/]+/'],
65         ['include', 'loader/appcache/'],
66         ['include', 'loader/archive/'],
67         ['include', 'loader/cache/'],
68         ['include', 'loader/cf/'],
69         ['include', 'loader/icon/'],
70         ['include', 'loader/mac/'],
71         ['exclude', 'page/[^/]+/'],
72         ['include', 'page/animation/'],
73         ['include', 'page/mac/'],
74         ['exclude', 'platform/[^/]+/'],
75         ['include', 'platform/animation/'],
76         ['include', 'platform/audio/'],
77         ['exclude', 'platform/audio/[^/]+/'],
78         ['include', 'platform/audio/mac/'],
79         ['include', 'platform/audio/fftw/'], # FIXME: Is this correct? mkl is the other choice.
80         ['include', 'platform/audio/resources/'],
81         ['include', 'platform/cf/'],
82         ['include', 'platform/cocoa/'],
83         ['include', 'platform/graphics/'],
84         ['exclude', 'platform/graphics/[^/]+/'],
85         ['include', 'platform/graphics/ca/'],
86         ['include', 'platform/graphics/cg/'],
87         # FIXME: This file appears to be misplaced.
88         ['exclude', 'platform/graphics/cg/FontPlatformData\.h'],
89         ['include', 'platform/graphics/cocoa/'],
90         ['include', 'platform/graphics/filters/'],
91         ['include', 'platform/graphics/gpu/'],
92         ['include', 'platform/graphics/mac/'],
93         ['include', 'platform/graphics/opengl/'],
94         ['include', 'platform/graphics/transforms/'],
95         ['include', 'platform/mac/'],
96         ['include', 'platform/mock/'],
97         ['include', 'platform/network/'],
98         ['exclude', 'platform/network/[^/]+/'],
99         ['include', 'platform/network/cf'],
100         ['include', 'platform/network/mac'],
101         ['include', 'platform/posix/'],
102         ['include', 'platform/sql/'],
103         ['exclude', 'platform/sql/chromium'],
104         ['include', 'platform/text/'],
105         ['exclude', 'platform/text/[^/]+/'],
106         ['include', 'platform/text/cf'],
107         ['include', 'platform/text/mac'],
108         ['include', 'platform/text/transcoder'],
109         ['exclude', 'DerivedSources\.cpp$'],
110         # FIXME: Consider using one or more AllInOne files.
111         ['exclude', '(Chromium|Win|Qt)\.cpp$'],
112         ['exclude', 'AllInOne\.cpp$'],
113         ['exclude', 'WebCore\.gyp/mac/Empty\.cpp$']
114       ],
115       'mac_framework_headers': [
116         '<@(webcore_publicheader_files)',
117       ],
118       'mac_framework_private_headers': [
119         '<@(webcore_privateheader_files)',
120       ],
121       'xcode_config_file': '../Configurations/WebCore.xcconfig',
122       # FIXME: A number of these actions aren't supposed to run if "${ACTION}" = "installhdrs"
123       'postbuilds': [
124         {
125           'postbuild_name': 'Check For Global Initializers',
126           'action': [
127             'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-global-initializers'
128           ],
129         },
130         {
131           'postbuild_name': 'Check For Exit Time Destructors',
132           'action': [
133             'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-exit-time-destructors'
134           ],
135         },
136         {
137           'postbuild_name': 'Check For Weak VTables and Externals',
138           'action': [
139             'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-weak-vtables-and-externals'
140           ],
141         },
142         {
143           'postbuild_name': 'Check For Inappropriate Files in Framework',
144           'action': [
145             'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-inappropriate-files-in-framework'
146           ],
147         },
148       ],
149       'conditions': [
150         ['OS=="mac"', {
151           'mac_bundle': 1,
152           'xcode_settings': {
153             # FIXME: Remove these overrides once WebCore.xcconfig is
154             # used only by this project.
155             'GCC_PREFIX_HEADER': '<(DEPTH)/WebCore/WebCorePrefix.h',
156             'INFOPLIST_FILE': '<(DEPTH)/WebCore/Info.plist',
157           },
158         }],
159       ],
160     },
161     {
162       'target_name': 'Derived Sources',
163       'type': 'none',
164       'actions': [{
165         'action_name': 'Generate Derived Sources',
166         'inputs': [],
167         'outputs': [],
168         'action': [
169           'sh', 'generate-derived-sources.sh',
170         ],
171       }],
172     },
173     {
174       'target_name': 'Update Version',
175       'type': 'none',
176       'actions': [{
177         'action_name': 'Update Info.plist with version information',
178         'inputs': [],
179          'outputs': [],
180          'action': [
181            'sh', '<(DEPTH)/gyp/update-info-plist.sh', '<(DEPTH)/WebCore/Info.plist'
182           ]
183       }],
184     },
185     # FIXME: Add WebCoreExportFileGenerator
186   ], # targets
187 }