aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/README10
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/makefile150
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.dfa39
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h24
4 files changed, 223 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/README b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/README
new file mode 100644
index 0000000..86583cc
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/README
@@ -0,0 +1,10 @@
1This demonstrates the use of PNG_USER_CONFIG, pngusr.h and pngusr.dfa
2
3The makefile builds a minimal read-only decoder with embedded libpng
4and zlib.
5
6Specify the location of the zlib source (1.2.1 or later) as ZLIBSRC
7on the make command line.
8
9If you prefer to use the shared libraries, go to contrib/pngminus
10and build the png2pnm application there.
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/makefile b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/makefile
new file mode 100644
index 0000000..9692e0a
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/makefile
@@ -0,0 +1,150 @@
1# Makefile for PngMinus (pngm2pnm)
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
17CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP -I. -O1
18
19C=.c
20O=.o
21L=.a
22E=
23
24# Where to find the source code:
25PNGSRC =../../..
26ZLIBSRC=$(PNGSRC)/../zlib
27PROGSRC=$(PNGSRC)/contrib/pngminus
28
29# Zlib (minimal inflate requirements - crc32 is used by libpng)
30# zutil can be eliminated if you provide your own zcalloc and zcfree
31ZSRCS = adler32$(C) crc32$(C) \
32 inffast$(C) inflate$(C) inftrees$(C) \
33 zutil$(C)
34
35# Standard headers
36ZH = zlib.h crc32.h inffast.h inffixed.h \
37 inflate.h inftrees.h zutil.h
38
39# Machine generated headers
40ZCONF = zconf.h
41
42# Headers callers use
43ZINC = zlib.h $(ZCONF)
44
45# Headers the Zlib source uses
46ZHDRS = $(ZH) $(ZCONF)
47
48ZOBJS = adler32$(O) crc32$(O) \
49 inffast$(O) inflate$(O) inftrees$(O) \
50 zutil$(O)
51
52# libpng
53PNGSRCS=png$(C) pngerror$(C) pngget$(C) pngmem$(C) \
54 pngread$(C) pngrio$(C) pngrtran$(C) pngrutil$(C) \
55 pngset$(C) pngtrans$(C)
56
57# Standard headers
58PNGH =png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
59
60# Machine generated headers
61PNGCONF=pnglibconf.h
62
63# Headers callers use
64PNGINC= png.h pngconf.h pngusr.h $(PNGCONF)
65
66# Headers the PNG library uses
67PNGHDRS=$(PNGH) $(PNGCONF) pngusr.h
68
69PNGOBJS=png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
70 pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \
71 pngset$(O) pngtrans$(O)
72
73PROGSRCS= pngm2pnm$(C)
74PROGHDRS=
75PROGDOCS=
76PROGOBJS= pngm2pnm$(O)
77
78OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
79
80# implicit make rules -------------------------------------------------------
81
82# note: dependencies do not work on implicit rule lines
83.c$(O):
84 $(CC) -c $(CFLAGS) $<
85
86# dependencies
87
88all: pngm2pnm$(E)
89
90pngm2pnm$(E): $(OBJS)
91 $(LD) -o pngm2pnm$(E) $(OBJS)
92
93# The DFA_XTRA setting turns all libpng options off then
94# turns on those required for this minimal build.
95# The CPP_FLAGS setting causes pngusr.h to be included in
96# both the build of pnglibconf.h and, subsequently, when
97# building libpng itself.
98$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak\
99 $(PNGSRC)/scripts/pnglibconf.dfa \
100 $(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
101 $(RM) pnglibconf.h pnglibconf.dfn
102 $(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
103 srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG"\
104 DFA_XTRA="pngusr.dfa" $@
105
106clean:
107 $(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
108 srcdir=$(PNGSRC) clean
109 $(RM) pngm2pnm$(O)
110 $(RM) pngm2pnm$(E)
111 $(RM) $(OBJS)
112
113# distclean also removes the copied source and headers
114distclean: clean
115 $(RM) -r scripts # historical reasons
116 $(RM) $(PNGSRCS) $(PNGH)
117 $(RM) $(ZSRCS) $(ZH) $(ZCONF)
118 $(RM) $(PROGSRCS) $(PROGHDRS) $(PROGDOCS)
119
120# Header file dependencies:
121$(PROGOBJS): $(PROGHDRS) $(PNGINC) $(ZINC)
122$(PNGOBJS): $(PNGHDRS) $(ZINC)
123$(ZOBJS): $(ZHDRS)
124
125# Gather the source code from the respective directories
126$(PNGSRCS) $(PNGH): $(PNGSRC)/$@
127 $(RM) $@
128 $(COPY) $(PNGSRC)/$@ $@
129
130# No dependency on the ZLIBSRC target so that it only needs
131# to be specified once.
132$(ZSRCS) $(ZH):
133 $(RM) $@
134 $(COPY) $(ZLIBSRC)/$@ $@
135
136# The unconfigured zconf.h varies in name according to the
137# zlib release
138$(ZCONF):
139 $(RM) $@
140 @for f in zconf.h.in zconf.in.h zconf.h; do\
141 test -r $(ZLIBSRC)/$$f &&\
142 echo $(COPY) $(ZLIBSRC)/$$f $@ &&\
143 $(COPY) $(ZLIBSRC)/$$f $@ && exit 0;\
144 done; echo copy: $(ZLIBSRC)/zconf.h not found; exit 1
145
146pngm2pnm.c: $(PROGSRC)/png2pnm.c
147 $(RM) $@
148 $(COPY) $(PROGSRC)/png2pnm.c $@
149
150# End of makefile for pngm2pnm
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.dfa b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.dfa
new file mode 100644
index 0000000..8a66d64
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.dfa
@@ -0,0 +1,39 @@
1# pngminim/decoder/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# All that is required is some read code. This example switches
14# on the sequential read code (see ../preader for a progressive
15# read example).
16
17option SEQUENTIAL_READ on
18
19# You must choose fixed or floating point arithmetic:
20# option FLOATING_POINT on
21
22option FIXED_POINT on
23
24# You must chose the internal fixed point implementation or to
25# use the system floating point. The latter is considerably
26# smaller (by about 1kbyte on an x86 system):
27# option FLOATING_ARITHMETIC on
28
29option FLOATING_ARITHMETIC off
30
31# Your program will probably need other options. The example
32# program here, pngm2pnm, requires the following. Take a look
33# at pnglibconf.h to find out the full set of what has to be
34# enabled to make the following work.
35
36option SETJMP on
37option STDIO on
38option READ_EXPAND on
39option READ_STRIP_16_TO_8 on
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h
new file mode 100644
index 0000000..2991c17
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h
@@ -0,0 +1,24 @@
1/* minrdpngconf.h: headers to make a minimal png-read-only library
2 *
3 * Copyright (c) 2007, 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 MINRDPNGCONF_H
13#define MINRDPNGCONF_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 /* MINRDPNGCONF_H */