1 # JavaScriptCore - Qt4 build info
4 CONFIG(debug, debug|release) {
5 isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug
6 OBJECTS_DIR = obj/debug
8 isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release
9 OBJECTS_DIR = obj/release
12 INCLUDEPATH += $$GENERATED_SOURCES_DIR \
27 $$PWD/ForwardingHeaders \
31 DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF
33 GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
38 # Default rules to turn JIT on/off
39 !contains(DEFINES, ENABLE_JIT=.) {
40 isEqual(QT_ARCH,i386)|isEqual(QT_ARCH,windows) {
42 CONFIG(release):linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
43 DEFINES += ENABLE_JIT=1
46 DEFINES += ENABLE_JIT=1
51 # Rules when JIT enabled
52 contains(DEFINES, ENABLE_JIT=1) {
53 !contains(DEFINES, ENABLE_YARR=.): DEFINES += ENABLE_YARR=1
54 !contains(DEFINES, ENABLE_YARR_JIT=.): DEFINES += ENABLE_YARR_JIT=1
55 !contains(DEFINES, ENABLE_JIT_OPTIMIZE_CALL=.): DEFINES += ENABLE_JIT_OPTIMIZE_CALL=1
56 !contains(DEFINES, ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS=.): DEFINES += ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS=1
57 !contains(DEFINES, ENABLE_JIT_OPTIMIZE_ARITHMETIC=.): DEFINES += ENABLE_JIT_OPTIMIZE_ARITHMETIC=1
59 !contains(DEFINES, WTF_USE_JIT_STUB_ARGUMENT_VA_LIST=.): DEFINES += WTF_USE_JIT_STUB_ARGUMENT_VA_LIST=1
60 QMAKE_CXXFLAGS += -fno-stack-protector
61 QMAKE_CFLAGS += -fno-stack-protector
64 !contains(DEFINES, WTF_USE_JIT_STUB_ARGUMENT_REGISTER=.): DEFINES += WTF_USE_JIT_STUB_ARGUMENT_REGISTER=1
68 include(pcre/pcre.pri)
71 runtime/DatePrototype.cpp \
72 runtime/JSONObject.cpp \
73 runtime/NumberConstructor.cpp \
74 runtime/StringPrototype.cpp \
75 runtime/ArrayPrototype.cpp \
76 runtime/MathObject.cpp \
77 runtime/RegExpConstructor.cpp \
78 runtime/RegExpObject.cpp
91 wtf/RandomNumber.cpp \
92 wtf/RefCountedLeakCounter.cpp \
94 wtf/unicode/CollatorDefault.cpp \
95 wtf/unicode/icu/CollatorICU.cpp \
96 wtf/unicode/UTF8.cpp \
98 API/JSCallbackConstructor.cpp \
99 API/JSCallbackFunction.cpp \
100 API/JSCallbackObject.cpp \
102 API/JSContextRef.cpp \
103 API/JSObjectRef.cpp \
104 API/JSStringRef.cpp \
106 API/OpaqueJSString.cpp \
107 runtime/InitializeThreading.cpp \
108 runtime/JSGlobalData.cpp \
109 runtime/JSGlobalObject.cpp \
110 runtime/JSStaticScopeObject.cpp \
111 runtime/JSVariableObject.cpp \
112 runtime/JSActivation.cpp \
113 runtime/JSNotAnObject.cpp \
114 runtime/JSONObject.cpp \
115 runtime/LiteralParser.cpp \
116 runtime/TimeoutChecker.cpp \
117 bytecode/CodeBlock.cpp \
118 bytecode/StructureStubInfo.cpp \
119 bytecode/JumpTable.cpp \
122 jit/JITArithmetic.cpp \
124 jit/JITPropertyAccess.cpp \
125 jit/ExecutableAllocator.cpp \
127 bytecompiler/BytecodeGenerator.cpp \
128 runtime/ExceptionHelpers.cpp \
129 runtime/JSPropertyNameIterator.cpp \
130 interpreter/Interpreter.cpp \
131 bytecode/Opcode.cpp \
132 bytecode/SamplingTool.cpp \
133 yarr/RegexCompiler.cpp \
134 yarr/RegexInterpreter.cpp \
136 interpreter/RegisterFile.cpp
138 win32-*: SOURCES += jit/ExecutableAllocatorWin.cpp
139 else: SOURCES += jit/ExecutableAllocatorPosix.cpp
141 # AllInOneFile.cpp helps gcc analize and optimize code
142 # Other compilers may be able to do this at link time
144 runtime/ArgList.cpp \
145 runtime/Arguments.cpp \
146 runtime/ArrayConstructor.cpp \
147 runtime/ArrayPrototype.cpp \
148 runtime/BooleanConstructor.cpp \
149 runtime/BooleanObject.cpp \
150 runtime/BooleanPrototype.cpp \
151 runtime/CallData.cpp \
152 runtime/Collector.cpp \
153 runtime/CommonIdentifiers.cpp \
154 runtime/ConstructData.cpp \
155 wtf/CurrentTime.cpp \
156 runtime/DateConstructor.cpp \
157 runtime/DateConversion.cpp \
158 runtime/DateInstance.cpp \
159 runtime/DatePrototype.cpp \
160 debugger/Debugger.cpp \
161 debugger/DebuggerCallFrame.cpp \
162 debugger/DebuggerActivation.cpp \
165 runtime/ErrorConstructor.cpp \
166 runtime/ErrorInstance.cpp \
167 runtime/ErrorPrototype.cpp \
168 interpreter/CallFrame.cpp \
169 runtime/FunctionConstructor.cpp \
170 runtime/FunctionPrototype.cpp \
171 runtime/GetterSetter.cpp \
172 runtime/GlobalEvalFunction.cpp \
173 runtime/Identifier.cpp \
174 runtime/InternalFunction.cpp \
175 runtime/Completion.cpp \
176 runtime/JSArray.cpp \
177 runtime/JSByteArray.cpp \
179 runtime/JSFunction.cpp \
180 runtime/JSGlobalObjectFunctions.cpp \
181 runtime/JSImmediate.cpp \
183 runtime/JSNumberCell.cpp \
184 runtime/JSObject.cpp \
185 runtime/JSString.cpp \
186 runtime/JSValue.cpp \
187 runtime/JSWrapperObject.cpp \
190 runtime/MathObject.cpp \
191 runtime/NativeErrorConstructor.cpp \
192 runtime/NativeErrorPrototype.cpp \
194 runtime/NumberConstructor.cpp \
195 runtime/NumberObject.cpp \
196 runtime/NumberPrototype.cpp \
197 runtime/ObjectConstructor.cpp \
198 runtime/ObjectPrototype.cpp \
199 runtime/Operations.cpp \
201 parser/ParserArena.cpp \
202 runtime/PropertyNameArray.cpp \
203 runtime/PropertySlot.cpp \
204 runtime/PrototypeFunction.cpp \
206 runtime/RegExpConstructor.cpp \
207 runtime/RegExpObject.cpp \
208 runtime/RegExpPrototype.cpp \
209 runtime/ScopeChain.cpp \
210 runtime/SmallStrings.cpp \
211 runtime/StringConstructor.cpp \
212 runtime/StringObject.cpp \
213 runtime/StringPrototype.cpp \
214 runtime/Structure.cpp \
215 runtime/StructureChain.cpp \
216 runtime/UString.cpp \
217 profiler/HeavyProfile.cpp \
218 profiler/Profile.cpp \
219 profiler/ProfileGenerator.cpp \
220 profiler/ProfileNode.cpp \
221 profiler/Profiler.cpp \
222 profiler/TreeProfile.cpp \
226 wtf/qt/MainThreadQt.cpp
228 !contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
229 SOURCES += wtf/qt/ThreadingQt.cpp
231 DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0
232 SOURCES += wtf/ThreadingNone.cpp
235 # GENERATOR 1-A: LUT creator
236 lut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h
237 lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
238 lut.depend = ${QMAKE_FILE_NAME}
239 lut.input = LUT_FILES
240 lut.CONFIG += no_link
241 addExtraCompiler(lut)
243 # GENERATOR 1-B: particular LUT creator (for 1 file only)
244 keywordlut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h
245 keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
246 keywordlut.depend = ${QMAKE_FILE_NAME}
247 keywordlut.input = KEYWORDLUT_FILES
248 keywordlut.CONFIG += no_link
249 addExtraCompiler(keywordlut)
251 # GENERATOR 2: bison grammar
252 jscbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
253 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
254 jscbison.depend = ${QMAKE_FILE_NAME}
255 jscbison.input = JSCBISON
256 jscbison.variable_out = GENERATED_SOURCES
257 jscbison.dependency_type = TYPE_C
258 jscbison.CONFIG = target_predeps
259 addExtraCompilerWithHeader(jscbison)