0
|
1 |
# JavaScriptCore - Qt4 build info
|
|
2 |
VPATH += $$PWD
|
|
3 |
|
|
4 |
CONFIG(debug, debug|release) {
|
|
5 |
isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug
|
|
6 |
OBJECTS_DIR = obj/debug
|
|
7 |
} else { # Release
|
|
8 |
isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release
|
|
9 |
OBJECTS_DIR = obj/release
|
|
10 |
}
|
|
11 |
|
|
12 |
INCLUDEPATH = \
|
|
13 |
$$PWD \
|
|
14 |
$$PWD/.. \
|
|
15 |
$$PWD/assembler \
|
|
16 |
$$PWD/bytecode \
|
|
17 |
$$PWD/bytecompiler \
|
|
18 |
$$PWD/debugger \
|
|
19 |
$$PWD/interpreter \
|
|
20 |
$$PWD/jit \
|
|
21 |
$$PWD/parser \
|
|
22 |
$$PWD/profiler \
|
|
23 |
$$PWD/runtime \
|
|
24 |
$$PWD/wrec \
|
|
25 |
$$PWD/wtf \
|
|
26 |
$$PWD/wtf/unicode \
|
|
27 |
$$PWD/yarr \
|
|
28 |
$$PWD/API \
|
|
29 |
$$PWD/ForwardingHeaders \
|
|
30 |
$$GENERATED_SOURCES_DIR \
|
|
31 |
$$INCLUDEPATH
|
|
32 |
|
|
33 |
DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF
|
|
34 |
|
|
35 |
GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
|
|
36 |
win32-* {
|
|
37 |
LIBS += -lwinmm
|
|
38 |
}
|
|
39 |
contains(JAVASCRIPTCORE_JIT,yes) {
|
|
40 |
DEFINES+=ENABLE_JIT=1
|
|
41 |
DEFINES+=ENABLE_YARR_JIT=1
|
|
42 |
}
|
|
43 |
contains(JAVASCRIPTCORE_JIT,no) {
|
|
44 |
DEFINES+=ENABLE_JIT=0
|
|
45 |
DEFINES+=ENABLE_YARR_JIT=0
|
|
46 |
}
|
|
47 |
|
|
48 |
# In debug mode JIT disabled until crash fixed
|
|
49 |
win32-* {
|
|
50 |
CONFIG(debug):!contains(DEFINES, ENABLE_JIT=1): DEFINES+=ENABLE_JIT=0
|
|
51 |
}
|
|
52 |
|
|
53 |
# Rules when JIT enabled (not disabled)
|
|
54 |
!contains(DEFINES, ENABLE_JIT=0) {
|
|
55 |
linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
|
|
56 |
QMAKE_CXXFLAGS += -fno-stack-protector
|
|
57 |
QMAKE_CFLAGS += -fno-stack-protector
|
|
58 |
}
|
|
59 |
}
|
|
60 |
|
|
61 |
wince* {
|
|
62 |
SOURCES += $$QT_SOURCE_TREE/src/3rdparty/ce-compat/ce_time.cpp
|
|
63 |
DEFINES += WINCEBASIC
|
|
64 |
}
|
|
65 |
|
|
66 |
include(pcre/pcre.pri)
|
|
67 |
|
|
68 |
LUT_FILES += \
|
|
69 |
runtime/DatePrototype.cpp \
|
|
70 |
runtime/JSONObject.cpp \
|
|
71 |
runtime/NumberConstructor.cpp \
|
|
72 |
runtime/StringPrototype.cpp \
|
|
73 |
runtime/ArrayPrototype.cpp \
|
|
74 |
runtime/MathObject.cpp \
|
|
75 |
runtime/RegExpConstructor.cpp \
|
|
76 |
runtime/RegExpObject.cpp
|
|
77 |
|
|
78 |
KEYWORDLUT_FILES += \
|
|
79 |
parser/Keywords.table
|
|
80 |
|
|
81 |
JSCBISON += \
|
|
82 |
parser/Grammar.y
|
|
83 |
|
|
84 |
SOURCES += \
|
|
85 |
wtf/Assertions.cpp \
|
|
86 |
wtf/ByteArray.cpp \
|
|
87 |
wtf/HashTable.cpp \
|
|
88 |
wtf/MainThread.cpp \
|
|
89 |
wtf/RandomNumber.cpp \
|
|
90 |
wtf/RefCountedLeakCounter.cpp \
|
|
91 |
wtf/TypeTraits.cpp \
|
|
92 |
wtf/unicode/CollatorDefault.cpp \
|
|
93 |
wtf/unicode/icu/CollatorICU.cpp \
|
|
94 |
wtf/unicode/UTF8.cpp \
|
|
95 |
API/JSBase.cpp \
|
|
96 |
API/JSCallbackConstructor.cpp \
|
|
97 |
API/JSCallbackFunction.cpp \
|
|
98 |
API/JSCallbackObject.cpp \
|
|
99 |
API/JSClassRef.cpp \
|
|
100 |
API/JSContextRef.cpp \
|
|
101 |
API/JSObjectRef.cpp \
|
|
102 |
API/JSStringRef.cpp \
|
|
103 |
API/JSValueRef.cpp \
|
|
104 |
API/OpaqueJSString.cpp \
|
|
105 |
runtime/InitializeThreading.cpp \
|
|
106 |
runtime/JSGlobalData.cpp \
|
|
107 |
runtime/JSGlobalObject.cpp \
|
|
108 |
runtime/JSStaticScopeObject.cpp \
|
|
109 |
runtime/JSVariableObject.cpp \
|
|
110 |
runtime/JSActivation.cpp \
|
|
111 |
runtime/JSNotAnObject.cpp \
|
|
112 |
runtime/JSONObject.cpp \
|
|
113 |
runtime/LiteralParser.cpp \
|
|
114 |
runtime/MarkStack.cpp \
|
|
115 |
runtime/TimeoutChecker.cpp \
|
|
116 |
bytecode/CodeBlock.cpp \
|
|
117 |
bytecode/StructureStubInfo.cpp \
|
|
118 |
bytecode/JumpTable.cpp \
|
|
119 |
assembler/ARMAssembler.cpp \
|
|
120 |
assembler/MacroAssemblerARM.cpp \
|
|
121 |
jit/JIT.cpp \
|
|
122 |
jit/JITCall.cpp \
|
|
123 |
jit/JITArithmetic.cpp \
|
|
124 |
jit/JITOpcodes.cpp \
|
|
125 |
jit/JITPropertyAccess.cpp \
|
|
126 |
jit/ExecutableAllocator.cpp \
|
|
127 |
jit/JITStubs.cpp \
|
|
128 |
bytecompiler/BytecodeGenerator.cpp \
|
|
129 |
runtime/ExceptionHelpers.cpp \
|
|
130 |
runtime/JSPropertyNameIterator.cpp \
|
|
131 |
interpreter/Interpreter.cpp \
|
|
132 |
bytecode/Opcode.cpp \
|
|
133 |
bytecode/SamplingTool.cpp \
|
|
134 |
yarr/RegexCompiler.cpp \
|
|
135 |
yarr/RegexInterpreter.cpp \
|
|
136 |
yarr/RegexJIT.cpp \
|
|
137 |
interpreter/RegisterFile.cpp
|
|
138 |
|
|
139 |
symbian {
|
|
140 |
SOURCES += jit/ExecutableAllocatorSymbian.cpp \
|
|
141 |
runtime/MarkStackSymbian.cpp
|
|
142 |
} else {
|
|
143 |
win32-*|wince* {
|
|
144 |
SOURCES += jit/ExecutableAllocatorWin.cpp \
|
|
145 |
runtime/MarkStackWin.cpp
|
|
146 |
} else {
|
|
147 |
SOURCES += jit/ExecutableAllocatorPosix.cpp \
|
|
148 |
runtime/MarkStackPosix.cpp
|
|
149 |
}
|
|
150 |
}
|
|
151 |
|
|
152 |
!contains(DEFINES, USE_SYSTEM_MALLOC) {
|
|
153 |
SOURCES += wtf/TCSystemAlloc.cpp
|
|
154 |
}
|
|
155 |
|
|
156 |
# AllInOneFile.cpp helps gcc analize and optimize code
|
|
157 |
# Other compilers may be able to do this at link time
|
|
158 |
SOURCES += \
|
|
159 |
runtime/ArgList.cpp \
|
|
160 |
runtime/Arguments.cpp \
|
|
161 |
runtime/ArrayConstructor.cpp \
|
|
162 |
runtime/ArrayPrototype.cpp \
|
|
163 |
runtime/BooleanConstructor.cpp \
|
|
164 |
runtime/BooleanObject.cpp \
|
|
165 |
runtime/BooleanPrototype.cpp \
|
|
166 |
runtime/CallData.cpp \
|
|
167 |
runtime/Collector.cpp \
|
|
168 |
runtime/CommonIdentifiers.cpp \
|
|
169 |
runtime/ConstructData.cpp \
|
|
170 |
wtf/CurrentTime.cpp \
|
|
171 |
runtime/DateConstructor.cpp \
|
|
172 |
runtime/DateConversion.cpp \
|
|
173 |
runtime/DateInstance.cpp \
|
|
174 |
runtime/DatePrototype.cpp \
|
|
175 |
debugger/Debugger.cpp \
|
|
176 |
debugger/DebuggerCallFrame.cpp \
|
|
177 |
debugger/DebuggerActivation.cpp \
|
|
178 |
wtf/dtoa.cpp \
|
|
179 |
runtime/Error.cpp \
|
|
180 |
runtime/ErrorConstructor.cpp \
|
|
181 |
runtime/ErrorInstance.cpp \
|
|
182 |
runtime/ErrorPrototype.cpp \
|
|
183 |
interpreter/CallFrame.cpp \
|
|
184 |
runtime/Executable.cpp \
|
|
185 |
runtime/FunctionConstructor.cpp \
|
|
186 |
runtime/FunctionPrototype.cpp \
|
|
187 |
runtime/GetterSetter.cpp \
|
|
188 |
runtime/GlobalEvalFunction.cpp \
|
|
189 |
runtime/Identifier.cpp \
|
|
190 |
runtime/InternalFunction.cpp \
|
|
191 |
runtime/Completion.cpp \
|
|
192 |
runtime/JSArray.cpp \
|
|
193 |
runtime/JSAPIValueWrapper.cpp \
|
|
194 |
runtime/JSByteArray.cpp \
|
|
195 |
runtime/JSCell.cpp \
|
|
196 |
runtime/JSFunction.cpp \
|
|
197 |
runtime/JSGlobalObjectFunctions.cpp \
|
|
198 |
runtime/JSImmediate.cpp \
|
|
199 |
runtime/JSLock.cpp \
|
|
200 |
runtime/JSNumberCell.cpp \
|
|
201 |
runtime/JSObject.cpp \
|
|
202 |
runtime/JSString.cpp \
|
|
203 |
runtime/JSValue.cpp \
|
|
204 |
runtime/JSWrapperObject.cpp \
|
|
205 |
parser/Lexer.cpp \
|
|
206 |
runtime/Lookup.cpp \
|
|
207 |
runtime/MathObject.cpp \
|
|
208 |
runtime/NativeErrorConstructor.cpp \
|
|
209 |
runtime/NativeErrorPrototype.cpp \
|
|
210 |
parser/Nodes.cpp \
|
|
211 |
runtime/NumberConstructor.cpp \
|
|
212 |
runtime/NumberObject.cpp \
|
|
213 |
runtime/NumberPrototype.cpp \
|
|
214 |
runtime/ObjectConstructor.cpp \
|
|
215 |
runtime/ObjectPrototype.cpp \
|
|
216 |
runtime/Operations.cpp \
|
|
217 |
parser/Parser.cpp \
|
|
218 |
parser/ParserArena.cpp \
|
|
219 |
runtime/PropertyDescriptor.cpp \
|
|
220 |
runtime/PropertyNameArray.cpp \
|
|
221 |
runtime/PropertySlot.cpp \
|
|
222 |
runtime/PrototypeFunction.cpp \
|
|
223 |
runtime/RegExp.cpp \
|
|
224 |
runtime/RegExpConstructor.cpp \
|
|
225 |
runtime/RegExpObject.cpp \
|
|
226 |
runtime/RegExpPrototype.cpp \
|
|
227 |
runtime/ScopeChain.cpp \
|
|
228 |
runtime/SmallStrings.cpp \
|
|
229 |
runtime/StringConstructor.cpp \
|
|
230 |
runtime/StringObject.cpp \
|
|
231 |
runtime/StringPrototype.cpp \
|
|
232 |
runtime/Structure.cpp \
|
|
233 |
runtime/StructureChain.cpp \
|
|
234 |
runtime/UString.cpp \
|
|
235 |
profiler/HeavyProfile.cpp \
|
|
236 |
profiler/Profile.cpp \
|
|
237 |
profiler/ProfileGenerator.cpp \
|
|
238 |
profiler/ProfileNode.cpp \
|
|
239 |
profiler/Profiler.cpp \
|
|
240 |
profiler/TreeProfile.cpp \
|
|
241 |
wtf/DateMath.cpp \
|
|
242 |
wtf/FastMalloc.cpp \
|
|
243 |
wtf/Threading.cpp \
|
|
244 |
wtf/qt/MainThreadQt.cpp
|
|
245 |
|
|
246 |
!contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
|
|
247 |
SOURCES += wtf/qt/ThreadingQt.cpp
|
|
248 |
} else {
|
|
249 |
DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0
|
|
250 |
SOURCES += wtf/ThreadingNone.cpp
|
|
251 |
}
|
|
252 |
|
|
253 |
# GENERATOR 1-A: LUT creator
|
|
254 |
lut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h
|
|
255 |
lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
|
|
256 |
lut.depend = ${QMAKE_FILE_NAME}
|
|
257 |
lut.input = LUT_FILES
|
|
258 |
lut.CONFIG += no_link
|
|
259 |
addExtraCompiler(lut)
|
|
260 |
|
|
261 |
# GENERATOR 1-B: particular LUT creator (for 1 file only)
|
|
262 |
keywordlut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h
|
|
263 |
keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
|
|
264 |
keywordlut.depend = ${QMAKE_FILE_NAME}
|
|
265 |
keywordlut.input = KEYWORDLUT_FILES
|
|
266 |
keywordlut.CONFIG += no_link
|
|
267 |
addExtraCompiler(keywordlut)
|
|
268 |
|
|
269 |
# GENERATOR 2: bison grammar
|
|
270 |
jscbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
|
|
271 |
jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
|
|
272 |
jscbison.depend = ${QMAKE_FILE_NAME}
|
|
273 |
jscbison.input = JSCBISON
|
|
274 |
jscbison.variable_out = GENERATED_SOURCES
|
|
275 |
jscbison.dependency_type = TYPE_C
|
|
276 |
jscbison.CONFIG = target_predeps
|
|
277 |
addExtraCompilerWithHeader(jscbison)
|
|
278 |
|