GNUmakefile.am 11.2 KB
Newer Older
1 2
include $(srcdir)/Source/JavaScriptCore/GNUmakefile.list.am

3 4 5
lib_LTLIBRARIES += \
	libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la

6 7 8
jsc_lib_for_dep = libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
$(jsc_lib_for_dep): $(srcdir)/Source/JavaScriptCore/GNUmakefile.list.am

9 10 11 12
# We are going to make everything public for now. When
# https://bugs.webkit.org/show_bug.cgi?id=27551 is fixed we'll able to
# simply rely on the usual symbol visibility flags.
libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
13
	-version-info @LIBJAVASCRIPTCOREGTK_VERSION@ \
14 15 16 17 18 19 20 21
	$(no_undefined)

nodist_EXTRA_libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
	$(javascriptcore_built_nosources)

nodist_libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
	$(javascriptcore_built_sources)

22
libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = $(libwebkitgtkincludedir)/JavaScriptCore
23 24 25 26 27 28
libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = $(javascriptcore_h_api)

libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
	$(javascriptcore_sources)

libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD = \
29 30
	-lpthread \
	libWTF.la \
31
	$(GLIB_LIBS) \
32 33
	$(LLVM_LIBS) \
	$(UNICODE_LIBS) \
34
	$(WINMM_LIBS)
35 36 37 38 39 40

libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
	$(global_cxxflags) \
	$(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS)

libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
41
	$(javascriptcore_cflags)
42 43 44 45 46

libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
	$(global_cppflags) \
	$(javascriptcore_cppflags)

47
javascriptcore_cppflags += \
xan@webkit.org's avatar
xan@webkit.org committed
48
	-I$(srcdir)/Source \
49 50
	-I$(srcdir)/Source/JavaScriptCore \
	-I$(srcdir)/Source/JavaScriptCore/API \
51
	-I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
52
	-I$(srcdir)/Source/JavaScriptCore/assembler \
53
	-I$(srcdir)/Source/JavaScriptCore/bindings \
54 55
	-I$(srcdir)/Source/JavaScriptCore/bytecode \
	-I$(srcdir)/Source/JavaScriptCore/bytecompiler \
56
	-I$(srcdir)/Source/JavaScriptCore/debugger \
57
	-I$(srcdir)/Source/JavaScriptCore/dfg \
58
	-I$(srcdir)/Source/JavaScriptCore/disassembler \
59
	-I$(srcdir)/Source/JavaScriptCore/ftl \
60
	-I$(srcdir)/Source/JavaScriptCore/heap \
61
	-I$(srcdir)/Source/JavaScriptCore/inspector \
62
	-I$(srcdir)/Source/JavaScriptCore/inspector/agents \
63 64
	-I$(srcdir)/Source/JavaScriptCore/interpreter \
	-I$(srcdir)/Source/JavaScriptCore/jit \
65
	-I$(srcdir)/Source/JavaScriptCore/llint \
66 67 68
	-I$(srcdir)/Source/JavaScriptCore/parser \
	-I$(srcdir)/Source/JavaScriptCore/profiler \
	-I$(srcdir)/Source/JavaScriptCore/runtime \
69
	-I$(srcdir)/Source/JavaScriptCore/tools \
70
	-I$(srcdir)/Source/JavaScriptCore/yarr \
71 72 73
	-I$(top_builddir)/DerivedSources/JavaScriptCore \
	-I$(srcdir)/Source/WTF \
	$(LLVM_CFLAGS)
74

75 76 77
javascriptcore_cflags += \
	$(global_cflags) \
	$(GLIB_CFLAGS) \
78
	$(LLVM_CFLAGS) \
79 80
	$(UNICODE_CFLAGS)

81 82
pkgconfig_DATA += Source/JavaScriptCore/javascriptcoregtk-@WEBKITGTK_API_VERSION@.pc

83 84 85
$(shell mkdir -p DerivedSources/JavaScriptCore)

DerivedSources/JavaScriptCore/Lexer.lut.h: $(srcdir)/Source/JavaScriptCore/create_hash_table $(srcdir)/Source/JavaScriptCore/parser/Keywords.table
xan@webkit.org's avatar
xan@webkit.org committed
86
	$(AM_V_GEN)$(PERL) $^ > $@
87

88
DerivedSources/JavaScriptCore/%.lut.h: $(srcdir)/Source/JavaScriptCore/create_hash_table $(srcdir)/Source/JavaScriptCore/runtime/%.cpp
xan@webkit.org's avatar
xan@webkit.org committed
89
	$(AM_V_GEN)$(PERL) $^ -i > $@
90

91
DerivedSources/JavaScriptCore/RegExpJitTables.h: $(srcdir)/Source/JavaScriptCore/create_regex_tables
92
	$(AM_V_GEN)$(PYTHON) $^ > $@
oliver@apple.com's avatar
oliver@apple.com committed
93

94
DerivedSources/JavaScriptCore/KeywordLookup.h: $(srcdir)/Source/JavaScriptCore/KeywordLookupGenerator.py $(srcdir)/Source/JavaScriptCore/parser/Keywords.table
95 96
	$(AM_V_GEN)$(PYTHON) $^ > $@

wingo@igalia.com's avatar
wingo@igalia.com committed
97 98
DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h: $(javascriptcore_sources) $(llint_nosources) $(offlineasm_nosources)
	$(AM_V_GEN)$(RUBY) $(srcdir)/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb $(srcdir)/Source/JavaScriptCore/llint/LowLevelInterpreter.asm $@
99
	$(AM_V_at)touch $@
wingo@igalia.com's avatar
wingo@igalia.com committed
100 101 102 103 104

$(Programs_LLIntOffsetsExtractor_OBJECTS): DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h

DerivedSources/JavaScriptCore/LLIntAssembly.h: Programs/LLIntOffsetsExtractor$(EXEEXT)
	$(AM_V_GEN)$(RUBY) $(srcdir)/Source/JavaScriptCore/offlineasm/asm.rb $(srcdir)/Source/JavaScriptCore/llint/LowLevelInterpreter.asm Programs/LLIntOffsetsExtractor$(EXEEXT) $@
105
	$(AM_V_at)touch $@
wingo@igalia.com's avatar
wingo@igalia.com committed
106 107 108

$(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_OBJECTS): DerivedSources/JavaScriptCore/LLIntAssembly.h

109
jsc: $(javascriptcore_built_nosources) Programs/jsc$(EXEEXT)
110

111
bin_PROGRAMS += \
112
	Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@$(EXEEXT)
113

114
noinst_PROGRAMS += \
115
	Programs/jsc \
wingo@igalia.com's avatar
wingo@igalia.com committed
116 117
	Programs/minidom \
	Programs/LLIntOffsetsExtractor
118

119 120 121 122
Programs_minidom_CPPFLAGS = \
	$(global_cppflags) \
	$(javascriptcore_cppflags)

darin@apple.com's avatar
.:  
darin@apple.com committed
123
Programs_minidom_CFLAGS = \
124
	-ansi \
125
	-fno-strict-aliasing \
126 127
	$(global_cflags) \
	$(GLOBALDEPS_CFLAGS)
128

darin@apple.com's avatar
.:  
darin@apple.com committed
129
Programs_minidom_LDADD = \
130 131 132 133 134
	libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
	$(WINMM_LIBS) \
	-lm \
	-lpthread \
	-lstdc++
135

136
Programs_minidom_LDFLAGS = \
137
	-no-install
138

wingo@igalia.com's avatar
wingo@igalia.com committed
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
Programs_LLIntOffsetsExtractor_CPPFLAGS = \
	$(global_cppflags) \
	$(javascriptcore_cppflags)

Programs_LLIntOffsetsExtractor_CFLAGS = \
	-ansi \
	-fno-strict-aliasing \
	$(global_cflags) \
	$(GLOBALDEPS_CFLAGS)

Programs_LLIntOffsetsExtractor_LDADD = \
	-lpthread \
	libWTF.la \
	$(UNICODE_LIBS) \
	$(GLIB_LIBS) \
	$(WINMM_LIBS) \
	-lm \
	-lpthread \
	-lstdc++

Programs_LLIntOffsetsExtractor_LDFLAGS = \
160
	-no-install
wingo@igalia.com's avatar
wingo@igalia.com committed
161

mjs@apple.com's avatar
mjs@apple.com committed
162
# jsc
163 164 165 166
Programs/jsc$(EXEEXT): Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@$(EXEEXT)
	$(AM_V_GEN)cp -f Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@$(EXEEXT) Programs/jsc$(EXEEXT)
Programs_jsc_LDADD =
Programs_jsc_SOURCES =
167

168
Programs_jsc_@WEBKITGTK_API_MAJOR_VERSION@_CPPFLAGS = \
169 170
	$(global_cppflags) \
	$(javascriptcore_cppflags)
171

172
Programs_jsc_@WEBKITGTK_API_MAJOR_VERSION@_CXXFLAGS = \
173
	-fno-strict-aliasing \
174 175
	$(global_cxxflags) \
	$(global_cflags) \
176 177
	$(GLOBALDEPS_CFLAGS) \
	$(UNICODE_CFLAGS)
178

179
Programs_jsc_@WEBKITGTK_API_MAJOR_VERSION@_LDADD = \
180
	-lpthread \
181
	libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
182
	$(WINMM_LIBS)
183

184
EXTRA_DIST += \
185 186 187 188 189 190 191
	Source/JavaScriptCore/AUTHORS \
	Source/JavaScriptCore/ChangeLog \
	Source/JavaScriptCore/COPYING.LIB \
	Source/JavaScriptCore/create_hash_table \
	Source/JavaScriptCore/create_regex_tables \
	Source/JavaScriptCore/icu/LICENSE \
	Source/JavaScriptCore/icu/README \
192
	Source/JavaScriptCore/inspector/InjectedScriptSource.js \
193 194 195 196 197 198
	Source/JavaScriptCore/inspector/protocol/Debugger.json \
	Source/JavaScriptCore/inspector/protocol/GenericTypes.json \
	Source/JavaScriptCore/inspector/protocol/InspectorDomain.json \
	Source/JavaScriptCore/inspector/protocol/Runtime.json \
	Source/JavaScriptCore/inspector/scripts/CodeGeneratorInspector.py \
	Source/JavaScriptCore/inspector/scripts/CodeGeneratorInspectorStrings.py \
199
	Source/JavaScriptCore/inspector/scripts/cssmin.py \
200
	Source/JavaScriptCore/inspector/scripts/generate-combined-inspector-json.py \
201
	Source/JavaScriptCore/inspector/scripts/inline-and-minify-stylesheets-and-scripts.py \
202 203
	Source/JavaScriptCore/inspector/scripts/jsmin.py \
	Source/JavaScriptCore/inspector/scripts/xxd.pl \
xan@webkit.org's avatar
xan@webkit.org committed
204
	Source/JavaScriptCore/KeywordLookupGenerator.py \
205
	Source/JavaScriptCore/parser/Keywords.table \
wingo@igalia.com's avatar
wingo@igalia.com committed
206 207 208
	Source/JavaScriptCore/THANKS \
	$(llint_nosources) \
	$(offlineasm_nosources)
209

210
CLEANFILES += \
211
	$(javascriptcore_built_nosources) \
212
	Programs/jsc \
213
	Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@ \
wingo@igalia.com's avatar
wingo@igalia.com committed
214
	Programs/LLIntOffsetsExtractor \
215
	Programs/minidom
216 217 218

DISTCLEANFILES += \
	$(top_builddir)/Source/JavaScriptCore/javascriptcoregtk-@WEBKITGTK_API_VERSION@.pc
219 220 221 222 223 224 225 226 227 228

if ENABLE_INTROSPECTION
# The GIR file is generated via autoconf, as we don't need to run the scanner against non-GObject libraries.
JavaScriptCore-@WEBKITGTK_API_VERSION@.typelib: JavaScriptCore-@WEBKITGTK_API_VERSION@.gir $(G_IR_COMPILER)
	$(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit) --includedir $(top_builddir) $< -o $@

gir_DATA += JavaScriptCore-@WEBKITGTK_API_VERSION@.gir
typelibs_DATA += JavaScriptCore-@WEBKITGTK_API_VERSION@.typelib
CLEANFILES += JavaScriptCore-@WEBKITGTK_API_VERSION@.gir JavaScriptCore-@WEBKITGTK_API_VERSION@.typelib
endif
229 230 231 232


# Inspector Interfaces

233
JavaScriptCore_INSPECTOR_DOMAINS := \
234 235 236
    $(JavaScriptCore)/inspector/protocol/Debugger.json \
    $(JavaScriptCore)/inspector/protocol/GenericTypes.json \
    $(JavaScriptCore)/inspector/protocol/InspectorDomain.json \
237 238
    $(JavaScriptCore)/inspector/protocol/Runtime.json

239
DerivedSources/JavaScriptCore/InspectorJS.json: $(INSPECTOR_SCRIPTS_DIR)/generate-combined-inspector-json.py $(JavaScriptCore_INSPECTOR_DOMAINS)
240 241 242 243 244 245
	$(AM_V_GEN)$(PYTHON) $(INSPECTOR_SCRIPTS_DIR)/generate-combined-inspector-json.py $(JavaScriptCore)/inspector/protocol > $(GENSOURCES_JAVASCRIPTCORE)/InspectorJS.json

# Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
# Copy generated header files to DerivedSources/JavaScriptCore/inspector so that WebCore's ForwardingHeader style of #include <inspector/Foo.h> will work.
DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.cpp: DerivedSources/JavaScriptCore/InspectorJS.json $(INSPECTOR_SCRIPTS_DIR)/CodeGeneratorInspector.py $(INSPECTOR_SCRIPTS_DIR)/CodeGeneratorInspectorStrings.py
	$(AM_V_GEN)$(PYTHON) $(INSPECTOR_SCRIPTS_DIR)/CodeGeneratorInspector.py $< --output_h_dir $(GENSOURCES_JAVASCRIPTCORE) --output_cpp_dir $(GENSOURCES_JAVASCRIPTCORE) --output_js_dir $(GENSOURCES_JAVASCRIPTCORE) --output_type JavaScript
246
	$(AM_V_at)touch $@
247 248 249 250 251 252 253 254
	mkdir -p DerivedSources/JavaScriptCore/inspector
	cp DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.h DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.h DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.h DerivedSources/JavaScriptCore/inspector
DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.h: DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.cpp
DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.cpp: DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.h
DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.h: DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.cpp
DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.cpp: DerivedSources/JavaScriptCore/InspectorJSBackendCommands.js
DerivedSources/JavaScriptCore/InspectorJSBackendCommands.js: DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.h
DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.h: DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.cpp
255

256 257 258 259
DerivedSources/JavaScriptCore/InjectedScriptSource.h: $(JavaScriptCore)/inspector/InjectedScriptSource.js $(INSPECTOR_SCRIPTS_DIR)/xxd.pl $(INSPECTOR_SCRIPTS_DIR)/jsmin.py
	$(AM_V_GEN)$(PYTHON) $(INSPECTOR_SCRIPTS_DIR)/jsmin.py < $< > $(GENSOURCES_JAVASCRIPTCORE)/InjectedScriptSource.min.js
	$(AM_V_at)$(PERL) $(INSPECTOR_SCRIPTS_DIR)/xxd.pl InjectedScriptSource_js $(GENSOURCES_JAVASCRIPTCORE)/InjectedScriptSource.min.js $@
	$(AM_V_at)rm -rf $(GENSOURCES_JAVASCRIPTCORE)/InjectedScriptSource.min.js