Makefile.am 2.5 KB
Newer Older
1
if ENABLE_PIXBUF_LOADER
2

3 4
NULL =

5
gdk_pixbuf_module_LTLIBRARIES = libpixbufloader-svg.la
6

7 8
libpixbufloader_svg_la_SOURCES = \
	io-svg.c
9

10 11 12 13 14 15
libpixbufloader_svg_la_CPPFLAGS = \
	-I$(top_srcdir) 			\
	-I$(top_builddir)			\
	-DGDK_PIXBUF_ENABLE_BACKEND		\
	-DG_LOG_DOMAIN=\"libpixbufloader-svg\" 	\
	$(AM_CPPFLAGS)
16

17 18 19
libpixbufloader_svg_la_CFLAGS = \
	$(GDK_PIXBUF_CFLAGS)	\
	$(LIBRSVG_CFLAGS)	\
Hans Nieser's avatar
Hans Nieser committed
20
	$(AM_CFLAGS)
21 22 23 24

libpixbufloader_svg_la_LDFLAGS = -avoid-version -module $(AM_LDFLAGS)

libpixbufloader_svg_la_LIBADD = \
25
	$(top_builddir)/librsvg-@RSVG_API_MAJOR_VERSION@.la	\
26
	$(GDK_PIXBUF_LIBS)	\
27
	$(LIBRSVG_LIBS)
28

29 30 31
if PLATFORM_WIN32
libpixbufloader_svg_la_LDFLAGS += -no-undefined
endif
32

33 34 35 36
noinst_PROGRAMS = rsvg-loader

rsvg_loader_SOURCES = \
	test.c \
37
	$(NULL)
38
rsvg_loader_CPPFLAGS = \
Matthias Clasen's avatar
Matthias Clasen committed
39 40
	-I$(top_srcdir) 			\
	-I$(top_builddir)			\
41 42 43 44 45 46 47 48
	$(AM_CPPFLAGS)
rsvg_loader_CFLAGS = \
	$(GDK_PIXBUF_CFLAGS) \
	$(AM_CFLAGS)
rsvg_loader_LDFLAGS = \
	$(AM_LDFLAGS)
rsvg_loader_LDADD = \
	$(GDK_PIXBUF_LIBS)
49
EXTRA_rsvg_loader_DEPENDENCIES = libpixbufloader-svg.la gdk-pixbuf-loaders
50 51 52 53

gdk-pixbuf-loaders: Makefile
	$(AM_V_GEN) ( $(GDK_PIXBUF_QUERYLOADERS) ./libpixbufloader-svg.la && $(GDK_PIXBUF_QUERYLOADERS)) > gdk-pixbuf.loaders 2>/dev/null

54 55 56 57 58 59 60 61 62 63 64 65 66 67
if CROSS_COMPILING
RUN_QUERY_LOADER_TEST=false
else
RUN_QUERY_LOADER_TEST=test -z "$(DESTDIR)"
endif

# The following bit is stolen from gdk-pixbuf/gdk-pixbuf/Makefile.am:
#
# Running this if cross compiling or if DESTDIR is set is going to
# not work at all, so skip it
# We use install-data-hook here to workaround a bug in automake and/or libtool
# that makes the install target for the loader libraries a dependency on
# install-data-am, and not install-exec-am. We need to ensure this gets run
# after the libraries are installed in their final locations.
68
install-data-hook:
69
	@if $(RUN_QUERY_LOADER_TEST) ; then \
70
		$(mkinstalldirs) $(DESTDIR)$(gdk_pixbuf_binarydir) ; \
71
		$(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file) ; \
72 73 74 75 76 77 78
	else \
	  echo "***" ; \
	  echo "*** Warning: loaders.cache not built" ; \
	  echo "***" ; \
	  echo "*** Generate this file manually on host" ; \
	  echo "*** system using gdk-pixbuf-query-loaders" ; \
	  echo "***" ; \
79 80
	fi

81 82 83 84 85 86 87 88
thumbnailerdir = $(datadir)/thumbnailers/
thumbnailer_DATA = librsvg.thumbnailer
librsvg.thumbnailer: librsvg.thumbnailer.in
	$(AM_V_GEN) $(SED) -e "s|\@bindir\@|$(bindir)|" \
	$< > $@

EXTRA_DIST = librsvg.thumbnailer.in

89 90
CLEANFILES = \
	gdk-pixbuf.loaders \
91
	$(thumbnailer_DATA) \
92 93 94 95 96 97
	$(NULL)

DISTCLEANFILES = \
	gdk-pixbuf.loaders \
	$(NULL)

98
endif # ENABLE_PIXBUF_LOADER