forked from GNOME/librsvg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
351 lines (299 loc) · 10.1 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
SUBDIRS = . gdk-pixbuf-loader tests tools doc win32 po
NULL =
lib_LTLIBRARIES = librsvg-@[email protected]
noinst_LTLIBRARIES = librsvg_c_api.la
# Automake wants to have a C sources list for LTLIBRARIES.
# See LIBRSVG_INTERNALS_SRC below for the real list of Rust
# sources.
librsvg_c_api_la_SOURCES = librsvg/dummy.c
bin_PROGRAMS = rsvg-convert
include rsvg-c-srcs.mk
librsvg_@RSVG_API_MAJOR_VERSION@_la_SOURCES = \
$(librsvg_c_srcs) \
$(NULL)
SERVO_CRATES_SRC = \
$(wildcard $(srcdir)/servo_crates/derive_common/*) \
$(wildcard $(srcdir)/servo_crates/selectors/*) \
$(wildcard $(srcdir)/servo_crates/servo_arc/*) \
$(wildcard $(srcdir)/servo_crates/to_shmem/*) \
$(wildcard $(srcdir)/servo_crates/to_shmem_derive/*) \
$(NULL)
LIBRSVG_INTERNALS_SRC = \
Cargo.toml \
rsvg_internals/Cargo.toml \
rsvg_internals/build.rs \
rsvg_internals/src/allowed_url.rs \
rsvg_internals/src/angle.rs \
rsvg_internals/src/aspect_ratio.rs \
rsvg_internals/src/bbox.rs \
rsvg_internals/src/clip_path.rs \
rsvg_internals/src/color.rs \
rsvg_internals/src/cond.rs \
rsvg_internals/src/coord_units.rs \
rsvg_internals/src/create_node.rs \
rsvg_internals/src/css.rs \
rsvg_internals/src/error.rs \
rsvg_internals/src/dasharray.rs \
rsvg_internals/src/document.rs \
rsvg_internals/src/dpi.rs \
rsvg_internals/src/drawing_ctx.rs \
rsvg_internals/src/filter.rs \
rsvg_internals/src/filters/bounds.rs \
rsvg_internals/src/filters/blend.rs \
rsvg_internals/src/filters/color_matrix.rs \
rsvg_internals/src/filters/component_transfer.rs \
rsvg_internals/src/filters/composite.rs \
rsvg_internals/src/filters/convolve_matrix.rs \
rsvg_internals/src/filters/context.rs \
rsvg_internals/src/filters/displacement_map.rs \
rsvg_internals/src/filters/error.rs \
rsvg_internals/src/filters/flood.rs \
rsvg_internals/src/filters/gaussian_blur.rs \
rsvg_internals/src/filters/image.rs \
rsvg_internals/src/filters/light/light_source.rs \
rsvg_internals/src/filters/light/lighting.rs \
rsvg_internals/src/filters/light/mod.rs \
rsvg_internals/src/filters/merge.rs \
rsvg_internals/src/filters/morphology.rs \
rsvg_internals/src/filters/mod.rs \
rsvg_internals/src/filters/input.rs \
rsvg_internals/src/filters/offset.rs \
rsvg_internals/src/filters/tile.rs \
rsvg_internals/src/filters/turbulence.rs \
rsvg_internals/src/float_eq_cairo.rs \
rsvg_internals/src/font_props.rs \
rsvg_internals/src/gradient.rs \
rsvg_internals/src/handle.rs \
rsvg_internals/src/image.rs \
rsvg_internals/src/io.rs \
rsvg_internals/src/iri.rs \
rsvg_internals/src/length.rs \
rsvg_internals/src/lib.rs \
rsvg_internals/src/limits.rs \
rsvg_internals/src/log.rs \
rsvg_internals/src/link.rs \
rsvg_internals/src/marker.rs \
rsvg_internals/src/mask.rs \
rsvg_internals/src/node.rs \
rsvg_internals/src/number_list.rs \
rsvg_internals/src/paint_server.rs \
rsvg_internals/src/parsers.rs \
rsvg_internals/src/path_builder.rs \
rsvg_internals/src/path_parser.rs \
rsvg_internals/src/pattern.rs \
rsvg_internals/src/properties.rs \
rsvg_internals/src/property_bag.rs \
rsvg_internals/src/property_defs.rs \
rsvg_internals/src/property_macros.rs \
rsvg_internals/src/rect.rs \
rsvg_internals/src/shapes.rs \
rsvg_internals/src/surface_utils/iterators.rs \
rsvg_internals/src/surface_utils/mod.rs \
rsvg_internals/src/surface_utils/shared_surface.rs \
rsvg_internals/src/space.rs \
rsvg_internals/src/srgb.rs \
rsvg_internals/src/structure.rs \
rsvg_internals/src/style.rs \
rsvg_internals/src/text.rs \
rsvg_internals/src/transform.rs \
rsvg_internals/src/unit_interval.rs \
rsvg_internals/src/util.rs \
rsvg_internals/src/viewbox.rs \
rsvg_internals/src/xml.rs \
rsvg_internals/src/xml2.rs \
rsvg_internals/src/xml2_load.rs \
$(SERVO_CRATES_SRC) \
$(NULL)
LIBRSVG_CRATE_SRC = \
librsvg_crate/Cargo.toml \
librsvg_crate/build.rs \
librsvg_crate/example.svg \
librsvg_crate/examples/proportional.rs \
librsvg_crate/src/lib.rs \
librsvg_crate/tests/api.rs \
librsvg_crate/tests/intrinsic_dimensions.rs \
librsvg_crate/tests/render_to_viewport.rs \
librsvg_crate/tests/primitives.rs \
librsvg_crate/tests/utils/mod.rs \
librsvg_crate/tests/utils/compare_surfaces.rs \
$(NULL)
LIBRSVG_C_API_SRC = \
librsvg/Cargo.toml \
librsvg/c_api.rs \
librsvg/lib.rs \
librsvg/pixbuf_utils.rs \
$(NULL)
RUST_EXTRA = \
Cargo.lock \
cargo-vendor-config \
rsvg_internals/benches/box_blur.rs \
rsvg_internals/benches/composite.rs \
rsvg_internals/benches/lighting.rs \
rsvg_internals/benches/pixel_iterators.rs \
rsvg_internals/benches/srgb.rs \
$(NULL)
if DEBUG_RELEASE
CARGO_RELEASE_ARGS=
else
CARGO_RELEASE_ARGS=--release
endif
if CROSS_COMPILING
CARGO_TARGET_ARGS=--target=$(RUST_TARGET)
endif
CARGO_VERBOSE = $(cargo_verbose_$(V))
cargo_verbose_ = $(cargo_verbose_$(AM_DEFAULT_VERBOSITY))
cargo_verbose_0 =
cargo_verbose_1 = --verbose
LIBRSVG_BUILD_DIR=@abs_top_builddir@
CARGO_TARGET_DIR=$(LIBRSVG_BUILD_DIR)/target
if PLATFORM_WIN32
# https://github.com/rust-lang/rust/issues/43749
RUST_LIB=$(CARGO_TARGET_DIR)/$(RUST_TARGET_SUBDIR)/rsvg_c_api.lib
else
RUST_LIB=$(CARGO_TARGET_DIR)/$(RUST_TARGET_SUBDIR)/librsvg_c_api.a
endif
check-local:
cd $(srcdir) && \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
$(CARGO) --locked test $(CARGO_VERBOSE) $(CARGO_TARGET_ARGS) $(CARGO_RELEASE_ARGS)
clean-local:
cd $(top_srcdir) && \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
$(CARGO) clean
distcheck-hook:
if test -z "${DESTDIR}"; \
then \
echo "Please specify DESTDIR=/tmp/foo so distcheck will work"; \
exit 1; \
fi
dist-hook:
(cd $(distdir) && \
$(CARGO) vendor -q && \
mkdir .cargo && \
cp cargo-vendor-config .cargo/config)
librsvg_c_api.la: $(librsvg_c_api_la_OBJECTS) $(LIBRSVG_INTERNALS_SRC) $(LIBRSVG_C_API_SRC)
+cd $(top_srcdir)/librsvg && \
PKG_CONFIG_ALLOW_CROSS=1 \
PKG_CONFIG='$(PKG_CONFIG)' \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
$(CARGO) --locked build $(CARGO_VERBOSE) $(CARGO_TARGET_ARGS) $(CARGO_RELEASE_ARGS) \
&& if [[ $$($(NM) -g $(RUST_LIB) | grep "T __*clzsi2" -c) -gt 1 ]] ; then \
$(AR) d $(RUST_LIB) clzsi2.o; \
fi \
&& cd $(LIBRSVG_BUILD_DIR) && $(LINK) $< && mv $(RUST_LIB) .libs/librsvg_c_api.a
librsvg_@RSVG_API_MAJOR_VERSION@_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_builddir)/librsvg \
-DG_LOG_DOMAIN=\"librsvg\" \
-DLIBRSVG_DATADIR="\"$(datadir)\"" \
-DSRCDIR=\""${abs_top_srcdir}"\" \
-DRSVG_DISABLE_DEPRECATION_WARNINGS \
$(AM_CPPFLAGS)
librsvg_@RSVG_API_MAJOR_VERSION@_la_CFLAGS = \
-DRSVG_COMPILATION \
$(LIBRSVG_CFLAGS) \
$(AM_CFLAGS)
librsvg_@RSVG_API_MAJOR_VERSION@_la_LDFLAGS = \
$(BSYMBOLIC_LDFLAG) \
-version-info @RSVG_LT_VERSION_INFO@ \
-export-dynamic \
-no-undefined \
-export-symbols-regex "^rsvg_.*" \
$(AM_LDFLAGS)
librsvg_@RSVG_API_MAJOR_VERSION@_la_LIBADD = \
librsvg_c_api.la \
$(LIBRSVG_LIBS) \
$(LIBM) \
$(DLOPEN_LIBS)
librsvgincdir = $(includedir)/librsvg-$(RSVG_API_VERSION)/librsvg
librsvginc_HEADERS = \
$(headers) \
$(extra_inc_headers)
dist_man_MANS = rsvg-convert.1
rsvg_convert_SOURCES = \
$(rsvg_convert_srcs) \
$(NULL)
rsvg_convert_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_builddir)/librsvg \
-DLIBRSVG_DATADIR="\"$(datadir)\"" \
$(AM_CPPFLAGS)
rsvg_convert_CFLAGS =\
$(RSVG_CONVERT_CFLAGS) \
$(AM_CFLAGS)
rsvg_convert_LDFLAGS = $(AM_LDFLAGS)
rsvg_convert_LDADD = \
$(top_builddir)/librsvg-@[email protected] \
$(RSVG_CONVERT_LIBS) \
$(LIBM)
dist_doc_DATA = \
COMPILING.md \
CONTRIBUTING.md \
README.md \
code-of-conduct.md
EXTRA_DIST = \
$(LIBRSVG_INTERNALS_SRC) \
$(LIBRSVG_C_API_SRC) \
$(RUST_EXTRA) \
$(LIBRSVG_CRATE_SRC) \
librsvg.doap \
AUTHORS \
NEWS \
COPYING.LIB \
librsvg-zip.in \
gtk-doc.make \
Rsvg-2.0-custom.vala \
Rsvg-2.0.metadata \
glib-tap.mk \
tap-driver.sh \
tap-test
## Put `exec' in the name because this should be installed by
## `install-exec', not `install-data'.
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = librsvg-$(RSVG_API_VERSION).pc
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS = Rsvg-@[email protected]
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --symbol-prefix=rsvg --symbol-prefix=librsvg
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
Rsvg-@[email protected]: librsvg-@[email protected]
Rsvg_@RSVG_API_VERSION_U@_gir_NAMESPACE = Rsvg
Rsvg_@RSVG_API_VERSION_U@_gir_EXPORT_PACKAGES = librsvg-$(RSVG_API_VERSION)
Rsvg_@RSVG_API_VERSION_U@_gir_FILES = \
$(librsvginc_HEADERS) \
$(filter-out %.h,$(librsvg_@RSVG_API_MAJOR_VERSION@_la_SOURCES)) \
$(NULL)
Rsvg_@RSVG_API_VERSION_U@_gir_INCLUDES = \
GLib-2.0 \
GObject-2.0 \
Gio-2.0 \
cairo-1.0 \
GdkPixbuf-2.0 \
$(NULL)
Rsvg_@RSVG_API_VERSION_U@_gir_PACKAGES = \
pango \
libxml-2.0 \
$(NULL)
Rsvg_@RSVG_API_VERSION_U@_gir_CFLAGS = -I$(top_builddir) -I$(top_builddir)/librsvg -DRSVG_COMPILATION
Rsvg_@RSVG_API_VERSION_U@_gir_LIBS = librsvg-@[email protected]
Rsvg_@RSVG_API_VERSION_U@_gir_SCANNERFLAGS = --c-include="librsvg/rsvg.h"
girdir = $(datadir)/gir-1.0
nodist_gir_DATA = $(INTROSPECTION_GIRS)
typelibsdir = $(libdir)/girepository-1.0
nodist_typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES = $(nodist_gir_DATA) $(nodist_typelibs_DATA)
if ENABLE_VAPIGEN
include $(VAPIGEN_MAKEFILE)
librsvg-$(RSVG_API_VERSION).vapi: Rsvg-$(RSVG_API_VERSION).gir
VAPIGEN_VAPIS = librsvg-$(RSVG_API_VERSION).vapi
librsvg_@RSVG_API_VERSION_U@_vapi_DEPS = gio-2.0 cairo
librsvg_@RSVG_API_VERSION_U@_vapi_METADATADIRS = $(srcdir)
librsvg_@RSVG_API_VERSION_U@_vapi_FILES = Rsvg-$(RSVG_API_VERSION).gir $(srcdir)/Rsvg-$(RSVG_API_VERSION)-custom.vala
vapidir = $(datadir)/vala/vapi
vapi_DATA = $(VAPIGEN_VAPIS)
CLEANFILES += $(VAPIGEN_VAPIS)
endif # ENABLE_VAPIGEN
endif # HAVE_INTROSPECTION