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