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