]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/Makefile.am
Some cleanups after the module cache file change
[~andy/gtk] / gdk-pixbuf / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2 -include $(INTROSPECTION_MAKEFILE)
3
4 INTROSPECTION_GIRS =
5
6 SUBDIRS = pixops
7
8 if PLATFORM_WIN32
9 no_undefined = -no-undefined
10 endif
11
12 if OS_WIN32
13 gdk_pixbuf_def = gdk_pixbuf.def
14 gdk_pixbuf_symbols = -export-symbols $(srcdir)/gdk_pixbuf.def
15
16 gdk_pixbuf_win32_res = gdk_pixbuf-win32-res.o
17 gdk_pixbuf_win32_res_ldflag = -Wl,gdk_pixbuf-win32-res.o
18
19 libole32 = -lole32
20
21 gdk_pixbuf-win32-res.o : gdk_pixbuf.rc
22         $(WINDRES) gdk_pixbuf.rc $@
23
24 install-def-file:
25         $(INSTALL) $(srcdir)/gdk_pixbuf.def $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).def
26 uninstall-def-file:
27         -rm $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).def
28 else
29 install-def-file:
30 uninstall-def-file:
31 endif
32
33 if MS_LIB_AVAILABLE
34 noinst_DATA = gdk_pixbuf-$(GTK_API_VERSION).lib
35
36 gdk_pixbuf-$(GTK_API_VERSION).lib: libgdk_pixbuf-$(GTK_API_VERSION).la gdk_pixbuf.def
37         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgdk_pixbuf-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gdk_pixbuf.def -out:$@
38
39 install-ms-lib:
40         $(INSTALL) gdk_pixbuf-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
41
42 uninstall-ms-lib:
43         -rm $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).lib
44 else
45 install-ms-lib:
46 uninstall-ms-lib:
47 endif
48
49 # This places the generated .def file in srcdir, since it is expected to be there.
50 # (The one from a tarball is)
51 gdk_pixbuf.def: gdk-pixbuf.symbols
52         (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') > $(srcdir)/gdk_pixbuf.def
53
54 gdk-pixbuf-alias.h: gdk-pixbuf.symbols
55          $(PERL) $(srcdir)/makegdkpixbufalias.pl < $(srcdir)/gdk-pixbuf.symbols > gdk-pixbuf-alias.h
56
57 gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols
58          $(PERL) $(srcdir)/makegdkpixbufalias.pl -def < $(srcdir)/gdk-pixbuf.symbols > gdk-pixbuf-aliasdef.c
59
60 if OS_LINUX
61 TESTS = abicheck.sh pltcheck.sh
62 endif
63
64 lib_LTLIBRARIES =               \
65         libgdk_pixbuf-3.0.la
66
67 loaderdir = $(libdir)/gtk-3.0/$(GTK_BINARY_VERSION)/loaders
68
69 module_libs = libgdk_pixbuf-$(GTK_API_VERSION).la $(GDK_PIXBUF_DEP_LIBS)
70
71 #
72 # The PNG loader
73 #
74 libstatic_pixbufloader_png_la_SOURCES = io-png.c
75 libpixbufloader_png_la_SOURCES = io-png.c
76 libpixbufloader_png_la_LDFLAGS = -avoid-version -module $(no_undefined)
77 libpixbufloader_png_la_LIBADD = $(LIBPNG) $(module_libs)
78
79 #
80 # The BMP loader
81 #
82 libstatic_pixbufloader_bmp_la_SOURCES = io-bmp.c
83 libpixbufloader_bmp_la_SOURCES = io-bmp.c
84 libpixbufloader_bmp_la_LDFLAGS = -avoid-version -module $(no_undefined)
85 libpixbufloader_bmp_la_LIBADD = $(module_libs)
86
87 #
88 # The WBMP loader
89 #
90 libstatic_pixbufloader_wbmp_la_SOURCES = io-wbmp.c
91 libpixbufloader_wbmp_la_SOURCES = io-wbmp.c
92 libpixbufloader_wbmp_la_LDFLAGS = -avoid-version -module $(no_undefined)
93 libpixbufloader_wbmp_la_LIBADD = $(module_libs)
94
95 #
96 # The GIF loader
97 #
98 libstatic_pixbufloader_gif_la_SOURCES = io-gif.c io-gif-animation.c io-gif-animation.h
99 libpixbufloader_gif_la_SOURCES = io-gif.c io-gif-animation.c io-gif-animation.h
100 libpixbufloader_gif_la_LDFLAGS = -avoid-version -module $(no_undefined)
101 libpixbufloader_gif_la_LIBADD = $(module_libs)
102
103 #
104 # The ICO loader
105 #
106 libstatic_pixbufloader_ico_la_SOURCES = io-ico.c
107 libpixbufloader_ico_la_SOURCES = io-ico.c
108 libpixbufloader_ico_la_LDFLAGS = -avoid-version -module $(no_undefined)
109 libpixbufloader_ico_la_LIBADD = $(module_libs)
110
111 #
112 # The ANI loader
113 #
114 libstatic_pixbufloader_ani_la_SOURCES = io-ani.c io-ani-animation.c io-ani-animation.h
115 libpixbufloader_ani_la_SOURCES = io-ani.c io-ani-animation.c io-ani-animation.h
116 libpixbufloader_ani_la_LDFLAGS = -avoid-version -module $(no_undefined)
117 libpixbufloader_ani_la_LIBADD = $(module_libs)
118
119 #
120 # The JPEG loader
121 #
122 libstatic_pixbufloader_jpeg_la_SOURCES = io-jpeg.c
123 libpixbufloader_jpeg_la_SOURCES = io-jpeg.c
124 libpixbufloader_jpeg_la_LDFLAGS = -avoid-version -module $(no_undefined)
125 libpixbufloader_jpeg_la_LIBADD = $(LIBJPEG) $(module_libs)
126
127 #
128 # The PNM loader
129 #
130 libstatic_pixbufloader_pnm_la_SOURCES = io-pnm.c
131 libpixbufloader_pnm_la_SOURCES = io-pnm.c
132 libpixbufloader_pnm_la_LDFLAGS = -avoid-version -module $(no_undefined)
133 libpixbufloader_pnm_la_LIBADD = $(module_libs)
134
135 #
136 # The RAS loader
137 #
138 libstatic_pixbufloader_ras_la_SOURCES = io-ras.c
139 libpixbufloader_ras_la_SOURCES = io-ras.c
140 libpixbufloader_ras_la_LDFLAGS = -avoid-version -module $(no_undefined)
141 libpixbufloader_ras_la_LIBADD = $(module_libs)
142
143 #
144 # The TIFF loader
145 #
146 libstatic_pixbufloader_tiff_la_SOURCES = io-tiff.c
147 libpixbufloader_tiff_la_SOURCES = io-tiff.c
148 libpixbufloader_tiff_la_LDFLAGS = -avoid-version -module $(no_undefined)
149 libpixbufloader_tiff_la_LIBADD = $(LIBTIFF) $(module_libs)
150
151 #
152 # The XPM loader
153 #
154 libstatic_pixbufloader_xpm_la_SOURCES = io-xpm.c
155 libpixbufloader_xpm_la_SOURCES = io-xpm.c
156 libpixbufloader_xpm_la_LDFLAGS = -avoid-version -module $(no_undefined)
157 libpixbufloader_xpm_la_LIBADD = $(module_libs)
158
159 #
160 # The XBM loader
161 #
162 libstatic_pixbufloader_xbm_la_SOURCES = io-xbm.c
163 libpixbufloader_xbm_la_SOURCES = io-xbm.c
164 libpixbufloader_xbm_la_LDFLAGS = -avoid-version -module $(no_undefined)
165 libpixbufloader_xbm_la_LIBADD = $(module_libs)
166
167 #
168 # The TGA loader
169 #
170 libstatic_pixbufloader_tga_la_SOURCES = io-tga.c
171 libpixbufloader_tga_la_SOURCES = io-tga.c
172 libpixbufloader_tga_la_LDFLAGS = -avoid-version -module $(no_undefined)
173 libpixbufloader_tga_la_LIBADD = $(module_libs)
174
175 #
176 # The .icns loader
177 #
178 libstatic_pixbufloader_icns_la_SOURCES = io-icns.c
179 libpixbufloader_icns_la_SOURCES = io-icns.c
180 libpixbufloader_icns_la_LDFLAGS = -avoid-version -module $(no_undefined)
181 libpixbufloader_icns_la_LIBADD = $(module_libs)
182
183 #
184 # The PCX loader
185 #
186 libstatic_pixbufloader_pcx_la_SOURCES = io-pcx.c
187 libpixbufloader_pcx_la_SOURCES = io-pcx.c
188 libpixbufloader_pcx_la_LDFLAGS = -avoid-version -module $(no_undefined)
189 libpixbufloader_pcx_la_LIBADD = $(module_libs)
190
191 #
192 # The JPEG2000 loader
193 #
194 libstatic_pixbufloader_jasper_la_SOURCES = io-jasper.c
195 libpixbufloader_jasper_la_SOURCES = io-jasper.c
196 libpixbufloader_jasper_la_LDFLAGS = -avoid-version -module $(no_undefined)
197 libpixbufloader_jasper_la_LIBADD = $(LIBJASPER) $(module_libs)
198
199 #
200 # The QTIF loader
201 #
202 libstatic_pixbufloader_qtif_la_SOURCES = io-qtif.c
203 libpixbufloader_qtif_la_SOURCES = io-qtif.c
204 libpixbufloader_qtif_la_LDFLAGS = -avoid-version -module $(no_undefined)
205 libpixbufloader_qtif_la_LIBADD = $(module_libs)
206
207 if BUILD_GDIPLUS_LOADERS
208
209 if INCLUDE_GDIPLUS
210
211 # When building the GDI+ loader statically, we put the "common" objects
212 # only in one of the archives to avoid duplicate definitions
213
214 STATIC_GDIPLUS_LIBS = \
215         libstatic-pixbufloader-gdip-ico.la \
216         libstatic-pixbufloader-gdip-wmf.la \
217         libstatic-pixbufloader-gdip-emf.la \
218         libstatic-pixbufloader-gdip-bmp.la \
219         libstatic-pixbufloader-gdip-gif.la \
220         libstatic-pixbufloader-gdip-jpeg.la \
221         libstatic-pixbufloader-gdip-tiff.la
222
223 libstatic_pixbufloader_gdip_ico_la_SOURCES =    \
224         io-gdip-native.h                \
225         io-gdip-propertytags.h          \
226         io-gdip-utils.h                 \
227         io-gdip-utils.c                 \
228         io-gdip-animation.c             \
229         io-gdip-animation.h             \
230         io-gdip-ico.c
231
232 libstatic_pixbufloader_gdip_wmf_la_SOURCES =    \
233         io-gdip-wmf.c
234
235 libstatic_pixbufloader_gdip_emf_la_SOURCES =    \
236         io-gdip-emf.c
237
238 libstatic_pixbufloader_gdip_bmp_la_SOURCES =    \
239         io-gdip-bmp.c
240
241 libstatic_pixbufloader_gdip_gif_la_SOURCES =    \
242         io-gdip-gif.c
243
244 libstatic_pixbufloader_gdip_jpeg_la_SOURCES =   \
245         io-gdip-jpeg.c
246
247 libstatic_pixbufloader_gdip_tiff_la_SOURCES =   \
248         io-gdip-tiff.c
249
250 else
251
252 GDIPLUS_LIBS = \
253         libpixbufloader-gdip-ico.la \
254         libpixbufloader-gdip-wmf.la \
255         libpixbufloader-gdip-emf.la \
256         libpixbufloader-gdip-bmp.la \
257         libpixbufloader-gdip-gif.la \
258         libpixbufloader-gdip-jpeg.la \
259         libpixbufloader-gdip-tiff.la
260
261 libpixbufloader_gdip_ico_la_LDFLAGS = -avoid-version -module -no-undefined
262 libpixbufloader_gdip_ico_la_SOURCES =   \
263         io-gdip-native.h                \
264         io-gdip-propertytags.h          \
265         io-gdip-utils.h                 \
266         io-gdip-utils.c                 \
267         io-gdip-animation.c             \
268         io-gdip-animation.h             \
269         io-gdip-ico.c
270 libpixbufloader_gdip_ico_la_LIBADD = $(module_libs) $(libole32)
271
272 libpixbufloader_gdip_wmf_la_LDFLAGS = -avoid-version -module -no-undefined
273 libpixbufloader_gdip_wmf_la_SOURCES =   \
274         io-gdip-native.h                \
275         io-gdip-propertytags.h          \
276         io-gdip-utils.h                 \
277         io-gdip-utils.c                 \
278         io-gdip-animation.c             \
279         io-gdip-animation.h             \
280         io-gdip-wmf.c
281 libpixbufloader_gdip_wmf_la_LIBADD = $(module_libs) $(libole32)
282
283 libpixbufloader_gdip_emf_la_LDFLAGS = -avoid-version -module -no-undefined
284 libpixbufloader_gdip_emf_la_SOURCES =   \
285         io-gdip-native.h                \
286         io-gdip-propertytags.h          \
287         io-gdip-utils.h                 \
288         io-gdip-utils.c                 \
289         io-gdip-animation.c             \
290         io-gdip-animation.h             \
291         io-gdip-emf.c
292 libpixbufloader_gdip_emf_la_LIBADD = $(module_libs) $(libole32)
293
294 libpixbufloader_gdip_bmp_la_LDFLAGS = -avoid-version -module -no-undefined
295 libpixbufloader_gdip_bmp_la_SOURCES =   \
296         io-gdip-native.h                \
297         io-gdip-propertytags.h          \
298         io-gdip-utils.h                 \
299         io-gdip-utils.c                 \
300         io-gdip-animation.c             \
301         io-gdip-animation.h             \
302         io-gdip-bmp.c
303 libpixbufloader_gdip_bmp_la_LIBADD = $(module_libs) $(libole32)
304
305 libpixbufloader_gdip_gif_la_LDFLAGS = -avoid-version -module -no-undefined
306 libpixbufloader_gdip_gif_la_SOURCES =   \
307         io-gdip-native.h                \
308         io-gdip-propertytags.h          \
309         io-gdip-utils.h                 \
310         io-gdip-utils.c                 \
311         io-gdip-animation.c             \
312         io-gdip-animation.h             \
313         io-gdip-gif.c
314 libpixbufloader_gdip_gif_la_LIBADD = $(module_libs) $(libole32)
315
316 libpixbufloader_gdip_jpeg_la_LDFLAGS = -avoid-version -module -no-undefined
317 libpixbufloader_gdip_jpeg_la_SOURCES =  \
318         io-gdip-native.h                \
319         io-gdip-propertytags.h          \
320         io-gdip-utils.h                 \
321         io-gdip-utils.c                 \
322         io-gdip-animation.c             \
323         io-gdip-animation.h             \
324         io-gdip-jpeg.c
325 libpixbufloader_gdip_jpeg_la_LIBADD = $(module_libs) $(libole32)
326
327 libpixbufloader_gdip_tiff_la_LDFLAGS = -avoid-version -module -no-undefined
328 libpixbufloader_gdip_tiff_la_SOURCES =  \
329         io-gdip-native.h                \
330         io-gdip-propertytags.h          \
331         io-gdip-utils.h                 \
332         io-gdip-utils.c                 \
333         io-gdip-animation.c             \
334         io-gdip-animation.h             \
335         io-gdip-tiff.c
336 libpixbufloader_gdip_tiff_la_LIBADD = $(module_libs) $(libole32)
337
338 endif
339
340 else
341
342 # Loaders that aren't built if we build the GDI+ loader
343
344 if INCLUDE_BMP
345 STATIC_BMP_LIB = libstatic-pixbufloader-bmp.la
346 else
347 BMP_LIB = libpixbufloader-bmp.la
348 endif
349
350 if INCLUDE_GIF
351 STATIC_GIF_LIB = libstatic-pixbufloader-gif.la
352 else
353 GIF_LIB = libpixbufloader-gif.la
354 endif
355
356 if INCLUDE_ICO
357 STATIC_ICO_LIB = libstatic-pixbufloader-ico.la
358 else
359 ICO_LIB = libpixbufloader-ico.la
360 endif
361
362 if HAVE_JPEG
363 if INCLUDE_JPEG
364 STATIC_JPEG_LIB = libstatic-pixbufloader-jpeg.la
365 else
366 JPEG_LIB = libpixbufloader-jpeg.la
367 endif
368 endif
369
370 if HAVE_TIFF
371 if INCLUDE_TIFF
372 STATIC_TIFF_LIB = libstatic-pixbufloader-tiff.la
373 else
374 TIFF_LIB = libpixbufloader-tiff.la
375 endif
376 endif
377
378 # End of loaders not built if building GDI+ loader
379 endif
380
381 if HAVE_PNG
382 if INCLUDE_PNG
383 STATIC_PNG_LIB = libstatic-pixbufloader-png.la
384 else
385 PNG_LIB = libpixbufloader-png.la
386 endif
387 endif
388
389 if INCLUDE_WBMP
390 STATIC_WBMP_LIB = libstatic-pixbufloader-wbmp.la
391 else
392 WBMP_LIB = libpixbufloader-wbmp.la
393 endif
394
395 if INCLUDE_ANI
396 STATIC_ANI_LIB = libstatic-pixbufloader-ani.la
397 else
398 ANI_LIB = libpixbufloader-ani.la
399 endif
400
401 if INCLUDE_PNM
402 STATIC_PNM_LIB = libstatic-pixbufloader-pnm.la
403 else
404 PNM_LIB = libpixbufloader-pnm.la
405 endif
406
407 if INCLUDE_RAS
408 STATIC_RAS_LIB = libstatic-pixbufloader-ras.la
409 else
410 RAS_LIB = libpixbufloader-ras.la
411 endif
412
413 if INCLUDE_XPM
414 STATIC_XPM_LIB = libstatic-pixbufloader-xpm.la
415 else
416 XPM_LIB = libpixbufloader-xpm.la
417 endif
418
419 if INCLUDE_XBM
420 STATIC_XBM_LIB = libstatic-pixbufloader-xbm.la
421 else
422 XBM_LIB = libpixbufloader-xbm.la
423 endif
424
425 if INCLUDE_TGA
426 STATIC_TGA_LIB = libstatic-pixbufloader-tga.la
427 else
428 TGA_LIB = libpixbufloader-tga.la
429 endif
430
431 if INCLUDE_PCX
432 STATIC_PCX_LIB = libstatic-pixbufloader-pcx.la
433 else
434 PCX_LIB = libpixbufloader-pcx.la
435 endif
436
437 if INCLUDE_ICNS
438 STATIC_ICNS_LIB = libstatic-pixbufloader-icns.la
439 else
440 ICNS_LIB = libpixbufloader-icns.la
441 endif
442
443 if HAVE_JASPER
444 if INCLUDE_JASPER
445 STATIC_JASPER_LIB = libstatic-pixbufloader-jasper.la
446 else
447 JASPER_LIB = libpixbufloader-jasper.la
448 endif
449 endif
450
451 if INCLUDE_QTIF
452 STATIC_QTIF_LIB = libstatic-pixbufloader-qtif.la
453 else
454 QTIF_LIB = libpixbufloader-qtif.la
455 endif
456
457 if BUILD_DYNAMIC_MODULES
458
459 loader_LTLIBRARIES =    \
460         $(PNG_LIB)      \
461         $(BMP_LIB)      \
462         $(WBMP_LIB)     \
463         $(GIF_LIB)      \
464         $(ICO_LIB)      \
465         $(ANI_LIB)      \
466         $(JPEG_LIB)     \
467         $(PNM_LIB)      \
468         $(RAS_LIB)      \
469         $(TIFF_LIB)     \
470         $(XPM_LIB)      \
471         $(XBM_LIB)      \
472         $(TGA_LIB)      \
473         $(ICNS_LIB)     \
474         $(PCX_LIB)      \
475         $(JASPER_LIB)   \
476         $(QTIF_LIB)     \
477         $(GDIPLUS_LIBS)
478
479
480 endif
481
482 noinst_LTLIBRARIES =            \
483         $(STATIC_PNG_LIB)       \
484         $(STATIC_BMP_LIB)       \
485         $(STATIC_WBMP_LIB)      \
486         $(STATIC_GIF_LIB)       \
487         $(STATIC_ICO_LIB)       \
488         $(STATIC_ANI_LIB)       \
489         $(STATIC_JPEG_LIB)      \
490         $(STATIC_PNM_LIB)       \
491         $(STATIC_RAS_LIB)       \
492         $(STATIC_TIFF_LIB)      \
493         $(STATIC_XPM_LIB)       \
494         $(STATIC_XBM_LIB)       \
495         $(STATIC_TGA_LIB)       \
496         $(STATIC_ICNS_LIB)      \
497         $(STATIC_PCX_LIB)       \
498         $(STATIC_JASPER_LIB)    \
499         $(STATIC_QTIF_LIB)      \
500         $(STATIC_GDIPLUS_LIBS)
501
502 builtin_objs = @INCLUDED_LOADER_OBJ@
503
504
505 DEPS = libgdk_pixbuf-$(GTK_API_VERSION).la
506 INCLUDES = \
507         -DG_LOG_DOMAIN=\"GdkPixbuf\"            \
508         -DGDK_PIXBUF_COMPILATION                \
509         -I$(top_srcdir) -I$(top_builddir)       \
510         -I$(top_srcdir)/gdk-pixbuf              \
511         -I$(top_builddir)/gdk-pixbuf            \
512         -DGTK_LIBDIR=\"$(libdir)\"      \
513         -DGTK_VERSION=\"$(GTK_VERSION)\"        \
514         -DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\"  \
515         -DGTK_PREFIX=\"$(prefix)\"              \
516         $(INCLUDED_LOADER_DEFINE)               \
517         $(GTK_DEBUG_FLAGS)                      \
518         $(GDK_PIXBUF_DEP_CFLAGS)                \
519         -DGDK_PIXBUF_ENABLE_BACKEND
520
521 AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(loaderdir)\"" "-DBUILT_MODULES_DIR=\"$(srcdir)/.libs\""
522 LDADDS = libgdk_pixbuf-$(GTK_API_VERSION).la $(GDK_PIXBUF_DEP_LIBS)
523
524 noinst_PROGRAMS = test-gdk-pixbuf
525 test_gdk_pixbuf_LDADD = $(LDADDS)
526
527 bin_PROGRAMS = gdk-pixbuf-csource-3.0 gdk-pixbuf-query-loaders-3.0
528 gdk_pixbuf_csource_3_0_SOURCES = gdk-pixbuf-csource.c
529 gdk_pixbuf_csource_3_0_LDADD = $(LDADDS)
530
531 gdk_pixbuf_query_loaders_3_0_DEPENDENCIES = $(DEPS)
532 gdk_pixbuf_query_loaders_3_0_LDADD = $(LDADDS)
533
534 gdk_pixbuf_query_loaders_3_0_SOURCES = queryloaders.c
535
536
537 #
538 # The GdkPixBuf library
539 #
540 libgdk_pixbufincludedir = $(includedir)/gtk-3.0/gdk-pixbuf
541 libgdk_pixbuf_3_0_la_SOURCES =   \
542         gdk-pixbuf-i18n.h        \
543         gdk-pixbuf.c             \
544         gdk-pixbuf-animation.c   \
545         gdk-pixbuf-data.c        \
546         gdk-pixbuf-io.c          \
547         gdk-pixbuf-loader.c      \
548         gdk-pixbuf-scale.c       \
549         gdk-pixbuf-simple-anim.c \
550         gdk-pixbuf-scaled-anim.c \
551         gdk-pixbuf-util.c        \
552         gdk-pixdata.c            \
553         gdk-pixbuf-enum-types.c
554
555 libgdk_pixbuf_3_0_la_LDFLAGS = \
556         $(gdk_pixbuf_win32_res_ldflag)          \
557         -version-info $(LT_VERSION_INFO)        \
558         $(LIBTOOL_EXPORT_OPTIONS)               \
559         $(no_undefined)                         \
560         $(gdk_pixbuf_symbols)
561
562
563 libgdk_pixbuf_3_0_la_LIBADD = pixops/libpixops.la $(builtin_objs) $(GDK_PIXBUF_DEP_LIBS) $(libole32)
564 libgdk_pixbuf_3_0_la_DEPENDENCIES = pixops/libpixops.la $(builtin_objs) $(gdk_pixbuf_def) $(gdk_pixbuf_win32_res)
565
566 gdk_pixbuf_headers =                    \
567         gdk-pixbuf.h                    \
568         gdk-pixbuf-core.h               \
569         gdk-pixbuf-transform.h          \
570         gdk-pixbuf-io.h                 \
571         gdk-pixbuf-animation.h          \
572         gdk-pixbuf-simple-anim.h        \
573         gdk-pixbuf-loader.h
574
575 libgdk_pixbufinclude_HEADERS =          \
576         $(gdk_pixbuf_headers)           \
577         gdk-pixbuf-enum-types.h         \
578         gdk-pixbuf-marshal.h            \
579         gdk-pixbuf-features.h           \
580         gdk-pixdata.h
581
582 noinst_HEADERS =                \
583         gdk-pixbuf-alias.h      \
584         gdk-pixbuf-private.h    \
585         gdk-pixbuf-scaled-anim.h \
586         xpm-color-table.h
587
588 BUILT_SOURCES =                 \
589         gdk-pixbuf-alias.h      \
590         gdk-pixbuf-aliasdef.c   \
591         gdk-pixbuf-enum-types.h \
592         gdk-pixbuf-enum-types.c \
593         gdk-pixbuf-marshal.h    \
594         gdk-pixbuf-marshal.c    \
595         gdk-pixbuf-features.h
596
597 CLEANFILES =
598 MAINTAINERCLEANFILES =          \
599         gdk-pixbuf-aliasdef.c   \
600         gdk-pixbuf-enum-types.h \
601         gdk-pixbuf-enum-types.c \
602         gdk-pixbuf-marshal.h    \
603         gdk-pixbuf-marshal.c    \
604         loaders.cache
605
606 #
607 # gdk-pixbuf-enum-types.h
608 #
609 gdk-pixbuf-enum-types.h: s-enum-types-h
610         @true
611
612 s-enum-types-h: @REBUILD@ $(gdk_pixbuf_headers) gdk-pixbuf-enum-types.h.template
613         ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdk-pixbuf-enum-types.h.template \
614                 $(gdk_pixbuf_headers) ) > tmp-gdk-pixbuf-enum-types.h \
615         && (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 ) \
616         && rm -f tmp-gdk-pixbuf-enum-types.h \
617         && echo timestamp > $(@F)
618
619 CLEANFILES += tmp-gdk-pixbuf-enum-types.h
620 MAINTAINERCLEANFILES += s-enum-types-h
621
622 #
623 # gdk-pixbuf-enum-types.c
624 #
625 gdk-pixbuf-enum-types.c: @REBUILD@ $(gdk_pixbuf_headers) gdk-pixbuf-enum-types.c.template
626         (cd $(srcdir) && $(GLIB_MKENUMS) --template gdk-pixbuf-enum-types.c.template \
627                   $(gdk_pixbuf_headers)) > gdk-pixbuf-enum-types.c
628
629 #
630 # gdk-pixbuf-marshal.h
631 #
632 gdk-pixbuf-marshal.h: @REBUILD@ stamp-gdk-pixbuf-marshal.h
633         @true
634
635 stamp-gdk-pixbuf-marshal.h: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
636         echo "#if !defined(GDK_PIXBUF_DISABLE_DEPRECATED) || defined(GDK_PIXBUF_COMPILATION)" > xgen-gmh \
637         && $(GLIB_GENMARSHAL) --prefix=_gdk_pixbuf_marshal $(srcdir)/gdk-pixbuf-marshal.list --header >> xgen-gmh \
638         && echo "#endif /* !GDK_PIXBUF_DISABLE_DEPRECATED || GDK_PIXBUF_COMPILATION */" >> xgen-gmh \
639         && (cmp -s xgen-gmh gdk-pixbuf-marshal.h || cp xgen-gmh gdk-pixbuf-marshal.h) \
640         && rm -f xgen-gmh xgen-gmh~ \
641         && echo timestamp > $(@F)
642
643 CLEANFILES += xgen-gmh
644 MAINTAINERCLEANFILES += stamp-gdk-pixbuf-marshal.h
645
646 #
647 # gdk-pixbuf-marshal.c
648 #
649 $(srcdir)/gdk-pixbuf-marshal.c: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
650         (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 \
651         && cp xgen-gmc gdk-pixbuf-marshal.c \
652         && rm -f xgen-gmc xgen-gmc~
653
654 CLEANFILES += xgen-gmc
655
656 # if srcdir!=builddir, clean out maintainer-clean files from builddir
657 # this allows dist to pass.
658 distclean-local:
659         if test $(srcdir) != .; then \
660           rm -f $(MAINTAINERCLEANFILES); \
661         fi
662
663 EXTRA_DIST +=                                   \
664         gdk-pixbuf-csource.1                    \
665         makefile.msc                            \
666         gdk-pixbuf.symbols                      \
667         makegdkpixbufalias.pl                   \
668         abicheck.sh                             \
669         pltcheck.sh                             \
670         gdk_pixbuf.def                          \
671         gdk_pixbuf.rc                           \
672         gdk-pixbuf-marshal.c                    \
673         gdk-pixbuf-marshal.list                 \
674         gdk-pixbuf-enum-types.c.template        \
675         gdk-pixbuf-enum-types.h.template        \
676         gen-color-table.pl
677
678 if HAVE_INTROSPECTION
679
680 GdkPixbuf-3.0.gir: libgdk_pixbuf-3.0.la Makefile
681 GdkPixbuf_3_0_gir_SCANNERFLAGS = --strip-prefix=Gdk
682 GdkPixbuf_3_0_gir_INCLUDES = GModule-2.0 Gio-2.0
683 GdkPixbuf_3_0_gir_LIBS = libgdk_pixbuf-3.0.la
684 GdkPixbuf_3_0_gir_CFLAGS = $(INCLUDES)
685 GdkPixbuf_3_0_gir_FILES = \
686     $(addprefix $(srcdir)/,$(libgdk_pixbufinclude_HEADERS)) \
687     $(addprefix $(srcdir)/,$(libgdk_pixbuf_3_0_la_SOURCES))
688 INTROSPECTION_GIRS += GdkPixbuf-3.0.gir
689
690 girdir = $(datadir)/gir-1.0
691 dist_gir_DATA = $(INTROSPECTION_GIRS)
692
693 typelibsdir = $(libdir)/girepository-1.0
694 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
695
696 CLEANFILES += $(dist_gir_DATA) $(typelibs_DATA)
697 endif
698
699 if CROSS_COMPILING
700 RUN_QUERY_LOADER_TEST=false
701 else
702 RUN_QUERY_LOADER_TEST=test -z "$(DESTDIR)"
703 endif
704
705 # Running this if cross compiling or if DESTDIR is set is going to
706 # not work at all, so skip it
707 # We use install-data-hook here to workaround a bug in automake and/or libtool
708 # that makes the install target for the loader libraries a dependency on
709 # install-data-am, and not install-exec-am. We need to ensure this gets run
710 # after the libraries are installed in their final locations.
711 install-data-hook: install-ms-lib install-def-file
712         @if $(RUN_QUERY_LOADER_TEST) ; then \
713           $(mkinstalldirs) $(DESTDIR)$(libdir)/gtk-3.0/3.0.0 ; \
714           $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders-3.0 > $(DESTDIR)$(libdir)/gtk-3.0/3.0.0/loaders.cache ; \
715         else \
716           echo "***" ; \
717           echo "*** Warning: loaders.cache not built" ; \
718           echo "***" ; \
719           echo "*** Generate this file manually on host" ; \
720           echo "*** system using gdk-pixbuf-query-loaders-3.0" ; \
721           echo "***" ; \
722         fi
723
724 uninstall-local: uninstall-ms-lib uninstall-def-file
725         rm -f $(DESTDIR)$(libdir)/gtk-3.0/3.0.0/loaders.cache
726
727 if CROSS_COMPILING
728 else
729 all-local: loaders.cache
730 endif
731
732 if BUILD_DYNAMIC_MODULES
733 loaders.cache: $(loader_LTLIBRARIES) gdk-pixbuf-query-loaders-3.0$(EXEEXT)
734         LOADERS=`echo libpixbufloader-*.la` ; \
735         if test "x$$LOADERS" != 'xlibpixbufloader-*.la' ; then \
736           echo "Writing a loaders.cache file to use when running examples before installing gdk-pixbuf."; \
737           $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders-3.0 $$LOADERS > ./loaders.cache ;\
738         else \
739           echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
740           touch loaders.cache; \
741         fi
742 else
743 loaders.cache:
744         echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
745         touch loaders.cache;
746 endif
747
748 -include $(top_srcdir)/git.mk