[devel] Attempt to get contrib/pngminim working with new pnglibconf.h
not quite working yet (pow is undefined)
This commit is contained in:
parent
9d976c0ef1
commit
6ff9ec81c5
@ -1,8 +1,23 @@
|
||||
|
||||
# Get the source for the pngminus application
|
||||
cp ../../pngminus/png2pnm.c pngm2pnm.c
|
||||
|
||||
# Get the libpng sources
|
||||
cp ../../../*.h .
|
||||
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
|
||||
# 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/*.c .
|
||||
|
||||
# Remove zlib sources we won't use
|
||||
rm minigzip.c example.c compress.c deflate.c gz*
|
||||
|
@ -4,6 +4,7 @@
|
||||
#CC=cc
|
||||
CC=gcc
|
||||
LD=$(CC)
|
||||
AWK=awk
|
||||
|
||||
RM=rm -f
|
||||
|
||||
@ -32,6 +33,24 @@ OBJS = pngm2pnm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
|
||||
|
||||
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)
|
||||
$(LD) -o pngm2pnm$(E) $(OBJS)
|
||||
strip pngm2pnm$(E)
|
||||
|
Loading…
Reference in New Issue
Block a user