diff options
author | David Walter Seikel | 2016-03-29 02:16:55 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-03-29 02:16:55 +1000 |
commit | cb3716ffb584fe0f593b6f1669a8efdba1305104 (patch) | |
tree | 5d1ebc4b6fc17b30f4b34e7e64a2d9514893459b /src/others/mimesh/libg3d-0.0.8/plugins/image | |
parent | Add Prosody build script. (diff) | |
download | SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.zip SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.gz SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.bz2 SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.xz |
Added my version of libg3d and friends.
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/image')
8 files changed, 2246 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/image/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/image/Makefile new file mode 100644 index 0000000..d739118 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/image/Makefile | |||
@@ -0,0 +1,552 @@ | |||
1 | # Makefile.in generated by automake 1.10.1 from Makefile.am. | ||
2 | # plugins/image/Makefile. Generated from Makefile.in by configure. | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
6 | # This Makefile.in is free software; the Free Software Foundation | ||
7 | # gives unlimited permission to copy and/or distribute it, | ||
8 | # with or without modifications, as long as this notice is preserved. | ||
9 | |||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
13 | # PARTICULAR PURPOSE. | ||
14 | |||
15 | |||
16 | |||
17 | |||
18 | pkgdatadir = $(datadir)/libg3d | ||
19 | pkglibdir = $(libdir)/libg3d | ||
20 | pkgincludedir = $(includedir)/libg3d | ||
21 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
22 | install_sh_DATA = $(install_sh) -c -m 644 | ||
23 | install_sh_PROGRAM = $(install_sh) -c | ||
24 | install_sh_SCRIPT = $(install_sh) -c | ||
25 | INSTALL_HEADER = $(INSTALL_DATA) | ||
26 | transform = $(program_transform_name) | ||
27 | NORMAL_INSTALL = : | ||
28 | PRE_INSTALL = : | ||
29 | POST_INSTALL = : | ||
30 | NORMAL_UNINSTALL = : | ||
31 | PRE_UNINSTALL = : | ||
32 | POST_UNINSTALL = : | ||
33 | build_triplet = x86_64-unknown-linux-gnu | ||
34 | host_triplet = x86_64-unknown-linux-gnu | ||
35 | am__append_1 = img_gdkpixbuf.la | ||
36 | subdir = plugins/image | ||
37 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
38 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
39 | am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ | ||
40 | $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \ | ||
41 | $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ | ||
42 | $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \ | ||
43 | $(top_srcdir)/configure.in | ||
44 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
45 | $(ACLOCAL_M4) | ||
46 | mkinstalldirs = $(install_sh) -d | ||
47 | CONFIG_HEADER = $(top_builddir)/include/g3d/config.h | ||
48 | CONFIG_CLEAN_FILES = | ||
49 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
50 | am__vpath_adj = case $$p in \ | ||
51 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
52 | *) f=$$p;; \ | ||
53 | esac; | ||
54 | am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; | ||
55 | am__installdirs = "$(DESTDIR)$(pluginimgdir)" | ||
56 | pluginimgLTLIBRARIES_INSTALL = $(INSTALL) | ||
57 | LTLIBRARIES = $(pluginimg_LTLIBRARIES) | ||
58 | img_bmp_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
59 | am_img_bmp_la_OBJECTS = img_bmp.lo | ||
60 | img_bmp_la_OBJECTS = $(am_img_bmp_la_OBJECTS) | ||
61 | img_dds_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
62 | am_img_dds_la_OBJECTS = img_dds.lo | ||
63 | img_dds_la_OBJECTS = $(am_img_dds_la_OBJECTS) | ||
64 | img_gdkpixbuf_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
65 | am_img_gdkpixbuf_la_OBJECTS = img_gdkpixbuf_la-img_gdkpixbuf.lo | ||
66 | img_gdkpixbuf_la_OBJECTS = $(am_img_gdkpixbuf_la_OBJECTS) | ||
67 | img_gdkpixbuf_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
68 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(img_gdkpixbuf_la_CFLAGS) \ | ||
69 | $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
70 | am_img_gdkpixbuf_la_rpath = -rpath \ | ||
71 | $(pluginimgdir) | ||
72 | img_sgi_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
73 | am_img_sgi_la_OBJECTS = img_sgi.lo | ||
74 | img_sgi_la_OBJECTS = $(am_img_sgi_la_OBJECTS) | ||
75 | DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d | ||
76 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp | ||
77 | am__depfiles_maybe = depfiles | ||
78 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
79 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
80 | LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
81 | --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
82 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
83 | CCLD = $(CC) | ||
84 | LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
85 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | ||
86 | $(LDFLAGS) -o $@ | ||
87 | SOURCES = $(img_bmp_la_SOURCES) $(img_dds_la_SOURCES) \ | ||
88 | $(img_gdkpixbuf_la_SOURCES) $(img_sgi_la_SOURCES) | ||
89 | DIST_SOURCES = $(img_bmp_la_SOURCES) $(img_dds_la_SOURCES) \ | ||
90 | $(img_gdkpixbuf_la_SOURCES) $(img_sgi_la_SOURCES) | ||
91 | ETAGS = etags | ||
92 | CTAGS = ctags | ||
93 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
94 | ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10 | ||
95 | AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar | ||
96 | AR = ar | ||
97 | AS = as | ||
98 | AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf | ||
99 | AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader | ||
100 | AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10 | ||
101 | AWK = gawk | ||
102 | CC = gcc | ||
103 | CCDEPMODE = depmode=gcc3 | ||
104 | CFLAGS = -g -O2 | ||
105 | CPP = gcc -E | ||
106 | CPPFLAGS = | ||
107 | CXX = g++ | ||
108 | CXXCPP = g++ -E | ||
109 | CXXDEPMODE = depmode=gcc3 | ||
110 | CXXFLAGS = -g -O2 | ||
111 | CYGPATH_W = echo | ||
112 | DBG_CFLAGS = -O2 | ||
113 | DEBUG = 0 | ||
114 | DEFS = -DHAVE_CONFIG_H | ||
115 | DEPDIR = .deps | ||
116 | DLLTOOL = dlltool | ||
117 | ECHO = echo | ||
118 | ECHO_C = | ||
119 | ECHO_N = -n | ||
120 | ECHO_T = | ||
121 | EGREP = /bin/grep -E | ||
122 | EXEEXT = | ||
123 | F77 = | ||
124 | FFLAGS = | ||
125 | GDKPIXBUF_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 | ||
126 | GDKPIXBUF_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 | ||
127 | GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include | ||
128 | GLIB_GENMARSHAL = glib-genmarshal | ||
129 | GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
130 | GLIB_MKENUMS = glib-mkenums | ||
131 | GOBJECT_QUERY = gobject-query | ||
132 | GREP = /bin/grep | ||
133 | GTKDOC_CHECK = /usr/bin/gtkdoc-check | ||
134 | GTK_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 | ||
135 | GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 | ||
136 | HTML_DIR = ${datadir}/gtk-doc/html | ||
137 | INSTALL = /usr/bin/install -c | ||
138 | INSTALL_DATA = ${INSTALL} -m 644 | ||
139 | INSTALL_PROGRAM = ${INSTALL} | ||
140 | INSTALL_SCRIPT = ${INSTALL} | ||
141 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s | ||
142 | LDFLAGS = | ||
143 | LEX = flex | ||
144 | LEXLIB = -lfl | ||
145 | LEX_OUTPUT_ROOT = lex.yy | ||
146 | LIBGSF_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libgsf-1 | ||
147 | LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0 | ||
148 | LIBOBJS = | ||
149 | LIBS = -lm | ||
150 | LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet | ||
151 | LIBXML2_CFLAGS = -I/usr/include/libxml2 | ||
152 | LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 | ||
153 | LN_S = ln -s | ||
154 | LTLIBOBJS = | ||
155 | LTVERSION = 0:8:0 | ||
156 | MAGIC_LIBS = -lmagic | ||
157 | MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo | ||
158 | MATH_LIBS = -lm | ||
159 | MKDIR_P = /bin/mkdir -p | ||
160 | OBJDUMP = objdump | ||
161 | OBJEXT = o | ||
162 | PACKAGE = libg3d | ||
163 | PACKAGE_BUGREPORT = | ||
164 | PACKAGE_NAME = | ||
165 | PACKAGE_STRING = | ||
166 | PACKAGE_TARNAME = | ||
167 | PACKAGE_VERSION = | ||
168 | PATH_SEPARATOR = : | ||
169 | PKG_CONFIG = /usr/bin/pkg-config | ||
170 | PLUGINS_LDFLAGS = -avoid-version -export-dynamic | ||
171 | RANLIB = ranlib | ||
172 | SET_MAKE = | ||
173 | SHELL = /bin/bash | ||
174 | STRIP = strip | ||
175 | VERSION = 0.0.8 | ||
176 | XML2_CONFIG = /usr/bin/xml2-config | ||
177 | XML_CPPFLAGS = -I/usr/include/libxml2 | ||
178 | XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 | ||
179 | Z_CFLAGS = | ||
180 | Z_LIBS = -lz | ||
181 | abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/image | ||
182 | abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/image | ||
183 | abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 | ||
184 | abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 | ||
185 | ac_ct_CC = gcc | ||
186 | ac_ct_CXX = g++ | ||
187 | ac_ct_F77 = | ||
188 | am__include = include | ||
189 | am__leading_dot = . | ||
190 | am__quote = | ||
191 | am__tar = ${AMTAR} chof - "$$tardir" | ||
192 | am__untar = ${AMTAR} xf - | ||
193 | bindir = ${exec_prefix}/bin | ||
194 | build = x86_64-unknown-linux-gnu | ||
195 | build_alias = | ||
196 | build_cpu = x86_64 | ||
197 | build_os = linux-gnu | ||
198 | build_vendor = unknown | ||
199 | builddir = . | ||
200 | datadir = ${datarootdir} | ||
201 | datarootdir = ${prefix}/share | ||
202 | docdir = ${datarootdir}/doc/${PACKAGE} | ||
203 | dvidir = ${docdir} | ||
204 | exec_prefix = ${prefix} | ||
205 | host = x86_64-unknown-linux-gnu | ||
206 | host_alias = | ||
207 | host_cpu = x86_64 | ||
208 | host_os = linux-gnu | ||
209 | host_vendor = unknown | ||
210 | htmldir = ${docdir} | ||
211 | includedir = ${prefix}/include | ||
212 | infodir = ${datarootdir}/info | ||
213 | install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh | ||
214 | libdir = ${exec_prefix}/lib | ||
215 | libexecdir = ${exec_prefix}/libexec | ||
216 | localedir = ${datarootdir}/locale | ||
217 | localstatedir = ${prefix}/var | ||
218 | mandir = ${datarootdir}/man | ||
219 | mkdir_p = /bin/mkdir -p | ||
220 | oldincludedir = /usr/include | ||
221 | pdfdir = ${docdir} | ||
222 | prefix = /usr/local | ||
223 | program_transform_name = s,x,x, | ||
224 | psdir = ${docdir} | ||
225 | sbindir = ${exec_prefix}/sbin | ||
226 | sharedstatedir = ${prefix}/com | ||
227 | srcdir = . | ||
228 | sysconfdir = ${prefix}/etc | ||
229 | target_alias = | ||
230 | top_builddir = ../.. | ||
231 | top_srcdir = ../.. | ||
232 | pluginimgdir = $(pkglibdir)/plugins/image | ||
233 | pluginimg_LTLIBRARIES = img_bmp.la img_sgi.la img_dds.la \ | ||
234 | $(am__append_1) | ||
235 | AM_CFLAGS = \ | ||
236 | -Wall -ansi -pedantic \ | ||
237 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
238 | -O2 -DDEBUG=0 \ | ||
239 | -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include | ||
240 | |||
241 | INCLUDES = -I$(top_srcdir)/include | ||
242 | AM_LDFLAGS = \ | ||
243 | -no-undefined -module \ | ||
244 | -avoid-version -export-dynamic | ||
245 | |||
246 | img_bmp_la_SOURCES = img_bmp.c | ||
247 | img_bmp_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
248 | img_sgi_la_SOURCES = img_sgi.c | ||
249 | img_sgi_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
250 | img_dds_la_SOURCES = img_dds.c | ||
251 | img_dds_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
252 | img_gdkpixbuf_la_CFLAGS = ${AM_CFLAGS} -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 | ||
253 | img_gdkpixbuf_la_SOURCES = img_gdkpixbuf.c | ||
254 | img_gdkpixbuf_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 \ | ||
255 | -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 | ||
256 | |||
257 | all: all-am | ||
258 | |||
259 | .SUFFIXES: | ||
260 | .SUFFIXES: .c .lo .o .obj | ||
261 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
262 | @for dep in $?; do \ | ||
263 | case '$(am__configure_deps)' in \ | ||
264 | *$$dep*) \ | ||
265 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
266 | && exit 0; \ | ||
267 | exit 1;; \ | ||
268 | esac; \ | ||
269 | done; \ | ||
270 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/image/Makefile'; \ | ||
271 | cd $(top_srcdir) && \ | ||
272 | $(AUTOMAKE) --gnu plugins/image/Makefile | ||
273 | .PRECIOUS: Makefile | ||
274 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
275 | @case '$?' in \ | ||
276 | *config.status*) \ | ||
277 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
278 | *) \ | ||
279 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
280 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
281 | esac; | ||
282 | |||
283 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
284 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
285 | |||
286 | $(top_srcdir)/configure: $(am__configure_deps) | ||
287 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
288 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
289 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
290 | install-pluginimgLTLIBRARIES: $(pluginimg_LTLIBRARIES) | ||
291 | @$(NORMAL_INSTALL) | ||
292 | test -z "$(pluginimgdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimgdir)" | ||
293 | @list='$(pluginimg_LTLIBRARIES)'; for p in $$list; do \ | ||
294 | if test -f $$p; then \ | ||
295 | f=$(am__strip_dir) \ | ||
296 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimgLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimgdir)/$$f'"; \ | ||
297 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimgLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimgdir)/$$f"; \ | ||
298 | else :; fi; \ | ||
299 | done | ||
300 | |||
301 | uninstall-pluginimgLTLIBRARIES: | ||
302 | @$(NORMAL_UNINSTALL) | ||
303 | @list='$(pluginimg_LTLIBRARIES)'; for p in $$list; do \ | ||
304 | p=$(am__strip_dir) \ | ||
305 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimgdir)/$$p'"; \ | ||
306 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimgdir)/$$p"; \ | ||
307 | done | ||
308 | |||
309 | clean-pluginimgLTLIBRARIES: | ||
310 | -test -z "$(pluginimg_LTLIBRARIES)" || rm -f $(pluginimg_LTLIBRARIES) | ||
311 | @list='$(pluginimg_LTLIBRARIES)'; for p in $$list; do \ | ||
312 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
313 | test "$$dir" != "$$p" || dir=.; \ | ||
314 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
315 | rm -f "$${dir}/so_locations"; \ | ||
316 | done | ||
317 | img_bmp.la: $(img_bmp_la_OBJECTS) $(img_bmp_la_DEPENDENCIES) | ||
318 | $(LINK) -rpath $(pluginimgdir) $(img_bmp_la_OBJECTS) $(img_bmp_la_LIBADD) $(LIBS) | ||
319 | img_dds.la: $(img_dds_la_OBJECTS) $(img_dds_la_DEPENDENCIES) | ||
320 | $(LINK) -rpath $(pluginimgdir) $(img_dds_la_OBJECTS) $(img_dds_la_LIBADD) $(LIBS) | ||
321 | img_gdkpixbuf.la: $(img_gdkpixbuf_la_OBJECTS) $(img_gdkpixbuf_la_DEPENDENCIES) | ||
322 | $(img_gdkpixbuf_la_LINK) $(am_img_gdkpixbuf_la_rpath) $(img_gdkpixbuf_la_OBJECTS) $(img_gdkpixbuf_la_LIBADD) $(LIBS) | ||
323 | img_sgi.la: $(img_sgi_la_OBJECTS) $(img_sgi_la_DEPENDENCIES) | ||
324 | $(LINK) -rpath $(pluginimgdir) $(img_sgi_la_OBJECTS) $(img_sgi_la_LIBADD) $(LIBS) | ||
325 | |||
326 | mostlyclean-compile: | ||
327 | -rm -f *.$(OBJEXT) | ||
328 | |||
329 | distclean-compile: | ||
330 | -rm -f *.tab.c | ||
331 | |||
332 | include ./$(DEPDIR)/img_bmp.Plo | ||
333 | include ./$(DEPDIR)/img_dds.Plo | ||
334 | include ./$(DEPDIR)/img_gdkpixbuf_la-img_gdkpixbuf.Plo | ||
335 | include ./$(DEPDIR)/img_sgi.Plo | ||
336 | |||
337 | .c.o: | ||
338 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
339 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
340 | # source='$<' object='$@' libtool=no \ | ||
341 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
342 | # $(COMPILE) -c $< | ||
343 | |||
344 | .c.obj: | ||
345 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
346 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
347 | # source='$<' object='$@' libtool=no \ | ||
348 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
349 | # $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
350 | |||
351 | .c.lo: | ||
352 | $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
353 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
354 | # source='$<' object='$@' libtool=yes \ | ||
355 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
356 | # $(LTCOMPILE) -c -o $@ $< | ||
357 | |||
358 | img_gdkpixbuf_la-img_gdkpixbuf.lo: img_gdkpixbuf.c | ||
359 | $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(img_gdkpixbuf_la_CFLAGS) $(CFLAGS) -MT img_gdkpixbuf_la-img_gdkpixbuf.lo -MD -MP -MF $(DEPDIR)/img_gdkpixbuf_la-img_gdkpixbuf.Tpo -c -o img_gdkpixbuf_la-img_gdkpixbuf.lo `test -f 'img_gdkpixbuf.c' || echo '$(srcdir)/'`img_gdkpixbuf.c | ||
360 | mv -f $(DEPDIR)/img_gdkpixbuf_la-img_gdkpixbuf.Tpo $(DEPDIR)/img_gdkpixbuf_la-img_gdkpixbuf.Plo | ||
361 | # source='img_gdkpixbuf.c' object='img_gdkpixbuf_la-img_gdkpixbuf.lo' libtool=yes \ | ||
362 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
363 | # $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(img_gdkpixbuf_la_CFLAGS) $(CFLAGS) -c -o img_gdkpixbuf_la-img_gdkpixbuf.lo `test -f 'img_gdkpixbuf.c' || echo '$(srcdir)/'`img_gdkpixbuf.c | ||
364 | |||
365 | mostlyclean-libtool: | ||
366 | -rm -f *.lo | ||
367 | |||
368 | clean-libtool: | ||
369 | -rm -rf .libs _libs | ||
370 | |||
371 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
372 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
373 | unique=`for i in $$list; do \ | ||
374 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
375 | done | \ | ||
376 | $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ | ||
377 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
378 | mkid -fID $$unique | ||
379 | tags: TAGS | ||
380 | |||
381 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
382 | $(TAGS_FILES) $(LISP) | ||
383 | tags=; \ | ||
384 | here=`pwd`; \ | ||
385 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
386 | unique=`for i in $$list; do \ | ||
387 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
388 | done | \ | ||
389 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
390 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
391 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
392 | test -n "$$unique" || unique=$$empty_fix; \ | ||
393 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
394 | $$tags $$unique; \ | ||
395 | fi | ||
396 | ctags: CTAGS | ||
397 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
398 | $(TAGS_FILES) $(LISP) | ||
399 | tags=; \ | ||
400 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
401 | unique=`for i in $$list; do \ | ||
402 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
403 | done | \ | ||
404 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
405 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
406 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
407 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
408 | $$tags $$unique | ||
409 | |||
410 | GTAGS: | ||
411 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
412 | && cd $(top_srcdir) \ | ||
413 | && gtags -i $(GTAGS_ARGS) $$here | ||
414 | |||
415 | distclean-tags: | ||
416 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
417 | |||
418 | distdir: $(DISTFILES) | ||
419 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
420 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
421 | list='$(DISTFILES)'; \ | ||
422 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
423 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
424 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
425 | case $$dist_files in \ | ||
426 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
427 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
428 | sort -u` ;; \ | ||
429 | esac; \ | ||
430 | for file in $$dist_files; do \ | ||
431 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
432 | if test -d $$d/$$file; then \ | ||
433 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
434 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
435 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
436 | fi; \ | ||
437 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
438 | else \ | ||
439 | test -f $(distdir)/$$file \ | ||
440 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
441 | || exit 1; \ | ||
442 | fi; \ | ||
443 | done | ||
444 | check-am: all-am | ||
445 | check: check-am | ||
446 | all-am: Makefile $(LTLIBRARIES) | ||
447 | installdirs: | ||
448 | for dir in "$(DESTDIR)$(pluginimgdir)"; do \ | ||
449 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
450 | done | ||
451 | install: install-am | ||
452 | install-exec: install-exec-am | ||
453 | install-data: install-data-am | ||
454 | uninstall: uninstall-am | ||
455 | |||
456 | install-am: all-am | ||
457 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
458 | |||
459 | installcheck: installcheck-am | ||
460 | install-strip: | ||
461 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
462 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
463 | `test -z '$(STRIP)' || \ | ||
464 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
465 | mostlyclean-generic: | ||
466 | |||
467 | clean-generic: | ||
468 | |||
469 | distclean-generic: | ||
470 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
471 | |||
472 | maintainer-clean-generic: | ||
473 | @echo "This command is intended for maintainers to use" | ||
474 | @echo "it deletes files that may require special tools to rebuild." | ||
475 | clean: clean-am | ||
476 | |||
477 | clean-am: clean-generic clean-libtool clean-pluginimgLTLIBRARIES \ | ||
478 | mostlyclean-am | ||
479 | |||
480 | distclean: distclean-am | ||
481 | -rm -rf ./$(DEPDIR) | ||
482 | -rm -f Makefile | ||
483 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
484 | distclean-tags | ||
485 | |||
486 | dvi: dvi-am | ||
487 | |||
488 | dvi-am: | ||
489 | |||
490 | html: html-am | ||
491 | |||
492 | info: info-am | ||
493 | |||
494 | info-am: | ||
495 | |||
496 | install-data-am: install-pluginimgLTLIBRARIES | ||
497 | |||
498 | install-dvi: install-dvi-am | ||
499 | |||
500 | install-exec-am: | ||
501 | |||
502 | install-html: install-html-am | ||
503 | |||
504 | install-info: install-info-am | ||
505 | |||
506 | install-man: | ||
507 | |||
508 | install-pdf: install-pdf-am | ||
509 | |||
510 | install-ps: install-ps-am | ||
511 | |||
512 | installcheck-am: | ||
513 | |||
514 | maintainer-clean: maintainer-clean-am | ||
515 | -rm -rf ./$(DEPDIR) | ||
516 | -rm -f Makefile | ||
517 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
518 | |||
519 | mostlyclean: mostlyclean-am | ||
520 | |||
521 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
522 | mostlyclean-libtool | ||
523 | |||
524 | pdf: pdf-am | ||
525 | |||
526 | pdf-am: | ||
527 | |||
528 | ps: ps-am | ||
529 | |||
530 | ps-am: | ||
531 | |||
532 | uninstall-am: uninstall-pluginimgLTLIBRARIES | ||
533 | |||
534 | .MAKE: install-am install-strip | ||
535 | |||
536 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
537 | clean-libtool clean-pluginimgLTLIBRARIES ctags distclean \ | ||
538 | distclean-compile distclean-generic distclean-libtool \ | ||
539 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
540 | install install-am install-data install-data-am install-dvi \ | ||
541 | install-dvi-am install-exec install-exec-am install-html \ | ||
542 | install-html-am install-info install-info-am install-man \ | ||
543 | install-pdf install-pdf-am install-pluginimgLTLIBRARIES \ | ||
544 | install-ps install-ps-am install-strip installcheck \ | ||
545 | installcheck-am installdirs maintainer-clean \ | ||
546 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
547 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
548 | tags uninstall uninstall-am uninstall-pluginimgLTLIBRARIES | ||
549 | |||
550 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
551 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
552 | .NOEXPORT: | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/image/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/image/Makefile.am new file mode 100644 index 0000000..1c40c96 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/image/Makefile.am | |||
@@ -0,0 +1,36 @@ | |||
1 | pluginimgdir = $(pkglibdir)/plugins/image | ||
2 | |||
3 | pluginimg_LTLIBRARIES = \ | ||
4 | img_bmp.la \ | ||
5 | img_sgi.la \ | ||
6 | img_dds.la | ||
7 | |||
8 | if HAVE_GDKPIXBUF | ||
9 | pluginimg_LTLIBRARIES += img_gdkpixbuf.la | ||
10 | endif | ||
11 | |||
12 | AM_CFLAGS = \ | ||
13 | -Wall -ansi -pedantic \ | ||
14 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
15 | @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ | ||
16 | @GLIB_CFLAGS@ | ||
17 | |||
18 | INCLUDES = -I$(top_srcdir)/include | ||
19 | |||
20 | AM_LDFLAGS = \ | ||
21 | -no-undefined -module \ | ||
22 | @PLUGINS_LDFLAGS@ | ||
23 | |||
24 | LIBTOOL += --quiet | ||
25 | |||
26 | img_bmp_la_SOURCES = img_bmp.c | ||
27 | img_bmp_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
28 | img_sgi_la_SOURCES = img_sgi.c | ||
29 | img_sgi_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
30 | img_dds_la_SOURCES = img_dds.c | ||
31 | img_dds_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
32 | |||
33 | img_gdkpixbuf_la_CFLAGS = ${AM_CFLAGS} @GDKPIXBUF_CFLAGS@ | ||
34 | img_gdkpixbuf_la_SOURCES = img_gdkpixbuf.c | ||
35 | img_gdkpixbuf_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ \ | ||
36 | @GDKPIXBUF_LIBS@ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/image/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/image/Makefile.in new file mode 100644 index 0000000..23bb6d6 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/image/Makefile.in | |||
@@ -0,0 +1,552 @@ | |||
1 | # Makefile.in generated by automake 1.10.1 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
6 | # This Makefile.in is free software; the Free Software Foundation | ||
7 | # gives unlimited permission to copy and/or distribute it, | ||
8 | # with or without modifications, as long as this notice is preserved. | ||
9 | |||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
13 | # PARTICULAR PURPOSE. | ||
14 | |||
15 | @SET_MAKE@ | ||
16 | |||
17 | VPATH = @srcdir@ | ||
18 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
19 | pkglibdir = $(libdir)/@PACKAGE@ | ||
20 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
21 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
22 | install_sh_DATA = $(install_sh) -c -m 644 | ||
23 | install_sh_PROGRAM = $(install_sh) -c | ||
24 | install_sh_SCRIPT = $(install_sh) -c | ||
25 | INSTALL_HEADER = $(INSTALL_DATA) | ||
26 | transform = $(program_transform_name) | ||
27 | NORMAL_INSTALL = : | ||
28 | PRE_INSTALL = : | ||
29 | POST_INSTALL = : | ||
30 | NORMAL_UNINSTALL = : | ||
31 | PRE_UNINSTALL = : | ||
32 | POST_UNINSTALL = : | ||
33 | build_triplet = @build@ | ||
34 | host_triplet = @host@ | ||
35 | @HAVE_GDKPIXBUF_TRUE@am__append_1 = img_gdkpixbuf.la | ||
36 | subdir = plugins/image | ||
37 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
38 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
39 | am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ | ||
40 | $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \ | ||
41 | $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ | ||
42 | $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \ | ||
43 | $(top_srcdir)/configure.in | ||
44 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
45 | $(ACLOCAL_M4) | ||
46 | mkinstalldirs = $(install_sh) -d | ||
47 | CONFIG_HEADER = $(top_builddir)/include/g3d/config.h | ||
48 | CONFIG_CLEAN_FILES = | ||
49 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
50 | am__vpath_adj = case $$p in \ | ||
51 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
52 | *) f=$$p;; \ | ||
53 | esac; | ||
54 | am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; | ||
55 | am__installdirs = "$(DESTDIR)$(pluginimgdir)" | ||
56 | pluginimgLTLIBRARIES_INSTALL = $(INSTALL) | ||
57 | LTLIBRARIES = $(pluginimg_LTLIBRARIES) | ||
58 | img_bmp_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
59 | am_img_bmp_la_OBJECTS = img_bmp.lo | ||
60 | img_bmp_la_OBJECTS = $(am_img_bmp_la_OBJECTS) | ||
61 | img_dds_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
62 | am_img_dds_la_OBJECTS = img_dds.lo | ||
63 | img_dds_la_OBJECTS = $(am_img_dds_la_OBJECTS) | ||
64 | img_gdkpixbuf_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
65 | am_img_gdkpixbuf_la_OBJECTS = img_gdkpixbuf_la-img_gdkpixbuf.lo | ||
66 | img_gdkpixbuf_la_OBJECTS = $(am_img_gdkpixbuf_la_OBJECTS) | ||
67 | img_gdkpixbuf_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
68 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(img_gdkpixbuf_la_CFLAGS) \ | ||
69 | $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
70 | @HAVE_GDKPIXBUF_TRUE@am_img_gdkpixbuf_la_rpath = -rpath \ | ||
71 | @HAVE_GDKPIXBUF_TRUE@ $(pluginimgdir) | ||
72 | img_sgi_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
73 | am_img_sgi_la_OBJECTS = img_sgi.lo | ||
74 | img_sgi_la_OBJECTS = $(am_img_sgi_la_OBJECTS) | ||
75 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d | ||
76 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp | ||
77 | am__depfiles_maybe = depfiles | ||
78 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
79 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
80 | LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
81 | --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
82 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
83 | CCLD = $(CC) | ||
84 | LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
85 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | ||
86 | $(LDFLAGS) -o $@ | ||
87 | SOURCES = $(img_bmp_la_SOURCES) $(img_dds_la_SOURCES) \ | ||
88 | $(img_gdkpixbuf_la_SOURCES) $(img_sgi_la_SOURCES) | ||
89 | DIST_SOURCES = $(img_bmp_la_SOURCES) $(img_dds_la_SOURCES) \ | ||
90 | $(img_gdkpixbuf_la_SOURCES) $(img_sgi_la_SOURCES) | ||
91 | ETAGS = etags | ||
92 | CTAGS = ctags | ||
93 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
94 | ACLOCAL = @ACLOCAL@ | ||
95 | AMTAR = @AMTAR@ | ||
96 | AR = @AR@ | ||
97 | AS = @AS@ | ||
98 | AUTOCONF = @AUTOCONF@ | ||
99 | AUTOHEADER = @AUTOHEADER@ | ||
100 | AUTOMAKE = @AUTOMAKE@ | ||
101 | AWK = @AWK@ | ||
102 | CC = @CC@ | ||
103 | CCDEPMODE = @CCDEPMODE@ | ||
104 | CFLAGS = @CFLAGS@ | ||
105 | CPP = @CPP@ | ||
106 | CPPFLAGS = @CPPFLAGS@ | ||
107 | CXX = @CXX@ | ||
108 | CXXCPP = @CXXCPP@ | ||
109 | CXXDEPMODE = @CXXDEPMODE@ | ||
110 | CXXFLAGS = @CXXFLAGS@ | ||
111 | CYGPATH_W = @CYGPATH_W@ | ||
112 | DBG_CFLAGS = @DBG_CFLAGS@ | ||
113 | DEBUG = @DEBUG@ | ||
114 | DEFS = @DEFS@ | ||
115 | DEPDIR = @DEPDIR@ | ||
116 | DLLTOOL = @DLLTOOL@ | ||
117 | ECHO = @ECHO@ | ||
118 | ECHO_C = @ECHO_C@ | ||
119 | ECHO_N = @ECHO_N@ | ||
120 | ECHO_T = @ECHO_T@ | ||
121 | EGREP = @EGREP@ | ||
122 | EXEEXT = @EXEEXT@ | ||
123 | F77 = @F77@ | ||
124 | FFLAGS = @FFLAGS@ | ||
125 | GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ | ||
126 | GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ | ||
127 | GLIB_CFLAGS = @GLIB_CFLAGS@ | ||
128 | GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ | ||
129 | GLIB_LIBS = @GLIB_LIBS@ | ||
130 | GLIB_MKENUMS = @GLIB_MKENUMS@ | ||
131 | GOBJECT_QUERY = @GOBJECT_QUERY@ | ||
132 | GREP = @GREP@ | ||
133 | GTKDOC_CHECK = @GTKDOC_CHECK@ | ||
134 | GTK_CFLAGS = @GTK_CFLAGS@ | ||
135 | GTK_LIBS = @GTK_LIBS@ | ||
136 | HTML_DIR = @HTML_DIR@ | ||
137 | INSTALL = @INSTALL@ | ||
138 | INSTALL_DATA = @INSTALL_DATA@ | ||
139 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
140 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
141 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
142 | LDFLAGS = @LDFLAGS@ | ||
143 | LEX = @LEX@ | ||
144 | LEXLIB = @LEXLIB@ | ||
145 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
146 | LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ | ||
147 | LIBGSF_LIBS = @LIBGSF_LIBS@ | ||
148 | LIBOBJS = @LIBOBJS@ | ||
149 | LIBS = @LIBS@ | ||
150 | LIBTOOL = @LIBTOOL@ --quiet | ||
151 | LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ | ||
152 | LIBXML2_LIBS = @LIBXML2_LIBS@ | ||
153 | LN_S = @LN_S@ | ||
154 | LTLIBOBJS = @LTLIBOBJS@ | ||
155 | LTVERSION = @LTVERSION@ | ||
156 | MAGIC_LIBS = @MAGIC_LIBS@ | ||
157 | MAKEINFO = @MAKEINFO@ | ||
158 | MATH_LIBS = @MATH_LIBS@ | ||
159 | MKDIR_P = @MKDIR_P@ | ||
160 | OBJDUMP = @OBJDUMP@ | ||
161 | OBJEXT = @OBJEXT@ | ||
162 | PACKAGE = @PACKAGE@ | ||
163 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
164 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
165 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
166 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
167 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
168 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
169 | PKG_CONFIG = @PKG_CONFIG@ | ||
170 | PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@ | ||
171 | RANLIB = @RANLIB@ | ||
172 | SET_MAKE = @SET_MAKE@ | ||
173 | SHELL = @SHELL@ | ||
174 | STRIP = @STRIP@ | ||
175 | VERSION = @VERSION@ | ||
176 | XML2_CONFIG = @XML2_CONFIG@ | ||
177 | XML_CPPFLAGS = @XML_CPPFLAGS@ | ||
178 | XML_LIBS = @XML_LIBS@ | ||
179 | Z_CFLAGS = @Z_CFLAGS@ | ||
180 | Z_LIBS = @Z_LIBS@ | ||
181 | abs_builddir = @abs_builddir@ | ||
182 | abs_srcdir = @abs_srcdir@ | ||
183 | abs_top_builddir = @abs_top_builddir@ | ||
184 | abs_top_srcdir = @abs_top_srcdir@ | ||
185 | ac_ct_CC = @ac_ct_CC@ | ||
186 | ac_ct_CXX = @ac_ct_CXX@ | ||
187 | ac_ct_F77 = @ac_ct_F77@ | ||
188 | am__include = @am__include@ | ||
189 | am__leading_dot = @am__leading_dot@ | ||
190 | am__quote = @am__quote@ | ||
191 | am__tar = @am__tar@ | ||
192 | am__untar = @am__untar@ | ||
193 | bindir = @bindir@ | ||
194 | build = @build@ | ||
195 | build_alias = @build_alias@ | ||
196 | build_cpu = @build_cpu@ | ||
197 | build_os = @build_os@ | ||
198 | build_vendor = @build_vendor@ | ||
199 | builddir = @builddir@ | ||
200 | datadir = @datadir@ | ||
201 | datarootdir = @datarootdir@ | ||
202 | docdir = @docdir@ | ||
203 | dvidir = @dvidir@ | ||
204 | exec_prefix = @exec_prefix@ | ||
205 | host = @host@ | ||
206 | host_alias = @host_alias@ | ||
207 | host_cpu = @host_cpu@ | ||
208 | host_os = @host_os@ | ||
209 | host_vendor = @host_vendor@ | ||
210 | htmldir = @htmldir@ | ||
211 | includedir = @includedir@ | ||
212 | infodir = @infodir@ | ||
213 | install_sh = @install_sh@ | ||
214 | libdir = @libdir@ | ||
215 | libexecdir = @libexecdir@ | ||
216 | localedir = @localedir@ | ||
217 | localstatedir = @localstatedir@ | ||
218 | mandir = @mandir@ | ||
219 | mkdir_p = @mkdir_p@ | ||
220 | oldincludedir = @oldincludedir@ | ||
221 | pdfdir = @pdfdir@ | ||
222 | prefix = @prefix@ | ||
223 | program_transform_name = @program_transform_name@ | ||
224 | psdir = @psdir@ | ||
225 | sbindir = @sbindir@ | ||
226 | sharedstatedir = @sharedstatedir@ | ||
227 | srcdir = @srcdir@ | ||
228 | sysconfdir = @sysconfdir@ | ||
229 | target_alias = @target_alias@ | ||
230 | top_builddir = @top_builddir@ | ||
231 | top_srcdir = @top_srcdir@ | ||
232 | pluginimgdir = $(pkglibdir)/plugins/image | ||
233 | pluginimg_LTLIBRARIES = img_bmp.la img_sgi.la img_dds.la \ | ||
234 | $(am__append_1) | ||
235 | AM_CFLAGS = \ | ||
236 | -Wall -ansi -pedantic \ | ||
237 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
238 | @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ | ||
239 | @GLIB_CFLAGS@ | ||
240 | |||
241 | INCLUDES = -I$(top_srcdir)/include | ||
242 | AM_LDFLAGS = \ | ||
243 | -no-undefined -module \ | ||
244 | @PLUGINS_LDFLAGS@ | ||
245 | |||
246 | img_bmp_la_SOURCES = img_bmp.c | ||
247 | img_bmp_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
248 | img_sgi_la_SOURCES = img_sgi.c | ||
249 | img_sgi_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
250 | img_dds_la_SOURCES = img_dds.c | ||
251 | img_dds_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
252 | img_gdkpixbuf_la_CFLAGS = ${AM_CFLAGS} @GDKPIXBUF_CFLAGS@ | ||
253 | img_gdkpixbuf_la_SOURCES = img_gdkpixbuf.c | ||
254 | img_gdkpixbuf_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ \ | ||
255 | @GDKPIXBUF_LIBS@ | ||
256 | |||
257 | all: all-am | ||
258 | |||
259 | .SUFFIXES: | ||
260 | .SUFFIXES: .c .lo .o .obj | ||
261 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
262 | @for dep in $?; do \ | ||
263 | case '$(am__configure_deps)' in \ | ||
264 | *$$dep*) \ | ||
265 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
266 | && exit 0; \ | ||
267 | exit 1;; \ | ||
268 | esac; \ | ||
269 | done; \ | ||
270 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/image/Makefile'; \ | ||
271 | cd $(top_srcdir) && \ | ||
272 | $(AUTOMAKE) --gnu plugins/image/Makefile | ||
273 | .PRECIOUS: Makefile | ||
274 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
275 | @case '$?' in \ | ||
276 | *config.status*) \ | ||
277 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
278 | *) \ | ||
279 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
280 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
281 | esac; | ||
282 | |||
283 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
284 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
285 | |||
286 | $(top_srcdir)/configure: $(am__configure_deps) | ||
287 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
288 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
289 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
290 | install-pluginimgLTLIBRARIES: $(pluginimg_LTLIBRARIES) | ||
291 | @$(NORMAL_INSTALL) | ||
292 | test -z "$(pluginimgdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimgdir)" | ||
293 | @list='$(pluginimg_LTLIBRARIES)'; for p in $$list; do \ | ||
294 | if test -f $$p; then \ | ||
295 | f=$(am__strip_dir) \ | ||
296 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimgLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimgdir)/$$f'"; \ | ||
297 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimgLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimgdir)/$$f"; \ | ||
298 | else :; fi; \ | ||
299 | done | ||
300 | |||
301 | uninstall-pluginimgLTLIBRARIES: | ||
302 | @$(NORMAL_UNINSTALL) | ||
303 | @list='$(pluginimg_LTLIBRARIES)'; for p in $$list; do \ | ||
304 | p=$(am__strip_dir) \ | ||
305 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimgdir)/$$p'"; \ | ||
306 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimgdir)/$$p"; \ | ||
307 | done | ||
308 | |||
309 | clean-pluginimgLTLIBRARIES: | ||
310 | -test -z "$(pluginimg_LTLIBRARIES)" || rm -f $(pluginimg_LTLIBRARIES) | ||
311 | @list='$(pluginimg_LTLIBRARIES)'; for p in $$list; do \ | ||
312 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
313 | test "$$dir" != "$$p" || dir=.; \ | ||
314 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
315 | rm -f "$${dir}/so_locations"; \ | ||
316 | done | ||
317 | img_bmp.la: $(img_bmp_la_OBJECTS) $(img_bmp_la_DEPENDENCIES) | ||
318 | $(LINK) -rpath $(pluginimgdir) $(img_bmp_la_OBJECTS) $(img_bmp_la_LIBADD) $(LIBS) | ||
319 | img_dds.la: $(img_dds_la_OBJECTS) $(img_dds_la_DEPENDENCIES) | ||
320 | $(LINK) -rpath $(pluginimgdir) $(img_dds_la_OBJECTS) $(img_dds_la_LIBADD) $(LIBS) | ||
321 | img_gdkpixbuf.la: $(img_gdkpixbuf_la_OBJECTS) $(img_gdkpixbuf_la_DEPENDENCIES) | ||
322 | $(img_gdkpixbuf_la_LINK) $(am_img_gdkpixbuf_la_rpath) $(img_gdkpixbuf_la_OBJECTS) $(img_gdkpixbuf_la_LIBADD) $(LIBS) | ||
323 | img_sgi.la: $(img_sgi_la_OBJECTS) $(img_sgi_la_DEPENDENCIES) | ||
324 | $(LINK) -rpath $(pluginimgdir) $(img_sgi_la_OBJECTS) $(img_sgi_la_LIBADD) $(LIBS) | ||
325 | |||
326 | mostlyclean-compile: | ||
327 | -rm -f *.$(OBJEXT) | ||
328 | |||
329 | distclean-compile: | ||
330 | -rm -f *.tab.c | ||
331 | |||
332 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_bmp.Plo@am__quote@ | ||
333 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_dds.Plo@am__quote@ | ||
334 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_gdkpixbuf_la-img_gdkpixbuf.Plo@am__quote@ | ||
335 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/img_sgi.Plo@am__quote@ | ||
336 | |||
337 | .c.o: | ||
338 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
339 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
340 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
341 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
342 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
343 | |||
344 | .c.obj: | ||
345 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
346 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
347 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
348 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
349 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
350 | |||
351 | .c.lo: | ||
352 | @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
353 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
354 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
355 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
356 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
357 | |||
358 | img_gdkpixbuf_la-img_gdkpixbuf.lo: img_gdkpixbuf.c | ||
359 | @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(img_gdkpixbuf_la_CFLAGS) $(CFLAGS) -MT img_gdkpixbuf_la-img_gdkpixbuf.lo -MD -MP -MF $(DEPDIR)/img_gdkpixbuf_la-img_gdkpixbuf.Tpo -c -o img_gdkpixbuf_la-img_gdkpixbuf.lo `test -f 'img_gdkpixbuf.c' || echo '$(srcdir)/'`img_gdkpixbuf.c | ||
360 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/img_gdkpixbuf_la-img_gdkpixbuf.Tpo $(DEPDIR)/img_gdkpixbuf_la-img_gdkpixbuf.Plo | ||
361 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='img_gdkpixbuf.c' object='img_gdkpixbuf_la-img_gdkpixbuf.lo' libtool=yes @AMDEPBACKSLASH@ | ||
362 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
363 | @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(img_gdkpixbuf_la_CFLAGS) $(CFLAGS) -c -o img_gdkpixbuf_la-img_gdkpixbuf.lo `test -f 'img_gdkpixbuf.c' || echo '$(srcdir)/'`img_gdkpixbuf.c | ||
364 | |||
365 | mostlyclean-libtool: | ||
366 | -rm -f *.lo | ||
367 | |||
368 | clean-libtool: | ||
369 | -rm -rf .libs _libs | ||
370 | |||
371 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
372 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
373 | unique=`for i in $$list; do \ | ||
374 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
375 | done | \ | ||
376 | $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ | ||
377 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
378 | mkid -fID $$unique | ||
379 | tags: TAGS | ||
380 | |||
381 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
382 | $(TAGS_FILES) $(LISP) | ||
383 | tags=; \ | ||
384 | here=`pwd`; \ | ||
385 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
386 | unique=`for i in $$list; do \ | ||
387 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
388 | done | \ | ||
389 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
390 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
391 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
392 | test -n "$$unique" || unique=$$empty_fix; \ | ||
393 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
394 | $$tags $$unique; \ | ||
395 | fi | ||
396 | ctags: CTAGS | ||
397 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
398 | $(TAGS_FILES) $(LISP) | ||
399 | tags=; \ | ||
400 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
401 | unique=`for i in $$list; do \ | ||
402 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
403 | done | \ | ||
404 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
405 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
406 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
407 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
408 | $$tags $$unique | ||
409 | |||
410 | GTAGS: | ||
411 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
412 | && cd $(top_srcdir) \ | ||
413 | && gtags -i $(GTAGS_ARGS) $$here | ||
414 | |||
415 | distclean-tags: | ||
416 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
417 | |||
418 | distdir: $(DISTFILES) | ||
419 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
420 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
421 | list='$(DISTFILES)'; \ | ||
422 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
423 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
424 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
425 | case $$dist_files in \ | ||
426 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
427 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
428 | sort -u` ;; \ | ||
429 | esac; \ | ||
430 | for file in $$dist_files; do \ | ||
431 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
432 | if test -d $$d/$$file; then \ | ||
433 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
434 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
435 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
436 | fi; \ | ||
437 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
438 | else \ | ||
439 | test -f $(distdir)/$$file \ | ||
440 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
441 | || exit 1; \ | ||
442 | fi; \ | ||
443 | done | ||
444 | check-am: all-am | ||
445 | check: check-am | ||
446 | all-am: Makefile $(LTLIBRARIES) | ||
447 | installdirs: | ||
448 | for dir in "$(DESTDIR)$(pluginimgdir)"; do \ | ||
449 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
450 | done | ||
451 | install: install-am | ||
452 | install-exec: install-exec-am | ||
453 | install-data: install-data-am | ||
454 | uninstall: uninstall-am | ||
455 | |||
456 | install-am: all-am | ||
457 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
458 | |||
459 | installcheck: installcheck-am | ||
460 | install-strip: | ||
461 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
462 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
463 | `test -z '$(STRIP)' || \ | ||
464 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
465 | mostlyclean-generic: | ||
466 | |||
467 | clean-generic: | ||
468 | |||
469 | distclean-generic: | ||
470 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
471 | |||
472 | maintainer-clean-generic: | ||
473 | @echo "This command is intended for maintainers to use" | ||
474 | @echo "it deletes files that may require special tools to rebuild." | ||
475 | clean: clean-am | ||
476 | |||
477 | clean-am: clean-generic clean-libtool clean-pluginimgLTLIBRARIES \ | ||
478 | mostlyclean-am | ||
479 | |||
480 | distclean: distclean-am | ||
481 | -rm -rf ./$(DEPDIR) | ||
482 | -rm -f Makefile | ||
483 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
484 | distclean-tags | ||
485 | |||
486 | dvi: dvi-am | ||
487 | |||
488 | dvi-am: | ||
489 | |||
490 | html: html-am | ||
491 | |||
492 | info: info-am | ||
493 | |||
494 | info-am: | ||
495 | |||
496 | install-data-am: install-pluginimgLTLIBRARIES | ||
497 | |||
498 | install-dvi: install-dvi-am | ||
499 | |||
500 | install-exec-am: | ||
501 | |||
502 | install-html: install-html-am | ||
503 | |||
504 | install-info: install-info-am | ||
505 | |||
506 | install-man: | ||
507 | |||
508 | install-pdf: install-pdf-am | ||
509 | |||
510 | install-ps: install-ps-am | ||
511 | |||
512 | installcheck-am: | ||
513 | |||
514 | maintainer-clean: maintainer-clean-am | ||
515 | -rm -rf ./$(DEPDIR) | ||
516 | -rm -f Makefile | ||
517 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
518 | |||
519 | mostlyclean: mostlyclean-am | ||
520 | |||
521 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
522 | mostlyclean-libtool | ||
523 | |||
524 | pdf: pdf-am | ||
525 | |||
526 | pdf-am: | ||
527 | |||
528 | ps: ps-am | ||
529 | |||
530 | ps-am: | ||
531 | |||
532 | uninstall-am: uninstall-pluginimgLTLIBRARIES | ||
533 | |||
534 | .MAKE: install-am install-strip | ||
535 | |||
536 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
537 | clean-libtool clean-pluginimgLTLIBRARIES ctags distclean \ | ||
538 | distclean-compile distclean-generic distclean-libtool \ | ||
539 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
540 | install install-am install-data install-data-am install-dvi \ | ||
541 | install-dvi-am install-exec install-exec-am install-html \ | ||
542 | install-html-am install-info install-info-am install-man \ | ||
543 | install-pdf install-pdf-am install-pluginimgLTLIBRARIES \ | ||
544 | install-ps install-ps-am install-strip installcheck \ | ||
545 | installcheck-am installdirs maintainer-clean \ | ||
546 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
547 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
548 | tags uninstall uninstall-am uninstall-pluginimgLTLIBRARIES | ||
549 | |||
550 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
551 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
552 | .NOEXPORT: | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/image/img_bmp.c b/src/others/mimesh/libg3d-0.0.8/plugins/image/img_bmp.c new file mode 100644 index 0000000..827997a --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/image/img_bmp.c | |||
@@ -0,0 +1,129 @@ | |||
1 | /* $Id$ */ | ||
2 | |||
3 | /* | ||
4 | libg3d - 3D object loading library | ||
5 | |||
6 | Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de> | ||
7 | |||
8 | This library is free software; you can redistribute it and/or | ||
9 | modify it under the terms of the GNU Lesser General Public | ||
10 | License as published by the Free Software Foundation; either | ||
11 | version 2.1 of the License, or (at your option) any later version. | ||
12 | |||
13 | This library is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | Lesser General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU Lesser General Public | ||
19 | License along with this library; if not, write to the Free Software | ||
20 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #include <stdio.h> | ||
24 | #include <string.h> | ||
25 | #include <errno.h> | ||
26 | |||
27 | #include <g3d/types.h> | ||
28 | #include <g3d/stream.h> | ||
29 | |||
30 | EAPI | ||
31 | gboolean plugin_load_image_from_stream(G3DContext *context, G3DStream *stream, | ||
32 | G3DImage *image, gpointer user_data) | ||
33 | { | ||
34 | guint32 filesize, offset, headsize, compression; | ||
35 | gint32 x, y, i; | ||
36 | guint32 ncolplanes, c; | ||
37 | |||
38 | /* bitmap file always starts with 'BM' */ | ||
39 | if(g3d_stream_read_int16_le(stream) != ('B' | ('M' << 8))) { | ||
40 | g_warning("bitmap magic not found: image seems to be corrupt\n"); | ||
41 | return FALSE; | ||
42 | } | ||
43 | |||
44 | image->name = g_strdup(stream->uri); | ||
45 | |||
46 | filesize = g3d_stream_read_int32_le(stream); /* file size */ | ||
47 | g3d_stream_read_int32_le(stream); /* 2 x UINT16 reserved */ | ||
48 | offset = g3d_stream_read_int32_le(stream); /* offset of data */ | ||
49 | headsize = g3d_stream_read_int32_le(stream); /* size of header */ | ||
50 | image->width = g3d_stream_read_int32_le(stream); /* width */ | ||
51 | image->height = g3d_stream_read_int32_le(stream); /* height */ | ||
52 | ncolplanes = g3d_stream_read_int16_le(stream); /* num of color planes */ | ||
53 | image->depth = g3d_stream_read_int16_le(stream); /* bits per pixel */ | ||
54 | compression = g3d_stream_read_int32_le(stream); /* compression */ | ||
55 | g3d_stream_read_int32_le(stream); /* image size */ | ||
56 | g3d_stream_read_int32_le(stream); /* v/res (dpi) */ | ||
57 | g3d_stream_read_int32_le(stream); /* h/res (dpi) */ | ||
58 | |||
59 | #if DEBUG > 0 | ||
60 | g_debug("BMP: %dx%dx%d (%d, 0x%x)", image->width, image->height, | ||
61 | image->depth, ncolplanes, compression); | ||
62 | #endif | ||
63 | |||
64 | g3d_stream_seek(stream, offset, G_SEEK_SET); | ||
65 | |||
66 | #define ALL32BIT | ||
67 | #ifndef ALL32BIT /* always 32bit for now.. */ | ||
68 | image->pixeldata = g_new0(guint8, | ||
69 | image->width * image->height * (image->depth / 8)); | ||
70 | #else | ||
71 | image->pixeldata = g_new0(guint8, image->width * image->height * 4); | ||
72 | #endif | ||
73 | |||
74 | for(y = (image->height - 1); y >= 0; y --) { | ||
75 | for(x = 0; x < image->width; x ++) { | ||
76 | switch(image->depth) { | ||
77 | case 8: | ||
78 | #ifndef ALL32BIT | ||
79 | image->pixeldata[y * image->width + x] = | ||
80 | g3d_stream_read_int8(stream); | ||
81 | #else | ||
82 | c = g3d_stream_read_int8(stream); | ||
83 | for(i = 0; i < 3; i ++) | ||
84 | image->pixeldata[(y * image->width + x) * 4 + i] = c; | ||
85 | image->pixeldata[(y * image->width + x) * 4 + 3] = 0xFF; | ||
86 | #endif | ||
87 | break; | ||
88 | case 24: | ||
89 | #if 1 | ||
90 | /* read BGR */ | ||
91 | for(i = 2; i >= 0; i --) | ||
92 | #else | ||
93 | for(i = 0; i < 3; i ++) | ||
94 | #endif | ||
95 | image->pixeldata[(y * image->width + x) * 4 + i] = | ||
96 | g3d_stream_read_int8(stream); | ||
97 | image->pixeldata[(y * image->width + x) * 4 + 3] = 0xFF; | ||
98 | break; | ||
99 | default: | ||
100 | break; | ||
101 | } | ||
102 | } /* x */ | ||
103 | #if 1 | ||
104 | /* padding */ | ||
105 | for(i = x; i < ((image->width + 3) & ~(3)); i ++) | ||
106 | g3d_stream_read_int8(stream); | ||
107 | #endif | ||
108 | } /* y */ | ||
109 | image->depth = 32; | ||
110 | #if DEBUG > 2 | ||
111 | g_debug("bitmap successfully loaded"); | ||
112 | #endif | ||
113 | |||
114 | return TRUE; | ||
115 | } | ||
116 | |||
117 | EAPI | ||
118 | gchar *plugin_description(G3DContext *context) | ||
119 | { | ||
120 | return g_strdup("Windows Bitmap images.\n" | ||
121 | "Author: Markus Dahms"); | ||
122 | } | ||
123 | |||
124 | EAPI | ||
125 | gchar **plugin_extensions(G3DContext *context) | ||
126 | { | ||
127 | return g_strsplit("bmp", ":", 0); | ||
128 | } | ||
129 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/image/img_dds.c b/src/others/mimesh/libg3d-0.0.8/plugins/image/img_dds.c new file mode 100644 index 0000000..cf6c58f --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/image/img_dds.c | |||
@@ -0,0 +1,149 @@ | |||
1 | /* $Id$ */ | ||
2 | |||
3 | /* | ||
4 | libg3d - 3D object loading library | ||
5 | |||
6 | Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de> | ||
7 | |||
8 | This library is free software; you can redistribute it and/or | ||
9 | modify it under the terms of the GNU Lesser General Public | ||
10 | License as published by the Free Software Foundation; either | ||
11 | version 2.1 of the License, or (at your option) any later version. | ||
12 | |||
13 | This library is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | Lesser General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU Lesser General Public | ||
19 | License along with this library; if not, write to the Free Software | ||
20 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #include <stdio.h> | ||
24 | #include <string.h> | ||
25 | |||
26 | #include <g3d/types.h> | ||
27 | #include <g3d/stream.h> | ||
28 | #include <g3d/iff.h> | ||
29 | |||
30 | static gboolean decode_dxt1(G3DImage *image, G3DStream *stream); | ||
31 | |||
32 | EAPI | ||
33 | gboolean plugin_load_image_from_stream(G3DContext *context, G3DStream *stream, | ||
34 | G3DImage *image, gpointer user_data) | ||
35 | { | ||
36 | guint32 magic, size, flags, depth; | ||
37 | guint32 pfsize, pfflags, pffourcc, pfbpp; | ||
38 | guint32 pfrmask, pfgmask, pfbmask, pfamask; | ||
39 | guint32 caps1, caps2; | ||
40 | gchar *sfourcc; | ||
41 | |||
42 | magic = g3d_stream_read_int32_be(stream); | ||
43 | if(magic != G3D_IFF_MKID('D','D','S',' ')) { | ||
44 | g_warning("%s is not a DDS file", stream->uri); | ||
45 | return FALSE; | ||
46 | } | ||
47 | image->name = g_strdup(stream->uri); | ||
48 | |||
49 | size = g3d_stream_read_int32_le(stream); | ||
50 | flags = g3d_stream_read_int32_le(stream); | ||
51 | image->height = g3d_stream_read_int32_le(stream); | ||
52 | image->width = g3d_stream_read_int32_le(stream); | ||
53 | g3d_stream_read_int32_le(stream); /* pitch or linesize */ | ||
54 | depth = g3d_stream_read_int32_le(stream); | ||
55 | g3d_stream_read_int32_le(stream); /* num mipmaps */ | ||
56 | |||
57 | g3d_stream_skip(stream, 44); | ||
58 | |||
59 | pfsize = g3d_stream_read_int32_le(stream); | ||
60 | pfflags = g3d_stream_read_int32_le(stream); | ||
61 | |||
62 | pffourcc = g3d_stream_read_int32_be(stream); | ||
63 | sfourcc = g3d_iff_id_to_text(pffourcc); | ||
64 | |||
65 | pfbpp = g3d_stream_read_int32_le(stream); | ||
66 | pfrmask = g3d_stream_read_int32_le(stream); | ||
67 | pfgmask = g3d_stream_read_int32_le(stream); | ||
68 | pfbmask = g3d_stream_read_int32_le(stream); | ||
69 | pfamask = g3d_stream_read_int32_le(stream); | ||
70 | caps1 = g3d_stream_read_int32_le(stream); | ||
71 | caps2 = g3d_stream_read_int32_le(stream); | ||
72 | |||
73 | g3d_stream_skip(stream, 12); | ||
74 | |||
75 | #if DEBUG > 0 | ||
76 | g_debug("DDS: %ux%u %s 0x%08x", image->width, image->height, | ||
77 | sfourcc, pfflags); | ||
78 | g_debug("DDS: masks: 0x%04x, 0x%04x, 0x%04x, 0x%04x", | ||
79 | pfrmask, pfgmask, pfbmask, pfamask); | ||
80 | #endif | ||
81 | |||
82 | image->pixeldata = g_new0(guint8, image->width * image->height * 4); | ||
83 | |||
84 | switch(pffourcc) { | ||
85 | case G3D_IFF_MKID('D','X','T','1'): | ||
86 | decode_dxt1(image, stream); | ||
87 | break; | ||
88 | default: | ||
89 | g_warning("DDS: unsupported FOURCC: %s", sfourcc); | ||
90 | } | ||
91 | |||
92 | g_free(sfourcc); | ||
93 | return TRUE; | ||
94 | } | ||
95 | |||
96 | EAPI | ||
97 | gchar *plugin_description(G3DContext *context) | ||
98 | { | ||
99 | return g_strdup("DDS textures.\n" | ||
100 | "Author: Markus Dahms"); | ||
101 | } | ||
102 | |||
103 | EAPI | ||
104 | gchar **plugin_extensions(G3DContext *context) | ||
105 | { | ||
106 | return g_strsplit("dds", ":", 0); | ||
107 | } | ||
108 | |||
109 | /*****************************************************************************/ | ||
110 | |||
111 | static void decode_rgb565(guint16 c, G3DFloat *r, G3DFloat *g, G3DFloat *b) | ||
112 | { | ||
113 | *r = ((c & 0xF800) >> 11) / 32.0; | ||
114 | *g = ((c & 0x07E0) >> 5) / 64.0; | ||
115 | *b = (c & 0x001F) / 32.0; | ||
116 | } | ||
117 | |||
118 | static gboolean decode_dxt1(G3DImage *image, G3DStream *stream) | ||
119 | { | ||
120 | gint32 x, y, i, j; | ||
121 | guint32 index; | ||
122 | G3DFloat r, g, b, r1, r2, g1, g2, b1, b2; | ||
123 | guint8 line, v2; | ||
124 | |||
125 | for(y = 0; y < image->height; y += 4) { | ||
126 | for(x = 0; x < image->width; x += 4) { | ||
127 | decode_rgb565(g3d_stream_read_int16_le(stream), &r1, &g1, &b1); | ||
128 | decode_rgb565(g3d_stream_read_int16_le(stream), &r2, &g2, &b2); | ||
129 | for(j = 0; j < 4; j ++) { | ||
130 | line = g3d_stream_read_int8(stream); | ||
131 | for(i = 0; i < 4; i ++) { | ||
132 | v2 = line & 0x3; | ||
133 | line >>= 2; | ||
134 | r = r1 + ((r2 - r1) / 3.0) * v2; | ||
135 | g = g1 + ((g2 - g1) / 3.0) * v2; | ||
136 | b = b1 + ((b2 - b1) / 3.0) * v2; | ||
137 | index = ((image->height - 4) - y + j) * | ||
138 | image->width + x + i; | ||
139 | image->pixeldata[index * 4 + 0] = r * 255.0; | ||
140 | image->pixeldata[index * 4 + 1] = g * 255.0; | ||
141 | image->pixeldata[index * 4 + 2] = b * 255.0; | ||
142 | image->pixeldata[index * 4 + 3] = 0xFF; | ||
143 | } | ||
144 | } | ||
145 | } | ||
146 | } | ||
147 | |||
148 | return TRUE; | ||
149 | } | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/image/img_gdkpixbuf.c b/src/others/mimesh/libg3d-0.0.8/plugins/image/img_gdkpixbuf.c new file mode 100644 index 0000000..725981d --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/image/img_gdkpixbuf.c | |||
@@ -0,0 +1,210 @@ | |||
1 | /* $Id$ */ | ||
2 | |||
3 | /* | ||
4 | libg3d - 3D object loading library | ||
5 | |||
6 | Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de> | ||
7 | |||
8 | This library is free software; you can redistribute it and/or | ||
9 | modify it under the terms of the GNU Lesser General Public | ||
10 | License as published by the Free Software Foundation; either | ||
11 | version 2.1 of the License, or (at your option) any later version. | ||
12 | |||
13 | This library is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | Lesser General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU Lesser General Public | ||
19 | License along with this library; if not, write to the Free Software | ||
20 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #include <g3d/config.h> | ||
24 | #include <stdio.h> | ||
25 | #include <string.h> | ||
26 | #include <errno.h> | ||
27 | |||
28 | #include <gdk/gdk.h> | ||
29 | #include <gdk-pixbuf/gdk-pixbuf.h> | ||
30 | |||
31 | #include <g3d/types.h> | ||
32 | #include <g3d/stream.h> | ||
33 | |||
34 | static gboolean gdkpixbuf_init(void); | ||
35 | static gboolean gdkpixbuf_postprocess(GdkPixbuf *pixbuf, G3DImage *image, | ||
36 | const gchar *uri); | ||
37 | |||
38 | #define BUFSIZE 1024 | ||
39 | |||
40 | EAPI | ||
41 | gboolean plugin_load_image_from_stream(G3DContext *context, G3DStream *stream, | ||
42 | G3DImage *image, gpointer user_data) | ||
43 | { | ||
44 | GdkPixbuf *pixbuf; | ||
45 | GdkPixbufLoader *loader; | ||
46 | GError *error = NULL; | ||
47 | guint8 buffer[BUFSIZE]; | ||
48 | gsize n; | ||
49 | gboolean retval; | ||
50 | |||
51 | if(!gdkpixbuf_init()) | ||
52 | return FALSE; | ||
53 | |||
54 | loader = gdk_pixbuf_loader_new(); | ||
55 | if (NULL == loader) | ||
56 | { | ||
57 | g_warning("gdkpixbuf - plugin_load_image_from_stream(): no loader"); | ||
58 | return FALSE; | ||
59 | } | ||
60 | while(!g3d_stream_eof(stream)) { | ||
61 | n = g3d_stream_read(stream, buffer, BUFSIZE); | ||
62 | if(0 >= n) | ||
63 | break; | ||
64 | if(!gdk_pixbuf_loader_write(loader, buffer, n, &error)) { | ||
65 | g_warning("error loading image data from stream: %s", | ||
66 | error->message); | ||
67 | g_error_free(error); | ||
68 | g_object_unref(loader); | ||
69 | return FALSE; | ||
70 | } | ||
71 | } | ||
72 | |||
73 | if(!gdk_pixbuf_loader_close(loader, &error)) { | ||
74 | g_warning("error loading image data from stream: %s", | ||
75 | error->message); | ||
76 | g_error_free(error); | ||
77 | g_object_unref(loader); | ||
78 | return FALSE; | ||
79 | } | ||
80 | |||
81 | pixbuf = gdk_pixbuf_loader_get_pixbuf(loader); | ||
82 | gdk_pixbuf_ref(pixbuf); | ||
83 | |||
84 | retval = gdkpixbuf_postprocess(pixbuf, image, stream->uri); | ||
85 | |||
86 | g_object_unref(loader); | ||
87 | return retval; | ||
88 | } | ||
89 | |||
90 | EAPI | ||
91 | gchar *plugin_description(G3DContext *context) | ||
92 | { | ||
93 | return g_strdup("Read most image formats using the GdkPixbuf library."); | ||
94 | } | ||
95 | |||
96 | EAPI | ||
97 | gchar **plugin_extensions(G3DContext *context) | ||
98 | { | ||
99 | gchar *extensions = g_strdup(""); | ||
100 | gchar **retval; | ||
101 | gchar *tmp, **ext; | ||
102 | GSList *fitem; | ||
103 | GdkPixbufFormat *format; | ||
104 | |||
105 | fitem = gdk_pixbuf_get_formats(); | ||
106 | while(fitem) | ||
107 | { | ||
108 | gboolean doit = TRUE; | ||
109 | |||
110 | format = (GdkPixbufFormat *)fitem->data; | ||
111 | ext = gdk_pixbuf_format_get_extensions(format); | ||
112 | |||
113 | if (0 == g_strcmp0("bmp", *ext)) | ||
114 | doit = FALSE; | ||
115 | else if (0 == g_strcmp0("jpg", *ext)) | ||
116 | doit = FALSE; | ||
117 | else if (0 == g_strcmp0("jpeg", *ext)) | ||
118 | doit = FALSE; | ||
119 | else if (0 == g_strcmp0("jfif", *ext)) | ||
120 | doit = FALSE; | ||
121 | else if (0 == g_strcmp0("jif", *ext)) | ||
122 | doit = FALSE; | ||
123 | |||
124 | if (doit) | ||
125 | { | ||
126 | tmp = g_strdup_printf("%s%s%s", extensions, strlen(extensions) ? ":" : "", g_strjoinv(":", ext)); | ||
127 | g_free(extensions); | ||
128 | extensions = tmp; | ||
129 | } | ||
130 | fitem = fitem->next; | ||
131 | } | ||
132 | |||
133 | retval = g_strsplit(extensions, ":", 0); | ||
134 | g_free(extensions); | ||
135 | return retval; | ||
136 | } | ||
137 | |||
138 | /*****************************************************************************/ | ||
139 | |||
140 | static gboolean gdkpixbuf_init(void) | ||
141 | { | ||
142 | static gboolean init = TRUE; | ||
143 | |||
144 | if(init) { | ||
145 | /* initialize GDK */ | ||
146 | /* FIXME: problem if already initialized with gtk_init()? */ | ||
147 | gint argc = 0; | ||
148 | if(!gdk_init_check(&argc, NULL)) | ||
149 | return FALSE; | ||
150 | init = FALSE; | ||
151 | } | ||
152 | return TRUE; | ||
153 | } | ||
154 | |||
155 | static gboolean gdkpixbuf_postprocess(GdkPixbuf *pixbuf, G3DImage *image, | ||
156 | const gchar *uri) | ||
157 | { | ||
158 | guint32 x, y, nchannels; | ||
159 | guchar *p; | ||
160 | |||
161 | if(gdk_pixbuf_get_colorspace(pixbuf) != GDK_COLORSPACE_RGB) { | ||
162 | g_warning("GdkPixbuf: %s: colorspace is not RGB", uri); | ||
163 | gdk_pixbuf_unref(pixbuf); | ||
164 | return FALSE; | ||
165 | } | ||
166 | |||
167 | nchannels = gdk_pixbuf_get_n_channels(pixbuf); | ||
168 | if(nchannels < 3) | ||
169 | { | ||
170 | g_warning("GdkPixbuf: %s: has only %d channels", uri, | ||
171 | gdk_pixbuf_get_n_channels(pixbuf)); | ||
172 | gdk_pixbuf_unref(pixbuf); | ||
173 | return FALSE; | ||
174 | } | ||
175 | |||
176 | image->width = gdk_pixbuf_get_width(pixbuf); | ||
177 | image->height = gdk_pixbuf_get_height(pixbuf); | ||
178 | image->depth = 32; | ||
179 | image->name = g_path_get_basename(uri); | ||
180 | image->pixeldata = g_new0(guint8, image->width * image->height * 4); | ||
181 | |||
182 | for(y = 0; y < image->height; y ++) | ||
183 | for(x = 0; x < image->width; x ++) | ||
184 | { | ||
185 | p = gdk_pixbuf_get_pixels(pixbuf) + y * | ||
186 | gdk_pixbuf_get_rowstride(pixbuf) + x * nchannels; | ||
187 | |||
188 | image->pixeldata[(y * image->width + x) * 4 + 0] = p[0]; | ||
189 | image->pixeldata[(y * image->width + x) * 4 + 1] = p[1]; | ||
190 | image->pixeldata[(y * image->width + x) * 4 + 2] = p[2]; | ||
191 | if(gdk_pixbuf_get_n_channels(pixbuf) >= 4) | ||
192 | image->pixeldata[(y * image->width + x) * 4 + 3] = p[3]; | ||
193 | } | ||
194 | |||
195 | /* set alpha to 1.0 */ | ||
196 | if(gdk_pixbuf_get_n_channels(pixbuf) < 4) | ||
197 | for(y = 0; y < image->height; y ++) | ||
198 | for(x = 0; x < image->width; x ++) | ||
199 | image->pixeldata[(y * image->width + x) * 4 + 3] = 0xFF; | ||
200 | |||
201 | gdk_pixbuf_unref(pixbuf); | ||
202 | |||
203 | #if DEBUG > 0 | ||
204 | g_print("GdkPixbuf: image '%s' loaded (%dx%d)\n", | ||
205 | image->name, image->width, image->height); | ||
206 | #endif | ||
207 | |||
208 | return TRUE; | ||
209 | } | ||
210 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/image/img_jpeg.c b/src/others/mimesh/libg3d-0.0.8/plugins/image/img_jpeg.c new file mode 100644 index 0000000..138f26b --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/image/img_jpeg.c | |||
@@ -0,0 +1,437 @@ | |||
1 | /* $Id$ */ | ||
2 | |||
3 | /* | ||
4 | libg3d - 3D object loading library | ||
5 | |||
6 | Copyright (c) 2011, Dawid Seikel. | ||
7 | |||
8 | This program is free software; you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation; version 2 of the License. | ||
11 | |||
12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program; if not, write to the Free Software | ||
19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | |||
23 | /* This is an ugly collection of styles, I'll fix it up later, just want to get it pushed up now. lol */ | ||
24 | |||
25 | #include <stdio.h> | ||
26 | #include <string.h> | ||
27 | #include <errno.h> | ||
28 | |||
29 | #include <g3d/types.h> | ||
30 | #include <g3d/stream.h> | ||
31 | |||
32 | #include <jpeglib.h> | ||
33 | #include <jerror.h> | ||
34 | #include <setjmp.h> | ||
35 | |||
36 | #define BUFSIZE 1024 | ||
37 | |||
38 | typedef struct | ||
39 | { | ||
40 | struct jpeg_source_mgr pub; /* public fields */ | ||
41 | |||
42 | G3DStream *stream; /* source stream */ | ||
43 | JOCTET *buffer; /* start of buffer */ | ||
44 | boolean start_of_file; /* have we gotten any data yet? */ | ||
45 | } my_source_mgr; | ||
46 | |||
47 | typedef my_source_mgr *my_src_ptr; | ||
48 | |||
49 | /* Stuff to stop jpeglib from exit() when things fail. */ | ||
50 | struct my_error_mgr | ||
51 | { | ||
52 | struct jpeg_error_mgr pub; /* "public" fields */ | ||
53 | jmp_buf setjmp_buffer; /* for return to caller */ | ||
54 | }; | ||
55 | |||
56 | typedef struct my_error_mgr *my_error_ptr; | ||
57 | |||
58 | /* | ||
59 | * Here's the routine that will replace the standard error_exit method: | ||
60 | */ | ||
61 | |||
62 | METHODDEF(void) | ||
63 | my_error_exit (j_common_ptr cinfo) | ||
64 | { | ||
65 | /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ | ||
66 | my_error_ptr myerr = (my_error_ptr) cinfo->err; | ||
67 | |||
68 | /* Always display the message. */ | ||
69 | /* We could postpone this until after returning, if we chose. */ | ||
70 | (*cinfo->err->output_message) (cinfo); | ||
71 | |||
72 | /* Return control to the setjmp point */ | ||
73 | longjmp(myerr->setjmp_buffer, 1); | ||
74 | } | ||
75 | |||
76 | |||
77 | static void init_stream_source (j_decompress_ptr cinfo); | ||
78 | static boolean fill_stream_input_buffer (j_decompress_ptr cinfo); | ||
79 | static void skip_input_data (j_decompress_ptr cinfo, long num_bytes); | ||
80 | /*static void resync_to_restart (j_decompress_ptr cinfo, int desired);*/ | ||
81 | static void term_source (j_decompress_ptr cinfo); | ||
82 | static void jpeg_stream_src(struct jpeg_decompress_struct *cinfo, G3DStream *stream); | ||
83 | |||
84 | |||
85 | EAPI | ||
86 | gchar *plugin_description(G3DContext *context) | ||
87 | { | ||
88 | return g_strdup("JPEG images."); | ||
89 | } | ||
90 | |||
91 | EAPI | ||
92 | gchar **plugin_extensions(G3DContext *context) | ||
93 | { | ||
94 | return g_strsplit("jpg:jpeg:jpe:jfif:jif", ":", 0); | ||
95 | } | ||
96 | |||
97 | EAPI | ||
98 | gboolean plugin_load_image_from_stream(G3DContext *context, G3DStream *stream, G3DImage *image, gpointer user_data) | ||
99 | { | ||
100 | gsize n; | ||
101 | gboolean retval; | ||
102 | guint32 x, y, nchannels; | ||
103 | |||
104 | /* This struct contains the JPEG decompression parameters and pointers to | ||
105 | * working space (which is allocated as needed by the JPEG library). | ||
106 | */ | ||
107 | struct jpeg_decompress_struct cinfo; | ||
108 | /* We use our private extension JPEG error handler. | ||
109 | * Note that this struct must live as long as the main JPEG parameter | ||
110 | * struct, to avoid dangling-pointer problems. | ||
111 | */ | ||
112 | struct my_error_mgr jerr; | ||
113 | /* More stuff */ | ||
114 | JSAMPARRAY buffer; /* Output row buffer */ | ||
115 | int row_stride; /* physical row width in output buffer */ | ||
116 | |||
117 | /* Step 1: allocate and initialize JPEG decompression object */ | ||
118 | |||
119 | /* We set up the normal JPEG error routines, then override error_exit. */ | ||
120 | cinfo.err = jpeg_std_error(&jerr.pub); | ||
121 | jerr.pub.error_exit = my_error_exit; | ||
122 | /* Establish the setjmp return context for my_error_exit to use. */ | ||
123 | if (setjmp(jerr.setjmp_buffer)) { | ||
124 | /* If we get here, the JPEG code has signaled an error. | ||
125 | * We need to clean up the JPEG object, close the input file, and return. | ||
126 | */ | ||
127 | jpeg_destroy_decompress(&cinfo); | ||
128 | return 0; | ||
129 | } | ||
130 | /* Now we can initialize the JPEG decompression object. */ | ||
131 | jpeg_create_decompress(&cinfo); | ||
132 | |||
133 | /* Step 2: specify data source (eg, a file) */ | ||
134 | |||
135 | jpeg_stream_src(&cinfo, stream); | ||
136 | |||
137 | /* Step 3: read file parameters with jpeg_read_header() */ | ||
138 | |||
139 | (void) jpeg_read_header(&cinfo, TRUE); | ||
140 | /* We can ignore the return value from jpeg_read_header since | ||
141 | * (a) suspension is not possible with the stdio data source, and | ||
142 | * (b) we passed TRUE to reject a tables-only JPEG file as an error. | ||
143 | * See libjpeg.txt for more info. | ||
144 | */ | ||
145 | |||
146 | /* Step 4: set parameters for decompression */ | ||
147 | |||
148 | if (cinfo.jpeg_color_space != JCS_RGB) | ||
149 | { | ||
150 | g_warning("Jpeg plugin: %s: colorspace is not RGB, converting.", stream->uri); | ||
151 | cinfo.out_color_space = JCS_RGB; | ||
152 | } | ||
153 | |||
154 | |||
155 | /* Step 5: Start decompressor */ | ||
156 | |||
157 | (void) jpeg_start_decompress(&cinfo); | ||
158 | /* We can ignore the return value since suspension is not possible | ||
159 | * with the stdio data source. | ||
160 | */ | ||
161 | |||
162 | /* We may need to do some setup of our own at this point before reading | ||
163 | * the data. After jpeg_start_decompress() we have the correct scaled | ||
164 | * output image dimensions available, as well as the output colormap | ||
165 | * if we asked for color quantization. | ||
166 | * In this example, we need to make an output work buffer of the right size. | ||
167 | */ | ||
168 | /* JSAMPLEs per row in output buffer */ | ||
169 | row_stride = cinfo.output_width * cinfo.output_components; | ||
170 | /* Make a one-row-high sample array that will go away when done with image */ | ||
171 | buffer = (*cinfo.mem->alloc_sarray) | ||
172 | ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); | ||
173 | |||
174 | /* | ||
175 | //output_width image width and height, as scaled | ||
176 | //output_height | ||
177 | //out_color_components # of color components in out_color_space | ||
178 | //output_components # of color components returned per pixel | ||
179 | //colormap the selected colormap, if any | ||
180 | //actual_number_of_colors number of entries in colormap | ||
181 | */ | ||
182 | nchannels = cinfo.output_components; | ||
183 | if(nchannels < 3) | ||
184 | { | ||
185 | g_warning("Jpeg plugin: %s: has only %d channels", stream->uri, nchannels); | ||
186 | jpeg_destroy_decompress(&cinfo); | ||
187 | return FALSE; | ||
188 | } | ||
189 | |||
190 | image->width = cinfo.output_width; | ||
191 | image->height = cinfo.output_height; | ||
192 | image->depth = 32; | ||
193 | image->name = g_path_get_basename(stream->uri); | ||
194 | image->pixeldata = g_new0(guint8, image->width * image->height * 4); | ||
195 | |||
196 | |||
197 | /* Step 6: while (scan lines remain to be read) */ | ||
198 | /* jpeg_read_scanlines(...); */ | ||
199 | |||
200 | /* Here we use the library's state variable cinfo.output_scanline as the | ||
201 | * loop counter, so that we don't have to keep track ourselves. | ||
202 | */ | ||
203 | y = 0; | ||
204 | while (cinfo.output_scanline < cinfo.output_height) | ||
205 | { | ||
206 | /* jpeg_read_scanlines expects an array of pointers to scanlines. | ||
207 | * Here the array is only one element long, but you could ask for | ||
208 | * more than one scanline at a time if that's more convenient. | ||
209 | */ | ||
210 | (void) jpeg_read_scanlines(&cinfo, buffer, 1); | ||
211 | /* for(y = 0; y < image->height; y ++) */ | ||
212 | for(x = 0; x < image->width; x ++) | ||
213 | { | ||
214 | JSAMPROW p = buffer[0] + x * nchannels; | ||
215 | |||
216 | image->pixeldata[(y * image->width + x) * 4 + 0] = GETJSAMPLE(p[0]); | ||
217 | image->pixeldata[(y * image->width + x) * 4 + 1] = GETJSAMPLE(p[1]); | ||
218 | image->pixeldata[(y * image->width + x) * 4 + 2] = GETJSAMPLE(p[2]); | ||
219 | if(nchannels >= 4) | ||
220 | image->pixeldata[(y * image->width + x) * 4 + 3] = GETJSAMPLE(p[3]); | ||
221 | } | ||
222 | y++; | ||
223 | } | ||
224 | |||
225 | /* set alpha to 1.0 */ | ||
226 | if(nchannels < 4) | ||
227 | for(y = 0; y < image->height; y ++) | ||
228 | for(x = 0; x < image->width; x ++) | ||
229 | image->pixeldata[(y * image->width + x) * 4 + 3] = 0xFF; | ||
230 | |||
231 | /* Step 7: Finish decompression */ | ||
232 | |||
233 | (void) jpeg_finish_decompress(&cinfo); | ||
234 | /* We can ignore the return value since suspension is not possible | ||
235 | * with the stdio data source. | ||
236 | */ | ||
237 | |||
238 | /* Step 8: Release JPEG decompression object */ | ||
239 | |||
240 | /* This is an important step since it will release a good deal of memory. */ | ||
241 | jpeg_destroy_decompress(&cinfo); | ||
242 | |||
243 | /* At this point you may want to check to see whether any corrupt-data | ||
244 | * warnings occurred (test whether jerr.pub.num_warnings is nonzero). | ||
245 | */ | ||
246 | |||
247 | return TRUE; | ||
248 | } | ||
249 | |||
250 | /* | ||
251 | * SOME FINE POINTS: | ||
252 | * | ||
253 | * In the above code, we ignored the return value of jpeg_read_scanlines, | ||
254 | * which is the number of scanlines actually read. We could get away with | ||
255 | * this because we asked for only one line at a time and we weren't using | ||
256 | * a suspending data source. See libjpeg.txt for more info. | ||
257 | * | ||
258 | * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress(); | ||
259 | * we should have done it beforehand to ensure that the space would be | ||
260 | * counted against the JPEG max_memory setting. In some systems the above | ||
261 | * code would risk an out-of-memory error. However, in general we don't | ||
262 | * know the output image dimensions before jpeg_start_decompress(), unless we | ||
263 | * call jpeg_calc_output_dimensions(). See libjpeg.txt for more about this. | ||
264 | * | ||
265 | * Scanlines are returned in the same order as they appear in the JPEG file, | ||
266 | * which is standardly top-to-bottom. If you must emit data bottom-to-top, | ||
267 | * you can use one of the virtual arrays provided by the JPEG memory manager | ||
268 | * to invert the data. See wrbmp.c for an example. | ||
269 | * | ||
270 | * As with compression, some operating modes may require temporary files. | ||
271 | * On some systems you may need to set up a signal handler to ensure that | ||
272 | * temporary files are deleted if the program is interrupted. See libjpeg.txt. | ||
273 | */ | ||
274 | |||
275 | |||
276 | const JOCTET * next_input_byte; /* => next byte to read from buffer */ | ||
277 | size_t bytes_in_buffer; /* # of bytes remaining in buffer */ | ||
278 | |||
279 | /* | ||
280 | Initialize source. This is called by jpeg_read_header() before any | ||
281 | data is actually read. Unlike init_destination(), it may leave | ||
282 | bytes_in_buffer set to 0 (in which case a fill_input_buffer() call | ||
283 | will occur immediately). | ||
284 | */ | ||
285 | |||
286 | static void init_stream_source (j_decompress_ptr cinfo) | ||
287 | { | ||
288 | my_src_ptr src = (my_src_ptr) cinfo->src; | ||
289 | |||
290 | /* We reset the empty-input-file flag for each image, | ||
291 | * but we don't clear the input buffer. | ||
292 | * This is correct behavior for reading a series of images from one source. | ||
293 | */ | ||
294 | src->start_of_file = TRUE; | ||
295 | } | ||
296 | |||
297 | /* | ||
298 | This is called whenever bytes_in_buffer has reached zero and more | ||
299 | data is wanted. In typical applications, it should read fresh data | ||
300 | into the buffer (ignoring the current state of next_input_byte and | ||
301 | bytes_in_buffer), reset the pointer & count to the start of the | ||
302 | buffer, and return TRUE indicating that the buffer has been reloaded. | ||
303 | It is not necessary to fill the buffer entirely, only to obtain at | ||
304 | least one more byte. bytes_in_buffer MUST be set to a positive value | ||
305 | if TRUE is returned. A FALSE return should only be used when I/O | ||
306 | suspension is desired (this mode is discussed in the next section). | ||
307 | */ | ||
308 | static boolean fill_stream_input_buffer (j_decompress_ptr cinfo) | ||
309 | { | ||
310 | my_src_ptr src = (my_src_ptr) cinfo->src; | ||
311 | size_t nbytes = 0; | ||
312 | |||
313 | if (!g3d_stream_eof(src->stream)) | ||
314 | nbytes = g3d_stream_read(src->stream, src->buffer, BUFSIZE); | ||
315 | |||
316 | if (nbytes <= 0) | ||
317 | { | ||
318 | if (src->start_of_file) /* Treat empty input file as fatal error */ | ||
319 | ERREXIT(cinfo, JERR_INPUT_EMPTY); | ||
320 | WARNMS(cinfo, JWRN_JPEG_EOF); | ||
321 | /* Insert a fake EOI marker */ | ||
322 | src->buffer[0] = (JOCTET) 0xFF; | ||
323 | src->buffer[1] = (JOCTET) JPEG_EOI; | ||
324 | nbytes = 2; | ||
325 | } | ||
326 | |||
327 | src->pub.next_input_byte = src->buffer; | ||
328 | src->pub.bytes_in_buffer = nbytes; | ||
329 | src->start_of_file = FALSE; | ||
330 | |||
331 | return TRUE; | ||
332 | } | ||
333 | |||
334 | /* | ||
335 | Skip num_bytes worth of data. The buffer pointer and count should | ||
336 | be advanced over num_bytes input bytes, refilling the buffer as | ||
337 | needed. This is used to skip over a potentially large amount of | ||
338 | uninteresting data (such as an APPn marker). In some applications | ||
339 | it may be possible to optimize away the reading of the skipped data, | ||
340 | but it's not clear that being smart is worth much trouble; large | ||
341 | skips are uncommon. bytes_in_buffer may be zero on return. | ||
342 | A zero or negative skip count should be treated as a no-op. | ||
343 | */ | ||
344 | static void skip_input_data (j_decompress_ptr cinfo, long num_bytes) | ||
345 | { | ||
346 | struct jpeg_source_mgr * src = cinfo->src; | ||
347 | |||
348 | /* Just a dumb implementation for now. Could use fseek() except | ||
349 | * it doesn't work on pipes. Not clear that being smart is worth | ||
350 | * any trouble anyway --- large skips are infrequent. | ||
351 | */ | ||
352 | if (num_bytes > 0) | ||
353 | { | ||
354 | while (num_bytes > (long) src->bytes_in_buffer) | ||
355 | { | ||
356 | num_bytes -= (long) src->bytes_in_buffer; | ||
357 | (void) (*src->fill_input_buffer) (cinfo); | ||
358 | /* note we assume that fill_input_buffer will never return FALSE, | ||
359 | * so suspension need not be handled. | ||
360 | */ | ||
361 | } | ||
362 | src->next_input_byte += (size_t) num_bytes; | ||
363 | src->bytes_in_buffer -= (size_t) num_bytes; | ||
364 | } | ||
365 | } | ||
366 | |||
367 | /* | ||
368 | This routine is called only when the decompressor has failed to find | ||
369 | a restart (RSTn) marker where one is expected. Its mission is to | ||
370 | find a suitable point for resuming decompression. For most | ||
371 | applications, we recommend that you just use the default resync | ||
372 | procedure, jpeg_resync_to_restart(). However, if you are able to back | ||
373 | up in the input data stream, or if you have a-priori knowledge about | ||
374 | the likely location of restart markers, you may be able to do better. | ||
375 | Read the read_restart_marker() and jpeg_resync_to_restart() routines | ||
376 | in jdmarker.c if you think you'd like to implement your own resync | ||
377 | procedure. | ||
378 | */ | ||
379 | /* | ||
380 | //static void resync_to_restart (j_decompress_ptr cinfo, int desired) | ||
381 | //{ | ||
382 | //} | ||
383 | */ | ||
384 | |||
385 | /* | ||
386 | Terminate source --- called by jpeg_finish_decompress() after all | ||
387 | data has been read. Often a no-op. | ||
388 | */ | ||
389 | static void term_source (j_decompress_ptr cinfo) | ||
390 | { | ||
391 | /* no work necessary here */ | ||
392 | } | ||
393 | /* | ||
394 | For both fill_input_buffer() and skip_input_data(), there is no such thing as an EOF return. If the end of the file has been reached, the routine has a choice of exiting via ERREXIT() or inserting fake data into the buffer. In most cases, generating a warning message and inserting a fake EOI marker is the best course of action --- this will allow the decompressor to output however much of the image is there. In pathological cases, the decompressor | ||
395 | |||
396 | may swallow the EOI and again demand data ... just keep feeding it fake EOIs. | ||
397 | |||
398 | jdatasrc.c illustrates the recommended error recovery behavior. | ||
399 | |||
400 | term_source() is NOT called by jpeg_abort() or jpeg_destroy(). If you want the source manager to be cleaned up during an abort, you must do it yourself. | ||
401 | |||
402 | You will also need code to create a jpeg_source_mgr struct, fill in its method pointers, and insert a pointer to the struct into the "src" field of the JPEG decompression object. This can be done in-line in your setup code if you like, but it's probably cleaner to provide a separate routine similar to the jpeg_stdio_src() routine of the supplied source manager. | ||
403 | |||
404 | For more information, consult the stdio source and destination managers in jdatasrc.c and jdatadst.c. | ||
405 | */ | ||
406 | |||
407 | static void jpeg_stream_src(struct jpeg_decompress_struct *cinfo, G3DStream *stream) | ||
408 | { | ||
409 | my_source_mgr *src; | ||
410 | |||
411 | if (stream == NULL) | ||
412 | ERREXIT(cinfo, JERR_INPUT_EMPTY); | ||
413 | |||
414 | /* The source object is made permanent so that a series of JPEG images | ||
415 | * can be read from the same buffer by calling jpeg_mem_src only before | ||
416 | * the first one. | ||
417 | */ | ||
418 | if (cinfo->src == NULL) { /* first time for this JPEG object? */ | ||
419 | cinfo->src = (struct jpeg_source_mgr *) | ||
420 | (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(my_source_mgr)); | ||
421 | |||
422 | src = (my_src_ptr) cinfo->src; | ||
423 | src->buffer = (JOCTET *) | ||
424 | (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, BUFSIZE * sizeof(JOCTET)); | ||
425 | } | ||
426 | |||
427 | src = (my_src_ptr) cinfo->src; | ||
428 | src->pub.init_source = init_stream_source; | ||
429 | src->pub.fill_input_buffer = fill_stream_input_buffer; | ||
430 | src->pub.skip_input_data = skip_input_data; | ||
431 | src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ | ||
432 | src->pub.term_source = term_source; | ||
433 | src->stream = stream; | ||
434 | src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ | ||
435 | src->pub.next_input_byte = NULL; /* until buffer loaded */ | ||
436 | } | ||
437 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/image/img_sgi.c b/src/others/mimesh/libg3d-0.0.8/plugins/image/img_sgi.c new file mode 100644 index 0000000..71dd583 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/image/img_sgi.c | |||
@@ -0,0 +1,181 @@ | |||
1 | /* $Id$ */ | ||
2 | |||
3 | /* | ||
4 | libg3d - 3D object loading library | ||
5 | |||
6 | Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de> | ||
7 | |||
8 | This library is free software; you can redistribute it and/or | ||
9 | modify it under the terms of the GNU Lesser General Public | ||
10 | License as published by the Free Software Foundation; either | ||
11 | version 2.1 of the License, or (at your option) any later version. | ||
12 | |||
13 | This library is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | Lesser General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU Lesser General Public | ||
19 | License along with this library; if not, write to the Free Software | ||
20 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #include <stdio.h> | ||
24 | #include <string.h> | ||
25 | #include <errno.h> | ||
26 | |||
27 | #include <g3d/types.h> | ||
28 | #include <g3d/stream.h> | ||
29 | |||
30 | #define SGI_STORAGE_VERBATIM 0 | ||
31 | #define SGI_STORAGE_RLE 1 | ||
32 | |||
33 | EAPI | ||
34 | gboolean plugin_load_image_from_stream(G3DContext *context, G3DStream *stream, | ||
35 | G3DImage *image, gpointer user_data) | ||
36 | { | ||
37 | guint32 cmap, planes, x, y, p; | ||
38 | guint16 dims; | ||
39 | guint8 storage, bpc; | ||
40 | gchar name[80]; | ||
41 | |||
42 | if(g3d_stream_read_int16_be(stream) != 474) { | ||
43 | g_warning("file '%s' is not a SGI RGB file", stream->uri); | ||
44 | return FALSE; | ||
45 | } | ||
46 | |||
47 | storage = g3d_stream_read_int8(stream); | ||
48 | bpc = g3d_stream_read_int8(stream); | ||
49 | dims = g3d_stream_read_int16_be(stream); | ||
50 | |||
51 | if(bpc != 1) { | ||
52 | g_warning("SGI: %s: bpc != 1 -- unsupported", stream->uri); | ||
53 | return FALSE; | ||
54 | } | ||
55 | |||
56 | image->width = g3d_stream_read_int16_be(stream); | ||
57 | image->height = g3d_stream_read_int16_be(stream); | ||
58 | |||
59 | planes = g3d_stream_read_int16_be(stream); /* ZSIZE */ | ||
60 | image->depth = 32; | ||
61 | g3d_stream_read_int32_be(stream); /* PIXMIN */ | ||
62 | g3d_stream_read_int32_be(stream); /* PIXMAX */ | ||
63 | g3d_stream_read_int32_be(stream); /* DUMMY */ | ||
64 | g3d_stream_read(stream, name, 80); | ||
65 | |||
66 | if(strlen(name) > 0) { | ||
67 | #if DEBUG > 0 | ||
68 | g_debug("SGI: image name: %s", name); | ||
69 | #endif | ||
70 | image->name = g_strdup(name); | ||
71 | } else { | ||
72 | image->name = g_strdup(stream->uri); | ||
73 | } | ||
74 | |||
75 | cmap = g3d_stream_read_int32_be(stream); /* COLORMAP */ | ||
76 | g3d_stream_skip(stream, 404); | ||
77 | |||
78 | #if DEBUG > 0 | ||
79 | g_debug("SGI: %dx%dx%d, %d bpc, colormap: 0x%02x", | ||
80 | image->width, image->height, planes, bpc, cmap); | ||
81 | #endif | ||
82 | /* end of header */ | ||
83 | |||
84 | image->pixeldata = g_new0(guint8, image->width * image->height * 4); | ||
85 | |||
86 | if(storage == SGI_STORAGE_VERBATIM) { | ||
87 | for(p = 0; p < planes; p ++) { | ||
88 | for(y = 0; y < image->height; y ++) { | ||
89 | for(x = 0; x < image->width; x ++) { | ||
90 | image->pixeldata[(y * image->width + x) * 4 + p] = | ||
91 | g3d_stream_read_int8(stream); | ||
92 | |||
93 | if(planes == 1) { | ||
94 | /* greyscale: g = r; b = r; */ | ||
95 | image->pixeldata[(y * image->width + x) * 4 + 1] = | ||
96 | image->pixeldata[(y * image->width + x) * 4]; | ||
97 | image->pixeldata[(y * image->width + x) * 4 + 2] = | ||
98 | image->pixeldata[(y * image->width + x) * 4]; | ||
99 | } | ||
100 | } /* x */ | ||
101 | } /* y */ | ||
102 | } /* p */ | ||
103 | } /* verbatim */ | ||
104 | else /* RLE */ { | ||
105 | guint32 *starttab, *lengthtab, rleoff, rlelen; | ||
106 | guint8 cnt, pixel; | ||
107 | |||
108 | starttab = g_new0(guint32, image->height * planes); | ||
109 | lengthtab = g_new0(guint32, image->height * planes); | ||
110 | |||
111 | /* read starttab */ | ||
112 | for(p = 0; p < planes; p ++) | ||
113 | for(y = 0; y < image->height; y ++) | ||
114 | starttab[y * planes + p] = g3d_stream_read_int32_be(stream); | ||
115 | /* read lengthtab */ | ||
116 | for(p = 0; p < planes; p ++) | ||
117 | for(y = 0; y < image->height; y ++) | ||
118 | lengthtab[y * planes + p] = g3d_stream_read_int32_be(stream); | ||
119 | |||
120 | /* read image data */ | ||
121 | for(p = 0; p < planes; p ++) | ||
122 | for(y = 0; y < image->height; y ++) | ||
123 | { | ||
124 | rleoff = starttab[y * planes + p]; | ||
125 | rlelen = lengthtab[y * planes + p]; | ||
126 | |||
127 | g3d_stream_seek(stream, rleoff, G_SEEK_SET); | ||
128 | |||
129 | x = 0; | ||
130 | |||
131 | while(1) { | ||
132 | pixel = g3d_stream_read_int8(stream); | ||
133 | cnt = pixel & 0x7F; | ||
134 | |||
135 | if(cnt == 0) | ||
136 | break; | ||
137 | |||
138 | if(pixel & 0x80) { | ||
139 | /* copy n bytes */ | ||
140 | while(cnt --) { | ||
141 | image->pixeldata[(y * image->width + x) * 4 + p] = | ||
142 | g3d_stream_read_int8(stream); | ||
143 | x ++; | ||
144 | } | ||
145 | } else { | ||
146 | /* repeat next byte n times */ | ||
147 | pixel = g3d_stream_read_int8(stream); | ||
148 | while(cnt --) { | ||
149 | image->pixeldata[(y * image->width + x) * 4 + p] = | ||
150 | pixel; | ||
151 | x ++; | ||
152 | } | ||
153 | } | ||
154 | } | ||
155 | } | ||
156 | |||
157 | g_free(starttab); | ||
158 | g_free(lengthtab); | ||
159 | } | ||
160 | |||
161 | /* set alpha to 1.0 */ | ||
162 | if(planes < 4) | ||
163 | for(y = 0; y < image->height; y ++) | ||
164 | for(x = 0; x < image->width; x ++) | ||
165 | image->pixeldata[(y * image->width + x) * 4 + 3] = 0xFF; | ||
166 | |||
167 | return TRUE; | ||
168 | } | ||
169 | |||
170 | EAPI | ||
171 | gchar *plugin_description(G3DContext *context) | ||
172 | { | ||
173 | return g_strdup("SGI RGB images."); | ||
174 | } | ||
175 | |||
176 | EAPI | ||
177 | gchar **plugin_extensions(G3DContext *context) | ||
178 | { | ||
179 | return g_strsplit("rgb:rgba:sgi", ":", 0); | ||
180 | } | ||
181 | |||