1 # JavaScriptCore - Qt4 build info
5 INCLUDEPATH += $$PWD $$PWD/kjs $$PWD/bindings $$PWD/bindings/c $$PWD/wtf
6 DEPENDPATH += $$PWD $$PWD/kjs $$PWD/bindings $$PWD/bindings/c $$PWD/wtf
7 DEFINES -= KJS_IDENTIFIER_HIDE_GLOBALS
8 qt-port:INCLUDEPATH += $$PWD/bindings/qt
9 qt-port:DEFINES += BUILDING_QT__
10 gtk-port:DEFINES += BUILDING_GTK__
12 # http://bugs.webkit.org/show_bug.cgi?id=16406
13 # [Gtk] JavaScriptCore needs -lpthread
14 gtk-port:!win32-*:LIBS += -lpthread
16 win32-msvc*: INCLUDEPATH += $$PWD/os-win32
18 isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp
20 include(pcre/pcre.pri)
24 kjs/number_object.cpp \
25 kjs/string_object.cpp \
26 kjs/array_object.cpp \
39 wtf/unicode/UTF8.cpp \
40 bindings/NP_jsobject.cpp \
41 bindings/npruntime.cpp \
42 bindings/runtime_array.cpp \
43 bindings/runtime.cpp \
44 bindings/runtime_method.cpp \
45 bindings/runtime_object.cpp \
46 bindings/runtime_root.cpp \
47 bindings/c/c_class.cpp \
48 bindings/c/c_instance.cpp \
49 bindings/c/c_runtime.cpp \
50 bindings/c/c_utility.cpp \
52 API/JSCallbackConstructor.cpp \
53 API/JSCallbackFunction.cpp \
54 API/JSCallbackObject.cpp \
56 API/JSContextRef.cpp \
60 kjs/JSGlobalObject.cpp \
61 kjs/JSVariableObject.cpp
63 # AllInOneFile.cpp helps gcc analize and optimize code
64 # Other compilers may be able to do this at link time
65 gtk-port:CONFIG(release) {
72 kjs/array_instance.cpp \
73 kjs/array_object.cpp \
76 kjs/CommonIdentifiers.cpp \
80 kjs/error_object.cpp \
82 kjs/function_object.cpp \
88 kjs/JSWrapperObject.cpp \
94 kjs/nodes2string.cpp \
95 kjs/number_object.cpp \
97 kjs/object_object.cpp \
100 kjs/property_map.cpp \
101 kjs/property_slot.cpp \
102 kjs/PropertyNameArray.cpp \
104 kjs/regexp_object.cpp \
105 kjs/scope_chain.cpp \
106 kjs/string_object.cpp \
111 !qt-port:SOURCES += \
112 wtf/TCSystemAlloc.cpp
116 bindings/qt/qt_class.cpp \
117 bindings/qt/qt_instance.cpp \
118 bindings/qt/qt_runtime.cpp
120 !CONFIG(QTDIR_build) {
121 defineTest(addExtraCompiler) {
122 QMAKE_EXTRA_COMPILERS += $$1
123 generated_files.depends += compiler_$${1}_make_all
124 export(QMAKE_EXTRA_COMPILERS)
125 export(generated_files.depends)
130 # GENERATOR 1-A: LUT creator
131 lut.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.lut.h
132 lut.commands = perl $$PWD/kjs/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
133 lut.depend = ${QMAKE_FILE_NAME}
134 lut.input = LUT_FILES
135 lut.CONFIG += no_link
136 addExtraCompiler(lut)
138 # GENERATOR 1-B: particular LUT creator (for 1 file only)
139 keywordlut.output = $$GENERATED_SOURCES_DIR/lexer.lut.h
140 keywordlut.commands = perl $$PWD/kjs/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
141 keywordlut.depend = ${QMAKE_FILE_NAME}
142 keywordlut.input = KEYWORDLUT_FILES
143 keywordlut.CONFIG += no_link
144 addExtraCompiler(keywordlut)
146 # GENERATOR 2: bison grammar
147 kjsbison.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.cpp
148 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
149 kjsbison.depend = ${QMAKE_FILE_NAME}
150 kjsbison.input = KJSBISON
151 kjsbison.variable_out = GENERATED_SOURCES
152 kjsbison.dependency_type = TYPE_C
153 kjsbison.CONFIG = target_predeps
154 kjsbison.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR}${QMAKE_FILE_BASE}.h
155 addExtraCompiler(kjsbison)