ea4fadfe06707782aac20787414d4f438f98d136
[WebKit-https.git] / JavaScriptCore / JavaScriptCore.pri
1 # JavaScriptCore - Qt4 build info
2 VPATH += $$PWD
3
4 INCLUDEPATH += tmp
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__
11
12 win32-msvc*: INCLUDEPATH += $$PWD/os-win32
13
14 include(pcre/pcre.pri)
15
16 LUT_FILES += \
17     kjs/date_object.cpp \
18     kjs/number_object.cpp \
19     kjs/string_object.cpp \
20     kjs/array_object.cpp \
21     kjs/math_object.cpp \
22     kjs/regexp_object.cpp
23
24 KEYWORDLUT_FILES += \
25     kjs/keywords.table
26
27 KJSBISON += \
28     kjs/grammar.y
29
30 gtk-port: SOURCES += wtf/TCSystemAlloc.cpp
31
32 SOURCES += \
33     wtf/Assertions.cpp \
34     wtf/HashTable.cpp \
35     wtf/FastMalloc.cpp \
36     wtf/unicode/UTF8.cpp \
37     bindings/NP_jsobject.cpp \
38     bindings/npruntime.cpp \
39     bindings/runtime_array.cpp \
40     bindings/runtime.cpp \
41     bindings/runtime_method.cpp \
42     bindings/runtime_object.cpp \
43     bindings/runtime_root.cpp \
44     bindings/c/c_class.cpp \
45     bindings/c/c_instance.cpp \
46     bindings/c/c_runtime.cpp \
47     bindings/c/c_utility.cpp \
48     API/JSBase.cpp \
49     API/JSCallbackConstructor.cpp \
50     API/JSCallbackFunction.cpp \
51     API/JSCallbackObject.cpp \
52     API/JSClassRef.cpp \
53     API/JSContextRef.cpp \
54     API/JSObjectRef.cpp \
55     API/JSStringRef.cpp \
56     API/JSValueRef.cpp \
57     kjs/DateMath.cpp \
58     kjs/JSWrapperObject.cpp \
59     kjs/PropertyNameArray.cpp \
60     kjs/array_instance.cpp \
61     kjs/array_object.cpp \
62     kjs/bool_object.cpp \
63     kjs/collector.cpp \
64     kjs/CommonIdentifiers.cpp \
65     kjs/date_object.cpp \
66     kjs/debugger.cpp \
67     kjs/dtoa.cpp \
68     kjs/error_object.cpp \
69     kjs/ExecState.cpp \
70     kjs/fpconst.cpp \
71     kjs/function.cpp \
72     kjs/function_object.cpp \
73     kjs/identifier.cpp \
74     kjs/internal.cpp \
75     kjs/interpreter.cpp \
76     kjs/JSImmediate.cpp \
77     kjs/JSLock.cpp \
78     kjs/lexer.cpp \
79     kjs/list.cpp \
80     kjs/lookup.cpp \
81     kjs/math_object.cpp \
82     kjs/nodes.cpp \
83     kjs/nodes2string.cpp \
84     kjs/number_object.cpp \
85     kjs/object.cpp \
86     kjs/object_object.cpp \
87     kjs/operations.cpp \
88     kjs/Parser.cpp \
89     kjs/property_map.cpp \
90     kjs/property_slot.cpp \
91     kjs/regexp.cpp \
92     kjs/regexp_object.cpp \
93     kjs/scope_chain.cpp \
94     kjs/string_object.cpp \
95     kjs/ustring.cpp \
96     kjs/value.cpp
97
98 qt-port:SOURCES += \
99     bindings/qt/qt_class.cpp \
100     bindings/qt/qt_instance.cpp \
101     bindings/qt/qt_runtime.cpp
102
103 !CONFIG(QTDIR_build) {
104     defineTest(addExtraCompiler) {
105         QMAKE_EXTRA_COMPILERS += $$1
106         generated_files.depends += compiler_$${1}_make_all
107         export(QMAKE_EXTRA_COMPILERS)
108         export(generated_files.depends)
109         return(true)
110     }
111 }
112
113 # GENERATOR 1-A: LUT creator
114 lut.output = tmp/${QMAKE_FILE_BASE}.lut.h
115 lut.commands = perl $$PWD/kjs/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
116 lut.depend = ${QMAKE_FILE_NAME}
117 lut.input = LUT_FILES
118 lut.CONFIG += no_link
119 addExtraCompiler(lut)
120
121 # GENERATOR 1-B: particular LUT creator (for 1 file only)
122 keywordlut.output = tmp/lexer.lut.h
123 keywordlut.commands = perl $$PWD/kjs/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
124 keywordlut.depend = ${QMAKE_FILE_NAME}
125 keywordlut.input = KEYWORDLUT_FILES
126 keywordlut.CONFIG += no_link
127 addExtraCompiler(keywordlut)
128
129 # GENERATOR 2: bison grammar
130 kjsbison.output = tmp/${QMAKE_FILE_BASE}.cpp
131 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 tmp/${QMAKE_FILE_BASE}.h
132 kjsbison.depend = ${QMAKE_FILE_NAME}
133 kjsbison.input = KJSBISON
134 kjsbison.variable_out = GENERATED_SOURCES
135 kjsbison.dependency_type = TYPE_C
136 kjsbison.CONFIG = target_predeps
137 kjsbison.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}${QMAKE_FILE_BASE}.h
138 addExtraCompiler(kjsbison)