summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libpng/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/libpng/scripts')
-rw-r--r--src/3rdparty/libpng/scripts/README.txt67
-rw-r--r--src/3rdparty/libpng/scripts/SCOPTIONS.ppc7
-rw-r--r--src/3rdparty/libpng/scripts/descrip.mms52
-rwxr-xr-xsrc/3rdparty/libpng/scripts/libpng-config-body.in96
-rwxr-xr-xsrc/3rdparty/libpng/scripts/libpng-config-head.in24
-rw-r--r--src/3rdparty/libpng/scripts/libpng.pc.in10
-rw-r--r--src/3rdparty/libpng/scripts/makefile.32sunu257
-rw-r--r--src/3rdparty/libpng/scripts/makefile.64sunu257
-rw-r--r--src/3rdparty/libpng/scripts/makefile.acorn50
-rw-r--r--src/3rdparty/libpng/scripts/makefile.aix116
-rw-r--r--src/3rdparty/libpng/scripts/makefile.amiga51
-rw-r--r--src/3rdparty/libpng/scripts/makefile.atari55
-rw-r--r--src/3rdparty/libpng/scripts/makefile.bc32145
-rw-r--r--src/3rdparty/libpng/scripts/makefile.beos230
-rw-r--r--src/3rdparty/libpng/scripts/makefile.bor156
-rw-r--r--src/3rdparty/libpng/scripts/makefile.cegcc113
-rw-r--r--src/3rdparty/libpng/scripts/makefile.cygwin293
-rw-r--r--src/3rdparty/libpng/scripts/makefile.darwin237
-rw-r--r--src/3rdparty/libpng/scripts/makefile.dec217
-rw-r--r--src/3rdparty/libpng/scripts/makefile.dj258
-rw-r--r--src/3rdparty/libpng/scripts/makefile.elf279
-rw-r--r--src/3rdparty/libpng/scripts/makefile.freebsd48
-rw-r--r--src/3rdparty/libpng/scripts/makefile.gcc83
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hp64239
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hpgcc248
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hpux236
-rw-r--r--src/3rdparty/libpng/scripts/makefile.ibmc77
-rw-r--r--src/3rdparty/libpng/scripts/makefile.intel106
-rw-r--r--src/3rdparty/libpng/scripts/makefile.knr103
-rw-r--r--src/3rdparty/libpng/scripts/makefile.linux253
-rw-r--r--src/3rdparty/libpng/scripts/makefile.mingw280
-rw-r--r--src/3rdparty/libpng/scripts/makefile.mips87
-rw-r--r--src/3rdparty/libpng/scripts/makefile.msc91
-rw-r--r--src/3rdparty/libpng/scripts/makefile.ne12bsd46
-rw-r--r--src/3rdparty/libpng/scripts/makefile.netbsd46
-rw-r--r--src/3rdparty/libpng/scripts/makefile.openbsd76
-rw-r--r--src/3rdparty/libpng/scripts/makefile.os272
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sco232
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sggcc243
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sgi247
-rw-r--r--src/3rdparty/libpng/scripts/makefile.so9254
-rw-r--r--src/3rdparty/libpng/scripts/makefile.solaris251
-rw-r--r--src/3rdparty/libpng/scripts/makefile.solaris-x86251
-rw-r--r--src/3rdparty/libpng/scripts/makefile.std95
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sunos100
-rw-r--r--src/3rdparty/libpng/scripts/makefile.tc389
-rw-r--r--src/3rdparty/libpng/scripts/makefile.vcwin32103
-rw-r--r--src/3rdparty/libpng/scripts/makefile.watcom112
-rw-r--r--src/3rdparty/libpng/scripts/makevms.com142
-rw-r--r--src/3rdparty/libpng/scripts/png32ce.def257
-rw-r--r--src/3rdparty/libpng/scripts/pngos2.def251
-rw-r--r--src/3rdparty/libpng/scripts/pngwin.def212
-rw-r--r--src/3rdparty/libpng/scripts/pngwin.rc112
-rw-r--r--src/3rdparty/libpng/scripts/smakefile.ppc33
54 files changed, 7845 insertions, 0 deletions
diff --git a/src/3rdparty/libpng/scripts/README.txt b/src/3rdparty/libpng/scripts/README.txt
new file mode 100644
index 0000000..fa7ffed
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/README.txt
@@ -0,0 +1,67 @@
+
+Makefiles for libpng version 1.4.0 - January 3, 2010
+
+ makefile.linux => Linux/ELF makefile
+ (gcc, creates libpng14.so.14.1.4.0)
+ makefile.gcc => Generic makefile (gcc, creates static libpng.a)
+ makefile.knr => Archaic UNIX Makefile that converts files with
+ ansi2knr (Requires ansi2knr.c from
+ ftp://ftp.cs.wisc.edu/ghost)
+ makefile.acorn => Acorn makefile
+ makefile.aix => AIX/gcc makefile
+ makefile.amiga => Amiga makefile
+ makefile.atari => Atari makefile
+ makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
+ makefile.beos => beos makefile
+ makefile.bor => Borland makefile (uses bcc)
+ makefile.cegcc => minge32ce for Windows CE makefile
+ makefile.cygwin => Cygwin/gcc makefile
+ makefile.darwin => Darwin makefile, can use on MacosX
+ makefile.dec => DEC Alpha UNIX makefile
+ makefile.dj2 => DJGPP 2 makefile
+ makefile.elf => Linux/ELF makefile symbol versioning,
+ gcc, creates libpng14.so.14.1.4.0)
+ makefile.freebsd => FreeBSD makefile
+ makefile.gcc => Generic gcc makefile
+ makefile.hpgcc => HPUX makefile using gcc
+ makefile.hpux => HPUX (10.20 and 11.00) makefile
+ makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit
+ makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
+ makefile.intel => Intel C/C++ version 4.0 and later
+ makefile.mingw => Mingw makefile
+ makefile.mips => MIPS makefile
+ makefile.msc => Microsoft C makefile
+ makefile.netbsd => NetBSD/cc makefile, makes libpng.so.
+ makefile.openbsd => OpenBSD makefile
+ makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
+ makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
+ makefile.sggcc => Silicon Graphics (gcc,
+ creates libpng14.so.14.1.4.0)
+ makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
+ makefile.solaris => Solaris 2.X makefile (gcc,
+ creates libpng14.so.14.1.4.0)
+ makefile.so9 => Solaris 9 makefile (gcc,
+ creates libpng14.so.14.1.4.0)
+ makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
+ makefile.sunos => Sun makefile
+ makefile.32sunu => Sun Ultra 32-bit makefile
+ makefile.64sunu => Sun Ultra 64-bit makefile
+ makefile.tc3 => Turbo C 3.0 makefile
+ makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later
+ makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
+ makevms.com => VMS build script
+ smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler
+ (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)
+
+Other supporting scripts:
+ descrip.mms => VMS makefile for MMS or MMK
+ libpng-config-body.in => used by several makefiles to create libpng-config
+ libpng-config-head.in => used by several makefiles to create libpng-config
+ libpng.pc.in => Used by several makefiles to create libpng.pc
+ pngos2.def => OS/2 module definition file used by makefile.os2
+ pngwin.def => Module definitions for makefile.cygwin and mingw
+ png32ce.def => Module definition file used by makefile.cegcc
+ pngwin.rc => Used by the visualc6 and visualc71 projects.
+ SCOPTIONS.ppc => Used with smakefile.ppc
+
+Further information can be found in comments in the individual makefiles.
diff --git a/src/3rdparty/libpng/scripts/SCOPTIONS.ppc b/src/3rdparty/libpng/scripts/SCOPTIONS.ppc
new file mode 100644
index 0000000..2c3503e
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/SCOPTIONS.ppc
@@ -0,0 +1,7 @@
+OPTIMIZE
+OPTPEEP
+OPTTIME
+OPTSCHED
+AUTOREGISTER
+PARMS=REGISTERS
+INCLUDEDIR=hlp:ppc/include
diff --git a/src/3rdparty/libpng/scripts/descrip.mms b/src/3rdparty/libpng/scripts/descrip.mms
new file mode 100644
index 0000000..d0642c0
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/descrip.mms
@@ -0,0 +1,52 @@
+
+cc_defs = /inc=$(ZLIBSRC)
+c_deb =
+
+.ifdef __DECC__
+pref = /prefix=all
+.endif
+
+
+
+OBJS = png.obj, pngset.obj, pngget.obj, pngrutil.obj, pngtrans.obj,\
+ pngwutil.obj, pngread.obj, pngmem.obj, pngwrite.obj, pngrtran.obj,\
+ pngwtran.obj, pngrio.obj, pngwio.obj, pngerror.obj, pngpread.obj
+
+
+CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF)
+
+all : pngtest.exe libpng.olb
+ @ write sys$output " pngtest available"
+
+libpng.olb : libpng.olb($(OBJS))
+ @ write sys$output " Libpng available"
+
+
+pngtest.exe : pngtest.obj libpng.olb
+ link pngtest,libpng.olb/lib,$(ZLIBSRC)libz.olb/lib
+
+test : pngtest.exe
+ run pngtest
+
+clean :
+ delete *.obj;*,*.exe;
+
+
+# Other dependencies.
+png.obj : png.h, pngconf.h, pngpriv.h
+pngpread.obj : png.h, pngconf.h, pngpriv.h
+pngset.obj : png.h, pngconf.h, pngpriv.h
+pngget.obj : png.h, pngconf.h, pngpriv.h
+pngread.obj : png.h, pngconf.h, pngpriv.h
+pngrtran.obj : png.h, pngconf.h, pngpriv.h
+pngrutil.obj : png.h, pngconf.h, pngpriv.h
+pngerror.obj : png.h, pngconf.h, pngpriv.h
+pngmem.obj : png.h, pngconf.h, pngpriv.h
+pngrio.obj : png.h, pngconf.h, pngpriv.h
+pngwio.obj : png.h, pngconf.h, pngpriv.h
+pngtrans.obj : png.h, pngconf.h, pngpriv.h
+pngwrite.obj : png.h, pngconf.h, pngpriv.h
+pngwtran.obj : png.h, pngconf.h, pngpriv.h
+pngwutil.obj : png.h, pngconf.h, pngpriv.h
+
+pngtest.obj : png.h, pngconf.h
diff --git a/src/3rdparty/libpng/scripts/libpng-config-body.in b/src/3rdparty/libpng/scripts/libpng-config-body.in
new file mode 100755
index 0000000..b466432
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/libpng-config-body.in
@@ -0,0 +1,96 @@
+
+usage()
+{
+ cat <<EOF
+Usage: libpng-config [OPTION] ...
+
+Known values for OPTION are:
+
+ --prefix print libpng prefix
+ --libdir print path to directory containing library
+ --libs print library linking information
+ --ccopts print compiler options
+ --cppflags print pre-processor flags
+ --cflags print preprocessor flags, I_opts, and compiler options
+ --I_opts print "-I" include options
+ --L_opts print linker "-L" flags for dynamic linking
+ --R_opts print dynamic linker "-R" or "-rpath" flags
+ --ldopts print linker options
+ --ldflags print linker flags (ldopts, L_opts, R_opts, and libs)
+ --static revise subsequent outputs for static linking
+ --help print this help and exit
+ --version print version information
+EOF
+
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+
+ --prefix)
+ echo ${prefix}
+ ;;
+
+ --version)
+ echo ${version}
+ exit 0
+ ;;
+
+ --help)
+ usage 0
+ ;;
+
+ --ccopts)
+ echo ${ccopts}
+ ;;
+
+ --cppflags)
+ echo ${cppflags}
+ ;;
+
+ --cflags)
+ echo ${I_opts} ${cppflags} ${ccopts}
+ ;;
+
+ --libdir)
+ echo ${libdir}
+ ;;
+
+ --libs)
+ echo ${libs}
+ ;;
+
+ --I_opts)
+ echo ${I_opts}
+ ;;
+
+ --L_opts)
+ echo ${L_opts}
+ ;;
+
+ --R_opts)
+ echo ${R_opts}
+ ;;
+
+ --ldflags)
+ echo ${ldflags} ${L_opts} ${R_opts} ${libs}
+ ;;
+
+ --static)
+ R_opts=""
+ ;;
+
+ *)
+ usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+exit 0
diff --git a/src/3rdparty/libpng/scripts/libpng-config-head.in b/src/3rdparty/libpng/scripts/libpng-config-head.in
new file mode 100755
index 0000000..01e7254
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/libpng-config-head.in
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# libpng-config
+# provides configuration info for libpng.
+
+# Copyright (C) 2002 Glenn Randers-Pehrson
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Modeled after libxml-config.
+
+version=1.4.0
+prefix=""
+libdir=""
+libs=""
+I_opts=""
+L_opts=""
+R_opts=""
+cppflags=""
+ccopts=""
+ldopts=""
+
diff --git a/src/3rdparty/libpng/scripts/libpng.pc.in b/src/3rdparty/libpng/scripts/libpng.pc.in
new file mode 100644
index 0000000..573df5a
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/libpng.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/libpng14
+
+Name: libpng
+Description: Loads and saves PNG files
+Version: 1.4.0
+Libs: -L${libdir} -lpng14
+Cflags: -I${includedir}
diff --git a/src/3rdparty/libpng/scripts/makefile.32sunu b/src/3rdparty/libpng/scripts/makefile.32sunu
new file mode 100644
index 0000000..3ae51f6
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.32sunu
@@ -0,0 +1,257 @@
+# makefile for libpng on Solaris 2.x with cc
+# Contributed by William L. Sebok, based on makefile.linux
+# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
+# Copyright (C) 1998 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+CC=cc
+AR_RC=ar rc
+MKDIR_P=mkdir -p
+LN_SF=ln -f -s
+RANLIB=echo
+RM_F=/bin/rm -f
+
+SUN_CC_FLAGS=-fast -xtarget=ultra
+SUN_LD_FLAGS=-fast -xtarget=ultra
+
+# where make install puts libpng.a, libpng14.so and libpng14/png.h
+prefix=/a
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+# Changing these to ../zlib poses a security risk. If you want
+# to have zlib in an adjacent directory, specify the full path instead of "..".
+#ZLIBLIB=../zlib
+#ZLIBINC=../zlib
+
+ZLIBLIB=/usr/lib
+ZLIBINC=/usr/include
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
+ # $(WARNMORE) -g -DPNG_DEBUG=5
+LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo libdir=\"$(LIBPATH)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo R_opts=\"-R$(LIBPATH)\"; \
+ echo ccopts=\"-xtarget=ultra\"; \
+ echo ldopts=\"-xtarget=ultra\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ @case "`type ld`" in *ucb*) \
+ echo; \
+ echo '## WARNING:'; \
+ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
+ echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
+ echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
+ echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
+ echo '## at all. If it is, things are likely to break because of'; \
+ echo '## the libucb dependency that is created.'; \
+ echo; \
+ ;; \
+ esac
+ $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \
+ -o $(LIBSOVER) $(OBJSDLL)
+
+$(OLDSOVER): $(OBJSDLL)
+ $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \
+ -o $(OLDSOVER) $(OBJSDLL)
+
+pngtest: pngtest.o $(LIBSO)
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
+ $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
+ $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
+ libpng-config $(LIBSO) $(LIBSOMAJ)* \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.64sunu b/src/3rdparty/libpng/scripts/makefile.64sunu
new file mode 100644
index 0000000..3a04d97
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.64sunu
@@ -0,0 +1,257 @@
+# makefile for libpng on Solaris 2.x with cc
+# Contributed by William L. Sebok, based on makefile.linux
+# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
+# Copyright (C) 1998 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+CC=cc
+AR_RC=ar rc
+MKDIR_P=mkdir -p
+LN_SF=ln -f -s
+RANLIB=echo
+RM_F=/bin/rm -f
+
+SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
+SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
+
+# where make install puts libpng.a, libpng14.so and libpng14/png.h
+prefix=/a
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+# Changing these to ../zlib poses a security risk. If you want
+# to have zlib in an adjacent directory, specify the full path instead of "..".
+#ZLIBLIB=../zlib
+#ZLIBINC=../zlib
+
+ZLIBLIB=/usr/lib
+ZLIBINC=/usr/include
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
+ # $(WARNMORE) -g -DPNG_DEBUG=5
+LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo libdir=\"$(LIBPATH)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo R_opts=\"-R$(LIBPATH)\"; \
+ echo ccopts=\"-xtarget=ultra -xarch=v9\"; \
+ echo ldopts=\"-xtarget=ultra -xarch=v9\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ @case "`type ld`" in *ucb*) \
+ echo; \
+ echo '## WARNING:'; \
+ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
+ echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
+ echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
+ echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
+ echo '## at all. If it is, things are likely to break because of'; \
+ echo '## the libucb dependency that is created.'; \
+ echo; \
+ ;; \
+ esac
+ $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \
+ -o $(LIBSOVER) $(OBJSDLL)
+
+$(OLDSOVER): $(OBJSDLL)
+ $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \
+ -o $(OLDSOVER) $(OBJSDLL)
+
+pngtest: pngtest.o $(LIBSO)
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
+ $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
+ $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
+ libpng-config $(LIBSO) $(LIBSOMAJ)* \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.acorn b/src/3rdparty/libpng/scripts/makefile.acorn
new file mode 100644
index 0000000..a0e577b
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.acorn
@@ -0,0 +1,50 @@
+# Project: libpng
+
+
+# Toolflags:
+CCflags = -c -depend !Depend -IC:,Zlib: -g -throwback -DRISCOS -fnah
+C++flags = -c -depend !Depend -IC: -throwback
+Linkflags = -aif -c++ -o $@
+ObjAsmflags = -throwback -NoCache -depend !Depend
+CMHGflags =
+LibFileflags = -c -l -o $@
+Squeezeflags = -o $@
+
+# Final targets:
+@.libpng-lib: @.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \
+ @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngrtran \
+ @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil
+ LibFile $(LibFileflags) @.o.png @.o.pngerror @.o.pngrio @.o.pngrtran \
+ @.o.pngmem @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngwio \
+ @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil
+@.mm-libpng-lib: @.mm.png @.mm.pngerror @.mm.pngrio @.mm.pngwio @.mm.pngmem \
+ @.mm.pngpread @.mm.pngset @.mm.pngget @.mm.pngread @.mm.pngrtran \
+ @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite @.mm.pngwtran @.mm.pngwutil
+ LibFile $(LibFileflags) @.mm.png @.mm.pngerror @.mm.pngrio \
+ @.mm.pngwio @.mm.pngmem @.mm.pngpread @.mm.pngset @.mm.pngget \
+ @.mm.pngread @.mm.pngrtran @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite \
+ @.mm.pngwtran @.mm.pngwutil
+
+
+# User-editable dependencies:
+# (C) Copyright 1997 Tom Tanner
+Test: @.pngtest
+ <Prefix$Dir>.pngtest
+ @remove <Prefix$Dir>.pngtest
+
+#It would be nice if you could stop "make" listing from here on!
+@.pngtest: @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib
+ Link $(Linkflags) @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib
+
+.SUFFIXES: .o .mm .c
+
+.c.mm:
+ MemCheck.CC cc $(ccflags) -o $@ LibPng:$<
+.c.o:
+ cc $(ccflags) -o $@ $<
+
+
+# Static dependencies:
+
+
+# Dynamic dependencies:
diff --git a/src/3rdparty/libpng/scripts/makefile.aix b/src/3rdparty/libpng/scripts/makefile.aix
new file mode 100644
index 0000000..e6e1a89
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.aix
@@ -0,0 +1,116 @@
+# makefile for libpng using gcc (generic, static library)
+# Copyright (C) 2002, 2006-2009 Glenn Randers-Pehrson
+# Copyright (C) 2000 Cosmin Truta
+# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Location of the zlib library and include files
+ZLIBINC = ../zlib
+ZLIBLIB = ../zlib
+
+# Compiler, linker, lib and other tools
+CC = gcc
+LD = $(CC)
+AR_RC = ar rcs
+MKDIR_P = mkdir -p
+RANLIB = ranlib
+RM_F = rm -f
+LN_SF = ln -f -s
+
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+prefix=/usr/local
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+
+CDEBUG = -g -DPNG_DEBUG=5
+LDDEBUG =
+CRELEASE = -O2
+LDRELEASE = -s
+WARNMORE=-W -Wall
+CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
+LDFLAGS = -L. -L$(ZLIBLIB) -lpng14 -lz -lm $(LDRELEASE)
+
+# File extensions
+O=.o
+A=.a
+E=
+
+# Variables
+OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
+ pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
+ pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
+
+# Targets
+all: $(LIBNAME)$(A) pngtest$(E)
+
+$(LIBNAME)$(A): $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+test: pngtest$(E)
+ ./pngtest$(E)
+
+pngtest$(E): pngtest$(O) $(LIBNAME)$(A)
+ $(LD) -o $@ pngtest$(O) $(LDFLAGS)
+
+install: $(LIBNAME)$(A)
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DI)/$(LIBNAME)/png.h
+ -@$(RM_F) $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h
+ -@$(RM_F) $(DI)/pngconf.h
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) -r $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+ -@$(RM_F) $(DL)/$(LIBNAME)$(A)
+ -@$(RM_F) $(DL)/libpng$(A)
+ cp $(LIBNAME)$(A) $(DL)/$(LIBNAME)$(A)
+ chmod 644 $(DL)/$(LIBNAME)$(A)
+ (cd $(DL); $(LN_SF) $(LIBNAME)$(A) libpng$(A))
+ (cd $(DI); $(LN_SF) libpng/* .;)
+
+clean:
+ $(RM_F) *.o $(LIBNAME)$(A) pngtest pngout.png
+
+png$(O): png.h pngconf.h pngpriv.h
+pngerror$(O): png.h pngconf.h pngpriv.h
+pngget$(O): png.h pngconf.h pngpriv.h
+pngmem$(O): png.h pngconf.h pngpriv.h
+pngpread$(O): png.h pngconf.h pngpriv.h
+pngread$(O): png.h pngconf.h pngpriv.h
+pngrio$(O): png.h pngconf.h pngpriv.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
+pngset$(O): png.h pngconf.h pngpriv.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
+pngwio$(O): png.h pngconf.h pngpriv.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
+
+pngtest$(O): png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.amiga b/src/3rdparty/libpng/scripts/makefile.amiga
new file mode 100644
index 0000000..8bf0f45
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.amiga
@@ -0,0 +1,51 @@
+# Commodore Amiga Makefile
+# makefile for libpng and SAS C V6.5x compiler
+# Copyright (C) 1995-2000 Wolf Faust
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+#
+# Note: Use #define PNG_READ_BIG_ENDIAN_SUPPORTED in pngconf.h
+#
+# Location/path of zlib include files
+ZLIB=/zlib
+#compiler
+CC=sc
+#compiler flags
+# WARNING: a bug in V6.51 causes bad code with OPTGO
+# So use V6.55 or set NOOPTGO!!!!!!!!!
+CFLAGS= NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\
+ OPTLOOP OPTRDEP=4 OPTDEP=4 OPTCOMP=4 INCLUDEDIR=$(ZLIB) \
+ DEFINE=PNG_INTERNAL
+#linker flags
+LDFLAGS= SD ND BATCH
+#link libs
+LDLIBS= libpng.lib libgz.lib LIB:scm.lib LIB:sc.lib Lib:amiga.lib
+# linker
+LN= slink
+# file deletion command
+RM= delete quiet
+# library (.lib) file creation command
+AR= oml
+# make directory command
+MKDIR= makedir
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+all: libpng.lib pngtest
+
+libpng.lib: $(OBJS)
+-$(RM) libpng.lib
+$(AR) libpng.lib r $(OBJS)
+
+pngtest: pngtest.o libpng.lib
+$(LN) <WITH <
+$(LDFLAGS)
+TO pngtest
+FROM LIB:c.o pngtest.o
+LIB $(LDLIBS)
+<
+
diff --git a/src/3rdparty/libpng/scripts/makefile.atari b/src/3rdparty/libpng/scripts/makefile.atari
new file mode 100644
index 0000000..0e1ca72
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.atari
@@ -0,0 +1,55 @@
+# makefile for libpng
+# Copyright (C) 2002 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+#
+# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
+# rules for library management
+#
+CFLAGS=-I..\zlib -O
+LBR = png.lib
+LDFLAGS=-lpng -lz -lm
+
+# where make install puts libpng.a and png.h
+prefix=/usr/local
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
+ $(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
+ $(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
+ $(LBR)(pngrtran.o) $(LBR)(pngwtran.o)\
+ $(LBR)(pngmem.o) $(LBR)(pngrio.o) $(LBR)(pngwio.o) $(LBR)(pngpread.o)
+
+all: $(LBR) pngtest.ttp
+
+$(LBR): $(OBJS)
+
+pngtest.ttp: pngtest.o $(LBR)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
+
+install: libpng.a
+ -@mkdir $(DESTDIR)$(INCPATH)
+ -@mkdir $(DESTDIR)$(INCPATH)/libpng
+ -@mkdir $(DESTDIR)$(LIBPATH)
+ -@rm -f $(DESTDIR)$(INCPATH)/png.h
+ -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
+ cp png.h $(DESTDIR)$(INCPATH)/libpng
+ cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
+ (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
+ ln -f -s $(LIBNAME)/* .)
diff --git a/src/3rdparty/libpng/scripts/makefile.bc32 b/src/3rdparty/libpng/scripts/makefile.bc32
new file mode 100644
index 0000000..2020e6e
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.bc32
@@ -0,0 +1,145 @@
+# Makefile for libpng
+# 32-bit Borland C++ (Note: All modules are compiled in C mode)
+# To build the library, do:
+# "make -fmakefile.bc32"
+#
+# -------------------- 32-bit Borland C++ --------------------
+
+### Absolutely necessary for this makefile to work
+.AUTODEPEND
+
+## Where zlib.h, zconf.h and zlib.lib are
+ZLIB_DIR=..\zlib
+
+## Compiler, linker and lib stuff
+CC=bcc32
+LD=bcc32
+LIB=tlib
+
+# -3 = 386, -4 = 486, -5 = Pentium etc.
+!ifndef TARGET_CPU
+#TARGET_CPU=-6
+!endif
+
+# Use this if you don't want Borland's fancy exception handling
+# (Caution: doesn't work with CBuilderX)
+#NOEHLIB=noeh32.lib
+
+!ifdef DEBUG
+CDEBUG=-v
+LDEBUG=-v
+!else
+CDEBUG=
+LDEBUG=
+!endif
+
+# STACKOFLOW=1
+!ifdef STACKOFLOW
+CDEBUG=$(CDEBUG) -N
+LDEBUG=$(LDEBUG) -N
+!endif
+
+# -O2 optimize for speed
+# -d merge duplicate strings
+# -k- turn off standard stack frame
+# -w display all warnings
+CFLAGS=-I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
+
+# -M generate map file
+LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
+
+## Variables
+OBJS = \
+ png.obj \
+ pngerror.obj \
+ pngget.obj \
+ pngmem.obj \
+ pngpread.obj \
+ pngread.obj \
+ pngrio.obj \
+ pngrtran.obj \
+ pngrutil.obj \
+ pngset.obj \
+ pngtrans.obj \
+ pngwio.obj \
+ pngwrite.obj \
+ pngwtran.obj \
+ pngwutil.obj
+
+LIBOBJS = \
+ +png.obj \
+ +pngerror.obj \
+ +pngget.obj \
+ +pngmem.obj \
+ +pngpread.obj \
+ +pngread.obj \
+ +pngrio.obj \
+ +pngrtran.obj \
+ +pngrutil.obj \
+ +pngset.obj \
+ +pngtrans.obj \
+ +pngwio.obj \
+ +pngwrite.obj \
+ +pngwtran.obj \
+ +pngwutil.obj
+
+LIBNAME=libpng.lib
+
+## Implicit rules
+# Braces let make "batch" calls to the compiler,
+# 2 calls instead of 12; space is important.
+.c.obj:
+ $(CC) $(CFLAGS) -c {$*.c }
+
+.c.exe:
+ $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib.lib $(NOEHLIB)
+
+.obj.exe:
+ $(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
+
+## Major targets
+all: libpng pngtest
+
+libpng: $(LIBNAME)
+
+pngtest: pngtest.exe
+
+test: pngtest.exe
+ pngtest
+
+## Minor Targets
+
+png.obj: png.c png.h pngconf.h pngpriv.h
+pngerror.obj: pngerror.c png.h pngconf.h pngpriv.h
+pngget.obj: pngget.c png.h pngconf.h pngpriv.h
+pngmem.obj: pngmem.c png.h pngconf.h pngpriv.h
+pngpread.obj: pngpread.c png.h pngconf.h pngpriv.h
+pngread.obj: pngread.c png.h pngconf.h pngpriv.h
+pngrio.obj: pngrio.c png.h pngconf.h pngpriv.h
+pngrtran.obj: pngrtran.c png.h pngconf.h pngpriv.h
+pngrutil.obj: pngrutil.c png.h pngconf.h pngpriv.h
+pngset.obj: pngset.c png.h pngconf.h pngpriv.h
+pngtrans.obj: pngtrans.c png.h pngconf.h pngpriv.h
+pngwio.obj: pngwio.c png.h pngconf.h pngpriv.h
+pngwrite.obj: pngwrite.c png.h pngconf.h pngpriv.h
+pngwtran.obj: pngwtran.c png.h pngconf.h pngpriv.h
+pngwutil.obj: pngwutil.c png.h pngconf.h pngpriv.h
+pngtest.obj: pngtest.c png.h pngconf.h
+
+$(LIBNAME): $(OBJS)
+ -del $(LIBNAME)
+ $(LIB) $(LIBNAME) @&&|
+$(LIBOBJS), libpng
+|
+
+# Cleanup
+clean:
+ -del *.obj
+ -del $(LIBNAME)
+ -del pngtest.exe
+ -del *.lst
+ -del *.map
+ -del *.tds
+ -del pngout.png
+
+# End of makefile for libpng
diff --git a/src/3rdparty/libpng/scripts/makefile.beos b/src/3rdparty/libpng/scripts/makefile.beos
new file mode 100644
index 0000000..0b184d6
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.beos
@@ -0,0 +1,230 @@
+# makefile for libpng on BeOS x86 ELF with gcc
+# modified from makefile.linux by Sander Stoks
+# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson
+# Copyright (C) 1999 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+CC=gcc
+AR_RC=ar rc
+MKDIR_P=mkdir -p
+LN_SF=ln -sf
+RANLIB=ranlib
+RM_F=/bin/rm -f
+
+# Where the zlib library and include files are located
+ZLIBLIB=/usr/local/lib
+ZLIBINC=/usr/local/include
+
+ALIGN=
+# For i386:
+# ALIGN=-malign-loops=2 -malign-functions=2
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+
+# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
+# still here in R4.5
+CFLAGS=-I$(ZLIBINC) -W -Wall -O1 -funroll-loops \
+ $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
+# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
+LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
+
+# where make install puts libpng.a, libpng14.so*, and png.h
+prefix=/usr/local
+exec_prefix=$(prefix)
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS)
+
+.SUFFIXES: .c .o
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo libs=\"-lpng14 -lz \"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+ cp $(LIBSO)* /boot/home/config/lib
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \
+ $(LIBSOVER) $(OBJSDLL) $(LDFLAGS)
+
+$(OLDSOVER): $(OBJSDLL)
+ $(CC) -nostart -Wl,-soname,$(OLDSOMAJ) -o \
+ $(OLDSOVER) $(OBJSDLL) $(LDFLAGS)
+
+pngtest: pngtest.o $(LIBSO)
+ $(CC) -L$(ZLIBLIB) -L. -lz -lpng14 -o pngtest pngtest.o
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) $(CFLAGS) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ $(CC) $(CFLAGS) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
+ $(LIBSO) $(LIBSOMAJ)* pngtesti \
+ $(OLDSOVER) \
+ libpng.pc
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.bor b/src/3rdparty/libpng/scripts/makefile.bor
new file mode 100644
index 0000000..dcc3c63
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.bor
@@ -0,0 +1,156 @@
+# Makefile for libpng
+# 16-bit Borland C++ (Note: All modules are compiled in C mode)
+# To build the library, do:
+# "make -fmakefile.bor -DMODEL=c"
+# or: "make -fmakefile.bor -DMODEL=l"
+#
+# ------------ Borland C++ ------------
+
+### Absolutely necessary for this makefile to work
+.AUTODEPEND
+
+## Where zlib.h, zconf.h and zlib_MODEL.lib are
+ZLIB_DIR=..\zlib
+
+## Compiler, linker and lib stuff
+CC=bcc
+LD=bcc
+LIB=tlib
+
+!ifndef MODEL
+MODEL=l
+!endif
+
+MODEL_ARG=-m$(MODEL)
+
+#TARGET_CPU=3
+# 2 = 286, 3 = 386, etc.
+!ifndef TARGET_CPU
+TARGET_CPU=2
+!endif
+
+# Use this if you don't want Borland's fancy exception handling
+# (for Borland C++ 4.0 or later)
+#NOEHLIB=noeh$(MODEL).lib
+
+!ifdef DEBUG
+CDEBUG=-v
+LDEBUG=-v
+!else
+CDEBUG=
+LDEBUG=
+!endif
+
+# STACKOFLOW=1
+!ifdef STACKOFLOW
+CDEBUG=$(CDEBUG) -N
+LDEBUG=$(LDEBUG) -N
+!endif
+
+# -X- turn on dependency generation in the object file
+# -w set all warnings on
+# -O2 optimize for speed
+# -Z global optimization
+CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
+
+# -M generate map file
+LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
+
+## Variables
+
+OBJS = \
+ png.obj \
+ pngerror.obj \
+ pngget.obj \
+ pngmem.obj \
+ pngpread.obj \
+ pngread.obj \
+ pngrio.obj \
+ pngrtran.obj \
+ pngrutil.obj \
+ pngset.obj \
+ pngtrans.obj \
+ pngwio.obj \
+ pngwrite.obj \
+ pngwtran.obj \
+ pngwutil.obj
+
+LIBOBJS = \
+ +png.obj \
+ +pngerror.obj \
+ +pngget.obj \
+ +pngmem.obj \
+ +pngpread.obj \
+ +pngread.obj \
+ +pngrio.obj \
+ +pngrtran.obj \
+ +pngrutil.obj \
+ +pngset.obj \
+ +pngtrans.obj \
+ +pngwio.obj \
+ +pngwrite.obj \
+ +pngwtran.obj \
+ +pngwutil.obj
+
+LIBNAME=libpng$(MODEL).lib
+
+## Implicit rules
+
+# Braces let make "batch" calls to the compiler,
+# 2 calls instead of 12; space is important.
+.c.obj:
+ $(CC) $(CFLAGS) -c {$*.c }
+
+.c.exe:
+ $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
+
+## Major targets
+
+all: libpng pngtest
+
+libpng: $(LIBNAME)
+
+pngtest: pngtest$(MODEL).exe
+
+test: pngtest$(MODEL).exe
+ pngtest$(MODEL)
+
+## Minor Targets
+
+png.obj: png.c png.h pngconf.h pngpriv.h
+pngerror.obj: pngerror.c png.h pngconf.h pngpriv.h
+pngget.obj: pngget.c png.h pngconf.h pngpriv.h
+pngmem.obj: pngmem.c png.h pngconf.h pngpriv.h
+pngpread.obj: pngpread.c png.h pngconf.h pngpriv.h
+pngread.obj: pngread.c png.h pngconf.h pngpriv.h
+pngrio.obj: pngrio.c png.h pngconf.h pngpriv.h
+pngrtran.obj: pngrtran.c png.h pngconf.h pngpriv.h
+pngrutil.obj: pngrutil.c png.h pngconf.h pngpriv.h
+pngset.obj: pngset.c png.h pngconf.h pngpriv.h
+pngtrans.obj: pngtrans.c png.h pngconf.h pngpriv.h
+pngwio.obj: pngwio.c png.h pngconf.h pngpriv.h
+pngwrite.obj: pngwrite.c png.h pngconf.h pngpriv.h
+pngwtran.obj: pngwtran.c png.h pngconf.h pngpriv.h
+pngwutil.obj: pngwutil.c png.h pngconf.h pngpriv.h
+
+$(LIBNAME): $(OBJS)
+ -del $(LIBNAME)
+ $(LIB) $(LIBNAME) @&&|
+$(LIBOBJS), libpng$(MODEL)
+|
+
+pngtest$(MODEL).obj: pngtest.c png.h pngconf.h
+ $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
+
+pngtest$(MODEL).exe: pngtest$(MODEL).obj
+ $(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
+
+# Clean up anything else you want
+clean:
+ -del *.obj
+ -del *.exe
+ -del *.lib
+ -del *.lst
+ -del *.map
+
+# End of makefile for libpng
diff --git a/src/3rdparty/libpng/scripts/makefile.cegcc b/src/3rdparty/libpng/scripts/makefile.cegcc
new file mode 100644
index 0000000..5b023df
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.cegcc
@@ -0,0 +1,113 @@
+# Makefile for creating Windows CE release archives, with the
+# mingw32ce compiler.
+
+# Last updated: 22-Jul-2008
+
+# Copyright (C) 2008 Vincent Torri
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# To get some help, type
+#
+# make help
+#
+# To create the archives
+#
+# make
+#
+# To remove everything, type:
+#
+# make clean
+
+VERMAJ = 1
+VERMIN = 4
+VERMIC = 0
+VER = $(VERMAJ).$(VERMIN).$(VERMIC)
+NAME = libpng
+PACKAGE = $(NAME)-$(VER)
+
+BIN = libpng14-0.dll libpng-14.dll
+LIB = libpng14.a libpng14.dll.a libpng.a libpng.dll.a scripts/png32ce.def
+INCLUDE = png.h pngconf.h pngpriv.h
+PC = libpng14.pc libpng.pc
+
+MANIFESTVERBIN = "Libpng-$(VER): Binary files"
+MANIFESTVERDEV = "Libpng-$(VER): Developer files"
+MANIFESTVERDESC = "Libpng: the official PNG reference library"
+
+all: $(NAME)
+
+$(NAME): remove-old copy-src compilation copy manifest archive
+ @echo " * Removal of the directories"
+ @rm -rf $(PACKAGE)/ $(PACKAGE)-bin/ $(PACKAGE)-dev/
+
+remove-old:
+ @echo " * Removal of the old files"
+ @rm -rf $(PACKAGE)-bin*
+ @rm -rf $(PACKAGE)-dev*
+
+copy-src:
+ @echo " * Copy of source files"
+ @cp -R ../src/$(PACKAGE) .
+ @echo " * Creation of directories and files"
+ @mkdir -p $(PACKAGE)-bin/bin
+ @mkdir -p $(PACKAGE)-bin/manifest
+ @mkdir -p $(PACKAGE)-dev/lib/pkgconfig
+ @mkdir -p $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN)
+ @mkdir -p $(PACKAGE)-dev/manifest
+ @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.mft
+ @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.ver
+ @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.mft
+ @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver
+
+compilation:
+ @echo " * Compilation of $(PACKAGE)"
+ cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -DPNG_NO_MMX_CODE -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make
+
+copy:
+ @echo " * Copy of binary and development files"
+ @for i in $(BIN); do \
+ cp $(PACKAGE)/.libs/$$i $(PACKAGE)-bin/bin; \
+ done
+ @for i in $(LIB); do \
+ cp $(PACKAGE)/.libs/$$i $(PACKAGE)-dev/lib; \
+ done
+ @for i in $(INCLUDE); do \
+ cp $(PACKAGE)/$$i $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN); \
+ done
+ @for i in $(PC); do \
+ cp $(PACKAGE)/$$i $(PACKAGE)-dev/lib/pkgconfig; \
+ done
+
+manifest:
+ @echo " * Creation of the manifest"
+ @cd $(PACKAGE)-bin && find * >> manifest/$(PACKAGE)-bin.mft
+ @cd $(PACKAGE)-bin && \
+ echo $(MANIFESTVERBIN) >> manifest/$(PACKAGE)-bin.ver && \
+ echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-bin.ver
+ @cd $(PACKAGE)-dev && find * >> manifest/$(PACKAGE)-dev.mft
+ @cd $(PACKAGE)-dev && \
+ echo $(MANIFESTVERDEV) >> manifest/$(PACKAGE)-dev.ver && \
+ echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-dev.ver
+
+archive:
+ @echo " * Creation of the archives"
+ @tar cf $(PACKAGE)-bin.tar $(PACKAGE)-bin
+ @bzip2 -9 $(PACKAGE)-bin.tar
+ @tar cf $(PACKAGE)-dev.tar $(PACKAGE)-dev
+ @bzip2 -9 $(PACKAGE)-dev.tar
+
+clean:
+ @echo " * Cleaning"
+ @rm -rf $(PACKAGE)*
+
+help:
+ @echo
+ @echo "To create the archives, type:"
+ @echo " make"
+ @echo
+ @echo "To remove everything, type:"
+ @echo " make clean"
+ @echo
diff --git a/src/3rdparty/libpng/scripts/makefile.cygwin b/src/3rdparty/libpng/scripts/makefile.cygwin
new file mode 100644
index 0000000..bdd904e
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.cygwin
@@ -0,0 +1,293 @@
+# makefile for cygwin on x86
+# Builds both dll (with import lib) and static lib versions
+# of the library, and builds two copies of pngtest: one
+# statically linked and one dynamically linked.
+#
+# Copyright (C) 2002, 2006-2008 Soren Anderson, Charles Wilson,
+# and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by:
+# Copyright (C) 1998-2000 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# This makefile intends to support building outside the src directory
+# if desired. When invoking it, specify an argument to SRCDIR on the
+# command line that points to the top of the directory where your source
+# is located.
+
+ifdef SRCDIR
+VPATH = $(SRCDIR)
+else
+SRCDIR = .
+endif
+
+# Override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+
+DESTDIR=
+
+CC=gcc
+ifdef MINGW
+MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw
+MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
+endif
+
+# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h
+ifndef prefix
+prefix=/usr
+$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr")
+endif
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+ZLIBLIB= /usr/lib
+ZLIBINC=
+#ZLIBLIB=../zlib
+#ZLIBINC=../zlib
+
+ALIGN=
+# for i386:
+#ALIGN=-malign-loops=2 -malign-functions=2
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+
+CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
+ -W -Wall -O3 $(ALIGN) -funroll-loops \
+ -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
+
+LIBNAME = libpng14
+PNGMAJ = 14
+CYGDLL = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+SHAREDLIB=cygpng$(CYGDLL).dll
+STATLIB=libpng.a
+IMPLIB=libpng.dll.a
+SHAREDDEF=libpng.def
+LIBS=$(SHAREDLIB) $(STATLIB)
+EXE=.exe
+
+LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz)
+LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS) -Wl,--export-all)
+LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
+
+MKDIR_P=/bin/mkdir -pv
+RANLIB=ranlib
+#RANLIB=echo
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+
+BINPATH=$(exec_prefix)/bin
+MANPATH=$(prefix)/man
+MAN3PATH=$(MANPATH)/man3
+MAN5PATH=$(MANPATH)/man5
+
+# cosmetic: shortened strings:
+S =$(SRCDIR)
+D =$(DESTDIR)
+DB =$(D)$(BINPATH)
+DI =$(D)$(INCPATH)
+DL =$(D)$(LIBPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+%.o : %.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+%.pic.o : CFLAGS += -DPNG_BUILD_DLL
+%.pic.o : %.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+all: all-static all-shared libpng.pc libpng-config libpng.pc libpng-config
+
+# Make this to verify that "make [...] install" will do what you want.
+buildsetup-tell:
+ @echo VPATH is set to: \"$(VPATH)\"
+ @echo prefix is set to: \"$(prefix)\"
+ @echo -e INCPATH,LIBPATH, etc. are set to:'\n' \
+ $(addprefix $(D),$(INCPATH)'\n' $(LIBPATH)'\n' $(BINPATH)'\n' \
+ $(MANPATH)'\n' $(MAN3PATH)'\n' $(MAN5PATH)'\n')'\n'
+
+libpng.pc: scripts/libpng.pc.in
+ @echo -e Making pkg-config file for this libpng installation..'\n' \
+ using PREFIX=\"$(prefix)\"'\n'
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz! > libpng.pc
+
+libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in
+ @echo -e Making $(LIBNAME) libpng-config file for this libpng \
+ installation..'\n' using PREFIX=\"$(prefix)\"'\n'
+ ( cat $(S)/scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo libs=\"-lpng$(CYGDLL) -lz\"; \
+ cat $(S)/scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+static: all-static
+shared: all-shared
+all-static: $(STATLIB) pngtest-stat$(EXE)
+all-shared: $(SHAREDLIB) pngtest$(EXE)
+
+$(STATLIB): $(OBJS)
+ ar rc $@ $(OBJS)
+ $(RANLIB) $@
+
+$(SHAREDDEF): scripts/pngwin.def
+ cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
+ sed -e 's/\([^;]*\);/;/' > $@
+
+$(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF)
+ $(CC) $(LDSFLAGS) -o $@ $(OBJSDLL) -L. $(LDEXTRA)
+
+pngtest$(EXE): pngtest.pic.o $(SHAREDLIB)
+ $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
+
+pngtest-stat$(EXE): pngtest.o $(STATLIB)
+ $(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@
+
+pngtest.pic.o: pngtest.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+pngtest.o: pngtest.c png.h pngconf.h
+ $(CC) $(CFLAGS) -c $< -o $@
+
+test: test-static test-shared
+
+test-static: pngtest-stat$(EXE)
+ ./pngtest-stat $(S)/pngtest.png
+
+test-shared: pngtest$(EXE)
+ ./pngtest $(S)/pngtest.png
+
+install-static: $(STATLIB) install-headers install-man
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a
+ -@rm -f $(DL)/$(STATLIB)
+ (cd $(DL); ln -sf $(LIBNAME).a $(STATLIB))
+
+install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a
+ -@rm -f $(DL)/$(IMPLIB)
+ (cd $(DL); ln -sf $(LIBNAME).dll.a $(IMPLIB))
+ install -s -m 755 $(SHAREDLIB) $(DB)
+ install -m 644 libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+
+install-headers:
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ -@rm -f $(DI)/png.h
+ -@rm -f $(DI)/pngconf.h
+ install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME)
+ -@rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+
+install-man:
+ -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR_P) $(D)$(MAN3PATH); fi
+ -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR_P) $(D)$(MAN5PATH); fi
+ install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH)
+ install -m 644 $(S)/png.5 $(D)$(MAN5PATH)
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
+
+# Run this to verify that a future `configure' run will pick up the settings
+# you want.
+test-config-install: SHELL=/bin/bash
+test-config-install: $(DB)/libpng-config
+ @echo -e Testing libpng-config functions...'\n'
+ @ for TYRA in LDFLAGS CPPFLAGS CFLAGS LIBS VERSION; \
+ do \
+ printf "(%d)\t %10s =%s\n" $$(($$gytiu + 1)) $$TYRA \
+ "$$($(DB)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \
+ gytiu=$$(( $$gytiu + 1 )); \
+ done
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) $(CFLAGS) \
+ `$(BINPATH)/libpng14-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) \
+ -o pngtestd `$(BINPATH)/libpng14-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ $(CC) $(CFLAGS) \
+ `$(BINPATH)/libpng14-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) \
+ -o pngtesti$(EXE) `$(BINPATH)/libpng14-config --ldflags`
+ ./pngtesti$(EXE) pngtest.png
+
+clean:
+ /bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \
+ pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF) \
+ libpng-config libpng.pc pngtesti$(EXE)
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+.PHONY: buildsetup-tell libpng.pc libpng-config test-config-install clean
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h png.c
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h pngerror.c
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h pngrio.c
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h pngwio.c
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h pngmem.c
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h pngset.c
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h pngget.c
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h pngread.c
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h pngrtran.c
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h pngrutil.c
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h pngtrans.c
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h pngwrite.c
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h pngwtran.c
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h pngwutil.c
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngpread.c
+
+pngtest.o: png.h pngconf.h pngtest.c
+pngtest-stat.o: png.h pngconf.h pngtest.c
+
+
+
diff --git a/src/3rdparty/libpng/scripts/makefile.darwin b/src/3rdparty/libpng/scripts/makefile.darwin
new file mode 100644
index 0000000..a35ad70
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.darwin
@@ -0,0 +1,237 @@
+# makefile for libpng on Darwin / Mac OS X
+# Copyright (C) 2002, 2004, 2006, 2008 Glenn Randers-Pehrson
+# Copyright (C) 2001 Christoph Pfisterer
+# derived from makefile.linux:
+# Copyright (C) 1998, 1999 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# where "make install" puts libpng.a, libpng14.dylib, png.h and pngconf.h
+prefix=/usr/local
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+# Library name:
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).dylib
+LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib
+LIBSOVER=$(LIBNAME).$(PNGVER).dylib
+OLDSO=libpng.dylib
+OLDSOMAJ=libpng.14.dylib
+OLDSOVER=libpng.14.$(PNGMIN).dylib
+
+# Utilities:
+CC=cc
+AR_RC=ar rc
+MKDIR_P=mkdir -p
+LN_SF=ln -sf
+RANLIB=ranlib
+RM_F=/bin/rm -f
+
+# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops
+CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ $(CC) -dynamiclib \
+ -install_name $(LIBPATH)/$(LIBSOMAJ) \
+ -current_version 14 -compatibility_version 14 \
+ -o $(LIBSOVER) \
+ $(OBJSDLL) -L$(ZLIBLIB) -lz
+
+$(OLDSOVER): $(OBJSDLL)
+ $(CC) -dynamiclib \
+ -install_name $(LIBPATH)/$(OLDSOMAJ) \
+ -current_version 14 -compatibility_version 14 \
+ -o $(OLDSOVER) \
+ $(OBJSDLL) -L$(ZLIBLIB) -lz
+
+pngtest: pngtest.o $(LIBSO)
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ $(RANLIB) $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSO) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBNAME).$(PNGVER)*.dylib
+ -@$(RM_F) $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib
+ -@$(RM_F) $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/libpng.3.$(PNGMIN)*.dylib
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ $(CC) $(CFLAGS) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
+ $(OLDSOVER) \
+ libpng.pc $(LIBNAME).*dylib pngtesti
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.dec b/src/3rdparty/libpng/scripts/makefile.dec
new file mode 100644
index 0000000..eb1fd14
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.dec
@@ -0,0 +1,217 @@
+# makefile for libpng on DEC Alpha Unix
+# Copyright (C) 2000-2002, 2006 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+LIBNAME = libpng14
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+AR_RC=ar rc
+CC=cc
+MKDIR_P=mkdir
+LN_SF=ln -f -s
+RANLIB=ranlib
+RM_F=/bin/rm -f
+
+# where make install puts libpng.a and png.h
+prefix=/usr/local
+exec_prefix=$(prefix)
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+# Where the zlib library and include files are located
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
+LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo ccopts=\"-std\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJS)
+ $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
+ -soname $(LIBSOMAJ)
+
+$(OLDSOVER): $(OBJS)
+ $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
+ -soname $(OLDSOMAJ)
+
+pngtest: pngtest.o libpng.a
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); $(LN_SF)(LIBNAME) libpng; $(LN_SF)(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); $(LN_SF)(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@/bin/rm -f $(DL)/$(LIBSOMAJ)
+ -@/bin/rm -f $(DL)/$(OLDSO)
+ -@/bin/rm -f $(DL)/$(OLDSOMAJ)
+ -@/bin/rm -f $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF)(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF)(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF)(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF)(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -w1 -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) -w1 -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) -R$(ZLIBLIB) \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
+ libpng-config $(LIBSO) $(LIBSOMAJ)* \
+ $(OLDSOVER) \
+ libpng.pc
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.dj2 b/src/3rdparty/libpng/scripts/makefile.dj2
new file mode 100644
index 0000000..021e969
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.dj2
@@ -0,0 +1,58 @@
+# DJGPP (DOS gcc) makefile for libpng
+# Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# where make install will put libpng.a and png.h
+#prefix=/usr/local
+prefix=.
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+CC=gcc
+CFLAGS=-I../zlib -O
+LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
+
+RANLIB=ranlib
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
+ pngmem.o pngerror.o pngpread.o
+
+all: libpng.a pngtest
+
+libpng.a: $(OBJS)
+ ar rc $@ $(OBJS)
+ $(RANLIB) $@
+
+pngtest: pngtest.o libpng.a
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+ coff2exe pngtest
+
+test: pngtest
+ ./pngtest
+clean:
+ rm -f *.o libpng.a pngtest pngout.png
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.elf b/src/3rdparty/libpng/scripts/makefile.elf
new file mode 100644
index 0000000..7d70af1
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.elf
@@ -0,0 +1,279 @@
+# makefile for libpng.a and libpng14.so on Linux ELF with gcc
+# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs
+# and Glenn Randers-Pehrson
+# Copyright (C) 1996, 1997 Andreas Dilger
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Modified for Debian by Junichi Uekawa and Josselin Mouette
+# Major modifications are:
+# * link libpng explicitly with libz and libm
+# * $(OLDSO).14 is a symlink rather than a different library
+# * versioned symbols
+
+# Library name:
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+AR_RC=ar rc
+CC=gcc
+MKDIR_P=mkdir -p
+LN_SF=ln -sf
+RANLIB=ranlib
+RM_F=/bin/rm -f
+
+# where "make install" puts libpng14.a, libpng14.so*,
+# libpng14/png.h and libpng14/pngconf.h
+# Prefix must be a full pathname.
+prefix=/usr/local
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located.
+ZLIBLIB=/usr/local/lib
+ZLIBINC=/usr/local/include
+# ZLIBLIB=../zlib
+# ZLIBINC=../zlib
+
+ALIGN=
+# for i386:
+#ALIGN=-malign-loops=2 -malign-functions=2
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+
+# for pgcc version 2.95.1, -O3 is buggy; don't use it.
+
+CFLAGS=-W -Wall -D_REENTRANT -O2 \
+ $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
+
+LDFLAGS=-L. -lpng14
+LDFLAGS_A=libpng.a -lz -lm
+LIBADDFLAGS=-lz -lm
+
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng.syms: png.h pngconf.h
+ $(CC) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\
+ awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG14_%s {global:\n",PNGMAJ)}\
+ { for (i=1;i+2<=NF;++i)\
+ if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
+ print $$(i+1) ";";\
+ for (i=1;i+1<=NF;++i)\
+ if ($$(i)=="PNG_DATA_EXPORT")\
+ print $$(i+1) ";";}\
+ END{print "local: *; };"}' >$@.new
+ $(RM_F) $@
+ mv $@.new $@
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo L_opts=\"\"; \
+ echo R_opts=\"\"; \
+ echo libs=\"-lpng14\"; \
+ echo all_libs=\"-lpng14 $(LIBADDFLAGS)\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL) libpng.syms
+ $(CC) -shared -Wl,-soname,$(LIBSOMAJ) \
+ -Wl,-version-script,libpng.syms \
+ -o $(LIBSOVER) \
+ $(OBJSDLL)
+
+$(OLDSOVER): $(OBJSDLL) libpng.syms
+ $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \
+ -Wl,-version-script,libpng.syms \
+ -o $(OLDSOVER) \
+ $(OBJSDLL)
+
+pngtest: pngtest.o $(LIBSO)
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+pngtest-static: pngtest.o libpng.a
+ $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
+
+test: pngtest pngtest-static
+ @echo ""
+ @echo " Running pngtest dynamically linked with $(LIBSO):"
+ @echo ""
+ LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ./pngtest
+ @echo ""
+ @echo " Running pngtest statically linked with libpng.a:"
+ @echo ""
+ ./pngtest-static
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ $(CC) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a libpng.syms pngtest pngout.png libpng-config \
+ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.freebsd b/src/3rdparty/libpng/scripts/makefile.freebsd
new file mode 100644
index 0000000..c0014af
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.freebsd
@@ -0,0 +1,48 @@
+# makefile for libpng under FreeBSD
+# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+PREFIX?= /usr/local
+SHLIB_VER?= 14
+
+LIB= png
+SHLIB_MAJOR= ${SHLIB_VER}
+SHLIB_MINOR= 0
+NOPROFILE= YES
+NOOBJ= YES
+
+# where make install puts libpng.a and png.h
+DESTDIR= ${PREFIX}
+LIBDIR= /lib
+INCS= png.h pngconf.h pngpriv.h
+INCSDIR= /include/libpng
+INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
+MAN= libpng.3 libpngpf.3 png.5
+MANDIR= /man/man
+SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
+ libpng/pngconf.h ${INCSDIR}/../pngconf.h
+LDADD+= -lm -lz
+DPADD+= ${LIBM} ${LIBZ}
+
+CFLAGS+= -I.
+
+SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
+ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
+ pngwtran.c pngmem.c pngerror.c pngpread.c
+
+pngtest: pngtest.o libpng.a
+ ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm
+
+CLEANFILES= pngtest pngtest.o pngout.png
+
+test: pngtest
+ ./pngtest
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+.include <bsd.lib.mk>
diff --git a/src/3rdparty/libpng/scripts/makefile.gcc b/src/3rdparty/libpng/scripts/makefile.gcc
new file mode 100644
index 0000000..b31adee
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.gcc
@@ -0,0 +1,83 @@
+# makefile for libpng using gcc (generic, static library)
+# Copyright (C) 2008 Glenn Randers-Pehrson
+# Copyright (C) 2000 Cosmin Truta
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Location of the zlib library and include files
+ZLIBINC = ../zlib
+ZLIBLIB = ../zlib
+
+# Compiler, linker, lib and other tools
+CC = gcc
+LD = $(CC)
+AR_RC = ar rcs
+RANLIB = ranlib
+RM_F = rm -f
+
+CDEBUG = -g -DPNG_DEBUG=5
+LDDEBUG =
+CRELEASE = -O2
+LDRELEASE = -s
+#CFLAGS = -W -Wall $(CDEBUG)
+CFLAGS = -W -Wall $(CRELEASE)
+#LDFLAGS = $(LDDEBUG)
+LDFLAGS = $(LDRELEASE)
+LIBS = -lz -lm
+
+# File extensions
+O=.o
+A=.a
+EXE=
+
+# Variables
+OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
+ pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
+ pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
+
+# Targets
+all: static
+
+.c$(O):
+ $(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
+
+static: libpng$(A) pngtest$(EXE)
+
+shared:
+ @echo This is a generic makefile that cannot create shared libraries.
+ @echo Please use a configuration that is specific to your platform.
+ @false
+
+libpng$(A): $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+test: pngtest$(EXE)
+ ./pngtest$(EXE)
+
+pngtest$(EXE): pngtest$(O) libpng$(A)
+ $(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
+
+clean:
+ $(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png
+
+png$(O): png.h pngconf.h pngpriv.h
+pngerror$(O): png.h pngconf.h pngpriv.h
+pngget$(O): png.h pngconf.h pngpriv.h
+pngmem$(O): png.h pngconf.h pngpriv.h
+pngpread$(O): png.h pngconf.h pngpriv.h
+pngread$(O): png.h pngconf.h pngpriv.h
+pngrio$(O): png.h pngconf.h pngpriv.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
+pngset$(O): png.h pngconf.h pngpriv.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
+pngwio$(O): png.h pngconf.h pngpriv.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
+
+pngtest$(O): png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.hp64 b/src/3rdparty/libpng/scripts/makefile.hp64
new file mode 100644
index 0000000..300421a
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.hp64
@@ -0,0 +1,239 @@
+# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
+# Copyright (C) 1999-2002, 2006, 2009 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42
+# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Where the zlib library and include files are located
+ZLIBLIB=/opt/zlib/lib
+ZLIBINC=/opt/zlib/include
+
+# Note that if you plan to build a libpng shared library, zlib must also
+# be a shared library, which zlib's configure does not do. After running
+# zlib's configure, edit the appropriate lines of makefile to read:
+# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
+# LDSHARED=ld -b
+# SHAREDLIB=libz.sl
+
+# Library name:
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).sl
+LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).sl.$(PNGVER)
+OLDSO=libpng.sl
+OLDSOMAJ=libpng.sl.14
+OLDSOVER=libpng.sl.14.$(PNGMIN)
+
+# Utilities:
+AR_RC=ar rc
+CC=cc
+MKDIR_P=mkdir -p
+LN_SF=ln -sf
+RANLIB=ranlib
+RM_F=/bin/rm -f
+
+CFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
+-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
+# Caution: be sure you have built zlib with the same CFLAGS.
+CCFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
+-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
+
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
+
+# where make install puts libpng.a, libpng14.sl, and png.h
+prefix=/opt/libpng
+exec_prefix=$(prefix)
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) +z -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ $(LD) -b +s \
+ +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
+
+$(OLDSOVER): $(OBJSDLL)
+ $(LD) -b +s \
+ +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL)
+
+pngtest: pngtest.o libpng.a
+ $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) $(CCFLAGS) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
+ libpng-config $(LIBSO) $(LIBSOMAJ)* \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.hpgcc b/src/3rdparty/libpng/scripts/makefile.hpgcc
new file mode 100644
index 0000000..5a147e6
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.hpgcc
@@ -0,0 +1,248 @@
+# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
+# Copyright (C) 2002, 2006-2008 Glenn Randers-Pehrson
+# Copyright (C) 2001, Laurent faillie
+# Copyright (C) 1998, 1999 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).sl
+LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).sl.$(PNGVER)
+OLDSO=libpng.sl
+OLDSOMAJ=libpng.sl.14
+OLDSOVER=libpng.sl.14.$(PNGMIN)
+
+# Utilities:
+CC=gcc
+LD=ld
+AR_RC=ar rc
+MKDIR_P=mkdir -p
+LN_SF=ln -sf
+RANLIB=ranlib
+RM_F=/bin/rm -f
+
+# where "make install" puts libpng.a, $(OLDSO)*, png.h and pngconf.h
+prefix=/usr/local
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+ZLIBLIB=/opt/zlib/lib
+ZLIBINC=/opt/zlib/include
+
+# Note that if you plan to build a libpng shared library, zlib must also
+# be a shared library, which zlib's configure does not do. After running
+# zlib's configure, edit the appropriate lines of makefile to read:
+# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
+# LDSHARED=ld -b
+# SHAREDLIB=libz.sl
+
+ALIGN=
+# for i386:
+#ALIGN=-malign-loops=2 -malign-functions=2
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+
+# for pgcc version 2.95.1, -O3 is buggy; don't use it.
+
+CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
+ $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
+#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ $(LD) -b +s \
+ +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
+
+$(OLDSOVER): $(OBJSDLL)
+ $(LD) -b +s \
+ +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL)
+
+pngtest: pngtest.o $(LIBSO)
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
+ libpng-config $(LIBSO) $(LIBSOMAJ)* \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.hpux b/src/3rdparty/libpng/scripts/makefile.hpux
new file mode 100644
index 0000000..4966fa9
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.hpux
@@ -0,0 +1,236 @@
+# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
+# Copyright (C) 1999-2002, 2006 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42
+# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Where the zlib library and include files are located
+ZLIBLIB=/opt/zlib/lib
+ZLIBINC=/opt/zlib/include
+
+# Note that if you plan to build a libpng shared library, zlib must also
+# be a shared library, which zlib's configure does not do. After running
+# zlib's configure, edit the appropriate lines of makefile to read:
+# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
+# LDSHARED=ld -b
+# SHAREDLIB=libz.sl
+
+# Library name:
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).sl
+LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).sl.$(PNGVER)
+OLDSO=libpng.sl
+OLDSOMAJ=libpng.sl.14
+OLDSOVER=libpng.sl.14.$(PNGMIN)
+
+# Utilities:
+AR_RC=ar rc
+CC=cc
+MKDIR_P=mkdir -p
+LN_SF=ln -sf
+RANLIB=ranlib
+RM_F=/bin/rm -f
+
+# where make install puts libpng.a, libpng14.sl, and png.h
+prefix=/opt/libpng
+exec_prefix=$(prefix)
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
+# Caution: be sure you have built zlib with the same CFLAGS.
+CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) +z -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ $(LD) -b +s \
+ +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
+
+$(OLDSOVER): $(OBJSDLL)
+ $(LD) -b +s \
+ +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL)
+
+pngtest: pngtest.o libpng.a
+ $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) $(CCFLAGS) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
+ libpng-config $(LIBSO) $(LIBSOMAJ)* \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.ibmc b/src/3rdparty/libpng/scripts/makefile.ibmc
new file mode 100644
index 0000000..b0b445a
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.ibmc
@@ -0,0 +1,77 @@
+# Makefile for libpng (static)
+# IBM C version 3.x for Win32 and OS/2
+# Copyright (C) 2006 Glenn Randers-Pehrson
+# Copyright (C) 2000 Cosmin Truta
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+#
+# Notes:
+# Derived from makefile.std
+# All modules are compiled in C mode
+# Tested under Win32, expected to work under OS/2
+# Can be easily adapted for IBM VisualAge/C++ for AIX
+
+# Location of the zlib library and include files
+ZLIBINC = ../zlib
+ZLIBLIB = ../zlib
+
+# Compiler, linker, lib and other tools
+CC = icc
+LD = ilink
+AR = ilib
+RM = del
+
+CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3
+LDFLAGS =
+
+# File extensions
+O=.obj
+A=.lib
+E=.exe
+
+# Variables
+OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
+ pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
+ pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
+
+LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
+
+# Targets
+all: libpng$(A) pngtest$(E)
+
+libpng$(A): $(OBJS)
+ $(AR) -out:$@ $(OBJS)
+
+test: pngtest$(E)
+ pngtest$(E)
+
+pngtest: pngtest$(E)
+
+pngtest$(E): pngtest$(O) libpng$(A)
+ $(LD) $(LDFLAGS) pngtest$(O) $(LIBS)
+
+clean:
+ $(RM) *$(O)
+ $(RM) libpng$(A)
+ $(RM) pngtest$(E)
+ $(RM) pngout.png
+
+png$(O): png.h pngconf.h pngpriv.h
+pngerror$(O): png.h pngconf.h pngpriv.h
+pngget$(O): png.h pngconf.h pngpriv.h
+pngmem$(O): png.h pngconf.h pngpriv.h
+pngpread$(O): png.h pngconf.h pngpriv.h
+pngread$(O): png.h pngconf.h pngpriv.h
+pngrio$(O): png.h pngconf.h pngpriv.h
+pngrtran$(O): png.h pngconf.h pngpriv.h
+pngrutil$(O): png.h pngconf.h pngpriv.h
+pngset$(O): png.h pngconf.h pngpriv.h
+pngtrans$(O): png.h pngconf.h pngpriv.h
+pngwio$(O): png.h pngconf.h pngpriv.h
+pngwrite$(O): png.h pngconf.h pngpriv.h
+pngwtran$(O): png.h pngconf.h pngpriv.h
+pngwutil$(O): png.h pngconf.h pngpriv.h
+
+pngtest$(O): png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.intel b/src/3rdparty/libpng/scripts/makefile.intel
new file mode 100644
index 0000000..fb705e1
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.intel
@@ -0,0 +1,106 @@
+# Makefile for libpng
+# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later
+
+# Copyright (C) 2006 Glenn Randers-Pehrson
+# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
+# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+#
+# To use, do "nmake /f scripts\makefile.intel"
+#
+# ------------------- Intel C/C++ Compiler 4.0 and later -------------------
+
+# Where the zlib library and include files are located
+ZLIBLIB=..\zlib
+ZLIBINC=..\zlib
+
+# Target CPU
+CPU=6 # Pentium II
+#CPU=5 # Pentium
+
+# Calling convention
+CALLING=r # __fastcall
+#CALLING=z # __stdcall
+#CALLING=d # __cdecl
+
+# Uncomment next to put error messages in a file
+#ERRFILE=>>pngerrs
+
+# --------------------------------------------------------------------------
+
+CC=icl -c
+CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) -nologo
+LD=link
+LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
+
+O=.obj
+
+OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \
+pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \
+pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
+
+all: test
+
+png$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngset$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngget$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngread$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngpread$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngrtran$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngrutil$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngerror$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngmem$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngrio$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngwio$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngtrans$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngwrite$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngwtran$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngwutil$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+libpng.lib: $(OBJS)
+ if exist libpng.lib del libpng.lib
+ lib /NOLOGO /OUT:libpng.lib $(OBJS)
+
+pngtest.exe: pngtest.obj libpng.lib
+ $(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
+
+pngtest$(O): png.h pngconf.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+test: pngtest.exe
+ pngtest.exe
+
+
+# End of makefile for libpng
diff --git a/src/3rdparty/libpng/scripts/makefile.knr b/src/3rdparty/libpng/scripts/makefile.knr
new file mode 100644
index 0000000..75cb1b5
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.knr
@@ -0,0 +1,103 @@
+# makefile for libpng
+# Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+#
+# This makefile requires the file ansi2knr.c, which you can get
+# from the Ghostscript ftp site at ftp://ftp.cs.wisc.edu/ghost/
+# If you have libjpeg, you probably already have ansi2knr.c in the jpeg
+# source distribution.
+
+# where make install puts libpng.a and png.h
+prefix=/usr/local
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+CC=cc
+CFLAGS=-I../zlib -O
+LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
+# flags for ansi2knr
+ANSI2KNRFLAGS=
+
+RANLIB=ranlib
+#RANLIB=echo
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+all: ansi2knr libpng.a pngtest
+
+# general rule to allow ansi2knr to work
+.c.o:
+ ./ansi2knr $*.c T$*.c
+ $(CC) $(CFLAGS) -c T$*.c
+ rm -f T$*.c $*.o
+ mv T$*.o $*.o
+
+ansi2knr: ansi2knr.c
+ $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
+
+libpng.a: ansi2knr $(OBJS)
+ ar rc $@ $(OBJS)
+ $(RANLIB) $@
+
+pngtest: pngtest.o libpng.a
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install: libpng.a png.h pngconf.h
+ -@mkdir $(DESTDIR)$(INCPATH)
+ -@mkdir $(DESTDIR)$(INCPATH)/libpng
+ -@mkdir $(DESTDIR)$(LIBPATH)
+ -@rm -f $(DESTDIR)$(INCPATH)/png.h
+ -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
+ cp png.h $(DESTDIR)$(INCPATH)/libpng
+ cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
+ (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
+ cp libpng.a $(DESTDIR)$(LIBPATH)
+ chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
+
+clean:
+ rm -f *.o libpng.a pngtest pngout.png ansi2knr
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.linux b/src/3rdparty/libpng/scripts/makefile.linux
new file mode 100644
index 0000000..8d02d5a
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.linux
@@ -0,0 +1,253 @@
+# makefile for libpng.a and libpng14.so on Linux ELF with gcc
+# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs and
+# Glenn Randers-Pehrson
+# Copyright (C) 1996, 1997 Andreas Dilger
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+AR_RC=ar rc
+CC=gcc
+MKDIR_P=mkdir -p
+LN_SF=ln -sf
+RANLIB=ranlib
+RM_F=/bin/rm -f
+
+# where "make install" puts libpng14.a, libpng14.so*,
+# libpng14/png.h and libpng14/pngconf.h
+# Prefix must be a full pathname.
+prefix=/usr/local
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located.
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+ALIGN=
+# for i386:
+#ALIGN=-malign-loops=2 -malign-functions=2
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+
+# for pgcc version 2.95.1, -O3 is buggy; don't use it.
+
+CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops \
+ $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
+
+LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
+LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
+
+$(OLDSOVER): $(OBJSDLL)
+ $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \
+ -o $(OLDSOVER) \
+ $(OBJSDLL)
+
+pngtest: pngtest.o $(LIBSO)
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+pngtest-static: pngtest.o libpng.a
+ $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
+
+test: pngtest pngtest-static
+ @echo ""
+ @echo " Running pngtest dynamically linked with $(LIBSO):"
+ @echo ""
+ ./pngtest
+ @echo ""
+ @echo " Running pngtest statically linked with libpng.a:"
+ @echo ""
+ ./pngtest-static
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ $(CC) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
+ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.mingw b/src/3rdparty/libpng/scripts/makefile.mingw
new file mode 100644
index 0000000..8faad93
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.mingw
@@ -0,0 +1,280 @@
+# makefile for mingw on x86
+# Builds both dll (with import lib) and static lib versions
+# of the library, and builds two copies of pngtest: one
+# statically linked and one dynamically linked.
+#
+# Copyright (C) 2002, 2006, 2008 Soren Anderson, Charles Wilson,
+# and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by:
+# Copyright (C) 1998-2000, 2007 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Built from makefile.cygwin
+
+# This makefile intends to support building outside the src directory
+# if desired. When invoking it, specify an argument to SRCDIR on the
+# command line that points to the top of the directory where your source
+# is located.
+ifdef SRCDIR
+VPATH = $(SRCDIR)
+else
+SRCDIR = .
+endif
+
+# Override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+# If you're using a cross-compiler, add the appropriate prefix (e.g.,
+# "i386-mingw32msvc-") to the following three commands:
+CC=gcc
+AR=ar
+RANLIB=ranlib
+
+MKDIR_P=/bin/mkdir -pv
+
+# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h
+ifndef prefix
+prefix=/usr
+$(warning "You haven't specified a 'prefix=' location. Defaulting to '/usr'")
+endif
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+ZLIBLIB= /usr/lib
+ZLIBINC=
+
+ALIGN=
+# for i386:
+#ALIGN=-malign-loops=2 -malign-functions=2
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+
+CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
+ -W -Wall -O3 $(ALIGN) -funroll-loops \
+ -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
+
+LIBNAME = libpng14
+PNGMAJ = 14
+MINGDLL = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+SHAREDLIB=libpng$(MINGDLL).dll
+STATLIB=libpng.a
+IMPLIB=libpng.dll.a
+SHAREDDEF=libpng.def
+LIBS=$(SHAREDLIB) $(STATLIB)
+EXE=.exe
+
+LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz)
+LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS))
+LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+
+BINPATH=$(exec_prefix)/bin
+MANPATH=$(prefix)/man
+MAN3PATH=$(MANPATH)/man3
+MAN5PATH=$(MANPATH)/man5
+
+# cosmetic: shortened strings:
+S =$(SRCDIR)
+D =$(DESTDIR)
+DB =$(D)$(BINPATH)
+DI =$(D)$(INCPATH)
+DL =$(D)$(LIBPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+%.o : %.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+%.pic.o : CFLAGS += -DPNG_BUILD_DLL
+%.pic.o : %.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+all: all-static all-shared libpng.pc libpng-config libpng.pc libpng-config
+
+# Make this to verify that "make [...] install" will do what you want.
+buildsetup-tell:
+ @echo VPATH is set to: \"$(VPATH)\"
+ @echo prefix is set to: \"$(prefix)\"
+ @echo -e INCPATH,LIBPATH, etc. are set to:'\n' \
+ $(addprefix $(D),$(INCPATH)'\n' $(LIBPATH)'\n' $(BINPATH)'\n' \
+ $(MANPATH)'\n' $(MAN3PATH)'\n' $(MAN5PATH)'\n')'\n'
+
+libpng.pc: scripts/libpng.pc.in
+ @echo -e Making pkg-config file for this libpng installation..'\n' \
+ using PREFIX=\"$(prefix)\"'\n'
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in
+ @echo -e Making $(LIBNAME) libpng-config file for this libpng \
+ installation..'\n' using PREFIX=\"$(prefix)\"'\n'
+ ( cat $(S)/scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo libs=\"-lpng$(MINGDLL) -lz\"; \
+ cat $(S)/scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+static: all-static
+shared: all-shared
+all-static: $(STATLIB) pngtest-stat$(EXE)
+all-shared: $(SHAREDLIB) pngtest$(EXE)
+
+$(STATLIB): $(OBJS)
+ $(AR) rc $@ $(OBJS)
+ $(RANLIB) $@
+
+$(SHAREDDEF): scripts/pngwin.def
+ cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
+ sed -e 's/\([^;]*\);/;/' > $@
+
+$(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF)
+ $(CC) $(LDSFLAGS) -o $@ $(OBJSDLL) -L. $(LDEXTRA)
+
+pngtest$(EXE): pngtest.pic.o $(SHAREDLIB)
+ $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
+
+pngtest-stat$(EXE): pngtest.o $(STATLIB)
+ $(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@
+
+test: test-static test-shared
+
+test-static: pngtest-stat$(EXE)
+ ./pngtest-stat $(S)/pngtest.png
+
+test-shared: pngtest$(EXE)
+ ./pngtest $(S)/pngtest.png
+
+install-static: $(STATLIB) install-headers install-man
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a
+ -@rm -f $(DL)/$(STATLIB)
+ (cd $(DL); ln -sf $(LIBNAME).a $(STATLIB))
+
+install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a
+ -@rm -f $(DL)/$(IMPLIB)
+ (cd $(DL); ln -sf $(LIBNAME).dll.a $(IMPLIB))
+ install -s -m 755 $(SHAREDLIB) $(DB)
+ install -m 644 libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+
+install-headers:
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ -@rm -f $(DI)/png.h
+ -@rm -f $(DI)/pngconf.h
+ install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME)
+ -@rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+
+install-man:
+ -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR_P) $(D)$(MAN3PATH); fi
+ -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR_P) $(D)$(MAN5PATH); fi
+ install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH)
+ install -m 644 $(S)/png.5 $(D)$(MAN5PATH)
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
+
+# Run this to verify that a future `configure' run will pick up the settings
+# you want.
+test-config-install: SHELL=/bin/bash
+test-config-install: $(DB)/libpng-config
+ @echo -e Testing libpng-config functions...'\n'
+ @ for TYRA in LDFLAGS CPPFLAGS CFLAGS LIBS VERSION; \
+ do \
+ printf "(%d)\t %10s =%s\n" $$(($$gytiu + 1)) $$TYRA \
+ "$$($(DB)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \
+ gytiu=$$(( $$gytiu + 1 )); \
+ done
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) $(CFLAGS) \
+ `$(BINPATH)/libpng14-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) \
+ -o pngtestd `$(BINPATH)/libpng14-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ $(CC) $(CFLAGS) \
+ `$(BINPATH)/libpng14-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) \
+ -o pngtesti$(EXE) `$(BINPATH)/libpng14-config --ldflags`
+ ./pngtesti$(EXE) pngtest.png
+
+clean:
+ /bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \
+ pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF) \
+ libpng-config libpng.pc pngtesti$(EXE)
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+.PHONY: buildsetup-tell libpng.pc libpng-config test-config-install clean
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h png.c
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h pngerror.c
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h pngrio.c
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h pngwio.c
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h pngmem.c
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h pngset.c
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h pngget.c
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h pngread.c
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h pngrtran.c
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h pngrutil.c
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h pngtrans.c
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h pngwrite.c
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h pngwtran.c
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h pngwutil.c
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngpread.c
+
+pngtest.o pngtest.pic.o: png.h pngconf.h pngtest.c
diff --git a/src/3rdparty/libpng/scripts/makefile.mips b/src/3rdparty/libpng/scripts/makefile.mips
new file mode 100644
index 0000000..5e1040e
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.mips
@@ -0,0 +1,87 @@
+# makefile for libpng
+# Copyright (C) Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# where make install puts libpng.a and png.h
+prefix=/usr/local
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+CC=cc
+CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips
+#CFLAGS=-O
+LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
+
+#RANLIB=ranlib
+RANLIB=echo
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+all: libpng.a pngtest
+
+libpng.a: $(OBJS)
+ ar rc $@ $(OBJS)
+ $(RANLIB) $@
+
+pngtest: pngtest.o libpng.a
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install: libpng.a
+ -@mkdir $(DESTDIR)$(INCPATH)
+ -@mkdir $(DESTDIR)$(INCPATH)/libpng
+ -@mkdir $(DESTDIR)$(LIBPATH)
+ -@rm -f $(DESTDIR)$(INCPATH)/png.h
+ -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
+ cp png.h $(DESTDIR)$(INCPATH)/libpng
+ cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
+ (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
+ cp libpng.a $(DESTDIR)$(LIBPATH)
+ chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
+
+clean:
+ rm -f *.o libpng.a pngtest pngout.png
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.msc b/src/3rdparty/libpng/scripts/makefile.msc
new file mode 100644
index 0000000..e744644
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.msc
@@ -0,0 +1,91 @@
+# makefile for libpng
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+# Copyright (C) 2006, 2009 Glenn Randers-Pehrson
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+#
+# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
+
+# -------- Microsoft C 5.1 and later, does not use assembler code --------
+MODEL=L
+CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib
+#-Ox generates bad code with MSC 5.1
+CC=cl
+LD=link
+LDFLAGS=/e/st:0x1500/noe
+O=.obj
+
+#uncomment next to put error messages in a file
+ERRFILE= >> pngerrs
+
+# variables
+OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
+OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
+OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
+
+all: libpng.lib
+
+png$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngset$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngget$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngread$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngpread$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngrtran$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngrutil$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngerror$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngmem$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngrio$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngwio$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngtrans$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngwrite$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngwtran$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngwutil$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
+ del libpng.lib
+ lib libpng $(OBJS1);
+ lib libpng $(OBJS2);
+ lib libpng $(OBJS3);
+
+pngtest$(O): png.h pngconf.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngtest.exe: pngtest.obj libpng.lib
+ $(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ;
+
+test: pngtest.exe
+ pngtest
+
+# End of makefile for libpng
+
diff --git a/src/3rdparty/libpng/scripts/makefile.ne12bsd b/src/3rdparty/libpng/scripts/makefile.ne12bsd
new file mode 100644
index 0000000..acf9c3c
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.ne12bsd
@@ -0,0 +1,46 @@
+# makefile for libpng for NetBSD for the standard
+# make obj && make depend && make && make test
+# make includes && make install
+# Copyright (C) 2002 Patrick R.L. Welche
+# Copyright (C) 2007, 2009 Glenn Randers-Pehrson
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# You should also run makefile.netbsd
+
+LOCALBASE?=/usr/local
+LIBDIR= ${LOCALBASE}/lib
+MANDIR= ${LOCALBASE}/man
+INCSDIR=${LOCALBASE}/include/libpng14
+
+LIB= png14
+SHLIB_MAJOR= 0
+SHLIB_MINOR= 1.4.0
+SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
+ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
+ pngwtran.c pngmem.c pngerror.c pngpread.c
+INCS= png.h pngconf.h
+MAN= libpng.3 libpngpf.3 png.5
+
+CPPFLAGS+=-I${.CURDIR}
+
+# We should be able to do something like this instead of the manual
+# uncommenting, but it core dumps for me at the moment:
+# .if ${MACHINE_ARCH} == "i386"
+# MKLINT= no
+# .endif
+
+CLEANFILES+=pngtest.o pngtest
+
+pngtest.o: pngtest.c
+ ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
+
+pngtest: pngtest.o libpng.a
+ ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
+
+test: pngtest
+ cd ${.CURDIR} && ${.OBJDIR}/pngtest
+
+.include <bsd.lib.mk>
diff --git a/src/3rdparty/libpng/scripts/makefile.netbsd b/src/3rdparty/libpng/scripts/makefile.netbsd
new file mode 100644
index 0000000..ef470f8
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.netbsd
@@ -0,0 +1,46 @@
+# makefile for libpng for NetBSD for the standard
+# make obj && make depend && make && make test
+# make includes && make install
+# Copyright (C) 2002 Patrick R.L. Welche
+# Copyright (C) 2007-2009 Glenn Randers-Pehrson
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# You should also run makefile.ne14bsd
+
+LOCALBASE?=/usr/local
+LIBDIR= ${LOCALBASE}/lib
+MANDIR= ${LOCALBASE}/man
+INCSDIR=${LOCALBASE}/include
+
+LIB= png
+SHLIB_MAJOR= 3
+SHLIB_MINOR= 1.4.0
+SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
+ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
+ pngwtran.c pngmem.c pngerror.c pngpread.c
+INCS= png.h pngconf.h
+MAN= libpng.3 libpngpf.3 png.5
+
+CPPFLAGS+=-I${.CURDIR}
+
+# We should be able to do something like this instead of the manual
+# uncommenting, but it core dumps for me at the moment:
+# .if ${MACHINE_ARCH} == "i386"
+# MKLINT= no
+# .endif
+
+CLEANFILES+=pngtest.o pngtest
+
+pngtest.o: pngtest.c
+ ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
+
+pngtest: pngtest.o libpng.a
+ ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
+
+test: pngtest
+ cd ${.CURDIR} && ${.OBJDIR}/pngtest
+
+.include <bsd.lib.mk>
diff --git a/src/3rdparty/libpng/scripts/makefile.openbsd b/src/3rdparty/libpng/scripts/makefile.openbsd
new file mode 100644
index 0000000..c924284
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.openbsd
@@ -0,0 +1,76 @@
+# makefile for libpng
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+# Copyright (C) 2007-2009 Glenn Randers-Pehrson
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+PREFIX?= /usr/local
+LIBDIR= ${PREFIX}/lib
+MANDIR= ${PREFIX}/man/cat
+
+SHLIB_MAJOR= 0
+SHLIB_MINOR= 1.4.0
+
+LIB= png
+SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
+ pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
+ pngwio.c pngwrite.c pngwtran.c pngwutil.c
+
+HDRS= png.h pngconf.h
+
+CFLAGS+= -W -Wall
+CPPFLAGS+= -I${.CURDIR}
+
+NOPROFILE= Yes
+
+CLEANFILES+= pngtest.o pngtest
+
+MAN= libpng.3 libpngpf.3 png.5
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO libpng.txt
+
+pngtest.o: pngtest.c
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
+
+pngtest: pngtest.o
+ ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
+
+test: pngtest
+ cd ${.OBJDIR} && env \
+ LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
+
+beforeinstall:
+ if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \
+ fi
+ if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
+ fi
+ if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \
+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \
+ fi
+ if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \
+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \
+ fi
+ if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \
+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \
+ fi
+ if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \
+ ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \
+ fi
+
+afterinstall:
+ @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a
+ @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a
+ @rm -f ${DESTDIR}${PREFIX}/include/png.h
+ @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
+ @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
+ ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
+ -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
+ ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
+ -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
+ ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
+ -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png
+
+.include <bsd.lib.mk>
diff --git a/src/3rdparty/libpng/scripts/makefile.os2 b/src/3rdparty/libpng/scripts/makefile.os2
new file mode 100644
index 0000000..affb03c
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.os2
@@ -0,0 +1,72 @@
+# makefile for libpng on OS/2 with gcc
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Related files: pngos2.def
+
+CC=gcc -Zomf -s
+
+# Where the zlib library and include files are located
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+CFLAGS=-I$(ZLIBINC) -W -Wall -O6 -funroll-loops -malign-loops=2 \
+ -malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lzdll -Zcrtdll
+AR=emxomfar
+
+PNGLIB=png.lib
+IMPLIB=emximp
+SHAREDLIB=png.dll
+SHAREDLIBIMP=pngdll.lib
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+.SUFFIXES: .c .o
+
+all: $(PNGLIB) $(SHAREDLIB) $(SHAREDLIBIMP)
+
+$(PNGLIB): $(OBJS)
+ $(AR) rc $@ $(OBJS)
+
+$(SHAREDLIB): $(OBJS) pngos2.def
+ $(CC) $(LDFLAGS) -Zdll -o $@ $^
+
+$(SHAREDLIBIMP): pngos2.def
+ $(IMPLIB) -o $@ $^
+
+pngtest.exe: pngtest.o png.dll pngdll.lib
+ $(CC) -o $@ $(CFLAGS) $< $(LDFLAGS)
+
+test: pngtest.exe
+ ./pngtest.exe
+
+clean:
+ rm -f *.o $(PNGLIB) png.dll pngdll.lib pngtest.exe pngout.png
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sco b/src/3rdparty/libpng/scripts/makefile.sco
new file mode 100644
index 0000000..22bb976
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.sco
@@ -0,0 +1,232 @@
+# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
+# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
+# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
+# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
+# Copyright (C) 1998 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+CC=cc
+AR_RC=ar rc
+MKDIR_P=mkdir
+LN_SF=ln -f -s
+RANLIB=echo
+RM_F=/bin/rm -f
+
+# where make install puts libpng.a, $(OLDSO)*, and png.h
+prefix=/usr/local
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+CFLAGS= -dy -belf -I$(ZLIBINC) -O3
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo ccopts=\"-belf\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOVER) \
+ $(OBJSDLL)
+
+$(OLDSOVER): $(OBJSDLL)
+ $(CC) -G -Wl,-h,$(OLDSOMAJ) -o $(OLDSOVER) \
+ $(OBJSDLL)
+
+pngtest: pngtest.o $(LIBSO)
+ LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ -@$(RM_F) $(DI)/png.h
+ -@$(RM_F) $(DI)/pngconf.h
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) $(CFLAGS) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ $(CC) $(CFLAGS) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
+ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sggcc b/src/3rdparty/libpng/scripts/makefile.sggcc
new file mode 100644
index 0000000..bcc9d01
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.sggcc
@@ -0,0 +1,243 @@
+# makefile for libpng.a and libpng14.so, SGI IRIX with 'cc'
+# Copyright (C) 2001-2002, 2006 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+AR_RC=ar rc
+CC=gcc
+MKDIR_P=mkdir -p
+LN_SF=ln -sf
+RANLIB=echo
+RM_F=/bin/rm -f
+
+# Where make install puts libpng.a, libpng14.so, and libpng14/png.h
+# Prefix must be a full pathname.
+
+prefix=/usr/local
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+#ZLIBLIB=/usr/local/lib32
+#ZLIBINC=/usr/local/include
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
+# See "man abi". zlib must be built with the same ABI.
+ABI=
+
+WARNMORE= # -g -DPNG_DEBUG=5
+CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32
+LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
+LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
+ -set_version sgi$(PNGMAJ).0
+LDLEGACY=cc $(ABI) -shared -soname $(OLDSOMAJ) \
+ -set_version sgi$3.0
+# See "man dso" for info about shared objects
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+#LIBPATH=$(exec_prefix)/lib32
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+all: libpng.a pngtest shared libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+shared: $(LIBSOVER)
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo ccopts=\"$(ABI)\"; \
+ echo cppflags=\"\"; \
+ echo ldopts=\"$(ABI)\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo libdir=\"$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJS)
+ $(LDSHARED) -o $@ $(OBJS)
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)
+
+$(OLDSOVER): $(OBJS)
+ $(LDLEGACY) -o $@ $(OBJS)
+
+pngtest: pngtest.o libpng.a
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ echo
+ echo Testing local static library.
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) \
+ -rpath $(ZLIBLIB):$(DL) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) \
+ -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) libpng.a pngtest pngtesti pngout.png libpng.pc \
+ so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* $(OLDSOVER)
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sgi b/src/3rdparty/libpng/scripts/makefile.sgi
new file mode 100644
index 0000000..c7550f1
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.sgi
@@ -0,0 +1,247 @@
+# makefile for libpng.a and libpng14.so, SGI IRIX with 'cc'
+# Copyright (C) 2001-2002, 2006, 2007 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+LIBNAME=libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+AR_RC=ar rc
+CC=cc
+MKDIR_P=mkdir -p
+LN_SF=ln -sf
+RANLIB=echo
+RM_F=/bin/rm -f
+
+# Where make install puts libpng.a, libpng14.so, and libpng14/png.h
+# Prefix must be a full pathname.
+
+prefix=/usr/local
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+#ZLIBLIB=/usr/local/lib32
+#ZLIBINC=/usr/local/include
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
+# See "man abi". zlib must be built with the same ABI.
+ABI=
+
+WARNMORE=-fullwarn
+# Note: -KPIC is the default anyhow
+#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC # -g -DPNG_DEBUG=5
+CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE)
+LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng14 -lz -lm
+LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
+LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
+ -set_version sgi$(PNGMAJ).0
+LDLEGACY=cc $(ABI) -shared -soname $(OLDSOMAJ) \
+ -set_version sgi$3.0
+# See "man dso" for info about shared objects
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+#LIBPATH=$(exec_prefix)/lib32
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+all: libpng.a pngtest shared libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+shared: $(LIBSOVER)
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo ccopts=\"$(ABI)\"; \
+ echo ldopts=\"$(ABI)\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo libdir=\"$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJS)
+ $(LDSHARED) -o $@ $(OBJS)
+ $(RM_F) $(LIBSO) $(LIBSOMAJ)
+
+$(OLDSOVER): $(OBJS)
+ $(LDLEGACY) -o $@ $(OBJS)
+
+pngtest: pngtest.o libpng.a
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ echo
+ echo Testing local static library.
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(DL) -L$(ZLIBLIB) \
+ -rpath $(ZLIBLIB):$(DL) \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -L$(ZLIBLIB) \
+ -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \
+ $(LIBSO) $(LIBSOMAJ)* \
+ $(OLDSOVER) \
+ so_locations
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.so9 b/src/3rdparty/libpng/scripts/makefile.so9
new file mode 100644
index 0000000..fb09b9e
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.so9
@@ -0,0 +1,254 @@
+# makefile for libpng on Solaris 9 (beta) with Forte cc
+# Updated by Chad Schrock for Solaris 9
+# Contributed by William L. Sebok, based on makefile.linux
+# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson
+# Copyright (C) 1998-2001 Greg Roelofs
+# Copyright (C) 1996-1997 Andreas Dilger
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+LIBNAME = libpng14
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+# gcc 2.95 doesn't work.
+CC=cc
+AR_RC=ar rc
+MKDIR_P=mkdir -p
+LN_SF=ln -f -s
+RANLIB=echo
+RM_F=/bin/rm -f
+
+# Where make install puts libpng.a, $(OLDSO)*, and png.h
+prefix=/usr/local
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+# Changing these to ../zlib poses a security risk. If you want
+# to have zlib in an adjacent directory, specify the full path instead of "..".
+#ZLIBLIB=../zlib
+#ZLIBINC=../zlib
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+#Use the preinstalled zlib that comes with Solaris 9:
+ZLIBLIB=/usr/lib
+ZLIBINC=/usr/include
+
+#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+#CFLAGS=-I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE
+CFLAGS=-I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
+LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo R_opts=\"-R$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ @case "`type ld`" in *ucb*) \
+ echo; \
+ echo '## WARNING:'; \
+ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
+ echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
+ echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
+ echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
+ echo '## at all. If it is, things are likely to break because of'; \
+ echo '## the libucb dependency that is created.'; \
+ echo; \
+ ;; \
+ esac
+ $(LD) -G -h $(LIBSOMAJ) \
+ -o $(LIBSOVER) $(OBJSDLL)
+
+$(OLDSOVER): $(OBJS)
+ $(LD) -G -h $(OLDSOMAJ) \
+ -o $(OLDSOVER) $(OBJSDLL)
+
+pngtest: pngtest.o $(LIBSO)
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
+ -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
+ -L$(ZLIBLIB) -R$(ZLIBLIB)
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
+ libpng-config $(LIBSO) $(LIBSOMAJ)* \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.solaris b/src/3rdparty/libpng/scripts/makefile.solaris
new file mode 100644
index 0000000..6c4adfc
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.solaris
@@ -0,0 +1,251 @@
+# makefile for libpng on Solaris 2.x with gcc
+# Copyright (C) 2004, 2006-2008 Glenn Randers-Pehrson
+# Contributed by William L. Sebok, based on makefile.linux
+# Copyright (C) 1998 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+AR_RC=ar rc
+CC=gcc
+MKDIR_P=mkdir -p
+LN_SF=ln -f -s
+RANLIB=echo
+RM_F=/bin/rm -f
+
+# Where make install puts libpng.a, libpng14.so*, and png.h
+prefix=/usr/local
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+# Changing these to ../zlib poses a security risk. If you want
+# to have zlib in an adjacent directory, specify the full path instead of "..".
+#ZLIBLIB=../zlib
+#ZLIBINC=../zlib
+
+ZLIBLIB=/usr/local/lib
+ZLIBINC=/usr/local/include
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+CFLAGS=-I$(ZLIBINC) -W -Wall -O \
+ # $(WARNMORE) -g -DPNG_DEBUG=5
+LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo cppflags=\"\"; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo R_opts=\"-R$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ @case "`type ld`" in *ucb*) \
+ echo; \
+ echo '## WARNING:'; \
+ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
+ echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
+ echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
+ echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
+ echo '## at all. If it is, things are likely to break because of'; \
+ echo '## the libucb dependency that is created.'; \
+ echo; \
+ ;; \
+ esac
+ $(LD) -G -h $(LIBSOMAJ) \
+ -o $(LIBSOVER) $(OBJSDLL)
+
+$(OLDSOVER): $(OBJS)
+ $(LD) -G -h $(OLDSOMAJ) \
+ -o $(OLDSOVER) $(OBJSDLL)
+
+pngtest: pngtest.o $(LIBSO)
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
+ -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
+ -L$(ZLIBLIB) -R$(ZLIBLIB)
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
+ libpng-config $(LIBSO) $(LIBSOMAJ)* \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.solaris-x86 b/src/3rdparty/libpng/scripts/makefile.solaris-x86
new file mode 100644
index 0000000..8ee7be1
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.solaris-x86
@@ -0,0 +1,251 @@
+# makefile for libpng on Solaris 2.x with gcc
+# Copyright (C) 2004, 2006-2008 Glenn Randers-Pehrson
+# Contributed by William L. Sebok, based on makefile.linux
+# Copyright (C) 1998 Greg Roelofs
+# Copyright (C) 1996, 1997 Andreas Dilger
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# Library name:
+LIBNAME = libpng14
+PNGMAJ = 14
+PNGMIN = 1.4.0
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+# Shared library names:
+LIBSO=$(LIBNAME).so
+LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
+LIBSOVER=$(LIBNAME).so.$(PNGVER)
+OLDSO=libpng.so
+OLDSOMAJ=libpng.so.14
+OLDSOVER=libpng.so.14.$(PNGMIN)
+
+# Utilities:
+AR_RC=ar rc
+CC=gcc
+MKDIR_P=mkdir -p
+LN_SF=ln -f -s
+RANLIB=echo
+RM_F=/bin/rm -f
+
+# Where make install puts libpng.a, libpng14.so*, and png.h
+prefix=/usr/local
+exec_prefix=$(prefix)
+
+# Where the zlib library and include files are located
+# Changing these to ../zlib poses a security risk. If you want
+# to have zlib in an adjacent directory, specify the full path instead of "..".
+#ZLIBLIB=../zlib
+#ZLIBINC=../zlib
+
+ZLIBLIB=/usr/local/lib
+ZLIBINC=/usr/local/include
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+CFLAGS=-I$(ZLIBINC) -W -Wall -O \
+ # $(WARNMORE) -g -DPNG_DEBUG=5
+LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
+
+INCPATH=$(prefix)/include
+LIBPATH=$(exec_prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(exec_prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES: .c .o .pic.o
+
+.c.pic.o:
+ $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
+
+all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+libpng.pc:
+ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
+ -e s!@exec_prefix@!$(exec_prefix)! \
+ -e s!@libdir@!$(LIBPATH)! \
+ -e s!@includedir@!$(INCPATH)! \
+ -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
+
+libpng-config:
+ ( cat scripts/libpng-config-head.in; \
+ echo prefix=\"$(prefix)\"; \
+ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+ echo cppflags=\""; \
+ echo L_opts=\"-L$(LIBPATH)\"; \
+ echo R_opts=\"-R$(LIBPATH)\"; \
+ echo libs=\"-lpng14 -lz -lm\"; \
+ cat scripts/libpng-config-body.in ) > libpng-config
+ chmod +x libpng-config
+
+$(LIBSO): $(LIBSOMAJ)
+ $(LN_SF) $(LIBSOMAJ) $(LIBSO)
+
+$(LIBSOMAJ): $(LIBSOVER)
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
+
+$(LIBSOVER): $(OBJSDLL)
+ @case "`type ld`" in *ucb*) \
+ echo; \
+ echo '## WARNING:'; \
+ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
+ echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
+ echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
+ echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
+ echo '## at all. If it is, things are likely to break because of'; \
+ echo '## the libucb dependency that is created.'; \
+ echo; \
+ ;; \
+ esac
+ $(LD) -G -h $(LIBSOMAJ) \
+ -o $(LIBSOVER) $(OBJSDLL)
+
+$(OLDSOVER): $(OBJS)
+ $(LD) -G -h $(OLDSOMAJ) \
+ -o $(OLDSOVER) $(OBJSDLL)
+
+pngtest: pngtest.o $(LIBSO)
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install-headers: png.h pngconf.h
+ -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+ -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
+ -@$(RM_F) $(DI)/libpng
+ (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@$(RM_F) $(DL)/libpng.a
+ (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBSOVER) libpng.pc \
+ $(OLDSOVER)
+ -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
+ -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSO)
+ -@$(RM_F) $(DL)/$(OLDSOMAJ)
+ -@$(RM_F) $(DL)/$(OLDSOVER)*
+ cp $(LIBSOVER) $(DL)
+ cp $(OLDSOVER) $(DL)
+ chmod 755 $(DL)/$(LIBSOVER)
+ chmod 755 $(DL)/$(OLDSOVER)
+ (cd $(DL); \
+ $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
+ $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSO); \
+ $(LN_SF) $(LIBSOVER) $(LIBSOMAJ))
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
+ -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
+ -@$(RM_F) $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+ -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
+ -@$(RM_F) $(DM)/man3/libpng.3
+ -@$(RM_F) $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
+ -@$(RM_F) $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
+
+install-config: libpng-config
+ -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
+ -@$(RM_F) $(DB)/libpng-config
+ -@$(RM_F) $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location. Use test-dd to test it
+# before then.
+
+test-dd:
+ echo
+ echo Testing installed dynamic shared library in $(DL).
+ $(CC) -I$(DI) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
+ -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
+ ./pngtestd pngtest.png
+
+test-installed:
+ echo
+ echo Testing installed dynamic shared library.
+ $(CC) -I$(ZLIBINC) \
+ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
+ -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
+ -L$(ZLIBLIB) -R$(ZLIBLIB)
+ ./pngtesti pngtest.png
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
+ libpng-config $(LIBSO) $(LIBSOMAJ)* \
+ $(OLDSOVER) \
+ libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h pngpriv.h
+pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
+pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
+pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
+pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
+pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
+pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
+pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
+pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.std b/src/3rdparty/libpng/scripts/makefile.std
new file mode 100644
index 0000000..afb885a
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.std
@@ -0,0 +1,95 @@
+# makefile for libpng
+# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# where make install puts libpng.a and png.h
+prefix=/usr/local
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+# Where the zlib library and include files are located
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+CC=cc
+AR_RC=ar rc
+MKDIR_P=mkdir
+LN_SF=ln -sf
+RANLIB=ranlib
+RM_F=rm -f
+
+CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+all: libpng.a pngtest
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+pngtest: pngtest.o libpng.a
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install: libpng.a
+ -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
+ -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
+ -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
+ -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
+ -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
+ cp png.h $(DESTDIR)$(INCPATH)/libpng
+ cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
+ (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
+ cp libpng.a $(DESTDIR)$(LIBPATH)
+ chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngout.png
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sunos b/src/3rdparty/libpng/scripts/makefile.sunos
new file mode 100644
index 0000000..984379c
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.sunos
@@ -0,0 +1,100 @@
+# makefile for libpng
+# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
+# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# where make install puts libpng.a and png.h
+prefix=/usr/local
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location. Example:
+#
+# make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+# Where the zlib library and include files are located
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \
+ -Wmissing-declarations -Wtraditional -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes
+
+CC=gcc
+AR_RC=ar rc
+MKDIR_P=mkdir -p
+LN_SF=ln -f -s
+RANLIB=ranlib
+RM_F=/bin/rm -f
+
+CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+ pngwtran.o pngmem.o pngerror.o pngpread.o
+
+all: libpng.a pngtest
+
+libpng.a: $(OBJS)
+ $(AR_RC) $@ $(OBJS)
+ $(RANLIB) $@
+
+pngtest: pngtest.o libpng.a
+ $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+test: pngtest
+ ./pngtest
+
+install: libpng.a
+ -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
+ -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
+ -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
+ -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
+ -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
+ cp png.h $(DESTDIR)$(INCPATH)/libpng
+ cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
+ chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
+ (cd $(DESTDIR)$(INCPATH); $(LN_SF) libpng/* .)
+ cp libpng.a $(DESTDIR)$(LIBPATH)
+ chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
+
+clean:
+ $(RM_F) *.o libpng.a pngtest pngout.png
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+ chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o: png.h pngconf.h pngpriv.h
+pngerror.o: png.h pngconf.h pngpriv.h
+pngrio.o: png.h pngconf.h pngpriv.h
+pngwio.o: png.h pngconf.h pngpriv.h
+pngmem.o: png.h pngconf.h pngpriv.h
+pngset.o: png.h pngconf.h pngpriv.h
+pngget.o: png.h pngconf.h pngpriv.h
+pngread.o: png.h pngconf.h pngpriv.h
+pngrtran.o: png.h pngconf.h pngpriv.h
+pngrutil.o: png.h pngconf.h pngpriv.h
+pngtrans.o: png.h pngconf.h pngpriv.h
+pngwrite.o: png.h pngconf.h pngpriv.h
+pngwtran.o: png.h pngconf.h pngpriv.h
+pngwutil.o: png.h pngconf.h pngpriv.h
+pngpread.o: png.h pngconf.h pngpriv.h
+
+pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.tc3 b/src/3rdparty/libpng/scripts/makefile.tc3
new file mode 100644
index 0000000..bf6ade6
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.tc3
@@ -0,0 +1,89 @@
+# Makefile for libpng
+# TurboC/C++ (Note: All modules are compiled in C mode)
+
+# To use, do "make -fmakefile.tc3"
+
+# ----- Turbo C 3.00 (can be modified to work with earlier versions) -----
+
+MODEL=l
+CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib
+#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00
+CC=tcc
+LD=tcc
+LIB=tlib
+LDFLAGS=-m$(MODEL) -L..\zlib
+O=.obj
+E=.exe
+
+# variables
+OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
+OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
+OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
+OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O)
+OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O)
+OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O)
+
+all: libpng$(MODEL).lib pngtest$(E)
+
+pngtest: pngtest$(E)
+
+test: pngtest$(E)
+ pngtest$(E)
+
+png$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngset$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngget$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngread$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngpread$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngrtran$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngrutil$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngerror$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngmem$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngrio$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngwio$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngtest$(O): png.h pngconf.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngtrans$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngwrite$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngwtran$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+pngwutil$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c
+
+libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
+ $(LIB) libpng$(MODEL) +$(OBJSL1)
+ $(LIB) libpng$(MODEL) +$(OBJSL2)
+ $(LIB) libpng$(MODEL) +$(OBJSL3)
+
+pngtest$(E): pngtest$(O) libpng$(MODEL).lib
+ $(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib
+
+# End of makefile for libpng
diff --git a/src/3rdparty/libpng/scripts/makefile.vcwin32 b/src/3rdparty/libpng/scripts/makefile.vcwin32
new file mode 100644
index 0000000..a65f1c1
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.vcwin32
@@ -0,0 +1,103 @@
+# makefile for libpng
+# Copyright (C) 1998 Tim Wegner
+# Copyright (C) 2006,2009 Glenn Randers-Pehrson
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+#
+# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
+# To use, do "nmake /f scripts\makefile.vcwin32"
+
+# -------- Microsoft Visual C++ 2.0 and later, no assembler code --------
+
+# Compiler, linker, librarian, and other tools
+CC = cl
+LD = link
+AR = lib
+CFLAGS = -nologo -MD -O2 -W3 -I..\zlib
+LDFLAGS = -nologo
+ARFLAGS = -nologo
+RM = del
+
+# File extensions
+O=.obj
+
+#uncomment next to put error messages in a file
+#ERRFILE= >> pngerrs.log
+
+# Variables
+OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O)
+OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O)
+OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
+OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
+
+# Targets
+all: libpng.lib
+
+png$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngset$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngget$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngread$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngpread$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngrtran$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngrutil$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngerror$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngmem$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngrio$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngwio$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngtrans$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngwrite$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngwtran$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngwutil$(O): png.h pngconf.h pngpriv.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+libpng.lib: $(OBJS)
+ -$(RM) $@
+ $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
+
+pngtest$(O): png.h pngconf.h
+ $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
+
+pngtest.exe: pngtest$(O) libpng.lib
+ $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
+
+test: pngtest.exe
+ pngtest
+
+clean:
+ -$(RM) *$(O)
+ -$(RM) libpng.lib
+ -$(RM) pngtest.exe
+ -$(RM) pngout.png
+
+# End of makefile for libpng
+
diff --git a/src/3rdparty/libpng/scripts/makefile.watcom b/src/3rdparty/libpng/scripts/makefile.watcom
new file mode 100644
index 0000000..db4d534
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makefile.watcom
@@ -0,0 +1,112 @@
+# Makefile for libpng
+# Watcom C/C++ 10.0 and later, 32-bit protected mode, flat memory model
+
+# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
+# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+# To use, do "wmake /f scripts\makefile.watcom"
+
+
+# ---------------------- Watcom C/C++ 10.0 and later -----------------------
+
+# Where the zlib library and include files are located
+ZLIBLIB=..\zlib
+ZLIBINC=..\zlib
+
+# Target OS
+OS=DOS
+#OS=NT
+
+# Target CPU
+CPU=6 # Pentium Pro
+#CPU=5 # Pentium
+
+# Calling convention
+CALLING=r # registers
+#CALLING=s # stack
+
+# Uncomment next to put error messages in a file
+#ERRFILE=>>pngerrs
+
+# --------------------------------------------------------------------------
+
+
+CC=wcc386
+CFLAGS=-$(CPU)$(CALLING) -fp$(CPU) -fpi87 -oneatx -mf -bt=$(OS) -i=$(ZLIBINC) -zq
+LD=wcl386
+LDFLAGS=-zq
+
+O=.obj
+
+OBJS1=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
+OBJS2=pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
+OBJS3=pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
+
+
+all: test
+
+png$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngset$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngget$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngread$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngpread$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngrtran$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngrutil$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngerror$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngmem$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngrio$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngwio$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngtest$(O): png.h pngconf.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngtrans$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngwrite$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngwtran$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+pngwutil$(O): png.h pngconf.h pngpriv.h
+ $(CC) $(CFLAGS) $*.c $(ERRFILE)
+
+libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
+ wlib -b -c -n -q libpng.lib $(OBJS1)
+ wlib -b -c -q libpng.lib $(OBJS2)
+ wlib -b -c -q libpng.lib $(OBJS3)
+
+pngtest.exe: pngtest.obj libpng.lib
+ $(LD) $(LDFLAGS) pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
+
+test: pngtest.exe .symbolic
+ pngtest.exe
+
+
+# End of makefile for libpng
diff --git a/src/3rdparty/libpng/scripts/makevms.com b/src/3rdparty/libpng/scripts/makevms.com
new file mode 100644
index 0000000..2fa9d0d
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/makevms.com
@@ -0,0 +1,142 @@
+$! make libpng under VMS
+$!
+$!
+$! Check for MMK/MMS
+$!
+$! This procedure accepts one parameter (contrib), which causes it to build
+$! the programs from the contrib directory instead of libpng.
+$!
+$ p1 = f$edit(p1,"UPCASE")
+$ if p1 .eqs. "CONTRIB"
+$ then
+$ set def [.contrib.gregbook]
+$ @makevms
+$ set def [-.pngminus]
+$ @makevms
+$ set def [--]
+$ exit
+$ endif
+$ Make = ""
+$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
+$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
+$!
+$! Look for the compiler used
+$!
+$ zlibsrc = "[-.zlib]"
+$ ccopt="/include=''zlibsrc'"
+$ if f$getsyi("HW_MODEL").ge.1024
+$ then
+$ ccopt = "/prefix=all"+ccopt
+$ comp = "__decc__=1"
+$ if f$trnlnm("SYS").eqs."" then define sys sys$library:
+$ else
+$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
+$ then
+$ if f$trnlnm("SYS").eqs."" then define sys sys$library:
+$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs.""
+$ then
+$ comp = "__gcc__=1"
+$ CC :== GCC
+$ else
+$ comp = "__vaxc__=1"
+$ endif
+$ else
+$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
+$ ccopt = "/decc/prefix=all"+ccopt
+$ comp = "__decc__=1"
+$ endif
+$ endif
+$!
+$! Build the thing plain or with mms/mmk
+$!
+$ write sys$output "Compiling Libpng sources ..."
+$ if make.eqs.""
+$ then
+$ dele pngtest.obj;*
+$ CALL MAKE png.OBJ "cc ''CCOPT' png" -
+ png.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" -
+ pngset.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" -
+ pngget.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" -
+ pngread.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" -
+ pngpread.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" -
+ pngrtran.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" -
+ pngrutil.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" -
+ pngerror.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" -
+ pngmem.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" -
+ pngrio.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" -
+ pngwio.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" -
+ pngtrans.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" -
+ pngwrite.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" -
+ pngwtran.c png.h pngconf.h pngpriv.h
+$ CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" -
+ pngwutil.c png.h pngconf.h pngpriv.h
+$ write sys$output "Building Libpng ..."
+$ CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ
+$ write sys$output "Building pngtest..."
+$ CALL MAKE pngtest.OBJ "cc ''CCOPT' pngtest" -
+ pngtest.c png.h pngconf.h
+$ call make pngtest.exe -
+ "LINK pngtest,libpng.olb/lib,''zlibsrc'libz.olb/lib" -
+ pngtest.obj libpng.olb
+$ write sys$output "Testing Libpng..."
+$ run pngtest
+$ else
+$ if f$search("DESCRIP.MMS") .eqs. "" then copy/nolog [.SCRIPTS]DESCRIP.MMS []
+$ 'make'/macro=('comp',zlibsrc='zlibsrc')
+$ endif
+$ write sys$output "Libpng build completed"
+$ exit
+$!
+$!
+$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
+$ V = 'F$Verify(0)
+$! P1 = What we are trying to make
+$! P2 = Command to make it
+$! P3 - P8 What it depends on
+$
+$ If F$Search(P1) .Eqs. "" Then Goto Makeit
+$ Time = F$CvTime(F$File(P1,"RDT"))
+$arg=3
+$Loop:
+$ Argument = P'arg
+$ If Argument .Eqs. "" Then Goto Exit
+$ El=0
+$Loop2:
+$ File = F$Element(El," ",Argument)
+$ If File .Eqs. " " Then Goto Endl
+$ AFile = ""
+$Loop3:
+$ OFile = AFile
+$ AFile = F$Search(File)
+$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
+$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
+$ Goto Loop3
+$NextEL:
+$ El = El + 1
+$ Goto Loop2
+$EndL:
+$ arg=arg+1
+$ If arg .Le. 8 Then Goto Loop
+$ Goto Exit
+$
+$Makeit:
+$ VV=F$VERIFY(0)
+$ write sys$output P2
+$ 'P2
+$ VV='F$Verify(VV)
+$Exit:
+$ If V Then Set Verify
+$ENDSUBROUTINE
diff --git a/src/3rdparty/libpng/scripts/png32ce.def b/src/3rdparty/libpng/scripts/png32ce.def
new file mode 100644
index 0000000..7e3b235
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/png32ce.def
@@ -0,0 +1,257 @@
+;------------------------------------------
+; LIBPNG module definition file for Windows
+;------------------------------------------
+
+LIBRARY lpngce
+
+ png_memcpy_check
+ png_memset_check
+ png_set_dither
+ png_read_init_3
+ png_write_init_3
+ png_set_strip_error_numbers
+ png_get_uint_32
+ png_get_uint_16
+ png_get_int_32
+
+EXPORTS
+;Version 1.4.0
+ png_build_grayscale_palette @1
+; png_check_sig @2
+ png_chunk_error @3
+ png_chunk_warning @4
+; png_convert_from_struct_tm @5
+; png_convert_from_time_t @6
+ png_create_info_struct @7
+ png_create_read_struct @8
+ png_create_write_struct @9
+ png_data_freer @10
+ png_destroy_info_struct @11
+ png_destroy_read_struct @12
+ png_destroy_write_struct @13
+ png_error @14
+ png_free @15
+ png_free_data @16
+ png_get_IHDR @17
+ png_get_PLTE @18
+ png_get_bKGD @19
+ png_get_bit_depth @20
+ png_get_cHRM @21
+ png_get_cHRM_fixed @22
+ png_get_channels @23
+ png_get_color_type @24
+ png_get_compression_buffer_size @25
+ png_get_compression_type @26
+ png_get_copyright @27
+ png_get_error_ptr @28
+ png_get_filter_type @29
+ png_get_gAMA @30
+ png_get_gAMA_fixed @31
+ png_get_hIST @32
+ png_get_header_ver @33
+ png_get_header_version @34
+ png_get_iCCP @35
+ png_get_image_height @36
+ png_get_image_width @37
+ png_get_interlace_type @38
+ png_get_io_ptr @39
+ png_get_libpng_ver @40
+ png_get_oFFs @41
+ png_get_pCAL @42
+ png_get_pHYs @43
+ png_get_pixel_aspect_ratio @44
+ png_get_pixels_per_meter @45
+ png_get_progressive_ptr @46
+ png_get_rgb_to_gray_status @47
+ png_get_rowbytes @48
+ png_get_rows @49
+ png_get_sBIT @50
+ png_get_sCAL @51
+ png_get_sPLT @52
+ png_get_sRGB @53
+ png_get_signature @54
+ png_get_tIME @55
+ png_get_tRNS @56
+ png_get_text @57
+ png_get_unknown_chunks @58
+ png_get_user_chunk_ptr @59
+ png_get_user_transform_ptr @60
+ png_get_valid @61
+ png_get_x_offset_microns @62
+ png_get_x_offset_pixels @63
+ png_get_x_pixels_per_meter @64
+ png_get_y_offset_microns @65
+ png_get_y_offset_pixels @66
+ png_get_y_pixels_per_meter @67
+ png_malloc @68
+; png_memcpy_check @69
+; png_memset_check @70
+ png_permit_empty_plte @71
+ png_process_data @72
+ png_progressive_combine_row @73
+ png_read_end @74
+ png_read_image @75
+ png_read_info @76
+; png_read_init is deprecated
+ png_read_init @77
+ png_read_png @78
+ png_read_row @79
+ png_read_rows @80
+ png_read_update_info @81
+ png_reset_zstream @82
+ png_set_IHDR @83
+ png_set_PLTE @84
+ png_set_bKGD @85
+ png_set_background @86
+ png_set_bgr @87
+ png_set_cHRM @88
+ png_set_cHRM_fixed @89
+ png_set_compression_buffer_size @90
+ png_set_compression_level @91
+ png_set_compression_mem_level @92
+ png_set_compression_method @93
+ png_set_compression_strategy @94
+ png_set_compression_window_bits @95
+ png_set_crc_action @96
+; png_set_dither @97
+ png_set_error_fn @98
+ png_set_expand @99
+ png_set_filler @100
+ png_set_filter @101
+ png_set_filter_heuristics @102
+ png_set_flush @103
+ png_set_gAMA @104
+ png_set_gAMA_fixed @105
+ png_set_gamma @106
+ png_set_gray_1_2_4_to_8 @107 ; deprecated
+ png_set_gray_to_rgb @108
+ png_set_hIST @109
+ png_set_iCCP @110
+ png_set_interlace_handling @111
+ png_set_invert_alpha @112
+ png_set_invert_mono @113
+ png_set_keep_unknown_chunks @114
+ png_set_oFFs @115
+ png_set_pCAL @116
+ png_set_pHYs @117
+ png_set_packing @118
+ png_set_packswap @119
+ png_set_palette_to_rgb @120
+ png_set_progressive_read_fn @121
+ png_set_read_fn @122
+ png_set_read_status_fn @123
+ png_set_read_user_chunk_fn @124
+ png_set_read_user_transform_fn @125
+ png_set_rgb_to_gray @126
+ png_set_rgb_to_gray_fixed @127
+ png_set_rows @128
+ png_set_sBIT @129
+ png_set_sCAL @130
+ png_set_sPLT @131
+ png_set_sRGB @132
+ png_set_sRGB_gAMA_and_cHRM @133
+ png_set_shift @134
+ png_set_sig_bytes @135
+ png_set_strip_16 @136
+ png_set_strip_alpha @137
+ png_set_swap @138
+ png_set_swap_alpha @139
+ png_set_tIME @140
+ png_set_tRNS @141
+ png_set_tRNS_to_alpha @142
+ png_set_text @143
+ png_set_unknown_chunk_location @144
+ png_set_unknown_chunks @145
+ png_set_user_transform_info @146
+ png_set_write_fn @147
+ png_set_write_status_fn @148
+ png_set_write_user_transform_fn @149
+ png_sig_cmp @150
+ png_start_read_image @151
+ png_warning @152
+ png_write_chunk @153
+ png_write_chunk_data @154
+ png_write_chunk_end @155
+ png_write_chunk_start @156
+ png_write_end @157
+ png_write_flush @158
+ png_write_image @159
+ png_write_info @160
+ png_write_info_before_PLTE @161
+; png_write_init is deprecated
+ png_write_init @162
+ png_write_png @163
+ png_write_row @164
+ png_write_rows @165
+; png_read_init_2 and png_write_init_2 are deprecated.
+ png_read_init_2 @166
+ png_write_init_2 @167
+ png_access_version_number @168
+; png_sig_bytes @169
+; png_libpng_ver @170
+ png_init_io @171
+ png_convert_to_rfc1123 @172
+ png_set_invalid @173
+; Added at version 1.0.12
+; For compatiblity with 1.0.7-1.0.11
+ png_info_init @174
+; png_read_init_3 @175
+; png_write_init_3 @176
+ png_info_init_3 @177
+ png_destroy_struct @178
+; Added at version 1.2.0
+; For use with PNG_USER_MEM_SUPPORTED
+; png_destroy_struct_2 @179
+; png_create_read_struct_2 @180
+; png_create_write_struct_2 @181
+; png_malloc_default @182
+; png_free_default @183
+; MNG features
+; png_permit_mng_features @184
+; MMX support
+; png_mmx_support @185
+; png_get_mmx_flagmask @186
+; png_get_asm_flagmask @187
+; png_get_asm_flags @188
+; png_get_mmx_bitdepth_threshold @189
+; png_get_mmx_rowbytes_threshold @190
+; png_set_asm_flags @191
+; png_init_mmx_flags @192
+; Strip error numbers
+; png_set_strip_error_numbers @193
+; Added at version 1.2.2
+ png_handle_as_unknown @179
+ png_zalloc @180
+ png_zfree @181
+; png_handle_as_unknown @194
+; png_zalloc @195
+; png_zfree @196
+; Added at version 1.2.6
+ png_malloc_warn @195
+ png_get_user_height_max @196
+ png_get_user_width_max @197
+ png_set_user_limits @198
+; Added at version 1.2.7
+ png_set_add_alpha @199
+; Added at version 1.2.9
+; png_get_uint_32 @200
+ png_save_uint_32 @201
+; png_get_uint_16 @202
+ png_save_uint_16 @203
+; png_get_int_32 @204
+ png_save_int_32 @205
+ png_get_uint_31 @206
+ png_set_expand_gray_1_2_4_to_8 @207
+; Added at version 1.2.41
+ png_write_sig @208
+ png_benign_error @209
+ png_benign_chunk_error @210
+ png_set_benign_error @211
+ png_get_io_chunk_name @212
+ png_get_io_state @213
+ png_set_premultiply_alpha @214
+ png_get_chunk_cache_max @215
+ png_set_chunk_cache_max @216
+ png_check_cHRM_fixed @217
+ png_calloc @218
+ png_set_longjmp_fn @219
diff --git a/src/3rdparty/libpng/scripts/pngos2.def b/src/3rdparty/libpng/scripts/pngos2.def
new file mode 100644
index 0000000..2d80eb4
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/pngos2.def
@@ -0,0 +1,251 @@
+;----------------------------------------
+; PNG.LIB module definition file for OS/2
+;----------------------------------------
+
+; Version 1.4.0
+
+LIBRARY PNG
+DESCRIPTION "PNG image compression library for OS/2"
+CODE PRELOAD MOVEABLE DISCARDABLE
+DATA PRELOAD MOVEABLE MULTIPLE
+
+EXPORTS
+
+ png_build_grayscale_palette
+ png_chunk_error
+ png_chunk_warning
+ png_convert_from_struct_tm
+ png_convert_from_time_t
+ png_create_info_struct
+ png_create_read_struct
+ png_create_write_struct
+ png_data_freer
+ png_destroy_info_struct
+ png_destroy_read_struct
+ png_destroy_write_struct
+ png_error
+ png_free
+ png_free_data
+ png_get_IHDR
+ png_get_PLTE
+ png_get_bKGD
+ png_get_bit_depth
+ png_get_cHRM
+ png_get_cHRM_fixed
+ png_get_channels
+ png_get_color_type
+ png_get_compression_buffer_size
+ png_get_compression_type
+ png_get_copyright
+ png_get_error_ptr
+ png_get_filter_type
+ png_get_gAMA
+ png_get_gAMA_fixed
+ png_get_hIST
+ png_get_header_ver
+ png_get_header_version
+ png_get_iCCP
+ png_get_image_height
+ png_get_image_width
+ png_get_interlace_type
+ png_get_io_ptr
+ png_get_libpng_ver
+ png_get_oFFs
+ png_get_pCAL
+ png_get_pHYs
+ png_get_pixel_aspect_ratio
+ png_get_pixels_per_meter
+ png_get_progressive_ptr
+ png_get_rgb_to_gray_status
+ png_get_rowbytes
+ png_get_rows
+ png_get_sBIT
+ png_get_sCAL
+ png_get_sPLT
+ png_get_sRGB
+ png_get_signature
+ png_get_tIME
+ png_get_tRNS
+ png_get_text
+ png_get_unknown_chunks
+ png_get_user_chunk_ptr
+ png_get_user_transform_ptr
+ png_get_valid
+ png_get_x_offset_microns
+ png_get_x_offset_pixels
+ png_get_x_pixels_per_meter
+ png_get_y_offset_microns
+ png_get_y_offset_pixels
+ png_get_y_pixels_per_meter
+ png_malloc
+ png_process_data
+ png_progressive_combine_row
+ png_read_end
+ png_read_image
+ png_read_info
+ png_read_png
+ png_read_row
+ png_read_rows
+ png_read_update_info
+ png_reset_zstream
+ png_set_IHDR
+ png_set_PLTE
+ png_set_bKGD
+ png_set_background
+ png_set_bgr
+ png_set_cHRM
+ png_set_cHRM_fixed
+ png_set_compression_buffer_size
+ png_set_compression_level
+ png_set_compression_mem_level
+ png_set_compression_method
+ png_set_compression_strategy
+ png_set_compression_window_bits
+ png_set_crc_action
+ png_set_error_fn
+ png_set_expand
+ png_set_filler
+ png_set_filter
+ png_set_filter_heuristics
+ png_set_flush
+ png_set_gAMA
+ png_set_gAMA_fixed
+ png_set_gamma
+ png_set_gray_to_rgb
+ png_set_hIST
+ png_set_iCCP
+ png_set_interlace_handling
+ png_set_invert_alpha
+ png_set_invert_mono
+ png_set_keep_unknown_chunks
+ png_set_oFFs
+ png_set_pCAL
+ png_set_pHYs
+ png_set_packing
+ png_set_packswap
+ png_set_palette_to_rgb
+ png_set_progressive_read_fn
+ png_set_read_fn
+ png_set_read_status_fn
+ png_set_read_user_chunk_fn
+ png_set_read_user_transform_fn
+ png_set_rgb_to_gray
+ png_set_rgb_to_gray_fixed
+ png_set_rows
+ png_set_sBIT
+ png_set_sCAL
+ png_set_sPLT
+ png_set_sRGB
+ png_set_sRGB_gAMA_and_cHRM
+ png_set_shift
+ png_set_sig_bytes
+ png_set_strip_16
+ png_set_strip_alpha
+ png_set_swap
+ png_set_swap_alpha
+ png_set_tIME
+ png_set_tRNS
+ png_set_tRNS_to_alpha
+ png_set_text
+ png_set_unknown_chunk_location
+ png_set_unknown_chunks
+ png_set_user_transform_info
+ png_set_write_fn
+ png_set_write_status_fn
+ png_set_write_user_transform_fn
+ png_sig_cmp
+ png_start_read_image
+ png_warning
+ png_write_chunk
+ png_write_chunk_data
+ png_write_chunk_end
+ png_write_chunk_start
+ png_write_end
+ png_write_flush
+ png_write_image
+ png_write_info
+ png_write_info_before_PLTE
+ png_write_png
+ png_write_row
+ png_write_rows
+ png_write_sig
+ png_access_version_number
+ png_init_io
+ png_convert_to_rfc1123
+ png_set_invalid
+
+; Added at version 1.2.0:
+ png_permit_empty_plte
+ png_permit_mng_features
+
+; Added at version 1.2.2:
+ png_handle_as_unknown
+
+; Added at version 1.2.2 and deleted from 1.2.3:
+; png_zalloc
+; png_zfree
+
+; Added at version 1.2.4
+ png_malloc_warn
+
+; Added at version 1.2.6
+ png_set_user_limits
+ png_get_user_height_max
+ png_get_user_width_max
+; Added at version 1.2.7
+ png_set_add_alpha
+
+; Added at version 1.2.9
+ png_save_uint_32
+ png_save_uint_16
+ png_save_int_32
+ png_get_uint_31
+ png_set_expand_gray_1_2_4_to_8
+
+; Added at version 1.2.41
+ png_write_sig
+; png_benign_error
+; png_benign_chunk_error
+; png_set_benign_error
+ png_get_io_chunk_name
+ png_get_io_state
+ png_set_premultiply_alpha
+ png_get_chunk_cache_max
+ png_set_chunk_cache_max
+ png_check_cHRM_fixed
+ png_calloc
+ png_set_longjmp_fn
+
+; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
+ png_libpng_ver
+ png_pass_start
+ png_pass_inc
+ png_pass_ystart
+ png_pass_yinc
+ png_pass_mask
+ png_pass_dsp_mask
+; png_pass_width
+; png_pass_height
+
+; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
+ png_IHDR
+ png_IDAT
+ png_IEND
+ png_PLTE
+ png_bKGD
+ png_cHRM
+ png_gAMA
+ png_hIST
+ png_iCCP
+ png_iTXt
+ png_oFFs
+ png_pCAL
+ png_pHYs
+ png_sBIT
+ png_sCAL
+ png_sPLT
+ png_sRGB
+ png_tEXt
+ png_tIME
+ png_tRNS
+ png_zTXt
diff --git a/src/3rdparty/libpng/scripts/pngwin.def b/src/3rdparty/libpng/scripts/pngwin.def
new file mode 100644
index 0000000..657e3b4
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/pngwin.def
@@ -0,0 +1,212 @@
+;------------------------------------------
+; LIBPNG module definition file for Windows
+;------------------------------------------
+
+LIBRARY
+
+EXPORTS
+;Version 1.4.0
+ png_build_grayscale_palette
+ png_chunk_error
+ png_chunk_warning
+ png_convert_from_struct_tm
+ png_convert_from_time_t
+ png_create_info_struct
+ png_create_read_struct
+ png_create_write_struct
+ png_data_freer
+ png_destroy_info_struct
+ png_destroy_read_struct
+ png_destroy_write_struct
+ png_error
+ png_free
+ png_free_data
+ png_get_IHDR
+ png_get_PLTE
+ png_get_bKGD
+ png_get_bit_depth
+ png_get_cHRM
+ png_get_cHRM_fixed
+ png_get_channels
+ png_get_color_type
+ png_get_compression_buffer_size
+ png_get_compression_type
+ png_get_copyright
+ png_get_error_ptr
+ png_get_filter_type
+ png_get_gAMA
+ png_get_gAMA_fixed
+ png_get_hIST
+ png_get_header_ver
+ png_get_header_version
+ png_get_iCCP
+ png_get_image_height
+ png_get_image_width
+ png_get_interlace_type
+ png_get_io_ptr
+ png_get_libpng_ver
+ png_get_oFFs
+ png_get_pCAL
+ png_get_pHYs
+ png_get_pixel_aspect_ratio
+ png_get_pixels_per_meter
+ png_get_progressive_ptr
+ png_get_rgb_to_gray_status
+ png_get_rowbytes
+ png_get_rows
+ png_get_sBIT
+ png_get_sCAL
+ png_get_sPLT
+ png_get_sRGB
+ png_get_signature
+ png_get_tIME
+ png_get_tRNS
+ png_get_text
+ png_get_unknown_chunks
+ png_get_user_chunk_ptr
+ png_get_user_transform_ptr
+ png_get_valid
+ png_get_x_offset_microns
+ png_get_x_offset_pixels
+ png_get_x_pixels_per_meter
+ png_get_y_offset_microns
+ png_get_y_offset_pixels
+ png_get_y_pixels_per_meter
+ png_malloc
+ png_process_data
+ png_progressive_combine_row
+ png_read_end
+ png_read_image
+ png_read_info
+ png_read_png
+ png_read_row
+ png_read_rows
+ png_read_update_info
+ png_reset_zstream
+ png_set_IHDR
+ png_set_PLTE
+ png_set_bKGD
+ png_set_background
+ png_set_bgr
+ png_set_cHRM
+ png_set_cHRM_fixed
+ png_set_compression_buffer_size
+ png_set_compression_level
+ png_set_compression_mem_level
+ png_set_compression_method
+ png_set_compression_strategy
+ png_set_compression_window_bits
+ png_set_crc_action
+ png_set_error_fn
+ png_set_expand
+ png_set_filler
+ png_set_filter
+ png_set_filter_heuristics
+ png_set_flush
+ png_set_gAMA
+ png_set_gAMA_fixed
+ png_set_gamma
+ png_set_gray_to_rgb
+ png_set_hIST
+ png_set_iCCP
+ png_set_interlace_handling
+ png_set_invert_alpha
+ png_set_invert_mono
+ png_set_keep_unknown_chunks
+ png_set_oFFs
+ png_set_pCAL
+ png_set_pHYs
+ png_set_packing
+ png_set_packswap
+ png_set_palette_to_rgb
+ png_set_progressive_read_fn
+ png_set_read_fn
+ png_set_read_status_fn
+ png_set_read_user_chunk_fn
+ png_set_read_user_transform_fn
+ png_set_rgb_to_gray
+ png_set_rgb_to_gray_fixed
+ png_set_rows
+ png_set_sBIT
+ png_set_sCAL
+ png_set_sPLT
+ png_set_sRGB
+ png_set_sRGB_gAMA_and_cHRM
+ png_set_shift
+ png_set_sig_bytes
+ png_set_strip_16
+ png_set_strip_alpha
+ png_set_swap
+ png_set_swap_alpha
+ png_set_tIME
+ png_set_tRNS
+ png_set_tRNS_to_alpha
+ png_set_text
+ png_set_unknown_chunk_location
+ png_set_unknown_chunks
+ png_set_user_transform_info
+ png_set_write_fn
+ png_set_write_status_fn
+ png_set_write_user_transform_fn
+ png_sig_cmp
+ png_start_read_image
+ png_warning
+ png_write_chunk
+ png_write_chunk_data
+ png_write_chunk_end
+ png_write_chunk_start
+ png_write_end
+ png_write_flush
+ png_write_image
+ png_write_info
+ png_write_info_before_PLTE
+ png_write_png
+ png_write_row
+ png_write_rows
+ png_access_version_number
+ png_init_io
+ png_convert_to_rfc1123
+ png_set_invalid
+; Added at version 1.0.12
+ png_info_init_3
+ png_destroy_struct
+; Added at version 1.2.0
+; For use with PNG_USER_MEM_SUPPORTED
+ png_destroy_struct_2
+ png_create_read_struct_2
+ png_create_write_struct_2
+ png_malloc_default
+ png_free_default
+; MNG features
+ png_permit_mng_features
+; Added at version 1.2.2
+ png_handle_as_unknown
+; Added at version 1.2.2 and deleted from 1.2.3
+; png_zalloc
+; png_zfree
+; Added at version 1.2.4
+ png_malloc_warn
+ png_get_user_height_max
+ png_get_user_width_max
+ png_set_user_limits
+; Added at version 1.2.7
+ png_set_add_alpha
+; Added at version 1.2.9
+ png_save_uint_32
+ png_save_uint_16
+ png_save_int_32
+ png_get_uint_31
+ png_set_expand_gray_1_2_4_to_8
+; Added at version 1.2.41
+ png_write_sig
+; png_benign_error
+; png_benign_chunk_error
+; png_set_benign_error
+ png_get_io_chunk_name
+ png_get_io_state
+ png_set_premultiply_alpha
+ png_get_chunk_cache_max
+ png_set_chunk_cache_max
+ png_check_cHRM_fixed
+ png_calloc
+ png_set_longjmp_fn
diff --git a/src/3rdparty/libpng/scripts/pngwin.rc b/src/3rdparty/libpng/scripts/pngwin.rc
new file mode 100644
index 0000000..9335cbb
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/pngwin.rc
@@ -0,0 +1,112 @@
+#define PNG_VERSION_INFO_ONLY
+
+#include <windows.h>
+#include "../png.h"
+
+#define _QUOTE(x) # x
+#define QUOTE(x) _QUOTE(x)
+
+#define PNG_LIBPNG_DLLFNAME "LIBPNG"
+
+/* Support deprecated PRIVATEBUILD macro */
+#if defined(PRIVATEBUILD) && !defined(PNG_USER_PRIVATEBUILD)
+# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
+#endif
+
+#if defined(PNG_USER_DLLFNAME_POSTFIX) && !defined(PNG_USER_PRIVATEBUILD)
+# error "PNG_USER_PRIVATEBUILD must be defined as a string describing the\
+ custom changes made to the library."
+#endif
+
+/* Prioritize PNG_USER_x over PNG_LIBPNG_x */
+#ifdef PNG_USER_DLLFNAME_POSTFIX
+# undef PNG_LIBPNG_DLLFNAME_POSTFIX
+# define PNG_LIBPNG_DLLFNAME_POSTFIX PNG_USER_DLLFNAME_POSTFIX
+#endif
+
+#ifdef PNG_USER_VERSIONINFO_COMMENTS
+# undef PNG_LIBPNG_VERSIONINFO_COMMENTS
+# define PNG_LIBPNG_VERSIONINFO_COMMENTS PNG_USER_VERSIONINFO_COMMENTS
+#endif
+
+#if defined(PNG_DEBUG) && (PNG_DEBUG > 0)
+# define VS_DEBUG VS_FF_DEBUG
+# ifndef PNG_LIBPNG_DLLFNAME_POSTFIX
+# define PNG_LIBPNG_DLLFNAME_POSTFIX "D"
+# endif /* PNG_LIBPNG_DLLFNAME_POSTFIX */
+# ifndef PNG_LIBPNG_VERSIONINFO_COMMENTS
+# define PNG_LIBPNG_VERSIONINFO_COMMENTS "PNG_DEBUG=" QUOTE(PNG_DEBUG)
+# endif /* PNG_LIBPNG_VERSIONINFO_COMMENTS */
+#else
+# define VS_DEBUG 0
+# ifndef PNG_LIBPNG_DLLFNAME_POSTFIX
+# define PNG_LIBPNG_DLLFNAME_POSTFIX
+# endif /* PNG_LIBPNG_DLLFNAME_POSTFIX */
+#endif /* defined(DEBUG)... */
+
+#ifdef PNG_USER_PRIVATEBUILD
+# define VS_PRIVATEBUILD VS_FF_PRIVATEBUILD
+#else
+# define VS_PRIVATEBUILD 0
+#endif /* PNG_USER_PRIVATEBUILD */
+
+#ifdef PNG_LIBPNG_SPECIALBUILD
+# define VS_SPECIALBUILD VS_FF_SPECIALBUILD
+#else
+# define VS_SPECIALBUILD 0
+#endif /* PNG_LIBPNG_BUILD_SPECIAL */
+
+#if ((PNG_LIBPNG_BUILD_BASE_TYPE & PNG_LIBPNG_RELEASE_STATUS_MASK) !=\
+ PNG_LIBPNG_BUILD_STABLE)
+# define VS_PRERELEASE VS_FF_PRERELEASE
+# define VS_PATCHED 0
+#else
+# define VS_PRERELEASE 0
+# if (PNG_LIBPNG_BUILD_BASE_TYPE & PNG_LIBPNG_BUILD_PATCHED)
+# define VS_PATCHED VS_FF_PATCHED
+# else
+# define VS_PATCHED 0
+# endif
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
+PRODUCTVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
+FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+FILEFLAGS VS_DEBUG | VS_PRIVATEBUILD | VS_SPECIALBUILD | VS_PRERELEASE | VS_PATCHED
+FILEOS VOS__WINDOWS32
+FILETYPE VFT_DLL
+FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN BLOCK "040904E4" /* Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) */
+ BEGIN
+#ifdef PNG_LIBPNG_VERSIONINFO_COMMENTS
+ VALUE "Comments", PNG_LIBPNG_VERSIONINFO_COMMENTS "\000"
+#endif /* PNG_LIBPNG_VERSIONINFO_COMMENTS */
+#ifdef PNG_USER_VERSIONINFO_COMPANYNAME
+ VALUE "CompanyName", PNG_USER_VERSIONINFO_COMPANYNAME "\000"
+#endif /* PNG_USER_VERSIONINFO_COMPANYNAME */
+ VALUE "FileDescription", "PNG image compression library\000"
+ VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000"
+ VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX " (Windows 32 bit)\000"
+ VALUE "LegalCopyright", "\251 1998-2009 Glenn Randers-Pehrson et al.\000"
+#ifdef PNG_USER_VERSIONINFO_LEGALTRADEMARKS
+ VALUE "LegalTrademarks", PNG_USER_VERSIONINFO_LEGALTRADEMARKS "\000"
+#endif /* PNG_USER_VERSIONINFO_LEGALTRADEMARKS */
+ VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX ".DLL\000"
+#ifdef PNG_USER_PRIVATEBUILD
+ VALUE "PrivateBuild", PNG_USER_PRIVATEBUILD "\000"
+#endif /* PNG_USER_PRIVATEBUILD */
+ VALUE "ProductName", "LibPNG\000"
+ VALUE "ProductVersion", "1\000"
+#ifdef PNG_LIBPNG_SPECIALBUILD
+ VALUE "SpecialBuild", PNG_LIBPNG_SPECIALBUILD "\000"
+#endif /* PNG_LIBPNG_SPECIALBUILD */
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04E4
+ END
+END
diff --git a/src/3rdparty/libpng/scripts/smakefile.ppc b/src/3rdparty/libpng/scripts/smakefile.ppc
new file mode 100644
index 0000000..531c693
--- /dev/null
+++ b/src/3rdparty/libpng/scripts/smakefile.ppc
@@ -0,0 +1,33 @@
+# Amiga powerUP (TM) Makefile
+# makefile for libpng and SAS C V6.58/7.00 PPC compiler
+# Copyright (C) 1998 by Andreas R. Kleinert
+#
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
+CC = scppc
+CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL IDIR /zlib \
+ OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8
+LIBNAME = libpng.a
+AR = ppc-amigaos-ar
+AR_FLAGS = cr
+RANLIB = ppc-amigaos-ranlib
+LDFLAGS = -r -o
+LDLIBS = ../zlib/libzip.a LIB:scppc.a
+LN = ppc-amigaos-ld
+RM = delete quiet
+MKDIR = makedir
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o pngread.o \
+pngerror.o pngpread.o pngwrite.o pngrtran.o pngwtran.o pngrio.o pngwio.o pngmem.o
+
+all: $(LIBNAME) pngtest
+
+$(LIBNAME): $(OBJS)
+ $(AR) $(AR_FLAGS) $@ $(OBJS)
+ $(RANLIB) $@
+
+pngtest: pngtest.o $(LIBNAME)
+ $(LN) $(LDFLAGS) pngtest LIB:c_ppc.o pngtest.o $(LIBNAME) $(LDLIBS) \
+LIB:end.o