GNUmakefile.am 6.54 KB
Newer Older
1
javascriptcore_cppflags += \
2
	-I$(srcdir)/JavaScriptCore/ForwardingHeaders \
3
	-I$(srcdir)/JavaScriptCore/VM \
4 5
	-I$(srcdir)/JavaScriptCore/profiler \
	-I$(srcdir)/JavaScriptCore/wtf/unicode \
6
	-I$(top_builddir)/JavaScriptCore/pcre \
7
	-I$(top_builddir)/JavaScriptCore/kjs
8 9

javascriptcore_h_api += \
10
	JavaScriptCore/API/JavaScript.h \
11 12 13 14 15 16 17 18 19 20
	JavaScriptCore/API/JavaScriptCore.h \
	JavaScriptCore/API/JSBase.h \
	JavaScriptCore/API/JSContextRef.h \
	JavaScriptCore/API/JSObjectRef.h \
	JavaScriptCore/API/JSStringRefBSTR.h \
	JavaScriptCore/API/JSStringRefCF.h \
	JavaScriptCore/API/JSStringRef.h \
	JavaScriptCore/API/JSValueRef.h

javascriptcore_built_nosources += \
darin@apple.com's avatar
darin@apple.com committed
21
	JavaScriptCore/kjs/ArrayPrototype.lut.h \
22
	JavaScriptCore/kjs/date_object.lut.h \
darin@apple.com's avatar
darin@apple.com committed
23 24 25
	JavaScriptCore/kjs/MathObject.lut.h \
	JavaScriptCore/kjs/NumberObject.lut.h \
	JavaScriptCore/kjs/RegExpObject.lut.h \
26 27 28 29 30 31 32 33 34 35 36 37 38 39
	JavaScriptCore/kjs/string_object.lut.h \
	JavaScriptCore/pcre/chartables.c \
	DerivedSources/lexer.lut.h

javascriptcore_sources += \
	JavaScriptCore/API/JSBase.cpp \
	JavaScriptCore/API/JSCallbackConstructor.cpp \
	JavaScriptCore/API/JSCallbackFunction.cpp \
	JavaScriptCore/API/JSCallbackObject.cpp \
	JavaScriptCore/API/JSClassRef.cpp \
	JavaScriptCore/API/JSContextRef.cpp \
	JavaScriptCore/API/JSObjectRef.cpp \
	JavaScriptCore/API/JSStringRef.cpp \
	JavaScriptCore/API/JSValueRef.cpp \
40 41
	JavaScriptCore/kjs/DebuggerCallFrame.cpp \
	JavaScriptCore/kjs/ExecState.cpp \
ap@webkit.org's avatar
ap@webkit.org committed
42
	JavaScriptCore/kjs/InitializeThreading.cpp \
43
	JavaScriptCore/kjs/JSGlobalData.cpp \
44
	JavaScriptCore/kjs/JSVariableObject.cpp \
45 46 47 48 49 50 51 52 53 54 55
	JavaScriptCore/kjs/JSActivation.cpp \
	JavaScriptCore/kjs/JSNotAnObject.cpp \
	JavaScriptCore/VM/CodeBlock.cpp \
	JavaScriptCore/VM/ExceptionHelpers.cpp \
	JavaScriptCore/VM/Instruction.cpp \
	JavaScriptCore/VM/JSPropertyNameIterator.cpp \
	JavaScriptCore/VM/LabelID.cpp \
	JavaScriptCore/VM/Machine.cpp \
	JavaScriptCore/VM/Opcode.cpp \
	JavaScriptCore/VM/Register.cpp \
	JavaScriptCore/VM/RegisterID.cpp \
56 57 58 59 60
	JavaScriptCore/pcre/pcre_compile.cpp \
	JavaScriptCore/pcre/pcre_exec.cpp \
	JavaScriptCore/pcre/pcre_tables.cpp \
	JavaScriptCore/pcre/pcre_ucp_searchfuncs.cpp \
	JavaScriptCore/pcre/pcre_xclass.cpp \
kmccullough@apple.com's avatar
kmccullough@apple.com committed
61
	JavaScriptCore/profiler/ProfileNode.cpp \
rwlbuis@webkit.org's avatar
rwlbuis@webkit.org committed
62
	JavaScriptCore/profiler/Profile.cpp \
63
	JavaScriptCore/profiler/Profiler.cpp \
64 65
	JavaScriptCore/wtf/Assertions.cpp \
	JavaScriptCore/wtf/HashTable.cpp \
66
	JavaScriptCore/wtf/MainThread.cpp \
67
	JavaScriptCore/wtf/ThreadingGtk.cpp \
68
	JavaScriptCore/wtf/gtk/MainThreadGtk.cpp \
ap@webkit.org's avatar
ap@webkit.org committed
69 70
	JavaScriptCore/wtf/unicode/CollatorDefault.cpp \
	JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp \
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
	JavaScriptCore/wtf/unicode/UTF8.cpp

# Debug build
if ENABLE_DEBUG
javascriptcore_built_sources += \
	DerivedSources/grammar.h \
	DerivedSources/grammar.cpp

javascriptcore_sources += \
	JavaScriptCore/kjs/CommonIdentifiers.cpp \
	JavaScriptCore/kjs/DateMath.cpp \
	JavaScriptCore/kjs/JSImmediate.cpp \
	JavaScriptCore/kjs/JSLock.cpp \
	JavaScriptCore/kjs/JSWrapperObject.cpp \
	JavaScriptCore/kjs/Parser.cpp \
	JavaScriptCore/kjs/PropertyNameArray.cpp \
darin@apple.com's avatar
darin@apple.com committed
87
	JavaScriptCore/kjs/JSArray.cpp \
88
	JavaScriptCore/kjs/ArrayConstructor.cpp \
darin@apple.com's avatar
darin@apple.com committed
89
	JavaScriptCore/kjs/ArrayPrototype.cpp \
90
	JavaScriptCore/kjs/BooleanConstructor.cpp \
darin@apple.com's avatar
darin@apple.com committed
91
	JavaScriptCore/kjs/BooleanObject.cpp \
92
	JavaScriptCore/kjs/BooleanPrototype.cpp \
93 94 95 96 97
	JavaScriptCore/kjs/collector.cpp \
	JavaScriptCore/kjs/date_object.cpp \
	JavaScriptCore/kjs/debugger.cpp \
	JavaScriptCore/kjs/dtoa.cpp \
	JavaScriptCore/kjs/error_object.cpp \
darin@apple.com's avatar
darin@apple.com committed
98
	JavaScriptCore/kjs/JSFunction.cpp \
darin@apple.com's avatar
darin@apple.com committed
99
	JavaScriptCore/kjs/FunctionPrototype.cpp \
100 101 102 103 104 105
	JavaScriptCore/kjs/identifier.cpp \
	JavaScriptCore/kjs/internal.cpp \
	JavaScriptCore/kjs/interpreter.cpp \
	JavaScriptCore/kjs/lexer.cpp \
	JavaScriptCore/kjs/list.cpp \
	JavaScriptCore/kjs/lookup.cpp \
darin@apple.com's avatar
darin@apple.com committed
106
	JavaScriptCore/kjs/MathObject.cpp \
107 108
	JavaScriptCore/kjs/nodes.cpp \
	JavaScriptCore/kjs/nodes2string.cpp \
darin@apple.com's avatar
darin@apple.com committed
109
	JavaScriptCore/kjs/NumberObject.cpp \
darin@apple.com's avatar
darin@apple.com committed
110
	JavaScriptCore/kjs/JSObject.cpp \
111
	JavaScriptCore/kjs/JSGlobalObject.cpp \
112 113
	JavaScriptCore/kjs/object_object.cpp \
	JavaScriptCore/kjs/operations.cpp \
darin@apple.com's avatar
darin@apple.com committed
114 115
	JavaScriptCore/kjs/PropertyMap.cpp \
	JavaScriptCore/kjs/PropertySlot.cpp \
116
	JavaScriptCore/kjs/regexp.cpp \
darin@apple.com's avatar
darin@apple.com committed
117 118
	JavaScriptCore/kjs/RegExpObject.cpp \
	JavaScriptCore/kjs/ScopeChain.cpp \
119 120
	JavaScriptCore/kjs/string_object.cpp \
	JavaScriptCore/kjs/ustring.cpp \
darin@apple.com's avatar
darin@apple.com committed
121
	JavaScriptCore/kjs/JSValue.cpp \
122
	JavaScriptCore/wtf/FastMalloc.cpp \
123 124 125
	JavaScriptCore/wtf/TCSystemAlloc.cpp \
	JavaScriptCore/VM/CodeGenerator.cpp \
	JavaScriptCore/VM/RegisterFile.cpp
126

127
else
128 129 130 131 132
javascriptcore_built_nosources += \
	DerivedSources/grammar.h \
	DerivedSources/grammar.cpp

javascriptcore_sources += \
133
	JavaScriptCore/kjs/AllInOneFile.cpp
134 135
endif # END ENABLE_DEBUG

136
DerivedSources/grammar.h: DerivedSources/grammar.cpp;
137

138
DerivedSources/grammar.cpp: $(srcdir)/JavaScriptCore/kjs/grammar.y
139 140 141
	$(BISON) -d -p kjsyy $(srcdir)/JavaScriptCore/kjs/grammar.y -o $@ > bison_out.txt 2>&1
	$(PERL) -p -e 'END { if ($$conflict) { unlink "grammar.cpp"; die; } } $$conflict ||= /conflict/' < bison_out.txt
	cat $(GENSOURCES)/grammar.hpp > $(GENSOURCES)/grammar.h
142
	rm -f $(GENSOURCES)/grammar.hpp bison_out.txt
143 144 145 146

DerivedSources/lexer.lut.h: $(CREATE_HASH_TABLE) $(srcdir)/JavaScriptCore/kjs/keywords.table
	$(PERL) $^ > $@

147
%.lut.h: $(CREATE_HASH_TABLE) %.cpp
148 149
	$^ -i > $@

ddkilzer@apple.com's avatar
ddkilzer@apple.com committed
150 151
JavaScriptCore/pcre/chartables.c: $(srcdir)/JavaScriptCore/pcre/dftables
	$^ $@
152

153
bin_PROGRAMS += \
mjs@apple.com's avatar
mjs@apple.com committed
154
	Programs/jsc
155

156 157 158
noinst_PROGRAMS += \
	Programs/minidom

159 160 161 162 163 164 165
# minidom
Programs_minidom_SOURCES = \
	JavaScriptCore/API/JSNode.c \
	JavaScriptCore/API/JSNodeList.c \
	JavaScriptCore/API/Node.c \
	JavaScriptCore/API/NodeList.c \
	JavaScriptCore/API/minidom.c
166 167 168 169 170

Programs_minidom_CPPFLAGS = \
	$(global_cppflags) \
	$(javascriptcore_cppflags)

darin@apple.com's avatar
.:  
darin@apple.com committed
171
Programs_minidom_CFLAGS = \
172 173
	-fno-strict-aliasing \
	-O2 \
174 175
	$(global_cflags) \
	$(GLOBALDEPS_CFLAGS)
176

darin@apple.com's avatar
.:  
darin@apple.com committed
177
Programs_minidom_CXXFLAGS = \
178 179
	-fno-strict-aliasing \
	-O2 \
180 181 182
	$(global_cxxflags) \
	$(global_cflags) \
	$(GLOBALDEPS_CFLAGS)
183

darin@apple.com's avatar
.:  
darin@apple.com committed
184
Programs_minidom_LDADD = \
185
	 libJavaScriptCore.la \
186
	 -lstdc++
187

mjs@apple.com's avatar
mjs@apple.com committed
188 189
# jsc
Programs_jsc_SOURCES = JavaScriptCore/kjs/Shell.cpp
190

mjs@apple.com's avatar
mjs@apple.com committed
191
Programs_jsc_CPPFLAGS = \
192 193
	$(global_cppflags) \
	$(javascriptcore_cppflags)
194

mjs@apple.com's avatar
mjs@apple.com committed
195
Programs_jsc_CXXFLAGS = \
196 197
	-fno-strict-aliasing \
	-O2 \
198 199
	$(global_cxxflags) \
	$(global_cflags) \
200 201
	$(GLOBALDEPS_CFLAGS) \
	$(UNICODE_CFLAGS)
202

mjs@apple.com's avatar
mjs@apple.com committed
203
Programs_jsc_LDADD = \
204
	libJavaScriptCore.la
205 206 207

# Clean rules for JavaScriptCore
CLEANFILES += \
darin@apple.com's avatar
darin@apple.com committed
208
	JavaScriptCore/kjs/ArrayPrototype.lut.h \
209
	JavaScriptCore/kjs/date_object.lut.h \
darin@apple.com's avatar
darin@apple.com committed
210 211 212
	JavaScriptCore/kjs/MathObject.lut.h \
	JavaScriptCore/kjs/NumberObject.lut.h \
	JavaScriptCore/kjs/RegExpObject.lut.h \
213
	JavaScriptCore/kjs/string_object.lut.h \
214
	JavaScriptCore/pcre/chartables.c \
mjs@apple.com's avatar
mjs@apple.com committed
215
	Programs/jsc \
216
	Programs/minidom