]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/Makefile.am
Add detection for libjasper, used by the gdk-pixbuf JPEG2000 loader
[~andy/gtk] / gdk-pixbuf / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 SUBDIRS = pixops
4
5 if PLATFORM_WIN32
6 no_undefined = -no-undefined
7 endif
8
9 if OS_WIN32
10 gdk_pixbuf_def = gdk_pixbuf.def
11 gdk_pixbuf_symbols = -export-symbols gdk_pixbuf.def
12
13 gdk_pixbuf_win32_res = gdk_pixbuf-win32-res.o
14 gdk_pixbuf_win32_res_ldflag = -Wl,gdk_pixbuf-win32-res.o
15
16 gdk_pixbuf-win32-res.o : gdk_pixbuf.rc
17         $(WINDRES) gdk_pixbuf.rc $@
18
19 install-def-file:
20         $(INSTALL) gdk_pixbuf.def $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).def
21 uninstall-def-file:
22         -rm $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).def
23 else
24 install-def-file:
25 uninstall-def-file:
26 endif
27
28 if MS_LIB_AVAILABLE
29 noinst_DATA = gdk_pixbuf-$(GTK_API_VERSION).lib
30
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:$@
33
34 install-ms-lib:
35         $(INSTALL) gdk_pixbuf-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
36
37 uninstall-ms-lib:
38         -rm $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).lib
39 else
40 install-ms-lib:
41 uninstall-ms-lib:
42 endif
43
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
46
47 gdk-pixbuf-alias.h: gdk-pixbuf.symbols
48          $(PERL) $(srcdir)/makegdkpixbufalias.pl < $(srcdir)/gdk-pixbuf.symbols > gdk-pixbuf-alias.h
49
50 gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols
51          $(PERL) $(srcdir)/makegdkpixbufalias.pl -def < $(srcdir)/gdk-pixbuf.symbols > gdk-pixbuf-aliasdef.c
52
53 if OS_LINUX
54 TESTS = abicheck.sh pltcheck.sh
55 endif
56
57 lib_LTLIBRARIES =               \
58         libgdk_pixbuf-2.0.la
59
60 loaderdir = $(libdir)/gtk-2.0/$(GTK_BINARY_VERSION)/loaders
61
62 module_libs = libgdk_pixbuf-$(GTK_API_VERSION).la $(GDK_PIXBUF_DEP_LIBS)
63
64 #
65 # The PNG loader
66 #
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
71
72 #
73 # The BMP loader
74 #
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)
79
80 #
81 # The WBMP loader
82 #
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)
87
88 #
89 # The GIF loader
90 #
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)
95
96 #
97 # The ICO loader
98 #
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)
103
104 #
105 # The ANI loader
106 #
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)
111
112 #
113 # The JPEG loader
114 #
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)
119
120 #
121 # The PNM loader
122 #
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)
127
128 #
129 # The RAS loader
130 #
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)
135
136 #
137 # The TIFF loader
138 #
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)
143
144 #
145 # The XPM loader
146 #
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)
151
152 #
153 # The XBM loader
154 #
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)
159
160 #
161 # The TGA loader
162 #
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)
167
168 #
169 # The .icns loader
170 #
171 libpixbufloader_static_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)
175
176 #
177 # The PCX loader
178 #
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)
183
184 #
185 # The JPEG2000 loader
186 #
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)
191
192 if HAVE_PNG
193 if INCLUDE_PNG
194 STATIC_PNG_LIB = libstatic-pixbufloader-png.la
195 else
196 PNG_LIB = libpixbufloader-png.la
197 endif
198 endif
199
200 if INCLUDE_BMP
201 STATIC_BMP_LIB = libstatic-pixbufloader-bmp.la
202 else
203 BMP_LIB = libpixbufloader-bmp.la
204 endif
205
206 if INCLUDE_WBMP
207 STATIC_WBMP_LIB = libstatic-pixbufloader-wbmp.la
208 else
209 WBMP_LIB = libpixbufloader-wbmp.la
210 endif
211
212 if INCLUDE_GIF
213 STATIC_GIF_LIB = libstatic-pixbufloader-gif.la
214 else
215 GIF_LIB = libpixbufloader-gif.la
216 endif
217
218 if INCLUDE_ICO
219 STATIC_ICO_LIB = libstatic-pixbufloader-ico.la
220 else
221 ICO_LIB = libpixbufloader-ico.la
222 endif
223
224 if INCLUDE_ANI
225 STATIC_ANI_LIB = libstatic-pixbufloader-ani.la
226 else
227 ANI_LIB = libpixbufloader-ani.la
228 endif
229
230 if HAVE_JPEG
231 if INCLUDE_JPEG
232 STATIC_JPEG_LIB = libstatic-pixbufloader-jpeg.la
233 else
234 JPEG_LIB = libpixbufloader-jpeg.la
235 endif
236 endif
237
238 if INCLUDE_PNM
239 STATIC_PNM_LIB = libstatic-pixbufloader-pnm.la
240 else
241 PNM_LIB = libpixbufloader-pnm.la
242 endif
243
244 if INCLUDE_RAS
245 STATIC_RAS_LIB = libstatic-pixbufloader-ras.la
246 else
247 RAS_LIB = libpixbufloader-ras.la
248 endif
249
250 if HAVE_TIFF
251 if INCLUDE_TIFF
252 STATIC_TIFF_LIB = libstatic-pixbufloader-tiff.la
253 else
254 TIFF_LIB = libpixbufloader-tiff.la
255 endif
256 endif
257
258 if INCLUDE_XPM
259 STATIC_XPM_LIB = libstatic-pixbufloader-xpm.la
260 else
261 XPM_LIB = libpixbufloader-xpm.la
262 endif
263
264 if INCLUDE_XBM
265 STATIC_XBM_LIB = libstatic-pixbufloader-xbm.la
266 else
267 XBM_LIB = libpixbufloader-xbm.la
268 endif
269
270 if INCLUDE_TGA
271 STATIC_TGA_LIB = libstatic-pixbufloader-tga.la
272 else
273 TGA_LIB = libpixbufloader-tga.la
274 endif
275
276 if INCLUDE_PCX
277 STATIC_PCX_LIB = libstatic-pixbufloader-pcx.la
278 else
279 PCX_LIB = libpixbufloader-pcx.la
280 endif
281
282 if INCLUDE_ICNS
283 STATIC_ICNS_LIB = libpixbufloader-static-icns.la
284 else
285 ICNS_LIB = libpixbufloader-icns.la
286 endif
287
288 if HAVE_JASPER
289 if INCLUDE_JASPER
290 STATIC_JASPER_LIB = libstatic-pixbufloader-jasper.la
291 else
292 JASPER_LIB = libpixbufloader-jasper.la
293 endif
294 endif
295
296 if BUILD_DYNAMIC_MODULES
297
298 loader_LTLIBRARIES =    \
299         $(PNG_LIB)      \
300         $(BMP_LIB)      \
301         $(WBMP_LIB)     \
302         $(GIF_LIB)      \
303         $(ICO_LIB)      \
304         $(ANI_LIB)      \
305         $(JPEG_LIB)     \
306         $(PNM_LIB)      \
307         $(RAS_LIB)      \
308         $(TIFF_LIB)     \
309         $(XPM_LIB)      \
310         $(XBM_LIB)      \
311         $(TGA_LIB)      \
312         $(ICNS_LIB)     \
313         $(PCX_LIB)      \
314         $(JASPER_LIB)
315
316
317 endif
318
319 noinst_LTLIBRARIES =            \
320         $(STATIC_PNG_LIB)       \
321         $(STATIC_BMP_LIB)       \
322         $(STATIC_WBMP_LIB)      \
323         $(STATIC_GIF_LIB)       \
324         $(STATIC_ICO_LIB)       \
325         $(STATIC_ANI_LIB)       \
326         $(STATIC_JPEG_LIB)      \
327         $(STATIC_PNM_LIB)       \
328         $(STATIC_RAS_LIB)       \
329         $(STATIC_TIFF_LIB)      \
330         $(STATIC_XPM_LIB)       \
331         $(STATIC_XBM_LIB)       \
332         $(STATIC_TGA_LIB)       \
333         $(STATIC_ICNS_LIB)      \
334         $(STATIC_PCX_LIB)       \
335         $(STATIC_JASPER_LIB)
336
337 builtin_objs = @INCLUDED_LOADER_OBJ@
338
339
340 DEPS = libgdk_pixbuf-$(GTK_API_VERSION).la
341 INCLUDES = \
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)               \
351         $(GTK_DEBUG_FLAGS)                      \
352         $(GDK_PIXBUF_DEP_CFLAGS)                \
353         -DGDK_PIXBUF_ENABLE_BACKEND
354
355 AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(loaderdir)\"" "-DBUILT_MODULES_DIR=\"$(srcdir)/.libs\""
356 LDADDS = libgdk_pixbuf-$(GTK_API_VERSION).la $(GLIB_LIBS)
357
358 noinst_PROGRAMS = test-gdk-pixbuf
359 test_gdk_pixbuf_LDADD = $(LDADDS)
360
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)
364
365 gdk_pixbuf_query_loaders_DEPENDENCIES = $(DEPS)
366 gdk_pixbuf_query_loaders_LDADD = $(LDADDS)
367
368 gdk_pixbuf_query_loaders_SOURCES = queryloaders.c
369
370
371 #
372 # The GdkPixBuf library
373 #
374 libgdk_pixbufincludedir = $(includedir)/gtk-2.0/gdk-pixbuf
375 libgdk_pixbuf_2_0_la_SOURCES =   \
376         gdk-pixbuf-i18n.h        \
377         gdk-pixbuf.c             \
378         gdk-pixbuf-animation.c   \
379         gdk-pixbuf-data.c        \
380         gdk-pixbuf-io.c          \
381         gdk-pixbuf-loader.c      \
382         gdk-pixbuf-scale.c       \
383         gdk-pixbuf-simple-anim.c \
384         gdk-pixbuf-scaled-anim.c \
385         gdk-pixbuf-util.c        \
386         gdk-pixdata.c            \
387         gdk-pixbuf-enum-types.c
388
389 libgdk_pixbuf_2_0_la_LDFLAGS = \
390         $(gdk_pixbuf_win32_res_ldflag)          \
391         -version-info $(LT_VERSION_INFO)        \
392         $(LIBTOOL_EXPORT_OPTIONS)               \
393         $(no_undefined)                         \
394         $(gdk_pixbuf_symbols)
395
396
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)
399
400 gdk_pixbuf_headers =                    \
401         gdk-pixbuf.h                    \
402         gdk-pixbuf-core.h               \
403         gdk-pixbuf-transform.h          \
404         gdk-pixbuf-io.h                 \
405         gdk-pixbuf-animation.h          \
406         gdk-pixbuf-simple-anim.h        \
407         gdk-pixbuf-loader.h
408
409 libgdk_pixbufinclude_HEADERS =          \
410         $(gdk_pixbuf_headers)           \
411         gdk-pixbuf-enum-types.h         \
412         gdk-pixbuf-marshal.h            \
413         gdk-pixbuf-features.h           \
414         gdk-pixdata.h
415
416 noinst_HEADERS =                \
417         gdk-pixbuf-alias.h      \
418         gdk-pixbuf-private.h    \
419         gdk-pixbuf-scaled-anim.h \
420         xpm-color-table.h
421
422 BUILT_SOURCES =                 \
423         gdk-pixbuf-alias.h      \
424         gdk-pixbuf-aliasdef.c   \
425         gdk-pixbuf-enum-types.h \
426         gdk-pixbuf-enum-types.c \
427         gdk-pixbuf-marshal.h    \
428         gdk-pixbuf-marshal.c
429
430 CLEANFILES =
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    \
437         gdk-pixbuf.loaders
438
439 #
440 # gdk-pixbuf-enum-types.h
441 #
442 gdk-pixbuf-enum-types.h: s-enum-types-h
443         @true
444
445 s-enum-types-h: @REBUILD@ $(gdk_pixbuf_headers) Makefile
446         ( cd $(srcdir) && $(GLIB_MKENUMS) \
447                         --fhead "#ifndef __GDK_PIXBUF_ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
448                         --fprod "/* enumerations from \"@filename@\" */\n" \
449                         --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
450                         --ftail "G_END_DECLS\n\n#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
451                 $(gdk_pixbuf_headers) ) > tmp-gdk-pixbuf-enum-types.h \
452         && (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 ) \
453         && rm -f tmp-gdk-pixbuf-enum-types.h \
454         && echo timestamp > $(@F)
455
456 CLEANFILES += tmp-gdk-pixbuf-enum-types.h
457 MAINTAINERCLEANFILES += s-enum-types-h
458
459 #
460 # gdk-pixbuf-enum-types.c
461 #
462 gdk-pixbuf-enum-types.c: @REBUILD@ $(gdk_pixbuf_headers) Makefile
463         (cd $(srcdir) && $(GLIB_MKENUMS) \
464                 --fhead "#include <gdk-pixbuf/gdk-pixbuf.h>\n#include \"gdk-pixbuf-alias.h\"\n" \
465                 --fprod "\n/* enumerations from \"@filename@\" */" \
466                 --ftail "\n#define __GDK_PIXBUF_ENUM_TYPES_C__\n#include \"gdk-pixbuf-aliasdef.c\"" \
467                 --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"       \
468                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
469                 --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n  }\n  return etype;\n}\n" \
470                   $(gdk_pixbuf_headers)) > gdk-pixbuf-enum-types.c
471
472 #
473 # gdk-pixbuf-marshal.h
474 #
475 gdk-pixbuf-marshal.h: @REBUILD@ stamp-gdk-pixbuf-marshal.h
476         @true
477
478 stamp-gdk-pixbuf-marshal.h: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
479         $(GLIB_GENMARSHAL) --prefix=_gdk_pixbuf_marshal $(srcdir)/gdk-pixbuf-marshal.list --header >> xgen-gmh \
480         && (cmp -s xgen-gmh gdk-pixbuf-marshal.h || cp xgen-gmh gdk-pixbuf-marshal.h) \
481         && rm -f xgen-gmh xgen-gmh~ \
482         && echo timestamp > $(@F)
483
484 CLEANFILES += xgen-gmh
485 MAINTAINERCLEANFILES += stamp-gdk-pixbuf-marshal.h
486
487 #
488 # gdk-pixbuf-marshal.c
489 #
490 $(srcdir)/gdk-pixbuf-marshal.c: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
491         (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 \
492         && cp xgen-gmc gdk-pixbuf-marshal.c \
493         && rm -f xgen-gmc xgen-gmc~
494
495 CLEANFILES += xgen-gmc
496
497 # if srcdir!=builddir, clean out maintainer-clean files from builddir
498 # this allows dist to pass.
499 distclean-local:
500         if test $(srcdir) != .; then \
501           rm -f $(MAINTAINERCLEANFILES); \
502         fi
503
504 EXTRA_DIST +=                                   \
505         gdk-pixbuf-csource.1                    \
506         makefile.msc                            \
507         gdk-pixbuf.symbols                      \
508         makegdkpixbufalias.pl                   \
509         abicheck.sh                             \
510         pltcheck.sh                             \
511         gdk_pixbuf.def                          \
512         gdk_pixbuf.rc                           \
513         gdk-pixbuf-marshal.c                    \
514         gdk-pixbuf-marshal.list                 \
515         gen-color-table.pl
516
517 if CROSS_COMPILING
518 RUN_QUERY_LOADER_TEST=false
519 else
520 RUN_QUERY_LOADER_TEST=test -z "$(DESTDIR)"
521 endif
522
523 # Running this if cross compiling or if DESTDIR is set is going to
524 # not work at all, so skip it
525 # We use install-data-hook here to workaround a bug in automake and/or libtool
526 # that makes the install target for the loader libraries a dependency on
527 # install-data-am, and not install-exec-am. We need to ensure this gets run
528 # after the libraries are installed in their final locations.
529 install-data-hook: install-ms-lib install-def-file
530         @if $(RUN_QUERY_LOADER_TEST) ; then \
531           $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
532           $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders > $(DESTDIR)$(sysconfdir)/gtk-2.0/gdk-pixbuf.loaders ; \
533         else \
534           echo "***" ; \
535           echo "*** Warning: gdk-pixbuf.loaders not built" ; \
536           echo "***" ; \
537           echo "*** Generate this file manually on host" ; \
538           echo "*** system using gdk-pixbuf-query-loaders" ; \
539           echo "***" ; \
540         fi
541
542 uninstall-local: uninstall-ms-lib uninstall-def-file
543         rm -f $(DESTDIR)$(sysconfdir)/gtk-2.0/gdk-pixbuf.loaders
544
545 if CROSS_COMPILING
546 else
547 all-local: gdk-pixbuf.loaders
548 endif
549
550 if BUILD_DYNAMIC_MODULES
551 gdk-pixbuf.loaders: $(loader_LTLIBRARIES) gdk-pixbuf-query-loaders$(EXEEXT)
552         LOADERS=`echo libpixbufloader-*.la` ; \
553         if test "x$$LOADERS" != 'xlibpixbufloader-*.la' ; then \
554           echo "Writing a gdk-pixbuf.loader file to use when running examples before installing gdk-pixbuf."; \
555           $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders $$LOADERS > ./gdk-pixbuf.loaders ;\
556         else \
557           echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
558           touch gdk-pixbuf.loaders; \
559         fi
560 else
561 gdk-pixbuf.loaders: 
562         echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
563         touch gdk-pixbuf.loaders;
564 endif