e76da3241824600f4af4e9290d2c1f7d07fe782e
[WebKit-https.git] / JavaScriptCore / Android.mk
1 ##
2 ## Copyright 2009, The Android Open Source Project
3 ##
4 ## Redistribution and use in source and binary forms, with or without
5 ## modification, are permitted provided that the following conditions
6 ## are met:
7 ##  * Redistributions of source code must retain the above copyright
8 ##    notice, this list of conditions and the following disclaimer.
9 ##  * Redistributions in binary form must reproduce the above copyright
10 ##    notice, this list of conditions and the following disclaimer in the
11 ##    documentation and/or other materials provided with the distribution.
12 ##
13 ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
14 ## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 ## PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 ## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 ## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 ## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 ## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 ## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 ## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 ##
25
26 LOCAL_SRC_FILES := \
27         API/JSValueRef.cpp \
28         API/JSCallbackObject.cpp \
29         API/OpaqueJSString.cpp \
30         \
31         bytecode/CodeBlock.cpp \
32         bytecode/JumpTable.cpp \
33         bytecode/Opcode.cpp \
34         bytecode/SamplingTool.cpp \
35         bytecode/StructureStubInfo.cpp \
36         \
37         bytecompiler/BytecodeGenerator.cpp \
38         bytecompiler/NodesCodegen.cpp \
39         \
40         debugger/Debugger.cpp \
41         debugger/DebuggerActivation.cpp \
42         debugger/DebuggerCallFrame.cpp \
43         \
44         interpreter/CallFrame.cpp \
45         interpreter/Interpreter.cpp \
46         interpreter/RegisterFile.cpp \
47         \
48         parser/Lexer.cpp \
49         parser/Nodes.cpp \
50         parser/Parser.cpp \
51         parser/ParserArena.cpp \
52         \
53         pcre/pcre_compile.cpp \
54         pcre/pcre_exec.cpp \
55         pcre/pcre_tables.cpp \
56         pcre/pcre_ucp_searchfuncs.cpp \
57         pcre/pcre_xclass.cpp \
58         \
59         profiler/Profile.cpp \
60         profiler/ProfileGenerator.cpp \
61         profiler/ProfileNode.cpp \
62         profiler/Profiler.cpp \
63         \
64         runtime/ArgList.cpp \
65         runtime/Arguments.cpp \
66         runtime/ArrayConstructor.cpp \
67         runtime/ArrayPrototype.cpp \
68         runtime/BooleanConstructor.cpp \
69         runtime/BooleanObject.cpp \
70         runtime/BooleanPrototype.cpp \
71         runtime/CallData.cpp \
72         runtime/Collector.cpp \
73         runtime/CommonIdentifiers.cpp \
74         runtime/Completion.cpp \
75         runtime/ConstructData.cpp \
76         runtime/DateConstructor.cpp \
77         runtime/DateConversion.cpp \
78         runtime/DateInstance.cpp \
79         runtime/DatePrototype.cpp \
80         runtime/Error.cpp \
81         runtime/ErrorConstructor.cpp \
82         runtime/ErrorInstance.cpp \
83         runtime/ErrorPrototype.cpp \
84         runtime/ExceptionHelpers.cpp \
85         runtime/Executable.cpp \
86         runtime/FunctionConstructor.cpp \
87         runtime/FunctionPrototype.cpp \
88         runtime/GetterSetter.cpp \
89         runtime/GlobalEvalFunction.cpp \
90         runtime/Identifier.cpp \
91         runtime/InitializeThreading.cpp \
92         runtime/InternalFunction.cpp \
93         runtime/JSAPIValueWrapper.cpp \
94         runtime/JSActivation.cpp \
95         runtime/JSArray.cpp \
96         runtime/JSByteArray.cpp \
97         runtime/JSCell.cpp \
98         runtime/JSFunction.cpp \
99         runtime/JSGlobalData.cpp \
100         runtime/JSGlobalObject.cpp \
101         runtime/JSGlobalObjectFunctions.cpp \
102         runtime/JSImmediate.cpp \
103         runtime/JSLock.cpp \
104         runtime/JSNotAnObject.cpp \
105         runtime/JSNumberCell.cpp \
106         runtime/JSONObject.cpp \
107         runtime/JSObject.cpp \
108         runtime/JSPropertyNameIterator.cpp \
109         runtime/JSStaticScopeObject.cpp \
110         runtime/JSString.cpp \
111         runtime/JSValue.cpp \
112         runtime/JSVariableObject.cpp \
113         runtime/JSWrapperObject.cpp \
114         runtime/LiteralParser.cpp \
115         runtime/Lookup.cpp \
116         runtime/MarkStack.cpp \
117         runtime/MarkStackPosix.cpp \
118         runtime/MathObject.cpp \
119         runtime/NativeErrorConstructor.cpp \
120         runtime/NativeErrorPrototype.cpp \
121         runtime/NumberConstructor.cpp \
122         runtime/NumberObject.cpp \
123         runtime/NumberPrototype.cpp \
124         runtime/ObjectConstructor.cpp \
125         runtime/ObjectPrototype.cpp \
126         runtime/Operations.cpp \
127         runtime/PropertyDescriptor.cpp \
128         runtime/PropertyNameArray.cpp \
129         runtime/PropertySlot.cpp \
130         runtime/PrototypeFunction.cpp \
131         runtime/RegExp.cpp \
132         runtime/RegExpConstructor.cpp \
133         runtime/RegExpObject.cpp \
134         runtime/RegExpPrototype.cpp \
135         runtime/ScopeChain.cpp \
136         runtime/SmallStrings.cpp \
137         runtime/StringConstructor.cpp \
138         runtime/StringObject.cpp \
139         runtime/StringPrototype.cpp \
140         runtime/Structure.cpp \
141         runtime/StructureChain.cpp \
142         runtime/TimeoutChecker.cpp \
143         runtime/UString.cpp \
144         \
145         wrec/CharacterClass.cpp \
146         wrec/CharacterClassConstructor.cpp \
147         wrec/WREC.cpp \
148         wrec/WRECFunctors.cpp \
149         wrec/WRECGenerator.cpp \
150         wrec/WRECParser.cpp \
151         \
152         wtf/Assertions.cpp \
153         wtf/ByteArray.cpp \
154         wtf/CurrentTime.cpp \
155         wtf/DateMath.cpp \
156         wtf/FastMalloc.cpp \
157         wtf/HashTable.cpp \
158         wtf/MainThread.cpp \
159         wtf/RandomNumber.cpp \
160         wtf/RefCountedLeakCounter.cpp \
161         wtf/TCSystemAlloc.cpp \
162         wtf/ThreadIdentifierDataPthreads.cpp \
163         wtf/Threading.cpp \
164         wtf/ThreadingPthreads.cpp \
165         \
166         wtf/TypeTraits.cpp \
167         wtf/dtoa.cpp \
168         \
169         wtf/android/MainThreadAndroid.cpp \
170         \
171         wtf/unicode/CollatorDefault.cpp \
172         wtf/unicode/UTF8.cpp \
173         \
174         wtf/unicode/icu/CollatorICU.cpp
175
176 # Rule to build grammar.y with our custom bison.
177 GEN := $(intermediates)/parser/Grammar.cpp
178 $(GEN) : PRIVATE_YACCFLAGS := -p jscyy
179 $(GEN) : $(LOCAL_PATH)/parser/Grammar.y
180         $(call local-transform-y-to-cpp,.cpp)
181 $(GEN) : $(LOCAL_BISON)
182 LOCAL_GENERATED_SOURCES += $(GEN)
183
184 # generated headers
185 JSC_OBJECTS := $(addprefix $(intermediates)/runtime/, \
186                                 ArrayPrototype.lut.h \
187                                 DatePrototype.lut.h \
188                                 JSONObject.lut.h \
189                                 MathObject.lut.h \
190                                 NumberConstructor.lut.h \
191                                 RegExpConstructor.lut.h \
192                                 RegExpObject.lut.h \
193                                 StringPrototype.lut.h \
194                         )
195 $(JSC_OBJECTS): PRIVATE_PATH := $(LOCAL_PATH)
196 $(JSC_OBJECTS): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/create_hash_table $< -i > $@
197 $(JSC_OBJECTS): $(LOCAL_PATH)/create_hash_table
198 $(JSC_OBJECTS): $(intermediates)/%.lut.h : $(LOCAL_PATH)/%.cpp
199         $(transform-generated-source)
200
201
202 LEXER_HEADER := $(intermediates)/Lexer.lut.h
203 $(LEXER_HEADER): PRIVATE_PATH := $(LOCAL_PATH)
204 $(LEXER_HEADER): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/create_hash_table $< -i > $@
205 $(LEXER_HEADER): $(LOCAL_PATH)/create_hash_table
206 $(LEXER_HEADER): $(intermediates)/%.lut.h : $(LOCAL_PATH)/parser/Keywords.table
207         $(transform-generated-source)
208
209 CHARTABLES := $(intermediates)/chartables.c
210 $(CHARTABLES): PRIVATE_PATH := $(LOCAL_PATH)
211 $(CHARTABLES): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/pcre/dftables $@
212 $(CHARTABLES): $(LOCAL_PATH)/pcre/dftables
213 $(CHARTABLES): $(LOCAL_PATH)/pcre/pcre_internal.h
214         $(transform-generated-source)
215
216 LOCAL_GENERATED_SOURCES += $(JSC_OBJECTS) $(LEXER_HEADER) $(CHARTABLES)