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