# The keys in sources are the paths to the directories
# the values are an array of source files in those directories to compile
sources = {}
sources['css'] = [
    'css/CSSBorderImageValue.cpp',
    'css/CSSCanvasValue.cpp',
    'css/CSSCharsetRule.cpp',
    'css/CSSComputedStyleDeclaration.cpp',
    'css/CSSCursorImageValue.cpp',
    'css/CSSFontFace.cpp',
    'css/CSSFontFaceRule.cpp',
    'css/CSSFontFaceSource.cpp',
    'css/CSSFontFaceSrcValue.cpp',
    'css/CSSFontSelector.cpp',
    'css/CSSFunctionValue.cpp',
    'css/CSSGradientValue.cpp',
    'css/CSSHelper.cpp',
    'css/CSSImageGeneratorValue.cpp',
    'css/CSSImageValue.cpp',
    'css/CSSImportRule.cpp',
    'css/CSSInheritedValue.cpp',
    'css/CSSInitialValue.cpp',
    'css/CSSMediaRule.cpp',
    'css/CSSMutableStyleDeclaration.cpp',
    'css/CSSPageRule.cpp',
    'css/CSSParser.cpp',
    'css/CSSParserValues.cpp',
    'css/CSSPrimitiveValue.cpp',
    'css/CSSProperty.cpp',
    'css/CSSReflectValue.cpp',
    'css/CSSRule.cpp',
    'css/CSSRuleList.cpp',
    'css/CSSSegmentedFontFace.cpp',
    'css/CSSSelector.cpp',
    'css/CSSSelectorList.cpp',
    'css/CSSStyleDeclaration.cpp',
    'css/CSSStyleRule.cpp',
    'css/CSSStyleSelector.cpp',
    'css/CSSStyleSheet.cpp',
    'css/CSSTimingFunctionValue.cpp',
    'css/CSSUnicodeRangeValue.cpp',
    'css/CSSValueList.cpp',
    'css/CSSVariableDependentValue.cpp',
    'css/CSSVariablesDeclaration.cpp',
    'css/CSSVariablesRule.cpp',
    'css/FontFamilyValue.cpp',
    'css/FontValue.cpp',
    'css/MediaFeatureNames.cpp',
    'css/MediaList.cpp',
    'css/MediaQuery.cpp',
    'css/MediaQueryEvaluator.cpp',
    'css/MediaQueryExp.cpp',
    'css/ShadowValue.cpp',
    'css/StyleBase.cpp',
    'css/StyleList.cpp',
    'css/StyleSheet.cpp',
    'css/StyleSheetList.cpp',
    'css/SVGCSSComputedStyleDeclaration.cpp',
    'css/SVGCSSParser.cpp',
    'css/SVGCSSStyleSelector.cpp',
    'css/WebKitCSSKeyframeRule.cpp',
    'css/WebKitCSSKeyframesRule.cpp',
    'css/WebKitCSSTransformValue.cpp'
]
sources['dom'] = [
    'dom/ActiveDOMObject.cpp',
    'dom/Attr.cpp',
    'dom/Attribute.cpp',
    'dom/BeforeTextInsertedEvent.cpp',
    'dom/BeforeUnloadEvent.cpp',
    'dom/CDATASection.cpp',
    'dom/CharacterData.cpp',
    'dom/ChildNodeList.cpp',
    'dom/ClassNames.cpp',
    'dom/ClassNodeList.cpp',
    'dom/Clipboard.cpp',
    'dom/ClipboardEvent.cpp',
    'dom/Comment.cpp',
    'dom/ContainerNode.cpp',
    'dom/CSSMappedAttributeDeclaration.cpp',
    'dom/Document.cpp',
    'dom/DocumentFragment.cpp',
    'dom/DocumentType.cpp',
    'dom/DOMImplementation.cpp',
    'dom/DOMStringList.cpp',
    'dom/DynamicNodeList.cpp',
    'dom/EditingText.cpp',
    'dom/Element.cpp',
    'dom/Entity.cpp',
    'dom/EntityReference.cpp',
    'dom/Event.cpp',
    'dom/EventNames.cpp',
    'dom/EventTarget.cpp',
    'dom/EventTargetNode.cpp',
    'dom/ExceptionBase.cpp',
    'dom/ExceptionCode.cpp',
    'dom/KeyboardEvent.cpp',
    'dom/MappedAttribute.cpp',
    'dom/MessageChannel.cpp',
    'dom/MessageEvent.cpp',
    'dom/MessagePort.cpp',
    'dom/MouseEvent.cpp',
    'dom/MouseRelatedEvent.cpp',
    'dom/MutationEvent.cpp',
    'dom/NamedAttrMap.cpp',
    'dom/NamedMappedAttrMap.cpp',
    'dom/NameNodeList.cpp',
    'dom/Node.cpp',
    'dom/NodeFilter.cpp',
    'dom/NodeFilterCondition.cpp',
    'dom/NodeIterator.cpp',
    'dom/Notation.cpp',
    'dom/OverflowEvent.cpp',
    'dom/Position.cpp',
    'dom/PositionIterator.cpp',
    'dom/ProcessingInstruction.cpp',
    'dom/ProgressEvent.cpp',
    'dom/QualifiedName.cpp',
    'dom/Range.cpp',
    'dom/RegisteredEventListener.cpp',
    'dom/ScriptElement.cpp',
    'dom/ScriptExecutionContext.cpp',
    'dom/SelectorNodeList.cpp',
    'dom/StaticNodeList.cpp',
    'dom/StaticStringList.cpp',
    'dom/StyledElement.cpp',
    'dom/StyleElement.cpp',
    'dom/TagNodeList.cpp',
    'dom/Text.cpp',
    'dom/TextEvent.cpp',
    'dom/Traversal.cpp',
    'dom/TreeWalker.cpp',
    'dom/UIEvent.cpp',
    'dom/UIEventWithKeyState.cpp',
    'dom/WebKitAnimationEvent.cpp',
    'dom/WebKitTransitionEvent.cpp',
    'dom/WheelEvent.cpp',
    'dom/Worker.cpp',
    'dom/WorkerContext.cpp',
    'dom/WorkerLocation.cpp',
    'dom/XMLTokenizer.cpp',
    'dom/XMLTokenizerLibxml2.cpp',
]
sources['editing'] = [
    'editing/AppendNodeCommand.cpp',
    'editing/ApplyStyleCommand.cpp',
    'editing/BreakBlockquoteCommand.cpp',
    'editing/CompositeEditCommand.cpp',
    'editing/CreateLinkCommand.cpp',
    'editing/DeleteButton.cpp',
    'editing/DeleteButtonController.cpp',
    'editing/DeleteFromTextNodeCommand.cpp',
    'editing/DeleteSelectionCommand.cpp',
    'editing/EditCommand.cpp',
    'editing/Editor.cpp',
    'editing/EditorCommand.cpp',
    'editing/FormatBlockCommand.cpp',
    'editing/htmlediting.cpp',
    'editing/HTMLInterchange.cpp',
    'editing/IndentOutdentCommand.cpp',
    'editing/InsertIntoTextNodeCommand.cpp',
    'editing/InsertLineBreakCommand.cpp',
    'editing/InsertListCommand.cpp',
    'editing/InsertNodeBeforeCommand.cpp',
    'editing/InsertParagraphSeparatorCommand.cpp',
    'editing/InsertTextCommand.cpp',
    'editing/JoinTextNodesCommand.cpp',
    'editing/markup.cpp',
    'editing/MergeIdenticalElementsCommand.cpp',
    'editing/ModifySelectionListLevel.cpp',
    'editing/MoveSelectionCommand.cpp',
    'editing/RemoveCSSPropertyCommand.cpp',
    'editing/RemoveFormatCommand.cpp',
    'editing/RemoveNodeAttributeCommand.cpp',
    'editing/RemoveNodeCommand.cpp',
    'editing/RemoveNodePreservingChildrenCommand.cpp',
    'editing/ReplaceSelectionCommand.cpp',
    'editing/Selection.cpp',
    'editing/SelectionController.cpp',
    'editing/SetNodeAttributeCommand.cpp',
    'editing/SmartReplace.cpp',
    'editing/SmartReplaceCF.cpp',
    'editing/SmartReplaceICU.cpp',
    'editing/SplitElementCommand.cpp',
    'editing/SplitTextNodeCommand.cpp',
    'editing/SplitTextNodeContainingElementCommand.cpp',
    'editing/TextIterator.cpp',
    'editing/TypingCommand.cpp',
    'editing/UnlinkCommand.cpp',
    'editing/visible_units.cpp',
    'editing/VisiblePosition.cpp',
    'editing/WrapContentsInDummySpanCommand.cpp',
]
sources['history'] = [
    'history/BackForwardList.cpp',
    'history/CachedPage.cpp',
    'history/HistoryItem.cpp',
    'history/PageCache.cpp'
]
sources['html'] = [
    'html/CanvasGradient.cpp',
    'html/CanvasPattern.cpp',
    'html/CanvasRenderingContext2D.cpp',
    'html/CanvasStyle.cpp',
    'html/File.cpp',
    'html/FileList.cpp',
    'html/FormDataList.cpp',
    'html/HTMLAnchorElement.cpp',
    'html/HTMLAppletElement.cpp',
    'html/HTMLAreaElement.cpp',
    'html/HTMLAudioElement.cpp',
    'html/HTMLBaseElement.cpp',
    'html/HTMLBaseFontElement.cpp',
    'html/HTMLBlockquoteElement.cpp',
    'html/HTMLBodyElement.cpp',
    'html/HTMLBRElement.cpp',
    'html/HTMLButtonElement.cpp',
    'html/HTMLCanvasElement.cpp',
    'html/HTMLCollection.cpp',
    'html/HTMLDirectoryElement.cpp',
    'html/HTMLDivElement.cpp',
    'html/HTMLDListElement.cpp',
    'html/HTMLDocument.cpp',
    'html/HTMLElement.cpp',
    'html/HTMLElementFactory.cpp',
    'html/HTMLEmbedElement.cpp',
    'html/HTMLFieldSetElement.cpp',
    'html/HTMLFontElement.cpp',
    'html/HTMLFormCollection.cpp',
    'html/HTMLFormControlElement.cpp',
    'html/HTMLFormElement.cpp',
    'html/HTMLFrameElement.cpp',
    'html/HTMLFrameElementBase.cpp',
    'html/HTMLFrameOwnerElement.cpp',
    'html/HTMLFrameSetElement.cpp',
    'html/HTMLHeadElement.cpp',
    'html/HTMLHeadingElement.cpp',
    'html/HTMLHRElement.cpp',
    'html/HTMLHtmlElement.cpp',
    'html/HTMLIFrameElement.cpp',
    'html/HTMLImageElement.cpp',
    'html/HTMLImageLoader.cpp',
    'html/HTMLInputElement.cpp',
    'html/HTMLIsIndexElement.cpp',
    'html/HTMLKeygenElement.cpp',
    'html/HTMLLabelElement.cpp',
    'html/HTMLLegendElement.cpp',
    'html/HTMLLIElement.cpp',
    'html/HTMLLinkElement.cpp',
    'html/HTMLMapElement.cpp',
    'html/HTMLMarqueeElement.cpp',
    'html/HTMLMediaElement.cpp',
    'html/HTMLMenuElement.cpp',
    'html/HTMLMetaElement.cpp',
    'html/HTMLModElement.cpp',
    'html/HTMLNameCollection.cpp',
    'html/HTMLObjectElement.cpp',
    'html/HTMLOListElement.cpp',
    'html/HTMLOptGroupElement.cpp',
    'html/HTMLOptionElement.cpp',
    'html/HTMLOptionsCollection.cpp',
    'html/HTMLParagraphElement.cpp',
    'html/HTMLParamElement.cpp',
    'html/HTMLParser.cpp',
    'html/HTMLParserErrorCodes.cpp',
    'html/HTMLPlugInElement.cpp',
    'html/HTMLPlugInImageElement.cpp',
    'html/HTMLPreElement.cpp',
    'html/HTMLQuoteElement.cpp',
    'html/HTMLScriptElement.cpp',
    'html/HTMLSelectElement.cpp',
    'html/HTMLSourceElement.cpp',
    'html/HTMLStyleElement.cpp',
    'html/HTMLTableCaptionElement.cpp',
    'html/HTMLTableCellElement.cpp',
    'html/HTMLTableColElement.cpp',
    'html/HTMLTableElement.cpp',
    'html/HTMLTablePartElement.cpp',
    'html/HTMLTableRowElement.cpp',
    'html/HTMLTableRowsCollection.cpp',
    'html/HTMLTableSectionElement.cpp',
    'html/HTMLTextAreaElement.cpp',
    'html/HTMLTitleElement.cpp',
    'html/HTMLTokenizer.cpp',
    'html/HTMLUListElement.cpp',
    'html/HTMLVideoElement.cpp',
    'html/HTMLViewSourceDocument.cpp',
    'html/ImageData.cpp',
    'html/PreloadScanner.cpp',
    'html/TimeRanges.cpp'
]
sources['inspector'] = [
    'inspector/InspectorController.cpp',
    'inspector/JavaScriptCallFrame.cpp',
    'inspector/JavaScriptDebugServer.cpp',
    'inspector/JavaScriptProfile.cpp',
    'inspector/JavaScriptProfileNode.cpp'
]
sources['loader/appcache'] = [
    'loader/appcache/ApplicationCache.cpp',
    'loader/appcache/ApplicationCacheGroup.cpp',
    'loader/appcache/ApplicationCacheResource.cpp',
    'loader/appcache/ApplicationCacheStorage.cpp',
    'loader/appcache/DOMApplicationCache.cpp',
    'loader/appcache/ManifestParser.cpp',
]
sources['loader/archive'] = [
    'loader/archive/ArchiveFactory.cpp',
    'loader/archive/ArchiveResource.cpp',
    'loader/archive/ArchiveResourceCollection.cpp'
]
sources['loader/icon'] = [
    'loader/icon/IconDatabase.cpp',
    'loader/icon/IconDatabaseNone.cpp',
    'loader/icon/IconFetcher.cpp',
    'loader/icon/IconLoader.cpp',
    'loader/icon/IconRecord.cpp',
    'loader/icon/PageURLRecord.cpp'
]
sources['loader'] = [
    'loader/Cache.cpp',
    'loader/CachedCSSStyleSheet.cpp',
    'loader/CachedFont.cpp',
    'loader/CachedImage.cpp',
    'loader/CachedResource.cpp',
    'loader/CachedResourceClientWalker.cpp',
    'loader/CachedResourceHandle.cpp',
    'loader/CachedScript.cpp',
    'loader/CachedXBLDocument.cpp',
    'loader/CachedXSLStyleSheet.cpp',
    'loader/DocLoader.cpp',
    'loader/DocumentLoader.cpp',
    'loader/FormState.cpp',
    'loader/FrameLoader.cpp',
    'loader/FTPDirectoryDocument.cpp',
    'loader/FTPDirectoryParser.cpp',
    'loader/ImageDocument.cpp',
    'loader/ImageLoader.cpp',
    'loader/loader.cpp',
    'loader/MainResourceLoader.cpp',
    'loader/MediaDocument.cpp',
    'loader/NavigationAction.cpp',
    'loader/NetscapePlugInStreamLoader.cpp',
    'loader/PluginDocument.cpp',
    'loader/ProgressTracker.cpp',
    'loader/Request.cpp',
    'loader/ResourceLoader.cpp',
    'loader/SubresourceLoader.cpp',
    'loader/TextDocument.cpp',
    'loader/TextResourceDecoder.cpp',
    'loader/UserStyleSheetLoader.cpp',
]
sources['page'] = [
    'page/AccessibilityImageMapLink.cpp',
    'page/AccessibilityList.cpp',
    'page/AccessibilityListBox.cpp',
    'page/AccessibilityListBoxOption.cpp',
    'page/AccessibilityObject.cpp',
    'page/AccessibilityRenderObject.cpp',
    'page/AccessibilityTable.cpp',
    'page/AccessibilityTableCell.cpp',
    'page/AccessibilityTableColumn.cpp',
    'page/AccessibilityTableHeaderContainer.cpp',
    'page/AccessibilityTableRow.cpp',
    'page/AXObjectCache.cpp',
    'page/BarInfo.cpp',
    'page/Chrome.cpp',
    'page/Console.cpp',
    'page/ContextMenuController.cpp',
    'page/DOMSelection.cpp',
    'page/DOMWindow.cpp',
    'page/DragController.cpp',
    'page/EventHandler.cpp',
    'page/FocusController.cpp',
    'page/Frame.cpp',
    'page/FrameTree.cpp',
    'page/FrameView.cpp',
    'page/Geolocation.cpp',
    'page/Geoposition.cpp',
    'page/History.cpp',
    'page/Location.cpp',
    'page/MouseEventWithHitTestResults.cpp',
    'page/Navigator.cpp',
    'page/NavigatorBase.cpp',
    'page/Page.cpp',
    'page/PageGroup.cpp',
    'page/PrintContext.cpp',
    'page/Screen.cpp',
    'page/SecurityOrigin.cpp',
    'page/Settings.cpp',
    'page/WindowFeatures.cpp',
    'page/WorkerNavigator.cpp',
]
sources['page/animation'] = [
    'page/animation/AnimationBase.cpp',
    'page/animation/AnimationController.cpp',
    'page/animation/CompositeAnimation.cpp',
    'page/animation/ImplicitAnimation.cpp',
    'page/animation/KeyframeAnimation.cpp',
]
sources['page/chromium'] = [
    'page/chromium/AccessibilityObjectChromium.cpp',
]
# platform/ sources are in a separate section below
# and may eventually be moved to another file
sources['plugins'] = [
    'plugins/MimeType.cpp',
    'plugins/MimeTypeArray.cpp',
    'plugins/npapi.cpp',
    'plugins/Plugin.cpp',
    'plugins/PluginArray.cpp',
    'plugins/PluginData.cpp',
    'plugins/PluginDatabase.cpp',
    'plugins/PluginInfoStore.cpp',
    'plugins/PluginMainThreadScheduler.cpp',
    'plugins/PluginPackage.cpp',
    'plugins/PluginStream.cpp',
    'plugins/PluginView.cpp'
]
sources['rendering'] = [
    'rendering/AutoTableLayout.cpp',
    'rendering/bidi.cpp',
    'rendering/break_lines.cpp',
    'rendering/CounterNode.cpp',
    'rendering/EllipsisBox.cpp',
    'rendering/FixedTableLayout.cpp',
    'rendering/HitTestResult.cpp',
    'rendering/InlineBox.cpp',
    'rendering/InlineFlowBox.cpp',
    'rendering/InlineTextBox.cpp',
    'rendering/LayoutState.cpp',
    'rendering/ListMarkerBox.cpp',
    'rendering/MediaControlElements.cpp',
    'rendering/PointerEventsHitRules.cpp',
    'rendering/RenderApplet.cpp',
    'rendering/RenderArena.cpp',
    'rendering/RenderBlock.cpp',
    'rendering/RenderBox.cpp',
    'rendering/RenderBR.cpp',
    'rendering/RenderButton.cpp',
    'rendering/RenderContainer.cpp',
    'rendering/RenderCounter.cpp',
    'rendering/RenderFieldset.cpp',
    'rendering/RenderFileUploadControl.cpp',
    'rendering/RenderFlexibleBox.cpp',
    'rendering/RenderFlow.cpp',
    'rendering/RenderForeignObject.cpp',
    'rendering/RenderFrame.cpp',
    'rendering/RenderFrameSet.cpp',
    'rendering/RenderHTMLCanvas.cpp',
    'rendering/RenderImage.cpp',
    'rendering/RenderImageGeneratedContent.cpp',
    'rendering/RenderInline.cpp',
    'rendering/RenderLayer.cpp',
    'rendering/RenderLegend.cpp',
    'rendering/RenderListBox.cpp',
    'rendering/RenderListItem.cpp',
    'rendering/RenderListMarker.cpp',
    'rendering/RenderMarquee.cpp',
    'rendering/RenderMedia.cpp',
    'rendering/RenderMenuList.cpp',
    'rendering/RenderObject.cpp',
    'rendering/RenderPart.cpp',
    'rendering/RenderPartObject.cpp',
    'rendering/RenderPath.cpp',
    'rendering/RenderReplaced.cpp',
    'rendering/RenderReplica.cpp',
    'rendering/RenderScrollbar.cpp',
    'rendering/RenderScrollbarPart.cpp',
    'rendering/RenderScrollbarTheme.cpp',
    'rendering/RenderSlider.cpp',
    'rendering/RenderSVGBlock.cpp',
    'rendering/RenderSVGContainer.cpp',
    'rendering/RenderSVGGradientStop.cpp',
    'rendering/RenderSVGHiddenContainer.cpp',
    'rendering/RenderSVGImage.cpp',
    'rendering/RenderSVGInline.cpp',
    'rendering/RenderSVGInlineText.cpp',
    'rendering/RenderSVGRoot.cpp',
    'rendering/RenderSVGText.cpp',
    'rendering/RenderSVGTextPath.cpp',
    'rendering/RenderSVGTransformableContainer.cpp',
    'rendering/RenderSVGTSpan.cpp',
    'rendering/RenderSVGViewportContainer.cpp',
    'rendering/RenderTable.cpp',
    'rendering/RenderTableCell.cpp',
    'rendering/RenderTableCol.cpp',
    'rendering/RenderTableRow.cpp',
    'rendering/RenderTableSection.cpp',
    'rendering/RenderText.cpp',
    'rendering/RenderTextControl.cpp',
    'rendering/RenderTextControlMultiLine.cpp',
    'rendering/RenderTextControlSingleLine.cpp',
    'rendering/RenderTextFragment.cpp',
    'rendering/RenderTheme.cpp',
    'rendering/RenderTreeAsText.cpp',
    'rendering/RenderVideo.cpp',
    'rendering/RenderView.cpp',
    'rendering/RenderWidget.cpp',
    'rendering/RenderWordBreak.cpp',
    'rendering/RootInlineBox.cpp',
    'rendering/SVGCharacterLayoutInfo.cpp',
    'rendering/SVGInlineFlowBox.cpp',
    'rendering/SVGInlineTextBox.cpp',
    'rendering/SVGRenderSupport.cpp',
    'rendering/SVGRenderTreeAsText.cpp',
    'rendering/SVGRootInlineBox.cpp',
    'rendering/TextControlInnerElements.cpp'
]
sources['rendering/style'] = [
    'rendering/style/Animation.cpp',
    'rendering/style/AnimationList.cpp',
    'rendering/style/BindingURI.cpp',
    'rendering/style/ContentData.cpp',
    'rendering/style/CounterDirectives.cpp',
    'rendering/style/FillLayer.cpp',
    'rendering/style/KeyframeList.cpp',
    'rendering/style/MatrixTransformOperation.cpp',
    'rendering/style/NinePieceImage.cpp',
    'rendering/style/RenderStyle.cpp',
    'rendering/style/RotateTransformOperation.cpp',
    'rendering/style/ScaleTransformOperation.cpp',
    'rendering/style/ShadowData.cpp',
    'rendering/style/SkewTransformOperation.cpp',
    'rendering/style/StyleBackgroundData.cpp',
    'rendering/style/StyleBoxData.cpp',
    'rendering/style/StyleCachedImage.cpp',
    'rendering/style/StyleFlexibleBoxData.cpp',
    'rendering/style/StyleGeneratedImage.cpp',
    'rendering/style/StyleInheritedData.cpp',
    'rendering/style/StyleMarqueeData.cpp',
    'rendering/style/StyleMultiColData.cpp',
    'rendering/style/StyleRareInheritedData.cpp',
    'rendering/style/StyleRareNonInheritedData.cpp',
    'rendering/style/StyleSurroundData.cpp',
    'rendering/style/StyleTransformData.cpp',
    'rendering/style/StyleVisualData.cpp',
    'rendering/style/SVGRenderStyle.cpp',
    'rendering/style/SVGRenderStyleDefs.cpp',
    'rendering/style/TransformOperations.cpp',
    'rendering/style/TranslateTransformOperation.cpp',
]
sources['storage'] = [
    'storage/ChangeVersionWrapper.cpp',
    'storage/Database.cpp',
    'storage/DatabaseAuthorizer.cpp',
    'storage/DatabaseTask.cpp',
    'storage/DatabaseThread.cpp',
    'storage/DatabaseTracker.cpp',
    'storage/LocalStorage.cpp',
    'storage/LocalStorageArea.cpp',
    'storage/LocalStorageTask.cpp',
    'storage/LocalStorageThread.cpp',
    'storage/OriginQuotaManager.cpp',
    'storage/OriginUsageRecord.cpp',
    'storage/SessionStorage.cpp',
    'storage/SessionStorageArea.cpp',
    'storage/SQLResultSet.cpp',
    'storage/SQLResultSetRowList.cpp',
    'storage/SQLStatement.cpp',
    'storage/SQLTransaction.cpp',
    'storage/Storage.cpp',
    'storage/StorageArea.cpp',
    'storage/StorageEvent.cpp',
    'storage/StorageMap.cpp'
]
sources['xml'] = [
    'xml/DOMParser.cpp',
    'xml/NativeXPathNSResolver.cpp',
    'xml/XMLHttpRequest.cpp',
    'xml/XMLHttpRequestUpload.cpp',
    'xml/XMLSerializer.cpp',
    'xml/XPathEvaluator.cpp',
    'xml/XPathExpression.cpp',
    'xml/XPathExpressionNode.cpp',
    'xml/XPathFunctions.cpp',
    'xml/XPathNamespace.cpp',
    'xml/XPathNodeSet.cpp',
    'xml/XPathNSResolver.cpp',
    'xml/XPathParser.cpp',
    'xml/XPathPath.cpp',
    'xml/XPathPredicate.cpp',
    'xml/XPathResult.cpp',
    'xml/XPathStep.cpp',
    'xml/XPathUtil.cpp',
    'xml/XPathValue.cpp',
    'xml/XPathVariableReference.cpp',
    'xml/XSLImportRule.cpp',
    'xml/XSLStyleSheet.cpp',
    'xml/XSLTExtensions.cpp',
    'xml/XSLTProcessor.cpp',
    'xml/XSLTUnicodeSort.cpp'
]

# Using JavaScriptCore for now, eventually this needs to be configurable (and in separate file)
sources['bindings/js'] = [
    "bindings/js/DOMTimer.cpp",
    "bindings/js/GCController.cpp",
    "bindings/js/JSAttrCustom.cpp",
    "bindings/js/JSAudioConstructor.cpp",
    "bindings/js/JSCSSRuleCustom.cpp",
    "bindings/js/JSCSSStyleDeclarationCustom.cpp",
    "bindings/js/JSCSSValueCustom.cpp",
    "bindings/js/JSCanvasRenderingContext2DCustom.cpp",
    "bindings/js/JSClipboardCustom.cpp",
    "bindings/js/JSConsoleCustom.cpp",
    "bindings/js/JSCustomPositionCallback.cpp",
    "bindings/js/JSCustomPositionErrorCallback.cpp",
    "bindings/js/JSCustomSQLStatementCallback.cpp",
    "bindings/js/JSCustomSQLStatementErrorCallback.cpp",
    "bindings/js/JSCustomSQLTransactionCallback.cpp",
    "bindings/js/JSCustomSQLTransactionErrorCallback.cpp",
    "bindings/js/JSCustomVoidCallback.cpp",
    "bindings/js/JSCustomXPathNSResolver.cpp",
    "bindings/js/JSDOMApplicationCacheCustom.cpp",
    "bindings/js/JSDOMBinding.cpp",
    "bindings/js/JSDOMGlobalObject.cpp",
    "bindings/js/JSDOMStringListCustom.cpp",
    "bindings/js/JSDOMWindowBase.cpp",
    "bindings/js/JSDOMWindowCustom.cpp",
    "bindings/js/JSDOMWindowShell.cpp",
    "bindings/js/JSDatabaseCustom.cpp",
    "bindings/js/JSDocumentCustom.cpp",
    "bindings/js/JSDocumentFragmentCustom.cpp",
    "bindings/js/JSElementCustom.cpp",
    "bindings/js/JSEventCustom.cpp",
    "bindings/js/JSEventListener.cpp",
    "bindings/js/JSEventTarget.cpp",
    "bindings/js/JSEventTargetNodeCustom.cpp",
    "bindings/js/JSGeolocationCustom.cpp",
    "bindings/js/JSHTMLAllCollection.cpp",
    "bindings/js/JSHTMLAppletElementCustom.cpp",
    "bindings/js/JSHTMLCollectionCustom.cpp",
    "bindings/js/JSHTMLDocumentCustom.cpp",
    "bindings/js/JSHTMLElementCustom.cpp",
    "bindings/js/JSHTMLEmbedElementCustom.cpp",
    "bindings/js/JSHTMLFormElementCustom.cpp",
    "bindings/js/JSHTMLFrameElementCustom.cpp",
    "bindings/js/JSHTMLFrameSetElementCustom.cpp",
    "bindings/js/JSHTMLIFrameElementCustom.cpp",
    "bindings/js/JSHTMLInputElementCustom.cpp",
    "bindings/js/JSHTMLObjectElementCustom.cpp",
    "bindings/js/JSHTMLOptionsCollectionCustom.cpp",
    "bindings/js/JSHTMLSelectElementCustom.cpp",
    "bindings/js/JSHistoryCustom.cpp",
    "bindings/js/JSImageConstructor.cpp",
    "bindings/js/JSImageDataCustom.cpp",
    "bindings/js/JSInspectedObjectWrapper.cpp",
    "bindings/js/JSInspectorCallbackWrapper.cpp",
    "bindings/js/JSJavaScriptCallFrameCustom.cpp",
    "bindings/js/JSLocationCustom.cpp",
    "bindings/js/JSMessageChannelConstructor.cpp",
    "bindings/js/JSMessageChannelCustom.cpp",
    "bindings/js/JSMessagePortCustom.cpp",
    "bindings/js/JSMimeTypeArrayCustom.cpp",
    "bindings/js/JSNamedNodeMapCustom.cpp",
    "bindings/js/JSNamedNodesCollection.cpp",
    "bindings/js/JSNavigatorCustom.cpp",
    "bindings/js/JSNodeCustom.cpp",
    "bindings/js/JSNodeFilterCondition.cpp",
    "bindings/js/JSNodeFilterCustom.cpp",
    "bindings/js/JSNodeIteratorCustom.cpp",
    "bindings/js/JSNodeListCustom.cpp",
    "bindings/js/JSOptionConstructor.cpp",
    "bindings/js/JSPluginArrayCustom.cpp",
    "bindings/js/JSPluginCustom.cpp",
    "bindings/js/JSPluginElementFunctions.cpp",
    "bindings/js/JSQuarantinedObjectWrapper.cpp",
    "bindings/js/JSRGBColor.cpp",
    "bindings/js/JSSQLResultSetRowListCustom.cpp",
    "bindings/js/JSSQLTransactionCustom.cpp",
    "bindings/js/JSSVGElementInstanceCustom.cpp",
    "bindings/js/JSSVGLengthCustom.cpp",
    "bindings/js/JSSVGMatrixCustom.cpp",
    "bindings/js/JSSVGPathSegCustom.cpp",
    "bindings/js/JSSVGPathSegListCustom.cpp",
    "bindings/js/JSSVGPointListCustom.cpp",
    "bindings/js/JSSVGTransformListCustom.cpp",
    "bindings/js/JSStorageCustom.cpp",
    "bindings/js/JSStyleSheetCustom.cpp",
    "bindings/js/JSStyleSheetListCustom.cpp",
    "bindings/js/JSTextCustom.cpp",
    "bindings/js/JSTreeWalkerCustom.cpp",
    "bindings/js/JSWorkerConstructor.cpp",
    "bindings/js/JSWorkerContextBase.cpp",
    "bindings/js/JSWorkerContextCustom.cpp",
    "bindings/js/JSWorkerCustom.cpp",
    "bindings/js/JSXMLHttpRequestConstructor.cpp",
    "bindings/js/JSXMLHttpRequestCustom.cpp",
    "bindings/js/JSXMLHttpRequestUploadCustom.cpp",
    "bindings/js/JSXSLTProcessorConstructor.cpp",
    "bindings/js/JSXSLTProcessorCustom.cpp",
    "bindings/js/ScheduledAction.cpp",
    "bindings/js/ScriptCallFrame.cpp",
    "bindings/js/ScriptCallStack.cpp",
    "bindings/js/ScriptController.cpp",
    "bindings/js/ScriptValue.cpp",
    "bindings/js/WorkerScriptController.cpp",
]
sources['bridge'] = [
    'bridge/NP_jsobject.cpp',
    'bridge/npruntime.cpp',
    'bridge/runtime.cpp',
    'bridge/runtime_array.cpp',
    'bridge/runtime_method.cpp',
    'bridge/runtime_object.cpp',
    'bridge/runtime_root.cpp',
]
sources['bridge/c'] = [
    'bridge/c/c_class.cpp',
    'bridge/c/c_instance.cpp',
    'bridge/c/c_runtime.cpp',
    'bridge/c/c_utility.cpp',
]

# Platform-specific sources, including common files
# These may eventually move to a separate sources file
sources['platform'] = [
    'platform/Arena.cpp',
    'platform/ContextMenu.cpp',
    'platform/DeprecatedPtrListImpl.cpp',
    'platform/DragData.cpp',
    'platform/DragImage.cpp',
    'platform/FileChooser.cpp',
    'platform/GeolocationService.cpp',
    'platform/KURL.cpp',
    'platform/Length.cpp',
    'platform/Logging.cpp',
    'platform/MIMETypeRegistry.cpp',
    'platform/Scrollbar.cpp',
    'platform/ScrollbarThemeComposite.cpp',
    'platform/ScrollView.cpp',
    'platform/SharedBuffer.cpp',
    'platform/Theme.cpp',
    'platform/ThreadGlobalData.cpp',
    'platform/Timer.cpp',
    'platform/Widget.cpp'
]
sources['platform/animation'] = [
    'platform/animation/Animation.cpp',
    'platform/animation/AnimationList.cpp',
]
sources['platform/sql'] = [
    'platform/sql/SQLiteAuthorizer.cpp',
    'platform/sql/SQLiteDatabase.cpp',
    'platform/sql/SQLiteStatement.cpp',
    'platform/sql/SQLiteTransaction.cpp',
    'platform/sql/SQLValue.cpp'
]
sources['platform/graphics'] = [
    'platform/graphics/BitmapImage.cpp',
    'platform/graphics/Color.cpp',
    'platform/graphics/FloatPoint.cpp',
    'platform/graphics/FloatPoint3D.cpp',
    'platform/graphics/FloatRect.cpp',
    'platform/graphics/FloatSize.cpp',
    'platform/graphics/Font.cpp',
    'platform/graphics/FontCache.cpp',
    'platform/graphics/FontData.cpp',
    'platform/graphics/FontDescription.cpp',
    'platform/graphics/FontFallbackList.cpp',
    'platform/graphics/FontFamily.cpp',
    'platform/graphics/GeneratedImage.cpp',
    'platform/graphics/GlyphPageTreeNode.cpp',
    'platform/graphics/GlyphWidthMap.cpp',
    'platform/graphics/Gradient.cpp',
    'platform/graphics/GraphicsContext.cpp',
    'platform/graphics/GraphicsTypes.cpp',
    'platform/graphics/Image.cpp',
    'platform/graphics/IntRect.cpp',
    'platform/graphics/MediaPlayer.cpp',
    'platform/graphics/Path.cpp',
    'platform/graphics/PathTraversalState.cpp',
    'platform/graphics/Pattern.cpp',
    'platform/graphics/Pen.cpp',
    'platform/graphics/SegmentedFontData.cpp',
    'platform/graphics/SimpleFontData.cpp',
    'platform/graphics/StringTruncator.cpp',
    'platform/graphics/WidthIterator.cpp',
]
sources['platform/graphics/transforms'] = [
    'platform/graphics/transforms/MatrixTransformOperation.cpp',
    'platform/graphics/transforms/RotateTransformOperation.cpp',
    'platform/graphics/transforms/ScaleTransformOperation.cpp',
    'platform/graphics/transforms/SkewTransformOperation.cpp',
    'platform/graphics/transforms/TransformOperations.cpp',
    'platform/graphics/transforms/TransformationMatrix.cpp',
    'platform/graphics/transforms/TranslateTransformOperation.cpp',
]
sources['platform/network'] = [
    'platform/network/AuthenticationChallengeBase.cpp',
    'platform/network/Credential.cpp',
    'platform/network/FormData.cpp',
    'platform/network/FormDataBuilder.cpp',
    'platform/network/HTTPParsers.cpp',
    'platform/network/mac/NetworkStateNotifierMac.cpp',
    'platform/network/NetworkStateNotifier.cpp',
    'platform/network/ProtectionSpace.cpp',
    'platform/network/ResourceErrorBase.cpp',
    'platform/network/ResourceHandle.cpp',
    'platform/network/ResourceRequestBase.cpp',
    'platform/network/ResourceResponseBase.cpp'
]
sources['platform/text'] = [
    'platform/text/AtomicString.cpp',
    'platform/text/Base64.cpp',
    'platform/text/BidiContext.cpp',
    'platform/text/CString.cpp',
    'platform/text/RegularExpression.cpp',
    'platform/text/SegmentedString.cpp',
    'platform/text/String.cpp',
    'platform/text/StringBuilder.cpp',
    'platform/text/StringFragment.cpp',
    'platform/text/StringImpl.cpp',
    'platform/text/symbian/StringImplSymbian.cpp',
    'platform/text/symbian/StringSymbian.cpp',
    'platform/text/TextBoundariesICU.cpp',
    'platform/text/TextBreakIteratorICU.cpp',
    'platform/text/TextCodec.cpp',
    'platform/text/TextCodecICU.cpp',
    'platform/text/TextCodecLatin1.cpp',
    'platform/text/TextCodecUserDefined.cpp',
    'platform/text/TextCodecUTF16.cpp',
    'platform/text/TextDecoder.cpp',
    'platform/text/TextEncoding.cpp',
    'platform/text/TextEncodingRegistry.cpp',
    'platform/text/TextStream.cpp',
    'platform/text/UnicodeRange.cpp',
]

env = Environment()

building_on_win32 = env['PLATFORM'] == 'win32' or env['PLATFORM'] == 'cygwin'

if env['PLATFORM'] == 'darwin':
    sources['platform/graphics/cg'] = [
        'platform/graphics/cg/TransformationMatrixCG.cpp',
        'platform/graphics/cg/ColorCG.cpp',
        'platform/graphics/cg/FloatPointCG.cpp',
        'platform/graphics/cg/FloatRectCG.cpp',
        'platform/graphics/cg/FloatSizeCG.cpp',
        'platform/graphics/cg/GradientCG.cpp',
        'platform/graphics/cg/GraphicsContextCG.cpp',
        'platform/graphics/cg/ImageBufferCG.cpp',
        'platform/graphics/cg/ImageCG.cpp',
        'platform/graphics/cg/ImageSourceCG.cpp',
        'platform/graphics/cg/IntPointCG.cpp',
        'platform/graphics/cg/IntRectCG.cpp',
        'platform/graphics/cg/IntSizeCG.cpp',
        'platform/graphics/cg/PathCG.cpp',
        'platform/graphics/cg/PatternCG.cpp',
        'platform/graphics/cg/PDFDocumentImage.cpp',
    ]
    sources['platform/graphics/mac'] = [
        'platform/graphics/mac/CoreTextController.cpp',
        'platform/graphics/mac/FontCustomPlatformData.cpp',
        'platform/graphics/mac/FontMacCoreText.cpp',
        'platform/graphics/mac/GlyphPageTreeNodeMac.cpp',
    ]
    sources['platform/network/cf'] = [
        'platform/network/cf/AuthenticationCF.cpp',
        'platform/network/cf/DNSCFNet.cpp',
        'platform/network/cf/FormDataStreamCFNet.cpp',
        'platform/network/cf/ResourceErrorCF.cpp',
        'platform/network/cf/ResourceHandleCFNet.cpp',
        'platform/network/cf/ResourceRequestCFNet.cpp',
        'platform/network/cf/ResourceResponseCFNet.cpp'
    ]
    sources['platform/network/mac'] = [
        'platform/network/mac/AuthenticationMac.mm',
        'platform/network/mac/FormDataStreamMac.mm',
        'platform/network/mac/ResourceErrorMac.mm',
        'platform/network/mac/ResourceHandleMac.mm',
        'platform/network/mac/ResourceRequestMac.mm',
        'platform/network/mac/ResourceResponseMac.mm',
        'platform/network/mac/WebCoreURLResponse.mm'
    ]
    sources['platform/text/cf'] = [
        'platform/text/cf/StringCF.cpp',
        'platform/text/cf/StringImplCF.cpp'
    ]
    sources['platform/text/mac'] = [
        'platform/text/mac/TextCodecMac.cpp',
        'platform/text/mac/StringImplMac.mm',
        'platform/text/mac/StringMac.mm',
        'platform/text/mac/TextBoundaries.mm',
        'platform/text/mac/TextBreakIteratorInternalICUMac.mm',
    ]

sources['platform/chromium'] = [
]

sources['platform/graphics/chromium'] = [
]

sources['platform/network/chromium'] = [
]

derived_sources_path = 'DerivedSources/WebCore/'
def DerivedSources(path):
    return derived_sources_path + path

derived_sources_results = map(DerivedSources, [
    'CSSValueKeywords.h',
])

derived_sources_sources = [
    'css/CSSValueKeywords.in'
]

# Generate DerivedSources
# Ideally Scons would be provided a full list of all the
# DerivedSources so it can better know when to run make-generated-sources.sh
env.Command(derived_sources_results, derived_sources_sources, './make-generated-sources.sh')
sources[derived_sources_path] = [DerivedSources('JSSVGFontFaceElement.cpp')]

env['CPPDEFINES'] = { 'BUILDING_CHROMIUM__' : 1, 'WTF_USE_V8' : 0 }

# Scons out-of-the-box only supports precompiled headers for MSVC
# remove this when we fix Scons to understand GCC precompiled headers
if env['CC'] == 'gcc':
    env['CCFLAGS'] = '-include WebCorePrefix.h'
# env['PCH'] = 'WebCorePrefix.h'

if env['PLATFORM'] == 'darwin':
    env['FRAMEWORKPATH'] = [
        '/System/Library/Frameworks/Carbon.framework/Frameworks',
        '/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
        '/System/Library/Frameworks/CoreServices.framework/Frameworks', # for CFNetwork, eventually we'll move to Chromium's network layer
    ]
    env['FRAMEWORKS'] = ['JavaScriptCore', 'ApplicationServices', 'Cocoa', 'CoreServices']
    # Temporarily disabling AX support for the Chromium Mac Build until we can fix our AX arch
    env.Append(CPPDEFINES = {'HAVE_ACCESSIBILITY' : 0})

env['CPPPATH'] = ['.', '..']

# Includes for JavaScriptCore (the Apple Mac build use JavaScriptCore.framework)
# Scons doesn't know how to build frameworks yet :( so we have to manually include a bunch of paths
env.Append(CPPPATH = [
    '../JavaScriptCore',
    '../JavaScriptCore/bytecode',
    '../JavaScriptCore/jit',
    '../JavaScriptCore/interpreter',
    '../JavaScriptCore/parser',
    '../JavaScriptCore/wtf',
    '../JavaScriptCore/runtime',
])

# HACK: Include ForwardingHeaders after ../JavaScriptCore for now to allow JavaScriptCore/wtf includes to work
env.Append(CPPPATH = ['ForwardingHeaders'])

# For bring-up we're depending on WebKitSystemInterface, this will go away once more of our port is upstreamed
env.Append(CPPPATH = ['../WebKitLibraries'])

# Mac OS X doesn't include icu headers, so WebKit svn includes icu 3.2 headers
if env['PLATFORM'] == 'darwin':
    env.Append(CPPPATH = ['icu', '/usr/include/libxml2'])

webkit_libraries_path = "../WebKitLibraries/win/"
def WebKitLibraries(path):
    return webkit_libraries_path + path

if building_on_win32:
    env.Append(CPPPATH = ['os-win32', WebKitLibraries('include')])
    env.Prepend(LIBPATH = [WebKitLibraries('lib')])
    env.Append(LIBS = ['icuin', 'icuuc', 'user32', 'winmm'])

# Include headers for all of the directories from which we are compiling source files
env.Append(CPPPATH = sources.keys())

env.SharedLibrary("WebCore", sources.values())
