]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/Makefile.am
f33a3bbe04ea363a1772249f6fe23d6c48f6e516
[~andy/gtk] / gdk-pixbuf / Makefile.am
1
2 SUBDIRS = pixops
3
4 if PLATFORM_WIN32
5 no_undefined = -no-undefined
6 endif
7
8 if OS_WIN32
9 gdk_pixbuf_def = gdk_pixbuf.def
10 gdk_pixbuf_symbols = -export-symbols $(gdk_pixbuf_def)
11
12 gdk_pixbuf_win32res_lo = gdk_pixbuf-win32res.lo
13
14 gdk_pixbuf-win32res.lo : gdk_pixbuf.rc
15         $(top_srcdir)/build/win32/lt-compile-resource gdk_pixbuf.rc gdk_pixbuf-win32res.lo
16
17 install-libtool-import-lib:
18         $(INSTALL) .libs/libgdk_pixbuf-$(GTK_API_VERSION).dll.a $(DESTDIR)$(libdir)
19 uninstall-libtool-import-lib:
20         -rm $(DESTDIR)$(libdir)/libdk_pixbuf-$(GTK_API_VERSION).dll.a
21 else
22 install-libtool-import-lib:
23 uninstall-libtool-import-lib:
24 endif
25
26 if MS_LIB_AVAILABLE
27 noinst_DATA = gdk_pixbuf-$(GTK_API_VERSION).lib
28
29 gdk_pixbuf-$(GTK_API_VERSION).lib: libgdk_pixbuf-$(GTK_API_VERSION).la gdk_pixbuf.def
30         lib -name:libgdk_pixbuf-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gdk_pixbuf.def -out:$@
31
32 install-ms-lib:
33         $(INSTALL) gdk_pixbuf-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
34
35 uninstall-ms-lib:
36         -rm $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).lib
37 else
38 install-ms-lib:
39 uninstall-ms-lib:
40 endif
41
42 lib_LTLIBRARIES =               \
43         libgdk_pixbuf-2.0.la
44
45 loaderdir = $(libdir)/gtk-2.0/$(GTK_BINARY_VERSION)/loaders
46
47 module_libs = libgdk_pixbuf-$(GTK_API_VERSION).la $(GDK_PIXBUF_DEP_LIBS)
48
49 #
50 # The PNG plugin.
51 #
52 libpixbufloader_png_la_SOURCES = io-png.c
53 libpixbufloader_png_la_LDFLAGS = -avoid-version -module $(no_undefined)
54 libpixbufloader_png_la_LIBADD = $(LIBPNG) $(module_libs)
55 libpixbufloader_static_png_la_SOURCES = io-png.c
56
57 #
58 # The JPEG loader
59 #
60 libpixbufloader_static_jpeg_la_SOURCES = io-jpeg.c
61 libpixbufloader_jpeg_la_SOURCES = io-jpeg.c
62 libpixbufloader_jpeg_la_LDFLAGS = -avoid-version -module $(no_undefined)
63 libpixbufloader_jpeg_la_LIBADD = $(LIBJPEG) $(module_libs)
64
65 #
66 # The XPM loader
67 #
68 libpixbufloader_static_xpm_la_SOURCES = io-xpm.c
69 libpixbufloader_xpm_la_SOURCES = io-xpm.c
70 libpixbufloader_xpm_la_LDFLAGS = -avoid-version -module $(no_undefined)
71 libpixbufloader_xpm_la_LIBADD = $(module_libs)
72
73 #
74 # The GIF loader
75 #
76 libpixbufloader_static_gif_la_SOURCES = io-gif.c io-gif-animation.c io-gif-animation.h
77 libpixbufloader_gif_la_SOURCES = io-gif.c io-gif-animation.c io-gif-animation.h
78 libpixbufloader_gif_la_LDFLAGS = -avoid-version -module $(no_undefined)
79 libpixbufloader_gif_la_LIBADD = $(module_libs)
80
81 #
82 # The ICO loader
83 #
84 libpixbufloader_static_ico_la_SOURCES = io-ico.c
85 libpixbufloader_ico_la_SOURCES = io-ico.c
86 libpixbufloader_ico_la_LDFLAGS = -avoid-version -module $(no_undefined)
87 libpixbufloader_ico_la_LIBADD = $(module_libs)
88
89 #
90 # The RAS loader
91 #
92 libpixbufloader_static_ras_la_SOURCES = io-ras.c
93 libpixbufloader_ras_la_SOURCES = io-ras.c
94 libpixbufloader_ras_la_LDFLAGS = -avoid-version -module $(no_undefined)
95 libpixbufloader_ras_la_LIBADD = $(module_libs)
96
97 #
98 # The TIFF loader
99 #
100 libpixbufloader_static_tiff_la_SOURCES = io-tiff.c
101 libpixbufloader_tiff_la_SOURCES = io-tiff.c
102 libpixbufloader_tiff_la_LDFLAGS = -avoid-version -module $(no_undefined)
103 libpixbufloader_tiff_la_LIBADD = $(LIBTIFF) $(module_libs)
104
105 #
106 # The PNM loader
107 #
108 libpixbufloader_static_pnm_la_SOURCES = io-pnm.c
109 libpixbufloader_pnm_la_SOURCES = io-pnm.c
110 libpixbufloader_pnm_la_LDFLAGS = -avoid-version -module $(no_undefined)
111 libpixbufloader_pnm_la_LIBADD = $(module_libs)
112
113 #
114 # The BMP loader
115 #
116 libpixbufloader_static_bmp_la_SOURCES = io-bmp.c
117 libpixbufloader_bmp_la_SOURCES = io-bmp.c
118 libpixbufloader_bmp_la_LDFLAGS = -avoid-version -module $(no_undefined)
119 libpixbufloader_bmp_la_LIBADD = $(module_libs)
120
121 #
122 # The WBMP loader
123 #
124 libpixbufloader_static_wbmp_la_SOURCES = io-wbmp.c
125 libpixbufloader_wbmp_la_SOURCES = io-wbmp.c
126 libpixbufloader_wbmp_la_LDFLAGS = -avoid-version -module $(no_undefined)
127 libpixbufloader_wbmp_la_LIBADD = $(module_libs)
128
129 #
130 # The XBM loader
131 #
132 libpixbufloader_static_xbm_la_SOURCES = io-xbm.c
133 libpixbufloader_xbm_la_SOURCES = io-xbm.c
134 libpixbufloader_xbm_la_LDFLAGS = -avoid-version -module $(no_undefined)
135 libpixbufloader_xbm_la_LIBADD = $(module_libs)
136
137 #
138 # The TGA loader
139 #
140 libpixbufloader_static_tga_la_SOURCES = io-tga.c
141 libpixbufloader_tga_la_SOURCES = io-tga.c
142 libpixbufloader_tga_la_LDFLAGS = -avoid-version -module $(no_undefined)
143 libpixbufloader_tga_la_LIBADD = $(module_libs)
144
145 if HAVE_PNG
146 PNG_LIB = libpixbufloader-png.la
147 endif
148
149 if HAVE_JPEG
150 JPEG_LIB = libpixbufloader-jpeg.la
151 endif
152
153 GIF_LIB = libpixbufloader-gif.la
154
155 ICO_LIB = libpixbufloader-ico.la
156
157 RAS_LIB = libpixbufloader-ras.la
158
159 if HAVE_TIFF
160 TIFF_LIB = libpixbufloader-tiff.la
161 endif
162
163 XPM_LIB = libpixbufloader-xpm.la
164
165 PNM_LIB = libpixbufloader-pnm.la
166
167 BMP_LIB = libpixbufloader-bmp.la
168
169 WBMP_LIB = libpixbufloader-wbmp.la
170
171 XBM_LIB = libpixbufloader-xbm.la
172
173 TGA_LIB = libpixbufloader-tga.la
174
175 if BUILD_DYNAMIC_MODULES
176
177 loader_LTLIBRARIES =    \
178         $(PNG_LIB)      \
179         $(JPEG_LIB)     \
180         $(GIF_LIB)      \
181         $(ICO_LIB)      \
182         $(RAS_LIB)      \
183         $(XPM_LIB)      \
184         $(TIFF_LIB)     \
185         $(PNM_LIB)      \
186         $(BMP_LIB)      \
187         $(WBMP_LIB)     \
188         $(XBM_LIB)      \
189         $(TGA_LIB)
190
191
192 extra_sources = 
193 builtin_objs = 
194 else
195 loader_LTLIBRARIES = 
196
197 noinst_LTLIBRARIES =    \
198         libpixbufloader-static-png.la \
199         libpixbufloader-static-jpeg.la \
200         libpixbufloader-static-gif.la  \
201         libpixbufloader-static-ico.la  \
202         libpixbufloader-static-ras.la  \
203         libpixbufloader-static-tiff.la \
204         libpixbufloader-static-xpm.la  \
205         libpixbufloader-static-pnm.la  \
206         libpixbufloader-static-bmp.la  \
207         libpixbufloader-static-wbmp.la \
208         libpixbufloader-static-xbm.la  \
209         libpixbufloader-static-tga.la
210
211 builtin_objs = @INCLUDED_LOADER_OBJ@
212
213 endif
214
215 DEPS = libgdk_pixbuf-$(GTK_API_VERSION).la
216 INCLUDES = @STRIP_BEGIN@                        \
217         -DG_LOG_DOMAIN=\"GdkPixbuf\"            \
218         -I$(top_srcdir) -I$(top_builddir)       \
219         -I$(top_srcdir)/gdk-pixbuf              \
220         -I$(top_builddir)/gdk-pixbuf            \
221         -DGTK_VERSION=\"@GTK_VERSION@\"         \
222         -DG_DISABLE_DEPRECATED                  \
223         -DGDK_PIXBUF_DISABLE_DEPRECATED         \
224         @INCLUDED_LOADER_DEFINE@                \
225         @GTK_DEBUG_FLAGS@                       \
226         @GDK_PIXBUF_DEP_CFLAGS@                 \
227 @STRIP_END@
228
229 AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(loaderdir)\"" "-DBUILT_MODULES_DIR=\"$(srcdir)/.libs\""
230 LDADDS = libgdk_pixbuf-$(GTK_API_VERSION).la
231
232 noinst_PROGRAMS = test-gdk-pixbuf test-loaders
233 test_gdk_pixbuf_LDADD = $(LDADDS)
234 test_loaders_LDADD = $(LDADDS)
235 test_loaders_SOURCES = test-loaders.c test-images.h
236
237 bin_PROGRAMS = gdk-pixbuf-csource
238 gdk_pixbuf_csource_SOURCES = gdk-pixbuf-csource.c
239 gdk_pixbuf_csource_LDADD = $(LDADDS)
240
241 #
242 # manual pages to install
243 #
244 man_MANS = gdk-pixbuf-csource.1
245
246
247 #
248 # The GdkPixBuf library
249 #
250 libgdk_pixbufincludedir = $(includedir)/gtk-2.0/gdk-pixbuf
251 libgdk_pixbuf_2_0_la_SOURCES = @STRIP_BEGIN@ \
252         gdk-pixbuf-i18n.h       \
253         gdk-pixbuf.c            \
254         gdk-pixbuf-animation.c  \
255         gdk-pixbuf-data.c       \
256         gdk-pixbuf-io.c         \
257         gdk-pixbuf-loader.c     \
258         gdk-pixbuf-scale.c      \
259         gdk-pixbuf-util.c       \
260         gdk-pixdata.c           \
261         $(gdk_pixbuf_built_cfiles) \
262 @STRIP_END@
263 libgdk_pixbuf_2_0_la_LDFLAGS = @STRIP_BEGIN@ \
264         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)    \
265         @LIBTOOL_EXPORT_OPTIONS@                                \
266         $(no_undefined)                                         \
267         $(gdk_pixbuf_symbols)                                   \
268 @STRIP_END@
269
270 libgdk_pixbuf_2_0_la_LIBADD = pixops/libpixops.la $(builtin_objs) $(gdk_pixbuf_win32res_lo) $(GDK_PIXBUF_DEP_LIBS)
271 libgdk_pixbuf_2_0_la_DEPENDENCIES = pixops/libpixops.la $(builtin_objs) $(gdk_pixbuf_def)
272
273 gdk_pixbuf_headers =                    \
274         gdk-pixbuf.h                    \
275         gdk-pixbuf-loader.h
276
277 libgdk_pixbufinclude_HEADERS =          \
278         $(gdk_pixbuf_headers)           \
279         $(gdk_pixbuf_built_headers)     \
280         gdk-pixbuf-features.h           \
281         gdk-pixdata.h
282
283 noinst_HEADERS =                \
284         gdk-pixbuf-io.h         \
285         gdk-pixbuf-private.h
286
287 gdk_pixbuf_built_headers = gdk-pixbuf-enum-types.h gdk-pixbuf-marshal.h
288 gdk_pixbuf_built_cfiles = gdk-pixbuf-enum-types.c 
289 $(libgdk_pixbuf_2_0_la_OBJECTS) $(OBJECTS): $(gdk_pixbuf_built_headers) $(gdk_pixbuf_built_cfiles) gdk-pixbuf-marshal.c
290
291 CLEANFILES =
292 MAINTAINERCLEANFILES = $(gdk_pixbuf_built_headers) $(gdk_pixbuf_built_cfiles) gdk-pixbuf-marshal.c
293
294 #
295 # gdk-pixbuf-enum-types.h
296 #
297 $(srcdir)/gdk-pixbuf-enum-types.h: s-enum-types-h
298         @true
299
300 s-enum-types-h: @REBUILD@ $(gdk_pixbuf_headers) Makefile
301         ( cd $(srcdir) && glib-mkenums \
302                         --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" \
303                         --fprod "/* enumerations from \"@filename@\" */\n" \
304                         --vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
305                         --ftail "G_END_DECLS\n\n#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
306                 $(gdk_pixbuf_headers) ) > tmp-gdk-pixbuf-enum-types.h \
307         && (cmp -s tmp-gdk-pixbuf-enum-types.h $(srcdir)/gdk-pixbuf-enum-types.h || cp tmp-gdk-pixbuf-enum-types.h $(srcdir)/gdk-pixbuf-enum-types.h ) \
308         && rm -f tmp-gdk-pixbuf-enum-types.h \
309         && echo timestamp > $(@F)
310
311 CLEANFILES += tmp-gdk-pixbuf-enum-types.h
312 MAINTAINERCLEANFILES += s-enum-types-h
313
314 #
315 # gdk-pixbuf-enum-types.c
316 #
317 $(srcdir)/gdk-pixbuf-enum-types.c: @REBUILD@ $(gdk_pixbuf_headers) Makefile
318         cd $(srcdir) && glib-mkenums \
319                 --fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
320                 --fprod "\n/* enumerations from \"@filename@\" */" \
321                 --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[] = {"       \
322                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
323                 --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
324                   $(gdk_pixbuf_headers) > gdk-pixbuf-enum-types.c
325
326 #
327 # gdk-pixbuf-marshal.h
328 #
329 $(srcdir)/gdk-pixbuf-marshal.h: @REBUILD@ stamp-gdk-pixbuf-marshal.h
330         @true
331
332 stamp-gdk-pixbuf-marshal.h: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
333         case @GLIB_GENMARSHAL@ in                                                                       \
334            .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;                               \
335            *) glib_genmarshal=@GLIB_GENMARSHAL@ ;;                                                      \
336         esac;                                                                                           \
337         cd $(srcdir) \
338         && $$glib_genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >> xgen-gmh   \
339         && (cmp -s xgen-gmh gdk-pixbuf-marshal.h || cp xgen-gmh gdk-pixbuf-marshal.h)                   \
340         && rm -f xgen-gmh xgen-gmh~     \
341         && echo timestamp > $(@F)
342
343 CLEANFILES += xgen-gmh
344 MAINTAINERCLEANFILES += stamp-gdk-pixbuf-marshal.h
345
346 #
347 # gdk-pixbuf-marshal.c
348 #
349 $(srcdir)/gdk-pixbuf-marshal.c: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
350         case @GLIB_GENMARSHAL@ in                                                                       \
351            .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;                               \
352            *) glib_genmarshal=@GLIB_GENMARSHAL@ ;;                                                      \
353         esac;                                                                                           \
354         cd $(srcdir) \
355         && $$glib_genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >> xgen-gmc     \
356         && cp xgen-gmc gdk-pixbuf-marshal.c                                                             \
357         && rm -f xgen-gmc xgen-gmc~
358
359 CLEANFILES += xgen-gmc
360
361 EXTRA_DIST =                    \
362         gdk-pixbuf-csource.1    \
363         makefile.mingw          \
364         makefile.mingw.in       \
365         makefile.msc            \
366         gdk_pixbuf.def          \
367         gdk_pixbuf.rc           \
368         gdk-pixbuf-marshal.c    \
369         gdk-pixbuf-marshal.list         \
370         pixbufloader_ico.def            \
371         pixbufloader_pnm.def            \
372         pixbufloader_xpm.def            \
373         pixbufloader_bmp.def            \
374         pixbufloader_jpeg.def           \
375         pixbufloader_ras.def            \
376         pixbufloader_gif.def            \
377         pixbufloader_png.def            \
378         pixbufloader_tiff.def           \
379         pixbufloader_wbmp.def           \
380         pixbufloader_xbm.def            \
381         pixbufloader_tga.def
382
383 install-data-local: install-ms-lib install-libtool-import-lib
384
385 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib