Add new files to other projects.
[WebKit-https.git] / JavaScriptCore / JavaScriptCore.pri
1 # JavaScriptCore - Qt4 build info
2 VPATH += $$PWD
3
4 INCLUDEPATH += tmp
5 INCLUDEPATH += $$PWD $$PWD/parser $$PWD/bytecompiler $$PWD/debugger $$PWD/runtime $$PWD/wtf $$PWD/wtf/unicode $$PWD/interpreter $$PWD/jit $$PWD/profiler $$PWD/wrec $$PWD/API $$PWD/.. \
6                $$PWD/ForwardingHeaders $$PWD/bytecode $$PWD/assembler
7 DEFINES += BUILDING_QT__
8
9 isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp
10 GENERATED_SOURCES_DIR_SLASH = $$GENERATED_SOURCES_DIR/
11 win32-*: GENERATED_SOURCES_DIR_SLASH ~= s|/|\|
12 win32-g++: LIBS += -lwinmm
13
14
15 # Disable the JIT due to numerous observed miscompilations :(
16 #CONFIG(release):isEqual(QT_ARCH,i386) {
17 #     JIT_DEFINES = ENABLE_JIT ENABLE_WREC ENABLE_JIT_OPTIMIZE_CALL ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS ENABLE_JIT_OPTIMIZE_ARITHMETIC
18 #     # gcc <= 4.1 is known to miscompile, so require >= 4.2, written as major > 3 and minor > 1
19 #     linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,1) {
20 #         DEFINES += $$JIT_DEFINES
21 #         SOURCES += wtf/TCSystemAlloc.cpp
22 #         DEFINES -= USE_SYSTEM_MALLOC
23 #     }
24 #     win32-msvc* {
25 #         DEFINES += $$JIT_DEFINES
26 #     }
27 #}
28
29 include(pcre/pcre.pri)
30
31 LUT_FILES += \
32     runtime/DatePrototype.cpp \
33     runtime/NumberConstructor.cpp \
34     runtime/StringPrototype.cpp \
35     runtime/ArrayPrototype.cpp \
36     runtime/MathObject.cpp \
37     runtime/RegExpConstructor.cpp \
38     runtime/RegExpObject.cpp
39
40 KEYWORDLUT_FILES += \
41     parser/Keywords.table
42
43 KJSBISON += \
44     parser/Grammar.y
45
46 SOURCES += \
47     wtf/Assertions.cpp \
48     wtf/HashTable.cpp \
49     wtf/MainThread.cpp \
50     wtf/RefCountedLeakCounter.cpp \
51     wtf/unicode/CollatorDefault.cpp \
52     wtf/unicode/icu/CollatorICU.cpp \
53     wtf/unicode/UTF8.cpp \
54     API/JSBase.cpp \
55     API/JSCallbackConstructor.cpp \
56     API/JSCallbackFunction.cpp \
57     API/JSCallbackObject.cpp \
58     API/JSClassRef.cpp \
59     API/JSContextRef.cpp \
60     API/JSObjectRef.cpp \
61     API/JSStringRef.cpp \
62     API/JSValueRef.cpp \
63     API/OpaqueJSString.cpp \
64     runtime/InitializeThreading.cpp \
65     runtime/JSGlobalData.cpp \
66     runtime/JSGlobalObject.cpp \
67     runtime/JSStaticScopeObject.cpp \
68     runtime/JSVariableObject.cpp \
69     runtime/JSActivation.cpp \
70     runtime/JSNotAnObject.cpp \
71     bytecode/CodeBlock.cpp \
72     bytecode/JumpTable.cpp \
73     jit/JIT.cpp \
74     jit/JITCall.cpp \
75     jit/JITArithmetic.cpp \
76     jit/JITPropertyAccess.cpp \
77     jit/ExecutableAllocator.cpp \
78     jit/ExecutableAllocatorMMAP.cpp \
79     bytecompiler/BytecodeGenerator.cpp \
80     runtime/ExceptionHelpers.cpp \
81     runtime/JSPropertyNameIterator.cpp \
82     interpreter/Interpreter.cpp \
83     bytecode/Opcode.cpp \
84     bytecode/SamplingTool.cpp \
85     wrec/CharacterClass.cpp \
86     wrec/CharacterClassConstructor.cpp \
87     wrec/WREC.cpp \
88     wrec/WRECFunctors.cpp \
89     wrec/WRECGenerator.cpp \
90     wrec/WRECParser.cpp \
91     interpreter/RegisterFile.cpp
92
93 # AllInOneFile.cpp helps gcc analize and optimize code
94 # Other compilers may be able to do this at link time
95 SOURCES += \
96     runtime/ArgList.cpp \
97     runtime/Arguments.cpp \
98     runtime/ArrayConstructor.cpp \
99     runtime/ArrayPrototype.cpp \
100     runtime/BooleanConstructor.cpp \
101     runtime/BooleanObject.cpp \
102     runtime/BooleanPrototype.cpp \
103     runtime/CallData.cpp \
104     runtime/Collector.cpp \
105     runtime/CommonIdentifiers.cpp \
106     runtime/ConstructData.cpp \
107     runtime/DateConstructor.cpp \
108     runtime/DateInstance.cpp \
109     runtime/DateMath.cpp \
110     runtime/DatePrototype.cpp \
111     debugger/Debugger.cpp \
112     debugger/DebuggerCallFrame.cpp \
113     wtf/dtoa.cpp \
114     runtime/Error.cpp \
115     runtime/ErrorConstructor.cpp \
116     runtime/ErrorInstance.cpp \
117     runtime/ErrorPrototype.cpp \
118     interpreter/CallFrame.cpp \
119     runtime/FunctionConstructor.cpp \
120     runtime/FunctionPrototype.cpp \
121     runtime/GetterSetter.cpp \
122     runtime/GlobalEvalFunction.cpp \
123     runtime/Identifier.cpp \
124     runtime/InternalFunction.cpp \
125     runtime/Completion.cpp \
126     runtime/JSArray.cpp \
127     runtime/JSCell.cpp \
128     runtime/JSFunction.cpp \
129     runtime/JSGlobalObjectFunctions.cpp \
130     runtime/JSImmediate.cpp \
131     runtime/JSLock.cpp \
132     runtime/JSNumberCell.cpp \
133     runtime/JSObject.cpp \
134     runtime/JSString.cpp \
135     runtime/JSValue.cpp \
136     runtime/JSWrapperObject.cpp \
137     parser/Lexer.cpp \
138     runtime/Lookup.cpp \
139     runtime/MathObject.cpp \
140     runtime/NativeErrorConstructor.cpp \
141     runtime/NativeErrorPrototype.cpp \
142     parser/Nodes.cpp \
143     runtime/NumberConstructor.cpp \
144     runtime/NumberObject.cpp \
145     runtime/NumberPrototype.cpp \
146     runtime/ObjectConstructor.cpp \
147     runtime/ObjectPrototype.cpp \
148     runtime/Operations.cpp \
149     parser/Parser.cpp \
150     runtime/PropertyNameArray.cpp \
151     runtime/PropertySlot.cpp \
152     runtime/PrototypeFunction.cpp \
153     runtime/RegExp.cpp \
154     runtime/RegExpConstructor.cpp \
155     runtime/RegExpObject.cpp \
156     runtime/RegExpPrototype.cpp \
157     runtime/ScopeChain.cpp \
158     runtime/SmallStrings.cpp \
159     runtime/StringConstructor.cpp \
160     runtime/StringObject.cpp \
161     runtime/StringPrototype.cpp \
162     runtime/Structure.cpp \
163     runtime/StructureChain.cpp \
164     runtime/UString.cpp \
165     profiler/HeavyProfile.cpp \
166     profiler/Profile.cpp \
167     profiler/ProfileGenerator.cpp \
168     profiler/ProfileNode.cpp \
169     profiler/Profiler.cpp \
170     profiler/TreeProfile.cpp \
171     wtf/FastMalloc.cpp \
172     wtf/ThreadingQt.cpp \
173     wtf/qt/MainThreadQt.cpp
174
175 # GENERATOR 1-A: LUT creator
176 lut.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.lut.h
177 lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
178 lut.depend = ${QMAKE_FILE_NAME}
179 lut.input = LUT_FILES
180 lut.CONFIG += no_link
181 addExtraCompiler(lut)
182
183 # GENERATOR 1-B: particular LUT creator (for 1 file only)
184 keywordlut.output = $$GENERATED_SOURCES_DIR/Lexer.lut.h
185 keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
186 keywordlut.depend = ${QMAKE_FILE_NAME}
187 keywordlut.input = KEYWORDLUT_FILES
188 keywordlut.CONFIG += no_link
189 addExtraCompiler(keywordlut)
190
191 # GENERATOR 2: bison grammar
192 kjsbison.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.cpp
193 kjsbison.commands = bison -d -p kjsyy ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_BASE}.tab.c && $(MOVE) ${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) ${QMAKE_FILE_BASE}.tab.h $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.h
194 kjsbison.depend = ${QMAKE_FILE_NAME}
195 kjsbison.input = KJSBISON
196 kjsbison.variable_out = GENERATED_SOURCES
197 kjsbison.dependency_type = TYPE_C
198 kjsbison.CONFIG = target_predeps
199 addExtraCompilerWithHeader(kjsbison)
200