.:
[WebKit-https.git] / JavaScriptCore / GNUmakefile.am
1 # tell automake to create gensources/ for us
2 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
3         DerivedSources/dummy.cxx
4
5 javascriptcore_cppflags += \
6         -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
7         -I$(srcdir)/JavaScriptCore/bindings \
8         -I$(srcdir)/JavaScriptCore/bindings/c \
9         -I$(top_builddir)/JavaScriptCore/pcre \
10         -I$(top_builddir)/JavaScriptCore/kjs
11
12 javascriptcore_h_api += \
13         JavaScriptCore/API/JavaScript.h \
14         JavaScriptCore/API/JavaScriptCore.h \
15         JavaScriptCore/API/JSBase.h \
16         JavaScriptCore/API/JSContextRef.h \
17         JavaScriptCore/API/JSObjectRef.h \
18         JavaScriptCore/API/JSStringRefBSTR.h \
19         JavaScriptCore/API/JSStringRefCF.h \
20         JavaScriptCore/API/JSStringRef.h \
21         JavaScriptCore/API/JSValueRef.h
22
23 javascriptcore_built_nosources += \
24         JavaScriptCore/kjs/array_object.lut.h \
25         JavaScriptCore/kjs/date_object.lut.h \
26         JavaScriptCore/kjs/math_object.lut.h \
27         JavaScriptCore/kjs/number_object.lut.h \
28         JavaScriptCore/kjs/regexp_object.lut.h \
29         JavaScriptCore/kjs/string_object.lut.h \
30         JavaScriptCore/pcre/chartables.c \
31         DerivedSources/lexer.lut.h
32
33 javascriptcore_sources += \
34         JavaScriptCore/API/JSBase.cpp \
35         JavaScriptCore/API/JSCallbackConstructor.cpp \
36         JavaScriptCore/API/JSCallbackFunction.cpp \
37         JavaScriptCore/API/JSCallbackObject.cpp \
38         JavaScriptCore/API/JSClassRef.cpp \
39         JavaScriptCore/API/JSContextRef.cpp \
40         JavaScriptCore/API/JSObjectRef.cpp \
41         JavaScriptCore/API/JSStringRef.cpp \
42         JavaScriptCore/API/JSValueRef.cpp \
43         JavaScriptCore/bindings/NP_jsobject.cpp \
44         JavaScriptCore/bindings/c/c_class.cpp \
45         JavaScriptCore/bindings/c/c_instance.cpp \
46         JavaScriptCore/bindings/c/c_runtime.cpp \
47         JavaScriptCore/bindings/c/c_utility.cpp \
48         JavaScriptCore/bindings/npruntime.cpp \
49         JavaScriptCore/bindings/runtime.cpp \
50         JavaScriptCore/bindings/runtime_array.cpp \
51         JavaScriptCore/bindings/runtime_method.cpp \
52         JavaScriptCore/bindings/runtime_object.cpp \
53         JavaScriptCore/bindings/runtime_root.cpp \
54         JavaScriptCore/kjs/JSGlobalObject.cpp \
55         JavaScriptCore/kjs/JSVariableObject.cpp \
56         JavaScriptCore/pcre/pcre_compile.cpp \
57         JavaScriptCore/pcre/pcre_exec.cpp \
58         JavaScriptCore/pcre/pcre_tables.cpp \
59         JavaScriptCore/pcre/pcre_ucp_searchfuncs.cpp \
60         JavaScriptCore/pcre/pcre_xclass.cpp \
61         JavaScriptCore/wtf/Assertions.cpp \
62         JavaScriptCore/wtf/HashTable.cpp \
63         JavaScriptCore/wtf/ThreadingGtk.cpp \
64         JavaScriptCore/wtf/unicode/UTF8.cpp
65
66 # Debug build
67 if ENABLE_DEBUG
68 javascriptcore_built_sources += \
69         DerivedSources/grammar.h \
70         DerivedSources/grammar.cpp
71
72 javascriptcore_sources += \
73         JavaScriptCore/kjs/CommonIdentifiers.cpp \
74         JavaScriptCore/kjs/DateMath.cpp \
75         JavaScriptCore/kjs/ExecState.cpp \
76         JavaScriptCore/kjs/JSImmediate.cpp \
77         JavaScriptCore/kjs/JSLock.cpp \
78         JavaScriptCore/kjs/JSWrapperObject.cpp \
79         JavaScriptCore/kjs/Parser.cpp \
80         JavaScriptCore/kjs/PropertyNameArray.cpp \
81         JavaScriptCore/kjs/array_instance.cpp \
82         JavaScriptCore/kjs/array_object.cpp \
83         JavaScriptCore/kjs/bool_object.cpp \
84         JavaScriptCore/kjs/collector.cpp \
85         JavaScriptCore/kjs/date_object.cpp \
86         JavaScriptCore/kjs/debugger.cpp \
87         JavaScriptCore/kjs/dtoa.cpp \
88         JavaScriptCore/kjs/error_object.cpp \
89         JavaScriptCore/kjs/function.cpp \
90         JavaScriptCore/kjs/function_object.cpp \
91         JavaScriptCore/kjs/identifier.cpp \
92         JavaScriptCore/kjs/internal.cpp \
93         JavaScriptCore/kjs/interpreter.cpp \
94         JavaScriptCore/kjs/lexer.cpp \
95         JavaScriptCore/kjs/list.cpp \
96         JavaScriptCore/kjs/lookup.cpp \
97         JavaScriptCore/kjs/math_object.cpp \
98         JavaScriptCore/kjs/nodes.cpp \
99         JavaScriptCore/kjs/nodes2string.cpp \
100         JavaScriptCore/kjs/number_object.cpp \
101         JavaScriptCore/kjs/object.cpp \
102         JavaScriptCore/kjs/object_object.cpp \
103         JavaScriptCore/kjs/operations.cpp \
104         JavaScriptCore/kjs/property_map.cpp \
105         JavaScriptCore/kjs/property_slot.cpp \
106         JavaScriptCore/kjs/regexp.cpp \
107         JavaScriptCore/kjs/regexp_object.cpp \
108         JavaScriptCore/kjs/scope_chain.cpp \
109         JavaScriptCore/kjs/string_object.cpp \
110         JavaScriptCore/kjs/ustring.cpp \
111         JavaScriptCore/kjs/value.cpp \
112         JavaScriptCore/wtf/FastMalloc.cpp \
113         JavaScriptCore/wtf/TCSystemAlloc.cpp
114
115 else
116 javascriptcore_built_nosources += \
117         DerivedSources/grammar.h \
118         DerivedSources/grammar.cpp
119
120 javascriptcore_sources += \
121         JavaScriptCore/kjs/AllInOneFile.cpp
122 endif # END ENABLE_DEBUG
123
124 DerivedSources/grammar.h: DerivedSources/grammar.cpp;
125
126 DerivedSources/grammar.cpp: $(srcdir)/JavaScriptCore/kjs/grammar.y
127         $(BISON) -d -p kjsyy $(srcdir)/JavaScriptCore/kjs/grammar.y -o $@ > bison_out.txt 2>&1
128         $(PERL) -p -e 'END { if ($$conflict) { unlink "grammar.cpp"; die; } } $$conflict ||= /conflict/' < bison_out.txt
129         cat $(GENSOURCES)/grammar.hpp > $(GENSOURCES)/grammar.h
130         rm -f $(GENSOURCES)/grammar.hpp bison_out.txt
131
132 DerivedSources/lexer.lut.h: $(CREATE_HASH_TABLE) $(srcdir)/JavaScriptCore/kjs/keywords.table
133         $(PERL) $^ > $@
134
135 %_object.lut.h: $(CREATE_HASH_TABLE) %_object.cpp
136         $^ -i > $@
137
138 JavaScriptCore/pcre/chartables.c: $(srcdir)/JavaScriptCore/pcre/dftables
139         $^ $@
140
141 noinst_PROGRAMS += \
142         Programs/minidom \
143         Programs/testkjs
144
145 # minidom
146 Programs_minidom_SOURCES = \
147         JavaScriptCore/API/JSNode.c \
148         JavaScriptCore/API/JSNodeList.c \
149         JavaScriptCore/API/Node.c \
150         JavaScriptCore/API/NodeList.c \
151         JavaScriptCore/API/minidom.c
152 Programs_minidom_CPPFLAGS = $(global_cppflags)
153 Programs_minidom_CFLAGS = \
154         $(global_cflags) \
155         $(GLOBALDEPS_CFLAGS)
156 Programs_minidom_CXXFLAGS = \
157         $(global_cxxflags) \
158         $(global_cflags) \
159         $(GLOBALDEPS_CFLAGS)
160 Programs_minidom_LDADD = \
161          libJavaScriptCore.la \
162         $(GLOBALDEPS_LIBS) \
163         $(ICU_LIBS)
164 Programs_minidom_LDFLAGS = -rpath $(CURDIR)/.libs
165
166 # testkjs
167 Programs_testkjs_SOURCES = JavaScriptCore/kjs/testkjs.cpp
168 Programs_testkjs_CPPFLAGS = $(global_cppflags)
169 Programs_testkjs_CXXFLAGS = \
170         $(global_cxxflags) \
171         $(global_cflags) \
172         $(GLOBALDEPS_CFLAGS)
173 Programs_testkjs_LDADD = \
174         libJavaScriptCore.la \
175         $(GLOBALDEPS_LIBS) \
176         $(ICU_LIBS)
177 Programs_testkjs_LDFLAGS = -rpath $(CURDIR)/.libs
178
179 # Clean rules for JavaScriptCore
180 CLEANFILES += \
181         JavaScriptCore/kjs/array_object.lut.h \
182         JavaScriptCore/kjs/date_object.lut.h \
183         JavaScriptCore/kjs/math_object.lut.h \
184         JavaScriptCore/kjs/number_object.lut.h \
185         JavaScriptCore/kjs/regexp_object.lut.h \
186         JavaScriptCore/kjs/string_object.lut.h \
187         JavaScriptCore/pcre/chartables.c