2008-01-12 Alp Toker <alp@atoker.com>
[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/unicode/UTF8.cpp
64
65 # Debug build
66 if ENABLE_DEBUG
67 javascriptcore_built_sources += \
68         DerivedSources/grammar.h \
69         DerivedSources/grammar.cpp
70
71 javascriptcore_sources += \
72         JavaScriptCore/kjs/CommonIdentifiers.cpp \
73         JavaScriptCore/kjs/DateMath.cpp \
74         JavaScriptCore/kjs/ExecState.cpp \
75         JavaScriptCore/kjs/JSImmediate.cpp \
76         JavaScriptCore/kjs/JSLock.cpp \
77         JavaScriptCore/kjs/JSWrapperObject.cpp \
78         JavaScriptCore/kjs/Parser.cpp \
79         JavaScriptCore/kjs/PropertyNameArray.cpp \
80         JavaScriptCore/kjs/array_instance.cpp \
81         JavaScriptCore/kjs/array_object.cpp \
82         JavaScriptCore/kjs/bool_object.cpp \
83         JavaScriptCore/kjs/collector.cpp \
84         JavaScriptCore/kjs/date_object.cpp \
85         JavaScriptCore/kjs/debugger.cpp \
86         JavaScriptCore/kjs/dtoa.cpp \
87         JavaScriptCore/kjs/error_object.cpp \
88         JavaScriptCore/kjs/function.cpp \
89         JavaScriptCore/kjs/function_object.cpp \
90         JavaScriptCore/kjs/identifier.cpp \
91         JavaScriptCore/kjs/internal.cpp \
92         JavaScriptCore/kjs/interpreter.cpp \
93         JavaScriptCore/kjs/lexer.cpp \
94         JavaScriptCore/kjs/list.cpp \
95         JavaScriptCore/kjs/lookup.cpp \
96         JavaScriptCore/kjs/math_object.cpp \
97         JavaScriptCore/kjs/nodes.cpp \
98         JavaScriptCore/kjs/nodes2string.cpp \
99         JavaScriptCore/kjs/number_object.cpp \
100         JavaScriptCore/kjs/object.cpp \
101         JavaScriptCore/kjs/object_object.cpp \
102         JavaScriptCore/kjs/operations.cpp \
103         JavaScriptCore/kjs/property_map.cpp \
104         JavaScriptCore/kjs/property_slot.cpp \
105         JavaScriptCore/kjs/regexp.cpp \
106         JavaScriptCore/kjs/regexp_object.cpp \
107         JavaScriptCore/kjs/scope_chain.cpp \
108         JavaScriptCore/kjs/string_object.cpp \
109         JavaScriptCore/kjs/ustring.cpp \
110         JavaScriptCore/kjs/value.cpp \
111         JavaScriptCore/wtf/FastMalloc.cpp \
112         JavaScriptCore/wtf/TCSystemAlloc.cpp
113
114 else 
115 javascriptcore_built_nosources += \
116         DerivedSources/grammar.h \
117         DerivedSources/grammar.cpp
118
119 javascriptcore_sources += \
120         JavaScriptCore/kjs/AllInOneFile.cpp 
121 endif # END ENABLE_DEBUG
122
123 DerivedSources/grammar.h: DerivedSources/grammar.cpp;
124
125 DerivedSources/grammar.cpp: $(srcdir)/JavaScriptCore/kjs/grammar.y
126         $(BISON) -d -p kjsyy $(srcdir)/JavaScriptCore/kjs/grammar.y -o $@ > bison_out.txt 2>&1
127         $(PERL) -p -e 'END { if ($$conflict) { unlink "grammar.cpp"; die; } } $$conflict ||= /conflict/' < bison_out.txt
128         cat $(GENSOURCES)/grammar.hpp > $(GENSOURCES)/grammar.h
129         rm -f $(GENSOURCES)/grammar.hpp bison_out.txt
130
131 DerivedSources/lexer.lut.h: $(CREATE_HASH_TABLE) $(srcdir)/JavaScriptCore/kjs/keywords.table
132         $(PERL) $^ > $@
133
134 %_object.lut.h: $(CREATE_HASH_TABLE) %_object.cpp
135         $^ -i > $@
136
137 JavaScriptCore/pcre/chartables.c: $(srcdir)/JavaScriptCore/pcre/dftables
138         $^ $@
139
140 noinst_PROGRAMS += \
141         Programs/minidom \
142         Programs/testkjs
143
144 # minidom
145 Programs_minidom_SOURCES = \
146         JavaScriptCore/API/JSNode.c \
147         JavaScriptCore/API/JSNodeList.c \
148         JavaScriptCore/API/Node.c \
149         JavaScriptCore/API/NodeList.c \
150         JavaScriptCore/API/minidom.c
151 Programs_minidom_CPPFLAGS = $(global_cppflags)
152 Programs_minidom_CXXFLAGS = $(global_cflags) $(ICU_CFLAGS)
153 Programs_minidom_LDADD = $(ICU_LIBS) libJavaScriptCore.la
154 Programs_minidom_LDFLAGS = -rpath $(CURDIR)/.libs
155
156 # testkjs
157 Programs_testkjs_SOURCES = JavaScriptCore/kjs/testkjs.cpp
158 Programs_testkjs_CPPFLAGS = $(global_cppflags)
159 Programs_testkjs_CXXFLAGS = $(global_cflags) $(ICU_CFLAGS)
160 Programs_testkjs_LDADD = $(ICU_LIBS) libJavaScriptCore.la
161 Programs_testkjs_LDFLAGS = -rpath $(CURDIR)/.libs
162
163 # Clean rules for JavaScriptCore
164 CLEANFILES += \
165         JavaScriptCore/kjs/array_object.lut.h \
166         JavaScriptCore/kjs/date_object.lut.h \
167         JavaScriptCore/kjs/math_object.lut.h \
168         JavaScriptCore/kjs/number_object.lut.h \
169         JavaScriptCore/kjs/regexp_object.lut.h \
170         JavaScriptCore/kjs/string_object.lut.h \
171         JavaScriptCore/pcre/chartables.c