1 # Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
2 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions
8 # 1. Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # 2. Redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in the
12 # documentation and/or other materials provided with the distribution.
13 # 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14 # its contributors may be used to endorse or promote products derived
15 # from this software without specific prior written permission.
17 # THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 # DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 $(WebCore)/bindings/js \
31 $(WebCore)/bindings/objc \
35 $(WebCore)/loader/appcache \
65 CanvasRenderingContext2D \
96 HTMLBlockquoteElement \
102 HTMLDirectoryElement \
107 HTMLFieldSetElement \
111 HTMLFrameSetElement \
132 HTMLOptGroupElement \
134 HTMLOptionsCollection \
135 HTMLParagraphElement \
143 HTMLTableCaptionElement \
144 HTMLTableCellElement \
145 HTMLTableColElement \
147 HTMLTableRowElement \
148 HTMLTableSectionElement \
149 HTMLTextAreaElement \
174 ProcessingInstruction \
182 SQLResultSetRowList \
189 SVGAnimateColorElement \
191 SVGAnimateTransformElement \
194 SVGAnimatedEnumeration \
197 SVGAnimatedLengthList \
199 SVGAnimatedNumberList \
200 SVGAnimatedPathData \
202 SVGAnimatedPreserveAspectRatio \
205 SVGAnimatedTransformList \
206 SVGAnimationElement \
210 SVGComponentTransferFunctionElement \
212 SVGDefinitionSrcElement \
218 SVGElementInstanceList \
221 SVGExternalResourcesRequired \
223 SVGFEColorMatrixElement \
224 SVGFEComponentTransferElement \
225 SVGFECompositeElement \
226 SVGFEDiffuseLightingElement \
227 SVGFEDisplacementMapElement \
228 SVGFEDistantLightElement \
234 SVGFEGaussianBlurElement \
237 SVGFEMergeNodeElement \
239 SVGFEPointLightElement \
240 SVGFESpecularLightingElement \
241 SVGFESpotLightElement \
243 SVGFETurbulenceElement \
245 SVGFilterPrimitiveStandardAttributes \
249 SVGFontFaceFormatElement \
250 SVGFontFaceNameElement \
251 SVGFontFaceSrcElement \
252 SVGFontFaceUriElement \
253 SVGForeignObjectElement \
263 SVGLinearGradientElement \
269 SVGMissingGlyphElement \
277 SVGPathSegClosePath \
278 SVGPathSegCurvetoCubicAbs \
279 SVGPathSegCurvetoCubicRel \
280 SVGPathSegCurvetoCubicSmoothAbs \
281 SVGPathSegCurvetoCubicSmoothRel \
282 SVGPathSegCurvetoQuadraticAbs \
283 SVGPathSegCurvetoQuadraticRel \
284 SVGPathSegCurvetoQuadraticSmoothAbs \
285 SVGPathSegCurvetoQuadraticSmoothRel \
286 SVGPathSegLinetoAbs \
287 SVGPathSegLinetoHorizontalAbs \
288 SVGPathSegLinetoHorizontalRel \
289 SVGPathSegLinetoRel \
290 SVGPathSegLinetoVerticalAbs \
291 SVGPathSegLinetoVerticalRel \
293 SVGPathSegMovetoAbs \
294 SVGPathSegMovetoRel \
300 SVGPreserveAspectRatio \
301 SVGRadialGradientElement \
317 SVGTextContentElement \
320 SVGTextPositioningElement \
342 XMLHttpRequestException \
343 XMLHttpRequestProgressEvent \
356 $(filter-out JSRGBColor.h,$(DOM_CLASSES:%=JS%.h)) \
358 JSDOMWindowBase.lut.h \
359 JSEventTargetBase.lut.h \
362 JSHTMLInputElementBaseTable.cpp \
371 SVGElementFactory.cpp \
373 UserAgentStyleSheets.h \
384 FRAMEWORK_FLAGS = $(shell echo $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
386 ifeq ($(shell gcc -E -P -dM -F $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_DASHBOARD_SUPPORT | cut -d' ' -f3), 1)
387 ENABLE_DASHBOARD_SUPPORT = 1
389 ENABLE_DASHBOARD_SUPPORT = 0
394 ENABLE_DASHBOARD_SUPPORT = 1
398 # CSS property names and value keywords
400 WEBCORE_CSS_PROPERTY_NAMES := $(WebCore)/css/CSSPropertyNames.in
401 WEBCORE_CSS_VALUE_KEYWORDS := $(WebCore)/css/CSSValueKeywords.in
403 ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
404 WEBCORE_CSS_PROPERTY_NAMES := $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/SVGCSSPropertyNames.in
405 WEBCORE_CSS_VALUE_KEYWORDS := $(WEBCORE_CSS_VALUE_KEYWORDS) $(WebCore)/css/SVGCSSValueKeywords.in
408 ifeq ($(ENABLE_DASHBOARD_SUPPORT), 1)
409 WEBCORE_CSS_PROPERTY_NAMES := $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/DashboardSupportCSSPropertyNames.in
412 CSSPropertyNames.h : $(WEBCORE_CSS_PROPERTY_NAMES) css/makeprop.pl
413 if sort $(WEBCORE_CSS_PROPERTY_NAMES) | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
414 cat $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in
415 perl "$(WebCore)/css/makeprop.pl"
417 CSSValueKeywords.h : $(WEBCORE_CSS_VALUE_KEYWORDS) css/makevalues.pl
418 # Lower case all the values, as CSS values are case-insensitive
419 perl -ne 'print lc' $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in
420 if sort CSSValueKeywords.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
421 perl "$(WebCore)/css/makevalues.pl"
427 DocTypeStrings.cpp : html/DocTypeStrings.gperf
428 gperf -CEot -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $< > $@
434 HTMLEntityNames.c : html/HTMLEntityNames.gperf
435 gperf -a -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 $< > $@
441 ColorData.c : platform/ColorData.gperf
442 gperf -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 $< > $@
448 tokenizer.cpp : css/tokenizer.flex css/maketokenizer
449 flex -t $< | perl $(WebCore)/css/maketokenizer > $@
454 # NOTE: Older versions of bison do not inject an inclusion guard, so we add one.
456 CSSGrammar.cpp : css/CSSGrammar.y
457 bison -d -p cssyy $< -o $@
458 touch CSSGrammar.cpp.h
460 echo '#ifndef CSSGrammar_h' > CSSGrammar.h
461 echo '#define CSSGrammar_h' >> CSSGrammar.h
462 cat CSSGrammar.cpp.h CSSGrammar.hpp >> CSSGrammar.h
463 echo '#endif' >> CSSGrammar.h
464 rm -f CSSGrammar.cpp.h CSSGrammar.hpp
469 # NOTE: Older versions of bison do not inject an inclusion guard, so we add one.
471 XPathGrammar.cpp : xml/XPathGrammar.y $(PROJECT_FILE)
472 bison -d -p xpathyy $< -o $@
473 touch XPathGrammar.cpp.h
474 touch XPathGrammar.hpp
475 echo '#ifndef XPathGrammar_h' > XPathGrammar.h
476 echo '#define XPathGrammar_h' >> XPathGrammar.h
477 cat XPathGrammar.cpp.h XPathGrammar.hpp >> XPathGrammar.h
478 echo '#endif' >> XPathGrammar.h
479 rm -f XPathGrammar.cpp.h XPathGrammar.hpp
483 # user agent style sheets
485 USER_AGENT_STYLE_SHEETS = $(WebCore)/css/html4.css $(WebCore)/css/quirks.css $(WebCore)/css/view-source.css $(WebCore)/css/svg.css
486 UserAgentStyleSheets.h : css/make-css-file-arrays.pl $(USER_AGENT_STYLE_SHEETS)
487 perl $< $@ UserAgentStyleSheetsData.cpp $(USER_AGENT_STYLE_SHEETS)
491 # lookup tables for old-style JavaScript bindings
493 %.lut.h: %.cpp $(CREATE_HASH_TABLE)
494 $(CREATE_HASH_TABLE) $< > $@
495 %Table.cpp: %.cpp $(CREATE_HASH_TABLE)
496 $(CREATE_HASH_TABLE) $< > $@
500 # HTML tag and attribute names
502 HTMLNames.cpp : dom/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in
503 perl $< --tags $(WebCore)/html/HTMLTagNames.in --attrs $(WebCore)/html/HTMLAttributeNames.in \
504 --namespace HTML --namespacePrefix xhtml --cppNamespace WebCore --namespaceURI "http://www.w3.org/1999/xhtml" --attrsNullNamespace --output .
506 XMLNames.cpp : dom/make_names.pl xml/xmlattrs.in
507 perl $< --attrs $(WebCore)/xml/xmlattrs.in \
508 --namespace XML --cppNamespace WebCore --namespaceURI "http://www.w3.org/XML/1998/namespace" --output .
512 ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
514 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.exp
516 ifeq ($(findstring ENABLE_SVG_USE,$(FEATURE_DEFINES)), ENABLE_SVG_USE)
517 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_USE=1
520 ifeq ($(findstring ENABLE_SVG_FONTS,$(FEATURE_DEFINES)), ENABLE_SVG_FONTS)
521 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_FONTS=1
524 ifeq ($(findstring ENABLE_SVG_FILTERS,$(FEATURE_DEFINES)), ENABLE_SVG_FILTERS)
525 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_FILTERS=1
526 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.Filters.exp
529 ifeq ($(findstring ENABLE_SVG_AS_IMAGE,$(FEATURE_DEFINES)), ENABLE_SVG_AS_IMAGE)
530 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_AS_IMAGE=1
533 ifeq ($(findstring ENABLE_SVG_ANIMATION,$(FEATURE_DEFINES)), ENABLE_SVG_ANIMATION)
534 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_ANIMATION=1
535 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.Animation.exp
538 ifeq ($(findstring ENABLE_SVG_FOREIGN_OBJECT,$(FEATURE_DEFINES)), ENABLE_SVG_FOREIGN_OBJECT)
539 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_FOREIGN_OBJECT=1
540 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.ForeignObject.exp
543 # SVG tag and attribute names (need to pass an extra flag if svg experimental features are enabled)
547 SVGElementFactory.cpp SVGNames.cpp : dom/make_names.pl svg/svgtags.in svg/svgattrs.in
548 perl $< --tags $(WebCore)/svg/svgtags.in --attrs $(WebCore)/svg/svgattrs.in --extraDefines "$(SVG_FLAGS)" \
549 --namespace SVG --guardFactoryWith "ENABLE(SVG)" --cppNamespace WebCore --namespaceURI "http://www.w3.org/2000/svg" --factory --attrsNullNamespace --output .
552 SVGElementFactory.cpp SVGNames.cpp : dom/make_names.pl svg/svgtags.in svg/svgattrs.in
553 perl $< --tags $(WebCore)/svg/svgtags.in --attrs $(WebCore)/svg/svgattrs.in \
554 --namespace SVG --guardFactoryWith "ENABLE(SVG)" --cppNamespace WebCore --namespaceURI "http://www.w3.org/2000/svg" --factory --attrsNullNamespace --output .
558 XLinkNames.cpp : dom/make_names.pl svg/xlinkattrs.in
559 perl $< --attrs $(WebCore)/svg/xlinkattrs.in \
560 --namespace XLink --cppNamespace WebCore --namespaceURI "http://www.w3.org/1999/xlink" --output .
564 SVGElementFactory.cpp :
577 # JavaScript bindings
579 GENERATE_BINDINGS = perl -I $(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl \
580 --include dom --include html --include css --include page --include xml --include svg --outputdir .
582 GENERATE_BINDINGS_SCRIPTS = \
583 bindings/scripts/CodeGenerator.pm \
584 bindings/scripts/IDLParser.pm \
585 bindings/scripts/IDLStructure.pm \
586 bindings/scripts/generate-bindings.pl \
589 JS%.h : %.idl $(GENERATE_BINDINGS_SCRIPTS) bindings/scripts/CodeGeneratorJS.pm
590 $(GENERATE_BINDINGS) --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS $<
592 # ------------------------
598 all : $(filter-out DOMDOMWindow.h DOMMimeType.h DOMPlugin.h,$(DOM_CLASSES:%=DOM%.h))
600 all : CharsetData.cpp WebCore.exp
604 # character set name table
606 CharsetData.cpp : platform/text/mac/make-charset-table.pl platform/text/mac/character-sets.txt platform/text/mac/mac-encodings.txt
607 perl $^ kTextEncoding > $@
613 ifeq ($(shell gcc -E -P -dM -F $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_MAC_JAVA_BRIDGE | cut -d' ' -f3), 1)
614 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.JNI.exp
617 # See also "Generate 64-bit Export File" build phase script in WebCore.xcodeproj/project.pbxproj
618 ifeq ($(shell gcc -E -P -dM -F $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_NETSCAPE_PLUGIN_API | cut -d' ' -f3), 1)
619 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.NPAPI.exp
622 ifeq ($(ENABLE_DASHBOARD_SUPPORT), 1)
623 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.DashboardSupport.exp
626 ifeq ($(findstring 10.4,$(MACOSX_DEPLOYMENT_TARGET)), 10.4)
627 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Tiger.exp
630 WebCore.exp : WebCore.base.exp $(WEBCORE_EXPORT_DEPENDENCIES)
635 # Objective-C bindings
637 DOM%.h : %.idl $(GENERATE_BINDINGS_SCRIPTS) bindings/scripts/CodeGeneratorObjC.pm bindings/objc/PublicDOMInterfaces.h
638 $(GENERATE_BINDINGS) --defines "$(FEATURE_DEFINES) LANGUAGE_OBJECTIVE_C" --generator ObjC $<
644 # ------------------------