Makefile.am 10.1 KB
Newer Older
1

2 3
SUBDIRS = pixops

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
if PLATFORM_WIN32
no_undefined = -no-undefined
endif

if OS_WIN32
gdk_pixbuf_def = gdk_pixbuf.def
gdk_pixbuf_symbols = -export-symbols $(gdk_pixbuf_def)

install-libtool-import-lib:
	$(INSTALL) .libs/libgdk_pixbuf-1.3.dll.a $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
	-rm $(DESTDIR)$(libdir)/libdk_pixbuf-1.3.dll.a
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

if MS_LIB_AVAILABLE
noinst_DATA = gdk_pixbuf-1.3.lib

gdk_pixbuf-1.3.lib: libgdk_pixbuf-1.3.la gdk_pixbuf.def
	lib -name:libgdk_pixbuf-1.3-@LT_CURRENT_MINUS_AGE@.dll -def:gdk_pixbuf.def -out:$@

install-ms-lib:
	$(INSTALL) gdk_pixbuf-1.3.lib $(DESTDIR)$(libdir)

uninstall-ms-lib:
	-rm $(DESTDIR)$(libdir)/gdk_pixbuf-1.3.lib
else
install-ms-lib:
uninstall-ms-lib:
endif

37
lib_LTLIBRARIES = 		\
38
	libgdk_pixbuf-1.3.la
39

40
loaderdir = $(libdir)/gtk-2.0/$(GTK_VERSION)/loaders
41

42 43
module_libs = libgdk_pixbuf-1.3.la $(GDK_PIXBUF_DEP_LIBS)

Federico Mena Quintero's avatar
Federico Mena Quintero committed
44 45 46
#
# The PNG plugin.
#
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
Federico Mena Quintero's avatar
Federico Mena Quintero committed
51 52 53 54

#
# The JPEG loader
#
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)
Federico Mena Quintero's avatar
Federico Mena Quintero committed
59 60 61 62

#
# The XPM loader
#
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)
Federico Mena Quintero's avatar
Federico Mena Quintero committed
67 68 69 70

#
# The GIF loader
#
Havoc Pennington's avatar
Havoc Pennington committed
71 72
libpixbufloader_static_gif_la_SOURCES = io-gif.c io-gif-animation.c io-gif-animation.h
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)
Federico Mena Quintero's avatar
Federico Mena Quintero committed
75 76 77 78

#
# The ICO loader
#
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)
Federico Mena Quintero's avatar
Federico Mena Quintero committed
83 84 85 86

#
# The RAS loader
#
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)
Federico Mena Quintero's avatar
Federico Mena Quintero committed
91 92 93 94

#
# The TIFF loader
#
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)
Federico Mena Quintero's avatar
Federico Mena Quintero committed
99 100 101 102

#
# The PNM loader
#
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)
Federico Mena Quintero's avatar
Federico Mena Quintero committed
107 108 109 110

#
# The BMP loader
#
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)
Federico Mena Quintero's avatar
Federico Mena Quintero committed
115

116 117 118
#
# The WBMP loader
#
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 126 127
#
# The XBM loader
#
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 133 134
#
# The TGA loader
#
libpixbufloader_tga_la_SOURCES = io-tga.c
135
libpixbufloader_tga_la_LDFLAGS = -avoid-version -module $(no_undefined)
136 137
libpixbufloader_tga_la_LIBADD = $(module_libs)

138
if HAVE_PNG
139
PNG_LIB = libpixbufloader-png.la
140 141 142
endif

if HAVE_JPEG
143
JPEG_LIB = libpixbufloader-jpeg.la
144 145
endif

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 155
endif

156
XPM_LIB = libpixbufloader-xpm.la
157

158
PNM_LIB = libpixbufloader-pnm.la
159

160
BMP_LIB = libpixbufloader-bmp.la
161

162 163
WBMP_LIB = libpixbufloader-wbmp.la

164 165
XBM_LIB = libpixbufloader-xbm.la

166 167
TGA_LIB = libpixbufloader-tga.la

Federico Mena Quintero's avatar
Federico Mena Quintero committed
168 169
if BUILD_DYNAMIC_MODULES

170
loader_LTLIBRARIES = 	\
171 172 173
	$(PNG_LIB)	\
	$(JPEG_LIB)	\
	$(GIF_LIB)	\
174
	$(ICO_LIB)	\
175
	$(RAS_LIB)	\
176
	$(XPM_LIB)	\
177
	$(TIFF_LIB)	\
178
	$(PNM_LIB)	\
179
	$(BMP_LIB)	\
180
	$(WBMP_LIB)	\
181 182
	$(XBM_LIB)	\
	$(TGA_LIB)
183

Federico Mena Quintero's avatar
Federico Mena Quintero committed
184 185

extra_sources = 
186
builtin_objs = 
Federico Mena Quintero's avatar
Federico Mena Quintero committed
187
else
188
loader_LTLIBRARIES = 
Federico Mena Quintero's avatar
Federico Mena Quintero committed
189

190 191 192 193 194 195 196 197 198 199 200 201 202 203
noinst_LTLIBRARIES =  	\
	libpixbufloader-static-png.la \
	libpixbufloader-static-jpeg.la \
	libpixbufloader-static-gif.la  \
	libpixbufloader-static-ico.la  \
	libpixbufloader-static-ras.la  \
	libpixbufloader-static-tiff.la \
	libpixbufloader-static-xpm.la  \
	libpixbufloader-static-pnm.la  \
	libpixbufloader-static-bmp.la  \
	libpixbufloader-static-wbmp.la

builtin_objs = @INCLUDED_LOADER_OBJ@

Federico Mena Quintero's avatar
Federico Mena Quintero committed
204 205
endif

206
DEPS = libgdk_pixbuf-1.3.la
207 208
INCLUDES = @STRIP_BEGIN@ 			\
	-DG_LOG_DOMAIN=\"GdkPixbuf\"		\
209
	-I$(top_srcdir) -I$(top_builddir) 	\
210 211
	-I$(top_srcdir)/gdk-pixbuf 		\
	-I$(top_builddir)/gdk-pixbuf 		\
212
	-DGTK_VERSION=\"@GTK_VERSION@\"		\
213 214
	-DG_DISABLE_DEPRECATED			\
	-DGDK_PIXBUF_DISABLE_DEPRECATED		\
215 216
	@INCLUDED_LOADER_DEFINE@ 		\
	@GTK_DEBUG_FLAGS@			\
217 218 219
	@GDK_PIXBUF_DEP_CFLAGS@			\
@STRIP_END@

220
AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(loaderdir)\"" "-DBUILT_MODULES_DIR=\"$(srcdir)/.libs\""
221
LDADDS = libgdk_pixbuf-1.3.la
Elliot Lee's avatar
Elliot Lee committed
222

223
noinst_PROGRAMS = test-gdk-pixbuf test-loaders
224
test_gdk_pixbuf_LDADD = $(LDADDS)
225 226
test_loaders_LDADD = $(LDADDS)
test_loaders_SOURCES = test-loaders.c test-images.h
227

228 229 230
bin_PROGRAMS = gdk-pixbuf-csource
gdk_pixbuf_csource_SOURCES = gdk-pixbuf-csource.c
gdk_pixbuf_csource_LDADD = $(LDADDS)
231

Tim Janik's avatar
Tim Janik committed
232 233 234 235 236
#
# manual pages to install
#
man_MANS = gdk-pixbuf-csource.1

237

238 239 240
#
# The GdkPixBuf library
#
241
libgdk_pixbufincludedir = $(includedir)/gtk-2.0/gdk-pixbuf
242
libgdk_pixbuf_1_3_la_SOURCES = @STRIP_BEGIN@ \
243
	gdk-pixbuf-i18n.h	\
Arturo Espinosa's avatar
Arturo Espinosa committed
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 251
	gdk-pixbuf-util.c	\
	gdk-pixdata.c		\
252
	$(gdk_pixbuf_built_cfiles) \
253 254
@STRIP_END@
libgdk_pixbuf_1_3_la_LDFLAGS = @STRIP_BEGIN@ \
255
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)    \
256
	@LIBTOOL_EXPORT_OPTIONS@				\
257 258
	$(no_undefined)						\
	$(gdk_pixbuf_symbols)					\
259 260
@STRIP_END@

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 265 266
gdk_pixbuf_headers = 			\
	gdk-pixbuf.h			\
	gdk-pixbuf-loader.h
267

268
libgdk_pixbufinclude_HEADERS =  	\
269 270
	$(gdk_pixbuf_headers)		\
	$(gdk_pixbuf_built_headers)	\
271
	gdk-pixbuf-features.h		\
272
	gdk-pixdata.h
273

274 275 276
noinst_HEADERS = 		\
	gdk-pixbuf-io.h		\
	gdk-pixbuf-private.h
Tor Lillqvist's avatar
Tor Lillqvist committed
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 283 284 285 286 287
CLEANFILES =
MAINTAINERCLEANFILES = $(gdk_pixbuf_built_headers) $(gdk_pixbuf_built_cfiles) gdk-pixbuf-marshal.c

#
# gdk-pixbuf-enum-types.h
#
288 289
$(srcdir)/gdk-pixbuf-enum-types.h: s-enum-types-h
	@true
290

291 292
s-enum-types-h: @REBUILD@ $(gdk_pixbuf_headers) Makefile
	( cd $(srcdir) && glib-mkenums \
293
			--fhead "#ifndef __GDK_PIXBUF_ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \
294 295 296 297 298 299 300
			--fprod "/* enumerations from \"@filename@\" */\n" \
			--vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
			--ftail "#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
		$(gdk_pixbuf_headers) ) > tmp-gdk-pixbuf-enum-types.h \
	&& (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 ) \
	&& rm -f tmp-gdk-pixbuf-enum-types.h \
	&& echo timestamp > $(@F)
301

302
CLEANFILES += tmp-gdk-pixbuf-enum-types.h
303 304 305 306 307
MAINTAINERCLEANFILES += s-enum-types-h

#
# gdk-pixbuf-enum-types.c
#
308
$(srcdir)/gdk-pixbuf-enum-types.c: @REBUILD@ $(gdk_pixbuf_headers) Makefile
309
	cd $(srcdir) && glib-mkenums \
310 311
		--fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
		--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 316 317 318 319
		  $(gdk_pixbuf_headers) > gdk-pixbuf-enum-types.c

#
# gdk-pixbuf-marshal.h
#
320
$(srcdir)/gdk-pixbuf-marshal.h: @REBUILD@ stamp-gdk-pixbuf-marshal.h
321
	@true
322

323 324 325 326 327 328 329 330 331
stamp-gdk-pixbuf-marshal.h: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
	case @GLIB_GENMARSHAL@ in									\
	   .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;				\
	   *) glib_genmarshal=@GLIB_GENMARSHAL@ ;;							\
	esac;												\
	cd $(srcdir) \
	&& $$glib_genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >> xgen-gmh	\
	&& (cmp -s xgen-gmh gdk-pixbuf-marshal.h || cp xgen-gmh gdk-pixbuf-marshal.h)			\
	&& rm -f xgen-gmh xgen-gmh~	\
332
	&& echo timestamp > $(@F)
333

334
CLEANFILES += xgen-gmh
335 336 337 338 339
MAINTAINERCLEANFILES += stamp-gdk-pixbuf-marshal.h

#
# gdk-pixbuf-marshal.c
#
340 341 342 343 344 345 346 347 348
$(srcdir)/gdk-pixbuf-marshal.c: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
	case @GLIB_GENMARSHAL@ in									\
	   .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;				\
	   *) glib_genmarshal=@GLIB_GENMARSHAL@ ;;							\
	esac;												\
	cd $(srcdir) \
	&& $$glib_genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >> xgen-gmc	\
	&& cp xgen-gmc gdk-pixbuf-marshal.c								\
	&& rm -f xgen-gmc xgen-gmc~
349

350
CLEANFILES += xgen-gmc
351

Tor Lillqvist's avatar
Tor Lillqvist committed
352
EXTRA_DIST =			\
Owen Taylor's avatar
Owen Taylor committed
353
        gdk-pixbuf-csource.1    \
Tor Lillqvist's avatar
Tor Lillqvist committed
354 355 356
	makefile.mingw		\
	makefile.mingw.in	\
	gdk_pixbuf.def		\
357
	gdk-pixbuf-marshal.c	\
Tim Janik's avatar
Tim Janik committed
358
	gdk-pixbuf-marshal.list		\
359 360 361 362 363 364 365 366 367
	pixbufloader_ico.def		\
	pixbufloader_pnm.def		\
	pixbufloader_xpm.def		\
	pixbufloader_bmp.def		\
	pixbufloader_jpeg.def		\
	pixbufloader_ras.def		\
	pixbufloader_gif.def		\
	pixbufloader_png.def		\
	pixbufloader_tiff.def		\
368 369
	pixbufloader_wbmp.def		\
	pixbufloader_xbm.def
370 371 372 373

install-data-local: install-ms-lib install-libtool-import-lib

uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib