JavaScriptCore.pri 8.03 KB
Newer Older
1 2
# JavaScriptCore - Qt4 build info
VPATH += $$PWD
3

4
CONFIG(debug, debug|release) {
5
    isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug
6 7
    OBJECTS_DIR = obj/debug
} else { # Release
8
    isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release
9 10 11
    OBJECTS_DIR = obj/release
}

hausmann@webkit.org's avatar
hausmann@webkit.org committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
INCLUDEPATH = \
    $$PWD \
    $$PWD/.. \
    $$PWD/assembler \
    $$PWD/bytecode \
    $$PWD/bytecompiler \
    $$PWD/debugger \
    $$PWD/interpreter \
    $$PWD/jit \
    $$PWD/parser \
    $$PWD/profiler \
    $$PWD/runtime \
    $$PWD/wrec \
    $$PWD/wtf \
    $$PWD/wtf/unicode \
    $$PWD/yarr \
    $$PWD/API \
    $$PWD/ForwardingHeaders \
    $$GENERATED_SOURCES_DIR \
    $$INCLUDEPATH
zecke@webkit.org's avatar
zecke@webkit.org committed
32

33
DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF
34

35
GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
36 37 38
win32-* {
    LIBS += -lwinmm
}
39 40
contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0
41

42 43 44
# In debug mode JIT disabled until crash fixed
win32-* {
    CONFIG(debug):!contains(DEFINES, ENABLE_JIT=1): DEFINES+=ENABLE_JIT=0
45 46
}

47 48 49
# Rules when JIT enabled (not disabled)
!contains(DEFINES, ENABLE_JIT=0) {
    linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
50 51 52
        QMAKE_CXXFLAGS += -fno-stack-protector
        QMAKE_CFLAGS += -fno-stack-protector
    }
53
}
54

55 56 57 58
wince* {
    SOURCES += $$QT_SOURCE_TREE/src/3rdparty/ce-compat/ce_time.cpp
    DEFINES += WINCEBASIC
}
59

60 61 62
include(pcre/pcre.pri)

LUT_FILES += \
63
    runtime/DatePrototype.cpp \
64
    runtime/JSONObject.cpp \
65 66 67 68
    runtime/NumberConstructor.cpp \
    runtime/StringPrototype.cpp \
    runtime/ArrayPrototype.cpp \
    runtime/MathObject.cpp \
69 70
    runtime/RegExpConstructor.cpp \
    runtime/RegExpObject.cpp
71 72

KEYWORDLUT_FILES += \
73
    parser/Keywords.table
74

75
JSCBISON += \
76
    parser/Grammar.y
77 78 79

SOURCES += \
    wtf/Assertions.cpp \
80
    wtf/ByteArray.cpp \
81
    wtf/HashTable.cpp \
82
    wtf/MainThread.cpp \
83
    wtf/RandomNumber.cpp \
84
    wtf/RefCountedLeakCounter.cpp \
85
    wtf/TypeTraits.cpp \
ap@webkit.org's avatar
ap@webkit.org committed
86 87
    wtf/unicode/CollatorDefault.cpp \
    wtf/unicode/icu/CollatorICU.cpp \
ap@webkit.org's avatar
ap@webkit.org committed
88
    wtf/unicode/UTF8.cpp \
89 90 91
    API/JSBase.cpp \
    API/JSCallbackConstructor.cpp \
    API/JSCallbackFunction.cpp \
92
    API/JSCallbackObject.cpp \
93 94 95 96 97
    API/JSClassRef.cpp \
    API/JSContextRef.cpp \
    API/JSObjectRef.cpp \
    API/JSStringRef.cpp \
    API/JSValueRef.cpp \
ap@webkit.org's avatar
ap@webkit.org committed
98
    API/OpaqueJSString.cpp \
99 100
    runtime/InitializeThreading.cpp \
    runtime/JSGlobalData.cpp \
101
    runtime/JSGlobalObject.cpp \
102
    runtime/JSStaticScopeObject.cpp \
103
    runtime/JSVariableObject.cpp \
104
    runtime/JSActivation.cpp \
105
    runtime/JSNotAnObject.cpp \
106
    runtime/JSONObject.cpp \
107
    runtime/LiteralParser.cpp \
108
    runtime/MarkStack.cpp \
ggaren@apple.com's avatar
ggaren@apple.com committed
109
    runtime/TimeoutChecker.cpp \
110
    bytecode/CodeBlock.cpp \
111
    bytecode/StructureStubInfo.cpp \
112
    bytecode/JumpTable.cpp \
113
    assembler/ARMAssembler.cpp \
114
    assembler/MacroAssemblerARM.cpp \
115
    jit/JIT.cpp \
vestbo@webkit.org's avatar
vestbo@webkit.org committed
116 117
    jit/JITCall.cpp \
    jit/JITArithmetic.cpp \
118
    jit/JITOpcodes.cpp \
vestbo@webkit.org's avatar
vestbo@webkit.org committed
119
    jit/JITPropertyAccess.cpp \
120
    jit/ExecutableAllocator.cpp \
121
    jit/JITStubs.cpp \
122
    bytecompiler/BytecodeGenerator.cpp \
123
    runtime/ExceptionHelpers.cpp \
124
    runtime/JSPropertyNameIterator.cpp \
125
    interpreter/Interpreter.cpp \
126
    bytecode/Opcode.cpp \
127
    bytecode/SamplingTool.cpp \
128 129 130
    yarr/RegexCompiler.cpp \
    yarr/RegexInterpreter.cpp \
    yarr/RegexJIT.cpp \
131
    interpreter/RegisterFile.cpp
132

133 134
symbian {
    SOURCES += runtime/MarkStackSymbian.cpp
135
} else {
136 137 138 139 140 141 142
    win32-*|wince* {
        SOURCES += jit/ExecutableAllocatorWin.cpp \
                  runtime/MarkStackWin.cpp
    } else {
        SOURCES += jit/ExecutableAllocatorPosix.cpp \
                  runtime/MarkStackPosix.cpp
    }
143
}
144

145 146 147 148
!contains(DEFINES, USE_SYSTEM_MALLOC) {
    SOURCES += wtf/TCSystemAlloc.cpp
}

149 150 151
# AllInOneFile.cpp helps gcc analize and optimize code
# Other compilers may be able to do this at link time
SOURCES += \
152 153
    runtime/ArgList.cpp \
    runtime/Arguments.cpp \
154 155 156 157 158 159
    runtime/ArrayConstructor.cpp \
    runtime/ArrayPrototype.cpp \
    runtime/BooleanConstructor.cpp \
    runtime/BooleanObject.cpp \
    runtime/BooleanPrototype.cpp \
    runtime/CallData.cpp \
160
    runtime/Collector.cpp \
161
    runtime/CommonIdentifiers.cpp \
162
    runtime/ConstructData.cpp \
ap@webkit.org's avatar
ap@webkit.org committed
163
    wtf/CurrentTime.cpp \
164
    runtime/DateConstructor.cpp \
dglazkov@chromium.org's avatar
dglazkov@chromium.org committed
165
    runtime/DateConversion.cpp \
166 167
    runtime/DateInstance.cpp \
    runtime/DatePrototype.cpp \
168 169
    debugger/Debugger.cpp \
    debugger/DebuggerCallFrame.cpp \
weinig@apple.com's avatar
weinig@apple.com committed
170
    debugger/DebuggerActivation.cpp \
171
    wtf/dtoa.cpp \
172 173 174 175
    runtime/Error.cpp \
    runtime/ErrorConstructor.cpp \
    runtime/ErrorInstance.cpp \
    runtime/ErrorPrototype.cpp \
ggaren@apple.com's avatar
ggaren@apple.com committed
176
    interpreter/CallFrame.cpp \
177
    runtime/Executable.cpp \
178 179
    runtime/FunctionConstructor.cpp \
    runtime/FunctionPrototype.cpp \
180
    runtime/GetterSetter.cpp \
181
    runtime/GlobalEvalFunction.cpp \
182
    runtime/Identifier.cpp \
183
    runtime/InternalFunction.cpp \
ggaren@apple.com's avatar
ggaren@apple.com committed
184
    runtime/Completion.cpp \
185
    runtime/JSArray.cpp \
186
    runtime/JSAPIValueWrapper.cpp \
187
    runtime/JSByteArray.cpp \
188 189 190 191
    runtime/JSCell.cpp \
    runtime/JSFunction.cpp \
    runtime/JSGlobalObjectFunctions.cpp \
    runtime/JSImmediate.cpp \
192
    runtime/JSLock.cpp \
193 194 195 196 197
    runtime/JSNumberCell.cpp \
    runtime/JSObject.cpp \
    runtime/JSString.cpp \
    runtime/JSValue.cpp \
    runtime/JSWrapperObject.cpp \
198
    parser/Lexer.cpp \
199
    runtime/Lookup.cpp \
200 201 202
    runtime/MathObject.cpp \
    runtime/NativeErrorConstructor.cpp \
    runtime/NativeErrorPrototype.cpp \
203
    parser/Nodes.cpp \
204 205 206 207 208
    runtime/NumberConstructor.cpp \
    runtime/NumberObject.cpp \
    runtime/NumberPrototype.cpp \
    runtime/ObjectConstructor.cpp \
    runtime/ObjectPrototype.cpp \
209
    runtime/Operations.cpp \
210
    parser/Parser.cpp \
211
    parser/ParserArena.cpp \
oliver@apple.com's avatar
oliver@apple.com committed
212
    runtime/PropertyDescriptor.cpp \
213
    runtime/PropertyNameArray.cpp \
214 215
    runtime/PropertySlot.cpp \
    runtime/PrototypeFunction.cpp \
216
    runtime/RegExp.cpp \
217 218 219
    runtime/RegExpConstructor.cpp \
    runtime/RegExpObject.cpp \
    runtime/RegExpPrototype.cpp \
220
    runtime/ScopeChain.cpp \
221 222 223 224
    runtime/SmallStrings.cpp \
    runtime/StringConstructor.cpp \
    runtime/StringObject.cpp \
    runtime/StringPrototype.cpp \
darin@apple.com's avatar
darin@apple.com committed
225 226
    runtime/Structure.cpp \
    runtime/StructureChain.cpp \
227
    runtime/UString.cpp \
228
    profiler/HeavyProfile.cpp \
229
    profiler/Profile.cpp \
230
    profiler/ProfileGenerator.cpp \
weinig@apple.com's avatar
weinig@apple.com committed
231
    profiler/ProfileNode.cpp \
232
    profiler/Profiler.cpp \
hausmann@webkit.org's avatar
hausmann@webkit.org committed
233
    profiler/TreeProfile.cpp \
dglazkov@chromium.org's avatar
dglazkov@chromium.org committed
234
    wtf/DateMath.cpp \
235
    wtf/FastMalloc.cpp \
236
    wtf/Threading.cpp \
237
    wtf/qt/MainThreadQt.cpp
238

239 240 241 242 243 244 245
!contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
    SOURCES += wtf/qt/ThreadingQt.cpp
} else {
    DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0
    SOURCES += wtf/ThreadingNone.cpp
}

246
# GENERATOR 1-A: LUT creator
247
lut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h
248
lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
249 250 251
lut.depend = ${QMAKE_FILE_NAME}
lut.input = LUT_FILES
lut.CONFIG += no_link
252
addExtraCompiler(lut)
253 254

# GENERATOR 1-B: particular LUT creator (for 1 file only)
255
keywordlut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h
256
keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
257 258 259
keywordlut.depend = ${QMAKE_FILE_NAME}
keywordlut.input = KEYWORDLUT_FILES
keywordlut.CONFIG += no_link
260
addExtraCompiler(keywordlut)
261 262

# GENERATOR 2: bison grammar
263 264
jscbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
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
265 266 267 268 269 270
jscbison.depend = ${QMAKE_FILE_NAME}
jscbison.input = JSCBISON
jscbison.variable_out = GENERATED_SOURCES
jscbison.dependency_type = TYPE_C
jscbison.CONFIG = target_predeps
addExtraCompilerWithHeader(jscbison)
271