mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Attempt to get contrib/pngminim working with new pnglibconf.h
not quite working yet (pow is undefined)
This commit is contained in:
@@ -1,8 +1,23 @@
|
|||||||
|
|
||||||
|
# Get the source for the pngminus application
|
||||||
cp ../../pngminus/png2pnm.c pngm2pnm.c
|
cp ../../pngminus/png2pnm.c pngm2pnm.c
|
||||||
|
|
||||||
|
# Get the libpng sources
|
||||||
cp ../../../*.h .
|
cp ../../../*.h .
|
||||||
cp ../../../*.c .
|
cp ../../../*.c .
|
||||||
|
|
||||||
|
# Get the libpng scripts for building pnglibconf.h
|
||||||
|
cp ../../../scripts/options.awk .
|
||||||
|
cp ../../../scripts/pnglibconf.dfa .
|
||||||
|
sed -e "s:scripts/::g" ../../../scripts/pnglibconf.mak > pnglibconf.mak
|
||||||
|
#14+%
|
||||||
|
# Remove libpng sources we won't use
|
||||||
rm example.c pngtest.c pngpread.c pngw*.c
|
rm example.c pngtest.c pngpread.c pngw*.c
|
||||||
# change the following 2 lines if zlib is somewhere else
|
|
||||||
|
# Get the zlib sources
|
||||||
|
# Change the following 2 lines if zlib is somewhere else
|
||||||
cp ../../../../zlib/*.h .
|
cp ../../../../zlib/*.h .
|
||||||
cp ../../../../zlib/*.c .
|
cp ../../../../zlib/*.c .
|
||||||
|
|
||||||
|
# Remove zlib sources we won't use
|
||||||
rm minigzip.c example.c compress.c deflate.c gz*
|
rm minigzip.c example.c compress.c deflate.c gz*
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#CC=cc
|
#CC=cc
|
||||||
CC=gcc
|
CC=gcc
|
||||||
LD=$(CC)
|
LD=$(CC)
|
||||||
|
AWK=awk
|
||||||
|
|
||||||
RM=rm -f
|
RM=rm -f
|
||||||
|
|
||||||
@@ -32,6 +33,24 @@ OBJS = pngm2pnm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
|
|||||||
|
|
||||||
all: pngm2pnm$(E)
|
all: pngm2pnm$(E)
|
||||||
|
|
||||||
|
# see scripts/pnglibconf.mak for more options
|
||||||
|
pnglibconf.h: pnglibconf.mak pnglibconf.dfn
|
||||||
|
make -f pnglibconf.mak pnglibconf.h
|
||||||
|
|
||||||
|
# used on demand to regenerate the standard header, CPPFLAGS should
|
||||||
|
# be empty - no non-standard defines
|
||||||
|
pnglibconf.dfn: pnglibconf.dfa options.awk
|
||||||
|
rm -f $@ dfn?.out
|
||||||
|
test -z "$(CPPFLAGS)"
|
||||||
|
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
||||||
|
$(AWK) -f options.awk pre=1 out=dfn1.out\
|
||||||
|
logunsupported=1 - pnglibconf.dfa 1>&2
|
||||||
|
$(AWK) -f options.awk pre=0 out=dfn2.out\
|
||||||
|
logunsupported=1 dfn1.out 1>&2
|
||||||
|
rm dfn1.out
|
||||||
|
mv dfn2.out $@
|
||||||
|
|
||||||
|
|
||||||
pngm2pnm$(E): $(OBJS)
|
pngm2pnm$(E): $(OBJS)
|
||||||
$(LD) -o pngm2pnm$(E) $(OBJS)
|
$(LD) -o pngm2pnm$(E) $(OBJS)
|
||||||
strip pngm2pnm$(E)
|
strip pngm2pnm$(E)
|
||||||
|
|||||||
Reference in New Issue
Block a user