mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Updated contrib/pngminim project to work with the new pnglibconf.h
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
cp ../../gregbook/rpng2-x.c ../../gregbook/readpng2.[ch] .
|
||||
cp ../../gregbook/COPYING ../../gregbook/LICENSE .
|
||||
cp ../../../*.h .
|
||||
cp ../../../*.c .
|
||||
test -n "${PNGSRC}" || PNGSRC=../../..
|
||||
cp "${PNGSRC}"/contrib/gregbook/rpng2-x.c .
|
||||
cp "${PNGSRC}"/contrib/gregbook/readpng2.[ch] .
|
||||
cp "${PNGSRC}"/contrib/gregbook/COPYING .
|
||||
cp "${PNGSRC}"/contrib/gregbook/LICENSE .
|
||||
cp "${PNGSRC}"/*.h .
|
||||
cp "${PNGSRC}"/*.c .
|
||||
rm example.c pngtest.c pngw*.c
|
||||
# change the following 2 lines if zlib is somewhere else
|
||||
cp ../../../../zlib/*.h .
|
||||
cp ../../../../zlib/*.c .
|
||||
rm -f pnglibconf.h
|
||||
test -d scripts || mkdir scripts
|
||||
cp "${PNGSRC}"/scripts/pnglibconf.mak scripts
|
||||
cp "${PNGSRC}"/scripts/pnglibconf.dfa scripts
|
||||
cp "${PNGSRC}"/scripts/options.awk scripts
|
||||
# change the following if zlib is somewhere else
|
||||
test -n "${ZLIBSRC}" || ZLIBSRC="${PNGSRC}"/../zlib
|
||||
cp "${ZLIBSRC}"/*.h .
|
||||
cp "${ZLIBSRC}"/*.c .
|
||||
rm minigzip.c example.c compress.c deflate.c gz*
|
||||
|
||||
@@ -41,7 +41,7 @@ OBJS = rpng2-x$(O) readpng2$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
|
||||
|
||||
# implicit make rules -------------------------------------------------------
|
||||
|
||||
.c$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h readpng2.h pngusr.h zlib.h
|
||||
.c$(O):
|
||||
$(CC) -c $(CFLAGS) $<
|
||||
|
||||
# dependencies
|
||||
@@ -52,9 +52,16 @@ rpng2-x$(E): $(OBJS)
|
||||
$(LD) -o rpng2-x$(E) $(OBJS) $(LIBS)
|
||||
strip rpng2-x$(E)
|
||||
|
||||
pnglibconf.h: scripts/pnglibconf.mak scripts/pnglibconf.dfa scripts/options.awk pngusr.h
|
||||
rm -f pnglibconf.h
|
||||
$(MAKE) $(MAKEFLAGS) -f scripts/pnglibconf.mak CPPFLAGS=-DPNG_USER_CONFIG $@
|
||||
|
||||
clean:
|
||||
$(MAKE) $(MAKEFLAGS) -f scripts/pnglibconf.mak clean
|
||||
$(RM) rpng2-x$(O)
|
||||
$(RM) rpng2-x$(E)
|
||||
$(RM) $(OBJS)
|
||||
|
||||
$(OBJS): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h readpng2.h pngusr.h zlib.h
|
||||
|
||||
# End of makefile for rpng2-x
|
||||
|
||||
@@ -12,12 +12,11 @@
|
||||
#ifndef MINPRDPNGCONF_H
|
||||
#define MINPRDPNGCONF_H
|
||||
|
||||
#define PNG_USER_PRIVATEBUILD "PNG minimal build"
|
||||
#define PNG_USER_DLLFNAME_POSTFIX "MN"
|
||||
|
||||
#define PNG_NO_WARNINGS
|
||||
#define png_warning(s1,s2) ""
|
||||
#define png_chunk_warning(s1,s2) ""
|
||||
#define PNG_NO_ERROR_TEXT
|
||||
#define png_error(s1,s2) png_err(s1)
|
||||
#define png_chunk_error(s1,s2) png_err(s1)
|
||||
|
||||
#define PNG_NO_READ_QUANTIZE
|
||||
#define PNG_NO_READ_INVERT
|
||||
|
||||
Reference in New Issue
Block a user