1 include $(top_srcdir)/Makefile.decl
6 no_undefined = -no-undefined
10 gdk_pixbuf_def = gdk_pixbuf.def
11 gdk_pixbuf_symbols = -export-symbols gdk_pixbuf.def
13 gdk_pixbuf_win32_res = gdk_pixbuf-win32-res.o
14 gdk_pixbuf_win32_res_ldflag = -Wl,gdk_pixbuf-win32-res.o
16 gdk_pixbuf-win32-res.o : gdk_pixbuf.rc
17 $(WINDRES) gdk_pixbuf.rc $@
20 $(INSTALL) gdk_pixbuf.def $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).def
22 -rm $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).def
29 noinst_DATA = gdk_pixbuf-$(GTK_API_VERSION).lib
31 gdk_pixbuf-$(GTK_API_VERSION).lib: libgdk_pixbuf-$(GTK_API_VERSION).la gdk_pixbuf.def
32 lib -name:libgdk_pixbuf-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gdk_pixbuf.def -out:$@
35 $(INSTALL) gdk_pixbuf-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
38 -rm $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).lib
44 gdk_pixbuf.def: gdk-pixbuf.symbols
45 (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gdk-pixbuf.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > gdk_pixbuf.def
47 gdk-pixbuf-alias.h: gdk-pixbuf.symbols
48 $(PERL) $(srcdir)/makegdkpixbufalias.pl < $(srcdir)/gdk-pixbuf.symbols > gdk-pixbuf-alias.h
50 gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols
51 $(PERL) $(srcdir)/makegdkpixbufalias.pl -def < $(srcdir)/gdk-pixbuf.symbols > gdk-pixbuf-aliasdef.c
54 TESTS = abicheck.sh pltcheck.sh
60 loaderdir = $(libdir)/gtk-2.0/$(GTK_BINARY_VERSION)/loaders
62 module_libs = libgdk_pixbuf-$(GTK_API_VERSION).la $(GDK_PIXBUF_DEP_LIBS)
67 libpixbufloader_png_la_SOURCES = io-png.c
68 libpixbufloader_png_la_LDFLAGS = -avoid-version -module $(no_undefined)
69 libpixbufloader_png_la_LIBADD = $(LIBPNG) $(module_libs)
70 libstatic_pixbufloader_png_la_SOURCES = io-png.c
75 libstatic_pixbufloader_bmp_la_SOURCES = io-bmp.c
76 libpixbufloader_bmp_la_SOURCES = io-bmp.c
77 libpixbufloader_bmp_la_LDFLAGS = -avoid-version -module $(no_undefined)
78 libpixbufloader_bmp_la_LIBADD = $(module_libs)
83 libstatic_pixbufloader_wbmp_la_SOURCES = io-wbmp.c
84 libpixbufloader_wbmp_la_SOURCES = io-wbmp.c
85 libpixbufloader_wbmp_la_LDFLAGS = -avoid-version -module $(no_undefined)
86 libpixbufloader_wbmp_la_LIBADD = $(module_libs)
91 libstatic_pixbufloader_gif_la_SOURCES = io-gif.c io-gif-animation.c io-gif-animation.h
92 libpixbufloader_gif_la_SOURCES = io-gif.c io-gif-animation.c io-gif-animation.h
93 libpixbufloader_gif_la_LDFLAGS = -avoid-version -module $(no_undefined)
94 libpixbufloader_gif_la_LIBADD = $(module_libs)
99 libstatic_pixbufloader_ico_la_SOURCES = io-ico.c
100 libpixbufloader_ico_la_SOURCES = io-ico.c
101 libpixbufloader_ico_la_LDFLAGS = -avoid-version -module $(no_undefined)
102 libpixbufloader_ico_la_LIBADD = $(module_libs)
107 libstatic_pixbufloader_ani_la_SOURCES = io-ani.c io-ani-animation.c io-ani-animation.h
108 libpixbufloader_ani_la_SOURCES = io-ani.c io-ani-animation.c io-ani-animation.h
109 libpixbufloader_ani_la_LDFLAGS = -avoid-version -module $(no_undefined)
110 libpixbufloader_ani_la_LIBADD = $(module_libs)
115 libstatic_pixbufloader_jpeg_la_SOURCES = io-jpeg.c
116 libpixbufloader_jpeg_la_SOURCES = io-jpeg.c
117 libpixbufloader_jpeg_la_LDFLAGS = -avoid-version -module $(no_undefined)
118 libpixbufloader_jpeg_la_LIBADD = $(LIBJPEG) $(module_libs)
123 libstatic_pixbufloader_pnm_la_SOURCES = io-pnm.c
124 libpixbufloader_pnm_la_SOURCES = io-pnm.c
125 libpixbufloader_pnm_la_LDFLAGS = -avoid-version -module $(no_undefined)
126 libpixbufloader_pnm_la_LIBADD = $(module_libs)
131 libstatic_pixbufloader_ras_la_SOURCES = io-ras.c
132 libpixbufloader_ras_la_SOURCES = io-ras.c
133 libpixbufloader_ras_la_LDFLAGS = -avoid-version -module $(no_undefined)
134 libpixbufloader_ras_la_LIBADD = $(module_libs)
139 libstatic_pixbufloader_tiff_la_SOURCES = io-tiff.c
140 libpixbufloader_tiff_la_SOURCES = io-tiff.c
141 libpixbufloader_tiff_la_LDFLAGS = -avoid-version -module $(no_undefined)
142 libpixbufloader_tiff_la_LIBADD = $(LIBTIFF) $(module_libs)
147 libstatic_pixbufloader_xpm_la_SOURCES = io-xpm.c
148 libpixbufloader_xpm_la_SOURCES = io-xpm.c
149 libpixbufloader_xpm_la_LDFLAGS = -avoid-version -module $(no_undefined)
150 libpixbufloader_xpm_la_LIBADD = $(module_libs)
155 libstatic_pixbufloader_xbm_la_SOURCES = io-xbm.c
156 libpixbufloader_xbm_la_SOURCES = io-xbm.c
157 libpixbufloader_xbm_la_LDFLAGS = -avoid-version -module $(no_undefined)
158 libpixbufloader_xbm_la_LIBADD = $(module_libs)
163 libstatic_pixbufloader_tga_la_SOURCES = io-tga.c
164 libpixbufloader_tga_la_SOURCES = io-tga.c
165 libpixbufloader_tga_la_LDFLAGS = -avoid-version -module $(no_undefined)
166 libpixbufloader_tga_la_LIBADD = $(module_libs)
171 libstatic_pixbufloader_icns_la_SOURCES = io-icns.c
172 libpixbufloader_icns_la_SOURCES = io-icns.c
173 libpixbufloader_icns_la_LDFLAGS = -avoid-version -module $(no_undefined)
174 libpixbufloader_icns_la_LIBADD = $(module_libs)
179 libstatic_pixbufloader_pcx_la_SOURCES = io-pcx.c
180 libpixbufloader_pcx_la_SOURCES = io-pcx.c
181 libpixbufloader_pcx_la_LDFLAGS = -avoid-version -module $(no_undefined)
182 libpixbufloader_pcx_la_LIBADD = $(module_libs)
185 # The JPEG2000 loader
187 libstatic_pixbufloader_jasper_la_SOURCES = io-jasper.c
188 libpixbufloader_jasper_la_SOURCES = io-jasper.c
189 libpixbufloader_jasper_la_LDFLAGS = -avoid-version -module $(no_undefined)
190 libpixbufloader_jasper_la_LIBADD = $(LIBJASPER) $(module_libs)
194 STATIC_PNG_LIB = libstatic-pixbufloader-png.la
196 PNG_LIB = libpixbufloader-png.la
201 STATIC_BMP_LIB = libstatic-pixbufloader-bmp.la
203 BMP_LIB = libpixbufloader-bmp.la
207 STATIC_WBMP_LIB = libstatic-pixbufloader-wbmp.la
209 WBMP_LIB = libpixbufloader-wbmp.la
213 STATIC_GIF_LIB = libstatic-pixbufloader-gif.la
215 GIF_LIB = libpixbufloader-gif.la
219 STATIC_ICO_LIB = libstatic-pixbufloader-ico.la
221 ICO_LIB = libpixbufloader-ico.la
225 STATIC_ANI_LIB = libstatic-pixbufloader-ani.la
227 ANI_LIB = libpixbufloader-ani.la
232 STATIC_JPEG_LIB = libstatic-pixbufloader-jpeg.la
234 JPEG_LIB = libpixbufloader-jpeg.la
239 STATIC_PNM_LIB = libstatic-pixbufloader-pnm.la
241 PNM_LIB = libpixbufloader-pnm.la
245 STATIC_RAS_LIB = libstatic-pixbufloader-ras.la
247 RAS_LIB = libpixbufloader-ras.la
252 STATIC_TIFF_LIB = libstatic-pixbufloader-tiff.la
254 TIFF_LIB = libpixbufloader-tiff.la
259 STATIC_XPM_LIB = libstatic-pixbufloader-xpm.la
261 XPM_LIB = libpixbufloader-xpm.la
265 STATIC_XBM_LIB = libstatic-pixbufloader-xbm.la
267 XBM_LIB = libpixbufloader-xbm.la
271 STATIC_TGA_LIB = libstatic-pixbufloader-tga.la
273 TGA_LIB = libpixbufloader-tga.la
277 STATIC_PCX_LIB = libstatic-pixbufloader-pcx.la
279 PCX_LIB = libpixbufloader-pcx.la
283 STATIC_ICNS_LIB = libstatic-pixbufloader-icns.la
285 ICNS_LIB = libpixbufloader-icns.la
290 STATIC_JASPER_LIB = libstatic-pixbufloader-jasper.la
292 JASPER_LIB = libpixbufloader-jasper.la
296 if BUILD_DYNAMIC_MODULES
298 loader_LTLIBRARIES = \
319 noinst_LTLIBRARIES = \
337 builtin_objs = @INCLUDED_LOADER_OBJ@
340 DEPS = libgdk_pixbuf-$(GTK_API_VERSION).la
342 -DG_LOG_DOMAIN=\"GdkPixbuf\" \
343 -I$(top_srcdir) -I$(top_builddir) \
344 -I$(top_srcdir)/gdk-pixbuf \
345 -I$(top_builddir)/gdk-pixbuf \
346 -DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
347 -DGTK_VERSION=\"$(GTK_VERSION)\" \
348 -DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
349 -DGTK_PREFIX=\"$(prefix)\" \
350 $(INCLUDED_LOADER_DEFINE) \
352 $(GDK_PIXBUF_DEP_CFLAGS) \
353 -DGDK_PIXBUF_ENABLE_BACKEND
355 AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(loaderdir)\"" "-DBUILT_MODULES_DIR=\"$(srcdir)/.libs\""
356 LDADDS = libgdk_pixbuf-$(GTK_API_VERSION).la $(GLIB_LIBS)
358 noinst_PROGRAMS = test-gdk-pixbuf
359 test_gdk_pixbuf_LDADD = $(LDADDS)
361 bin_PROGRAMS = gdk-pixbuf-csource gdk-pixbuf-query-loaders
362 gdk_pixbuf_csource_SOURCES = gdk-pixbuf-csource.c
363 gdk_pixbuf_csource_LDADD = $(LDADDS)
365 gdk_pixbuf_query_loaders_DEPENDENCIES = $(DEPS)
366 gdk_pixbuf_query_loaders_LDADD = $(LDADDS)
368 gdk_pixbuf_query_loaders_SOURCES = queryloaders.c
372 # The GdkPixBuf library
374 libgdk_pixbufincludedir = $(includedir)/gtk-2.0/gdk-pixbuf
375 libgdk_pixbuf_2_0_la_SOURCES = \
378 gdk-pixbuf-animation.c \
381 gdk-pixbuf-loader.c \
383 gdk-pixbuf-simple-anim.c \
384 gdk-pixbuf-scaled-anim.c \
387 gdk-pixbuf-enum-types.c
389 libgdk_pixbuf_2_0_la_LDFLAGS = \
390 $(gdk_pixbuf_win32_res_ldflag) \
391 -version-info $(LT_VERSION_INFO) \
392 $(LIBTOOL_EXPORT_OPTIONS) \
394 $(gdk_pixbuf_symbols)
397 libgdk_pixbuf_2_0_la_LIBADD = pixops/libpixops.la $(builtin_objs) $(GDK_PIXBUF_DEP_LIBS)
398 libgdk_pixbuf_2_0_la_DEPENDENCIES = pixops/libpixops.la $(builtin_objs) $(gdk_pixbuf_def) $(gdk_pixbuf_win32_res)
400 gdk_pixbuf_headers = \
403 gdk-pixbuf-transform.h \
405 gdk-pixbuf-animation.h \
406 gdk-pixbuf-simple-anim.h \
409 libgdk_pixbufinclude_HEADERS = \
410 $(gdk_pixbuf_headers) \
411 gdk-pixbuf-enum-types.h \
412 gdk-pixbuf-marshal.h \
413 gdk-pixbuf-features.h \
418 gdk-pixbuf-private.h \
419 gdk-pixbuf-scaled-anim.h \
424 gdk-pixbuf-aliasdef.c \
425 gdk-pixbuf-enum-types.h \
426 gdk-pixbuf-enum-types.c \
427 gdk-pixbuf-marshal.h \
431 MAINTAINERCLEANFILES = \
432 gdk-pixbuf-aliasdef.c \
433 gdk-pixbuf-enum-types.h \
434 gdk-pixbuf-enum-types.c \
435 gdk-pixbuf-marshal.h \
436 gdk-pixbuf-marshal.c \
440 # gdk-pixbuf-enum-types.h
442 gdk-pixbuf-enum-types.h: s-enum-types-h
445 s-enum-types-h: @REBUILD@ $(gdk_pixbuf_headers) gdk-pixbuf-enum-types.h.template
446 ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdk-pixbuf-enum-types.h.template \
447 $(gdk_pixbuf_headers) ) > tmp-gdk-pixbuf-enum-types.h \
448 && (cmp -s tmp-gdk-pixbuf-enum-types.h gdk-pixbuf-enum-types.h || cp tmp-gdk-pixbuf-enum-types.h gdk-pixbuf-enum-types.h ) \
449 && rm -f tmp-gdk-pixbuf-enum-types.h \
450 && echo timestamp > $(@F)
452 CLEANFILES += tmp-gdk-pixbuf-enum-types.h
453 MAINTAINERCLEANFILES += s-enum-types-h
456 # gdk-pixbuf-enum-types.c
458 gdk-pixbuf-enum-types.c: @REBUILD@ $(gdk_pixbuf_headers) gdk-pixbuf-enum-types.c.template
459 (cd $(srcdir) && $(GLIB_MKENUMS) --template gdk-pixbuf-enum-types.c.template \
460 $(gdk_pixbuf_headers)) > gdk-pixbuf-enum-types.c
463 # gdk-pixbuf-marshal.h
465 gdk-pixbuf-marshal.h: @REBUILD@ stamp-gdk-pixbuf-marshal.h
468 stamp-gdk-pixbuf-marshal.h: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
469 $(GLIB_GENMARSHAL) --prefix=_gdk_pixbuf_marshal $(srcdir)/gdk-pixbuf-marshal.list --header >> xgen-gmh \
470 && (cmp -s xgen-gmh gdk-pixbuf-marshal.h || cp xgen-gmh gdk-pixbuf-marshal.h) \
471 && rm -f xgen-gmh xgen-gmh~ \
472 && echo timestamp > $(@F)
474 CLEANFILES += xgen-gmh
475 MAINTAINERCLEANFILES += stamp-gdk-pixbuf-marshal.h
478 # gdk-pixbuf-marshal.c
480 $(srcdir)/gdk-pixbuf-marshal.c: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
481 (echo -e "#include <gdk-pixbuf/gdk-pixbuf.h>\n#include \"gdk-pixbuf-alias.h\"" | $(GLIB_GENMARSHAL) --prefix=_gdk_pixbuf_marshal $(srcdir)/gdk-pixbuf-marshal.list --body ) >> xgen-gmc \
482 && cp xgen-gmc gdk-pixbuf-marshal.c \
483 && rm -f xgen-gmc xgen-gmc~
485 CLEANFILES += xgen-gmc
487 # if srcdir!=builddir, clean out maintainer-clean files from builddir
488 # this allows dist to pass.
490 if test $(srcdir) != .; then \
491 rm -f $(MAINTAINERCLEANFILES); \
495 gdk-pixbuf-csource.1 \
498 makegdkpixbufalias.pl \
503 gdk-pixbuf-marshal.c \
504 gdk-pixbuf-marshal.list \
505 gdk-pixbuf-enum-types.c.template \
506 gdk-pixbuf-enum-types.h.template \
510 RUN_QUERY_LOADER_TEST=false
512 RUN_QUERY_LOADER_TEST=test -z "$(DESTDIR)"
515 # Running this if cross compiling or if DESTDIR is set is going to
516 # not work at all, so skip it
517 # We use install-data-hook here to workaround a bug in automake and/or libtool
518 # that makes the install target for the loader libraries a dependency on
519 # install-data-am, and not install-exec-am. We need to ensure this gets run
520 # after the libraries are installed in their final locations.
521 install-data-hook: install-ms-lib install-def-file
522 @if $(RUN_QUERY_LOADER_TEST) ; then \
523 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
524 $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders > $(DESTDIR)$(sysconfdir)/gtk-2.0/gdk-pixbuf.loaders ; \
527 echo "*** Warning: gdk-pixbuf.loaders not built" ; \
529 echo "*** Generate this file manually on host" ; \
530 echo "*** system using gdk-pixbuf-query-loaders" ; \
534 uninstall-local: uninstall-ms-lib uninstall-def-file
535 rm -f $(DESTDIR)$(sysconfdir)/gtk-2.0/gdk-pixbuf.loaders
539 all-local: gdk-pixbuf.loaders
542 if BUILD_DYNAMIC_MODULES
543 gdk-pixbuf.loaders: $(loader_LTLIBRARIES) gdk-pixbuf-query-loaders$(EXEEXT)
544 LOADERS=`echo libpixbufloader-*.la` ; \
545 if test "x$$LOADERS" != 'xlibpixbufloader-*.la' ; then \
546 echo "Writing a gdk-pixbuf.loader file to use when running examples before installing gdk-pixbuf."; \
547 $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders $$LOADERS > ./gdk-pixbuf.loaders ;\
549 echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
550 touch gdk-pixbuf.loaders; \
554 echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
555 touch gdk-pixbuf.loaders;