QtScript/JSC on Symbian: Enhanced memory allocator for Collector heap
[qt:qt.git] / src / script / script.pro
1 TARGET     = QtScript
2 QPRO_PWD   = $$PWD
3 QT         = core
4 DEFINES   += JSC=QTJSC jscyyparse=qtjscyyparse jscyylex=qtjscyylex jscyyerror=qtjscyyerror WTF=QTWTF
5 DEFINES   += QT_BUILD_SCRIPT_LIB
6 DEFINES   += QT_NO_USING_NAMESPACE
7 DEFINES   += QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO
8 #win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000       ### FIXME
9
10 unix:QMAKE_PKGCONFIG_REQUIRES = QtCore
11
12 include(../qbase.pri)
13
14 CONFIG += building-libs
15
16 # FIXME: shared the statically built JavaScriptCore
17
18 # Fetch the base WebKit directory from the WEBKITDIR environment variable;
19 # fall back to src/3rdparty otherwise
20 WEBKITDIR = $$(WEBKITDIR)
21 isEmpty(WEBKITDIR) {
22     WEBKITDIR = $$PWD/../3rdparty/javascriptcore
23     GENERATED_SOURCES_DIR = generated
24 } else {
25     message(using external WebKit from $$WEBKITDIR)
26     CONFIG -= QTDIR_build
27 }
28 include($$WEBKITDIR/WebKit.pri)
29
30 # Disable a few warnings on Windows.
31 # These are in addition to the ones disabled in WebKit.pri
32 win32-msvc*: QMAKE_CXXFLAGS += -wd4396 -wd4099
33
34 # Windows CE-specific stuff copied from WebCore.pro
35 # ### Should rather be in JavaScriptCore.pri?
36 wince* {
37     INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/os-wince
38     INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/os-win32
39     LIBS += -lmmtimer
40 }
41
42 mac {
43     DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0
44     LIBS_PRIVATE += -framework AppKit
45 }
46
47 include($$WEBKITDIR/JavaScriptCore/JavaScriptCore.pri)
48
49 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore
50 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/parser
51 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/bytecompiler
52 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/debugger
53 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/runtime
54 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/wtf
55 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/unicode
56 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/interpreter
57 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/jit
58 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/profiler
59 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/wrec
60 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/API
61 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/bytecode
62 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/assembler
63 INCLUDEPATH += $$WEBKITDIR/JavaScriptCore/generated
64
65 # This line copied from WebCore.pro
66 DEFINES += WTF_USE_JAVASCRIPTCORE_BINDINGS=1 WTF_CHANGES=1
67
68 DEFINES += NDEBUG
69
70 solaris-g++:isEqual(QT_ARCH,sparc) {
71     CONFIG -= separate_debug_info
72     CONFIG += no_debug_info
73 }
74
75 # Avoid JSC C API functions being exported.
76 DEFINES += JS_NO_EXPORT
77
78 INCLUDEPATH += $$PWD
79
80 include(script.pri)
81
82 symbian {
83     TARGET.UID3=0x2001B2E1
84 }
85
86 symbian {
87     symbian-abld|symbian-sbsv2 {
88         MMP_RULES += ALWAYS_BUILD_AS_ARM
89     }  else {
90         QMAKE_CFLAGS -= --thumb
91         QMAKE_CXXFLAGS -= --thumb
92     }
93     QMAKE_CXXFLAGS.ARMCC += -OTime -O3
94 }
95
96 # WebKit doesn't compile in C++0x mode
97 *-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x