DateMath.cpp should not depend on JavaScriptCore
[WebKit-https.git] / Source / JavaScriptCore / Target.pri
1 # -------------------------------------------------------------------
2 # Target file for the JavaScriptSource library
3 #
4 # See 'Tools/qmake/README' for an overview of the build system
5 # -------------------------------------------------------------------
6
7 TEMPLATE = lib
8
9 load(javascriptcore)
10
11 DEFINES += BUILDING_JavaScriptCore BUILDING_WTF
12
13 CONFIG += javas
14 CONFIG += staticlib
15
16 # Don't use JavaScriptCore as the target name. qmake would create a
17 # JavaScriptCore.vcproj for msvc which already exists as a directory
18 TARGET = $$JAVASCRIPTCORE_TARGET
19 DESTDIR = $$JAVASCRIPTCORE_DESTDIR
20 QT += core
21 QT -= gui
22
23 contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
24 unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
25
26 *-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2
27 *-g++*:QMAKE_CXXFLAGS_RELEASE += -O3
28
29 # Rules when JIT enabled (not disabled)
30 !contains(DEFINES, ENABLE_JIT=0) {
31     linux*-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
32         QMAKE_CXXFLAGS += -fno-stack-protector
33         QMAKE_CFLAGS += -fno-stack-protector
34     }
35 }
36
37 wince* {
38     SOURCES += $$QT_SOURCE_TREE/src/3rdparty/ce-compat/ce_time.c
39 }
40
41 include(yarr/yarr.pri)
42 include(wtf/wtf.pri)
43
44 INSTALLDEPS += all
45
46 SOURCES += \
47     API/JSBase.cpp \
48     API/JSCallbackConstructor.cpp \
49     API/JSCallbackFunction.cpp \
50     API/JSCallbackObject.cpp \
51     API/JSClassRef.cpp \
52     API/JSContextRef.cpp \
53     API/JSObjectRef.cpp \
54     API/JSStringRef.cpp \
55     API/JSValueRef.cpp \
56     API/OpaqueJSString.cpp \
57     assembler/ARMAssembler.cpp \
58     assembler/ARMv7Assembler.cpp \
59     assembler/MacroAssemblerARM.cpp \
60     assembler/MacroAssemblerSH4.cpp \
61     bytecode/CodeBlock.cpp \
62     bytecode/JumpTable.cpp \
63     bytecode/Opcode.cpp \
64     bytecode/PredictedType.cpp \
65     bytecode/SamplingTool.cpp \
66     bytecode/StructureStubInfo.cpp \
67     bytecode/ValueProfile.cpp \
68     bytecompiler/BytecodeGenerator.cpp \
69     bytecompiler/NodesCodegen.cpp \
70     heap/AllocationSpace.cpp \
71     heap/ConservativeRoots.cpp \
72     heap/HandleHeap.cpp \
73     heap/HandleStack.cpp \
74     heap/Heap.cpp \
75     heap/JettisonedCodeBlocks.cpp \
76     heap/MachineStackMarker.cpp \
77     heap/MarkStack.cpp \
78     heap/MarkedBlock.cpp \
79     heap/MarkedSpace.cpp \
80     heap/VTableSpectrum.cpp \
81     heap/WriteBarrierSupport.cpp \
82     debugger/DebuggerActivation.cpp \
83     debugger/DebuggerCallFrame.cpp \
84     debugger/Debugger.cpp \
85     dfg/DFGAbstractState.cpp \
86     dfg/DFGAssemblyHelpers.cpp \
87     dfg/DFGByteCodeParser.cpp \
88     dfg/DFGCapabilities.cpp \
89     dfg/DFGCorrectableJumpPoint.cpp \
90     dfg/DFGDriver.cpp \
91     dfg/DFGGraph.cpp \
92     dfg/DFGJITCodeGenerator.cpp \
93     dfg/DFGJITCodeGenerator32_64.cpp \
94     dfg/DFGJITCodeGenerator64.cpp \
95     dfg/DFGJITCompiler.cpp \
96     dfg/DFGOperations.cpp \
97     dfg/DFGOSREntry.cpp \
98     dfg/DFGOSRExit.cpp \
99     dfg/DFGOSRExitCompiler.cpp \
100     dfg/DFGOSRExitCompiler64.cpp \
101     dfg/DFGOSRExitCompiler32_64.cpp \
102     dfg/DFGPropagator.cpp \
103     dfg/DFGRepatch.cpp \
104     dfg/DFGSpeculativeJIT.cpp \
105     dfg/DFGSpeculativeJIT32_64.cpp \
106     dfg/DFGSpeculativeJIT64.cpp \
107     dfg/DFGThunks.cpp \
108     interpreter/CallFrame.cpp \
109     interpreter/Interpreter.cpp \
110     interpreter/RegisterFile.cpp \
111     jit/ExecutableAllocatorFixedVMPool.cpp \
112     jit/ExecutableAllocator.cpp \
113     jit/JITArithmetic.cpp \
114     jit/JITArithmetic32_64.cpp \
115     jit/JITCall.cpp \
116     jit/JITCall32_64.cpp \
117     jit/JIT.cpp \
118     jit/JITOpcodes.cpp \
119     jit/JITOpcodes32_64.cpp \
120     jit/JITPropertyAccess.cpp \
121     jit/JITPropertyAccess32_64.cpp \
122     jit/JITStubs.cpp \
123     jit/ThunkGenerators.cpp \
124     parser/Lexer.cpp \
125     parser/Nodes.cpp \
126     parser/ParserArena.cpp \
127     parser/Parser.cpp \
128     parser/SourceProviderCache.cpp \
129     profiler/Profile.cpp \
130     profiler/ProfileGenerator.cpp \
131     profiler/ProfileNode.cpp \
132     profiler/Profiler.cpp \
133     runtime/ArgList.cpp \
134     runtime/Arguments.cpp \
135     runtime/ArrayConstructor.cpp \
136     runtime/ArrayPrototype.cpp \
137     runtime/BooleanConstructor.cpp \
138     runtime/BooleanObject.cpp \
139     runtime/BooleanPrototype.cpp \
140     runtime/CallData.cpp \
141     runtime/CommonIdentifiers.cpp \
142     runtime/Completion.cpp \
143     runtime/ConstructData.cpp \
144     runtime/DateConstructor.cpp \
145     runtime/DateConversion.cpp \
146     runtime/DateInstance.cpp \
147     runtime/DatePrototype.cpp \
148     runtime/ErrorConstructor.cpp \
149     runtime/Error.cpp \
150     runtime/ErrorInstance.cpp \
151     runtime/ErrorPrototype.cpp \
152     runtime/ExceptionHelpers.cpp \
153     runtime/Executable.cpp \
154     runtime/FunctionConstructor.cpp \
155     runtime/FunctionPrototype.cpp \
156     runtime/GCActivityCallback.cpp \
157     runtime/GetterSetter.cpp \
158     runtime/Heuristics.cpp \
159     runtime/Identifier.cpp \
160     runtime/InitializeThreading.cpp \
161     runtime/InternalFunction.cpp \
162     runtime/JSActivation.cpp \
163     runtime/JSAPIValueWrapper.cpp \
164     runtime/JSArray.cpp \
165     runtime/JSByteArray.cpp \
166     runtime/JSCell.cpp \
167     runtime/JSDateMath.cpp \
168     runtime/JSFunction.cpp \
169     runtime/JSBoundFunction.cpp \
170     runtime/JSGlobalData.cpp \
171     runtime/JSGlobalObject.cpp \
172     runtime/JSGlobalObjectFunctions.cpp \
173     runtime/JSGlobalThis.cpp \
174     runtime/JSLock.cpp \
175     runtime/JSNotAnObject.cpp \
176     runtime/JSObject.cpp \
177     runtime/JSONObject.cpp \
178     runtime/JSPropertyNameIterator.cpp \
179     runtime/JSStaticScopeObject.cpp \
180     runtime/JSString.cpp \
181     runtime/JSValue.cpp \
182     runtime/JSVariableObject.cpp \
183     runtime/JSWrapperObject.cpp \
184     runtime/LiteralParser.cpp \
185     runtime/Lookup.cpp \
186     runtime/MathObject.cpp \
187     runtime/NativeErrorConstructor.cpp \
188     runtime/NativeErrorPrototype.cpp \
189     runtime/NumberConstructor.cpp \
190     runtime/NumberObject.cpp \
191     runtime/NumberPrototype.cpp \
192     runtime/ObjectConstructor.cpp \
193     runtime/ObjectPrototype.cpp \
194     runtime/Operations.cpp \
195     runtime/PropertyDescriptor.cpp \
196     runtime/PropertyNameArray.cpp \
197     runtime/PropertySlot.cpp \
198     runtime/RegExpConstructor.cpp \
199     runtime/RegExp.cpp \
200     runtime/RegExpObject.cpp \
201     runtime/RegExpPrototype.cpp \
202     runtime/RegExpCache.cpp \
203     runtime/SamplingCounter.cpp \
204     runtime/ScopeChain.cpp \
205     runtime/SmallStrings.cpp \
206     runtime/StrictEvalActivation.cpp \
207     runtime/StringConstructor.cpp \
208     runtime/StringObject.cpp \
209     runtime/StringPrototype.cpp \
210     runtime/StringRecursionChecker.cpp \
211     runtime/StructureChain.cpp \
212     runtime/Structure.cpp \
213     runtime/TimeoutChecker.cpp \
214     runtime/UString.cpp \
215     yarr/YarrJIT.cpp \
216
217 *sh4* {
218     QMAKE_CXXFLAGS += -mieee -w
219     QMAKE_CFLAGS   += -mieee -w
220 }
221
222 lessThan(QT_GCC_MAJOR_VERSION, 5) {
223     # GCC 4.5 and before
224     lessThan(QT_GCC_MINOR_VERSION, 6) {
225         # Disable C++0x mode in JSC for those who enabled it in their Qt's mkspec.
226         *-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x
227     }
228
229     # GCC 4.6 and after.
230     greaterThan(QT_GCC_MINOR_VERSION, 5) {
231         if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {
232             # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr).
233             QMAKE_CFLAGS_WARN_ON += -Wno-c++0x-compat
234             QMAKE_CXXFLAGS_WARN_ON += -Wno-c++0x-compat
235             QMAKE_CFLAGS += -Wno-c++0x-compat
236             QMAKE_CXXFLAGS += -Wno-c++0x-compat
237         }
238     }
239 }