aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/README15
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/makefile165
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.dfa40
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.h24
4 files changed, 244 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/README b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/README
new file mode 100644
index 0000000..e40024e
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/README
@@ -0,0 +1,15 @@
1This demonstrates the use of PNG_USER_CONFIG and pngusr.h
2
3The makefile builds a minimal read-only progressive decoder with
4embedded libpng, zlib and your system's X library.
5
6Specify the location of the zlib source (1.2.1 or later) as ZLIBSRC
7on the make command line.
8
9Edit makefile if required, to find your X library and include files,
10then
11
12 make ZLIBSRC=directory
13
14If you prefer to use the shared libraries, go to contrib/gregbook
15and build the rpng2-x application there.
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/makefile b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/makefile
new file mode 100644
index 0000000..a367661
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/makefile
@@ -0,0 +1,165 @@
1# Makefile for PngMinus (rpng2)
2# Linux / Unix
3
4#CC=cc
5CC=gcc
6LD=$(CC)
7
8# If awk fails try
9# make AWK=nawk
10
11# If cpp fails try
12# make CPP=/lib/cpp
13
14RM=rm -f
15COPY=cp
16
17#XINC = -I/usr/include # old-style, stock X distributions
18#XLIB = -L/usr/lib/X11 -lX11 # (including SGI IRIX)
19
20#XINC = -I/usr/openwin/include # Sun workstations (OpenWindows)
21#XLIB = -L/usr/openwin/lib -lX11
22
23XINC = -I/usr/X11R6/include # new X distributions (X.org, etc.)
24XLIB = -L/usr/X11R6/lib -lX11
25#XLIB = -L/usr/X11R6/lib64 -lX11 # e.g., Red Hat on AMD64
26
27#XINC = -I/usr/local/include # FreeBSD
28#XLIB = -L/usr/local/lib -lX11
29
30#LIBS = $(XLIB)
31LIBS = $(XLIB) -lm #platforms that need libm
32
33CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP -I. $(XINC) -O1
34
35C=.c
36O=.o
37L=.a
38E=
39
40# Where to find the source code:
41PNGSRC =../../..
42ZLIBSRC=$(PNGSRC)/../zlib
43PROGSRC=$(PNGSRC)/contrib/gregbook
44
45# Zlib (minimal inflate requirements - crc32 is used by libpng)
46# zutil can be eliminated if you provide your own zcalloc and zcfree
47ZSRCS = adler32$(C) crc32$(C) \
48 inffast$(C) inflate$(C) inftrees$(C) \
49 zutil$(C)
50
51# Standard headers
52ZH = zlib.h crc32.h inffast.h inffixed.h \
53 inflate.h inftrees.h zutil.h
54
55# Machine generated headers
56ZCONF = zconf.h
57
58# Headers callers use
59ZINC = zlib.h $(ZCONF)
60
61# Headers the Zlib source uses
62ZHDRS = $(ZH) $(ZCONF)
63
64ZOBJS = adler32$(O) crc32$(O) \
65 inffast$(O) inflate$(O) inftrees$(O) \
66 zutil$(O)
67
68# libpng
69PNGSRCS=png$(C) pngerror$(C) pngget$(C) pngmem$(C) \
70 pngpread$(C) pngread$(C) pngrio$(C) pngrtran$(C) pngrutil$(C) \
71 pngset$(C) pngtrans$(C)
72
73# Standard headers
74PNGH =png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
75
76# Machine generated headers
77PNGCONF=pnglibconf.h
78
79# Headers callers use
80PNGINC= png.h pngconf.h pngusr.h $(PNGCONF)
81
82# Headers the PNG library uses
83PNGHDRS=$(PNGH) $(PNGCONF) pngusr.h
84
85PNGOBJS=png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
86 pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \
87 pngset$(O) pngtrans$(O)
88
89PROGSRCS= rpng2-x$(C) readpng2$(C)
90PROGHDRS= readpng2.h
91PROGDOCS= COPYING LICENSE
92PROGOBJS= rpng2-x$(O) readpng2$(O)
93
94OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
95
96# implicit make rules -------------------------------------------------------
97
98.c$(O):
99 $(CC) -c $(CFLAGS) $<
100
101# dependencies
102
103all: $(PROGDOCS) rpng2-x$(E)
104
105rpng2-x$(E): $(OBJS)
106 $(LD) -o rpng2-x$(E) $(OBJS) $(LIBS)
107
108# The DFA_XTRA setting turns all libpng options off then
109# turns on those required for this minimal build.
110# The CPP_FLAGS setting causes pngusr.h to be included in
111# both the build of pnglibconf.h and, subsequently, when
112# building libpng itself.
113$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak\
114 $(PNGSRC)/scripts/pnglibconf.dfa \
115 $(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
116 $(RM) pnglibconf.h pnglibconf.dfn
117 $(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
118 srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG"\
119 DFA_XTRA="pngusr.dfa" $@
120
121clean:
122 $(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
123 srcdir=$(PNGSRC) clean
124 $(RM) rpng2-x$(O)
125 $(RM) rpng2-x$(E)
126 $(RM) $(OBJS)
127
128# distclean also removes the copied source and headers
129distclean: clean
130 $(RM) -r scripts # historical reasons
131 $(RM) $(PNGSRCS) $(PNGH)
132 $(RM) $(ZSRCS) $(ZH) $(ZCONF)
133 $(RM) $(PROGSRCS) $(PROGHDRS) $(PROGDOCS)
134
135# Header file dependencies:
136$(PROGOBJS): $(PROGHDRS) $(PNGINC) $(ZINC)
137$(PNGOBJS): $(PNGHDRS) $(ZINC)
138$(ZOBJS): $(ZHDRS)
139
140# Gather the source code from the respective directories
141$(PNGSRCS) $(PNGH): $(PNGSRC)/$@
142 $(RM) $@
143 $(COPY) $(PNGSRC)/$@ $@
144
145# No dependency on the ZLIBSRC target so that it only needs
146# to be specified once.
147$(ZSRCS) $(ZH):
148 $(RM) $@
149 $(COPY) $(ZLIBSRC)/$@ $@
150
151# The unconfigured zconf.h varies in name according to the
152# zlib release
153$(ZCONF):
154 $(RM) $@
155 @for f in zconf.h.in zconf.in.h zconf.h; do\
156 test -r $(ZLIBSRC)/$$f &&\
157 echo $(COPY) $(ZLIBSRC)/$$f $@ &&\
158 $(COPY) $(ZLIBSRC)/$$f $@ && exit 0;\
159 done; echo copy: $(ZLIBSRC)/zconf.h not found; exit 1
160
161$(PROGSRCS) $(PROGHDRS) $(PROGDOCS): $(PROGSRC)/$@
162 $(RM) $@
163 $(COPY) $(PROGSRC)/$@ $@
164
165# End of makefile for rpng2-x
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.dfa b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.dfa
new file mode 100644
index 0000000..0c991d3
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.dfa
@@ -0,0 +1,40 @@
1# pngminim/preader/pngusr.dfa
2#
3# Copyright (c) 2010-2011 Glenn Randers-Pehrson
4#
5# This code is released under the libpng license.
6# For conditions of distribution and use, see the disclaimer
7# and license in png.h
8
9# First all the build options off:
10
11everything = off
12
13# Just switch on the progressive read code
14
15option PROGRESSIVE_READ on
16
17# You may choose fixed or floating point APIs:
18# option FLOATING_POINT on
19
20option FIXED_POINT on
21
22# You must chose the internal fixed point implementation or to
23# use the system floating point. The latter is considerably
24# smaller (by about 1kbyte on an x86 system):
25
26option FLOATING_ARITHMETIC on
27# option FLOATING_ARITHMETIC off
28
29# Your program will probably need other options. The example
30# program here, rpng2-x, requires the following. Take a look
31# at pnglibconf.h to find out the full set of what has to be
32# enabled to make the following work.
33
34option SETJMP on
35option STDIO on
36option READ_bKGD on
37option READ_GAMMA on
38option READ_EXPAND on
39option READ_STRIP_16_TO_8 on
40option READ_GRAY_TO_RGB on
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.h b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.h
new file mode 100644
index 0000000..7db806f
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/preader/pngusr.h
@@ -0,0 +1,24 @@
1/* minrdpngconf.h: headers to make a minimal png-read-only library
2 *
3 * Copyright (c) 2009, 2010-2011 Glenn Randers-Pehrson
4 *
5 * This code is released under the libpng license.
6 * For conditions of distribution and use, see the disclaimer
7 * and license in png.h
8 *
9 * Derived from pngcrush.h, Copyright 1998-2007, Glenn Randers-Pehrson
10 */
11
12#ifndef MINPRDPNGCONF_H
13#define MINPRDPNGCONF_H
14
15/* To include pngusr.h set -DPNG_USER_CONFIG in CPPFLAGS */
16
17/* List options to turn off features of the build that do not
18 * affect the API (so are not recorded in pnglibconf.h)
19 */
20
21#define PNG_NO_WARNINGS
22#define PNG_ALIGN_TYPE PNG_ALIGN_NONE
23
24#endif /* MINPRDPNGCONF_H */