]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/Makefile.am
Use GTK_BINARY_VERSION (and not GTK_VERSION) in the path to the loaders on
[~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)/libgdk_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 STATIC_PNG_LIB = libpixbufloader-static-png.la
148 endif
149
150 if HAVE_JPEG
151 JPEG_LIB = libpixbufloader-jpeg.la
152 STATIC_JPEG_LIB = libpixbufloader-static-jpeg.la
153 endif
154
155 GIF_LIB = libpixbufloader-gif.la
156 STATIC_GIF_LIB = libpixbufloader-static-gif.la
157
158 ICO_LIB = libpixbufloader-ico.la
159 STATIC_ICO_LIB = libpixbufloader-static-ico.la
160
161 RAS_LIB = libpixbufloader-ras.la
162 STATIC_RAS_LIB = libpixbufloader-static-ras.la
163
164 if HAVE_TIFF
165 TIFF_LIB = libpixbufloader-tiff.la
166 STATIC_TIFF_LIB = libpixbufloader-static-tiff.la
167 endif
168
169 XPM_LIB = libpixbufloader-xpm.la
170 STATIC_XPM_LIB = libpixbufloader-static-xpm.la
171
172 PNM_LIB = libpixbufloader-pnm.la
173 STATIC_PNM_LIB = libpixbufloader-static-pnm.la
174
175 BMP_LIB = libpixbufloader-bmp.la
176 STATIC_BMP_LIB = libpixbufloader-static-bmp.la
177
178 WBMP_LIB = libpixbufloader-wbmp.la
179 STATIC_WBMP_LIB = libpixbufloader-static-wbmp.la
180
181 XBM_LIB = libpixbufloader-xbm.la
182 STATIC_XBM_LIB = libpixbufloader-static-xbm.la
183
184 TGA_LIB = libpixbufloader-tga.la
185 STATIC_TGA_LIB = libpixbufloader-static-tga.la
186
187 if BUILD_DYNAMIC_MODULES
188
189 loader_LTLIBRARIES =    \
190         $(PNG_LIB)      \
191         $(JPEG_LIB)     \
192         $(GIF_LIB)      \
193         $(ICO_LIB)      \
194         $(RAS_LIB)      \
195         $(XPM_LIB)      \
196         $(TIFF_LIB)     \
197         $(PNM_LIB)      \
198         $(BMP_LIB)      \
199         $(WBMP_LIB)     \
200         $(XBM_LIB)      \
201         $(TGA_LIB)
202
203
204 extra_sources = 
205 builtin_objs = 
206 else
207 loader_LTLIBRARIES = 
208
209 noinst_LTLIBRARIES =            \
210         $(STATIC_PNG_LIB)       \
211         $(STATIC_JPEG_LIB)      \
212         $(STATIC_GIF_LIB)       \
213         $(STATIC_ICO_LIB)       \
214         $(STATIC_RAS_LIB)       \
215         $(STATIC_XPM_LIB)       \
216         $(STATIC_TIFF_LIB)      \
217         $(STATIC_PNM_LIB)       \
218         $(STATIC_BMP_LIB)       \
219         $(STATIC_WBMP_LIB)      \
220         $(STATIC_XBM_LIB)       \
221         $(STATIC_TGA_LIB)
222
223 builtin_objs = @INCLUDED_LOADER_OBJ@
224
225 endif
226
227 DEPS = libgdk_pixbuf-$(GTK_API_VERSION).la
228 INCLUDES = @STRIP_BEGIN@                        \
229         -DG_LOG_DOMAIN=\"GdkPixbuf\"            \
230         -I$(top_srcdir) -I$(top_builddir)       \
231         -I$(top_srcdir)/gdk-pixbuf              \
232         -I$(top_builddir)/gdk-pixbuf            \
233         -DGTK_VERSION=\"@GTK_VERSION@\"         \
234         -DGTK_BINARY_VERSION=\"@GTK_BINARY_VERSION@\"   \
235         -DG_DISABLE_DEPRECATED                  \
236         -DGDK_PIXBUF_DISABLE_DEPRECATED         \
237         @INCLUDED_LOADER_DEFINE@                \
238         @GTK_DEBUG_FLAGS@                       \
239         @GDK_PIXBUF_DEP_CFLAGS@                 \
240 @STRIP_END@
241
242 AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(loaderdir)\"" "-DBUILT_MODULES_DIR=\"$(srcdir)/.libs\""
243 LDADDS = libgdk_pixbuf-$(GTK_API_VERSION).la
244
245 noinst_PROGRAMS = test-gdk-pixbuf
246 test_gdk_pixbuf_LDADD = $(LDADDS)
247
248 bin_PROGRAMS = gdk-pixbuf-csource
249 gdk_pixbuf_csource_SOURCES = gdk-pixbuf-csource.c
250 gdk_pixbuf_csource_LDADD = $(LDADDS)
251
252 #
253 # manual pages to install
254 #
255 man_MANS = gdk-pixbuf-csource.1
256
257
258 #
259 # The GdkPixBuf library
260 #
261 libgdk_pixbufincludedir = $(includedir)/gtk-2.0/gdk-pixbuf
262 libgdk_pixbuf_2_0_la_SOURCES = @STRIP_BEGIN@ \
263         gdk-pixbuf-i18n.h       \
264         gdk-pixbuf.c            \
265         gdk-pixbuf-animation.c  \
266         gdk-pixbuf-data.c       \
267         gdk-pixbuf-io.c         \
268         gdk-pixbuf-loader.c     \
269         gdk-pixbuf-scale.c      \
270         gdk-pixbuf-util.c       \
271         gdk-pixdata.c           \
272         $(gdk_pixbuf_built_cfiles) \
273 @STRIP_END@
274 libgdk_pixbuf_2_0_la_LDFLAGS = @STRIP_BEGIN@ \
275         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)    \
276         @LIBTOOL_EXPORT_OPTIONS@                                \
277         $(no_undefined)                                         \
278         $(gdk_pixbuf_symbols)                                   \
279 @STRIP_END@
280
281 libgdk_pixbuf_2_0_la_LIBADD = pixops/libpixops.la $(builtin_objs) $(gdk_pixbuf_win32res_lo) $(GDK_PIXBUF_DEP_LIBS)
282 libgdk_pixbuf_2_0_la_DEPENDENCIES = pixops/libpixops.la $(builtin_objs) $(gdk_pixbuf_def)
283
284 gdk_pixbuf_headers =                    \
285         gdk-pixbuf.h                    \
286         gdk-pixbuf-loader.h
287
288 libgdk_pixbufinclude_HEADERS =          \
289         $(gdk_pixbuf_headers)           \
290         $(gdk_pixbuf_built_headers)     \
291         gdk-pixbuf-features.h           \
292         gdk-pixdata.h
293
294 noinst_HEADERS =                \
295         gdk-pixbuf-io.h         \
296         gdk-pixbuf-private.h
297
298 gdk_pixbuf_built_headers = gdk-pixbuf-enum-types.h gdk-pixbuf-marshal.h
299 gdk_pixbuf_built_cfiles = gdk-pixbuf-enum-types.c 
300 $(libgdk_pixbuf_2_0_la_OBJECTS) $(OBJECTS): $(gdk_pixbuf_built_headers) $(gdk_pixbuf_built_cfiles) gdk-pixbuf-marshal.c
301
302 CLEANFILES =
303 MAINTAINERCLEANFILES = $(gdk_pixbuf_built_headers) $(gdk_pixbuf_built_cfiles) gdk-pixbuf-marshal.c
304
305 #
306 # gdk-pixbuf-enum-types.h
307 #
308 $(srcdir)/gdk-pixbuf-enum-types.h: s-enum-types-h
309         @true
310
311 s-enum-types-h: @REBUILD@ $(gdk_pixbuf_headers) Makefile
312         ( cd $(srcdir) && glib-mkenums \
313                         --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" \
314                         --fprod "/* enumerations from \"@filename@\" */\n" \
315                         --vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
316                         --ftail "G_END_DECLS\n\n#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
317                 $(gdk_pixbuf_headers) ) > tmp-gdk-pixbuf-enum-types.h \
318         && (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 ) \
319         && rm -f tmp-gdk-pixbuf-enum-types.h \
320         && echo timestamp > $(@F)
321
322 CLEANFILES += tmp-gdk-pixbuf-enum-types.h
323 MAINTAINERCLEANFILES += s-enum-types-h
324
325 #
326 # gdk-pixbuf-enum-types.c
327 #
328 $(srcdir)/gdk-pixbuf-enum-types.c: @REBUILD@ $(gdk_pixbuf_headers) Makefile
329         cd $(srcdir) && glib-mkenums \
330                 --fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
331                 --fprod "\n/* enumerations from \"@filename@\" */" \
332                 --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[] = {"       \
333                 --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
334                 --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
335                   $(gdk_pixbuf_headers) > gdk-pixbuf-enum-types.c
336
337 #
338 # gdk-pixbuf-marshal.h
339 #
340 $(srcdir)/gdk-pixbuf-marshal.h: @REBUILD@ stamp-gdk-pixbuf-marshal.h
341         @true
342
343 stamp-gdk-pixbuf-marshal.h: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
344         case @GLIB_GENMARSHAL@ in                                                                       \
345            .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;                               \
346            *) glib_genmarshal=@GLIB_GENMARSHAL@ ;;                                                      \
347         esac;                                                                                           \
348         cd $(srcdir) \
349         && $$glib_genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >> xgen-gmh   \
350         && (cmp -s xgen-gmh gdk-pixbuf-marshal.h || cp xgen-gmh gdk-pixbuf-marshal.h)                   \
351         && rm -f xgen-gmh xgen-gmh~     \
352         && echo timestamp > $(@F)
353
354 CLEANFILES += xgen-gmh
355 MAINTAINERCLEANFILES += stamp-gdk-pixbuf-marshal.h
356
357 #
358 # gdk-pixbuf-marshal.c
359 #
360 $(srcdir)/gdk-pixbuf-marshal.c: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
361         case @GLIB_GENMARSHAL@ in                                                                       \
362            .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;                               \
363            *) glib_genmarshal=@GLIB_GENMARSHAL@ ;;                                                      \
364         esac;                                                                                           \
365         cd $(srcdir) \
366         && $$glib_genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >> xgen-gmc     \
367         && cp xgen-gmc gdk-pixbuf-marshal.c                                                             \
368         && rm -f xgen-gmc xgen-gmc~
369
370 CLEANFILES += xgen-gmc
371
372 EXTRA_DIST =                    \
373         gdk-pixbuf-csource.1    \
374         makefile.mingw          \
375         makefile.mingw.in       \
376         makefile.msc            \
377         gdk_pixbuf.def          \
378         gdk_pixbuf.rc           \
379         gdk-pixbuf-marshal.c    \
380         gdk-pixbuf-marshal.list         \
381         pixbufloader_ico.def            \
382         pixbufloader_pnm.def            \
383         pixbufloader_xpm.def            \
384         pixbufloader_bmp.def            \
385         pixbufloader_jpeg.def           \
386         pixbufloader_ras.def            \
387         pixbufloader_gif.def            \
388         pixbufloader_png.def            \
389         pixbufloader_tiff.def           \
390         pixbufloader_wbmp.def           \
391         pixbufloader_xbm.def            \
392         pixbufloader_tga.def
393
394 install-data-local: install-ms-lib install-libtool-import-lib
395
396 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib