[libpng16] Allow an easy replacement of the default pre-built configuration

header with a custom header, via the make PNGLIBCONF_H_PREBUILT
macro.
This commit is contained in:
Cosmin Truta 2014-03-22 13:13:11 -05:00 committed by Glenn Randers-Pehrson
parent ae6eaa89e5
commit 9ab7b4ca58
35 changed files with 168 additions and 64 deletions

View File

@ -39,6 +39,9 @@ Version 1.6.11beta02 [March 22, 2014]
$(CP) is now used alongside $(RM_F). Also, use 'copy' instead $(CP) is now used alongside $(RM_F). Also, use 'copy' instead
of 'cp' where applicable, and applied other minor makefile changes. of 'cp' where applicable, and applied other minor makefile changes.
Don't warn about invalid dimensions exceeding user limits. Don't warn about invalid dimensions exceeding user limits.
Allow an easy replacement of the default pre-built configuration
header with a custom header, via the make PNGLIBCONF_H_PREBUILT
macro.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -4888,6 +4888,9 @@ Version 1.6.11beta02 [March 22, 2014]
$(CP) is now used alongside $(RM_F). Also, use 'copy' instead $(CP) is now used alongside $(RM_F). Also, use 'copy' instead
of 'cp' where applicable, and applied other minor makefile changes. of 'cp' where applicable, and applied other minor makefile changes.
Don't warn about invalid dimensions exceeding user limits. Don't warn about invalid dimensions exceeding user limits.
Allow an easy replacement of the default pre-built configuration
header with a custom header, via the make PNGLIBCONF_H_PREBUILT
macro.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -31,6 +31,10 @@ AR= oml
# make directory command # make directory command
MKDIR= makedir MKDIR= makedir
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -43,8 +47,8 @@ $(AR) libpng.lib r $(OBJS)
$(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h $(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
pnglibconf.h: scripts/pnglibconf.h.prebuilt pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) scripts/pnglibconf.h.prebuilt pnglibconf.h $(CP) $< $@
pngtest: pngtest.o libpng.lib pngtest: pngtest.o libpng.lib
$(LN) <WITH < $(LN) <WITH <

View File

@ -29,6 +29,10 @@ LIBPATH=$(prefix)/lib
# you execute make install. # you execute make install.
DESTDIR= DESTDIR=
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\ OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
$(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\ $(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
$(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\ $(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
@ -44,7 +48,7 @@ $(LBR): $(OBJS)
$(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h $(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
pnglibconf.h: scripts/pnglibconf.h.prebuilt pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
cp $< $@ cp $< $@
pngtest.ttp: pngtest.o $(LBR) pngtest.ttp: pngtest.o $(LBR)

View File

@ -50,6 +50,10 @@ CFLAGS=-O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
# -M generate map file # -M generate map file
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG) LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
## Variables ## Variables
OBJS = \ OBJS = \
png.obj \ png.obj \
@ -112,9 +116,7 @@ test: pngtest.exe
## Minor Targets ## Minor Targets
# see scripts\pnglibconf.mak for how to make this file pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
# with different options
pnglibconf.h: scripts\pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h

View File

@ -69,6 +69,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -82,8 +86,7 @@ OBJSDLL = $(OBJS)
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
# try include scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -58,6 +58,10 @@ CFLAGS=-O2 -Z -X- -w -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
# -M generate map file # -M generate map file
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG) LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
## Variables ## Variables
OBJS = \ OBJS = \
@ -111,8 +115,8 @@ LIBNAME=libpng$(MODEL).lib
all: libpng pngtest all: libpng pngtest
# try !inlude scripts\pnglibconf.mak for more options # try !include scripts\pnglibconf.mak for more options
pnglibconf.h: scripts\pnglibconf.h.prebuilt pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
$(CP) $< $@ $(CP) $< $@
libpng: $(LIBNAME) libpng: $(LIBNAME)

View File

@ -63,6 +63,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -79,8 +83,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -58,6 +58,10 @@ CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=-std -w1 -O # -g CFLAGS=-std -w1 -O # -g
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -67,8 +71,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -22,6 +22,10 @@ RANLIB=ranlib
CP=cp CP=cp
RM_F=rm -f RM_F=rm -f
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
pngmem.o pngerror.o pngpread.o pngmem.o pngerror.o pngpread.o
@ -31,8 +35,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest all: libpng.a pngtest
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -83,6 +83,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -99,8 +103,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -39,6 +39,10 @@ DPADD+= ${LIBM} ${LIBZ}
CPPFLAGS+= -I. -I${ZLIBINC} CPPFLAGS+= -I. -I${ZLIBINC}
CFLAGS+= -W -Wall CFLAGS+= -W -Wall
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c pngwtran.c pngmem.c pngerror.c pngpread.c
@ -55,8 +59,7 @@ CLEANFILES= pngtest pngtest.o pngout.png
test: pngtest test: pngtest
./pngtest ./pngtest
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp $< $@ cp $< $@
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO

View File

@ -30,6 +30,10 @@ LIBS = -lz -lm
# File extensions # File extensions
EXEEXT = EXEEXT =
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
# Variables # Variables
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
@ -38,8 +42,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
# Targets # Targets
all: static all: static
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
.c.o: .c.o:

View File

@ -68,6 +68,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -84,8 +88,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -66,6 +66,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -82,8 +86,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -28,6 +28,10 @@ CPPFLAGS = -I$(ZLIBINC)
CFLAGS = -Mc -O2 -W3 CFLAGS = -Mc -O2 -W3
LDFLAGS = LDFLAGS =
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
# File extensions # File extensions
O=.obj O=.obj
A=.lib A=.lib
@ -46,8 +50,7 @@ LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
all: libpng$(A) pngtest$(E) all: libpng$(A) pngtest$(E)
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng$(A): $(OBJS) libpng$(A): $(OBJS)

View File

@ -38,6 +38,10 @@ LD=link
LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
CP=cp CP=cp
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
O=.obj O=.obj
OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \ OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \
@ -46,8 +50,7 @@ pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
all: test all: test
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h

View File

@ -39,14 +39,17 @@ RANLIB = ranlib
CP = cp CP = cp
RM_F = rm -f RM_F = rm -f
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
all: ansi2knr libpng.a pngtest all: ansi2knr libpng.a pngtest
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
# general rule to allow ansi2knr to work # general rule to allow ansi2knr to work

View File

@ -76,6 +76,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -92,8 +96,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -32,6 +32,10 @@ RANLIB=echo
CP=cp CP=cp
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -41,8 +45,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest all: libpng.a pngtest
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -19,6 +19,10 @@ LDFLAGS=/e/st:0x1500/noe
CP=copy CP=copy
O=.obj O=.obj
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
#uncomment next to put error messages in a file #uncomment next to put error messages in a file
ERRFILE= >> pngerrs ERRFILE= >> pngerrs
@ -29,8 +33,7 @@ OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
all: libpng.lib all: libpng.lib
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h

View File

@ -74,6 +74,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
# Variables # Variables
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \ pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
@ -82,8 +86,7 @@ OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
# Targets # Targets
all: static shared all: static shared
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
.c.o: .c.o:

View File

@ -37,8 +37,7 @@ CLEANFILES+=pngtest.o pngtest pnglibconf.h
.c.o: .c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp $< $@ cp $< $@
pngtest.o: pngtest.c pngtest.o: pngtest.c

View File

@ -26,6 +26,10 @@ MAN= libpng.3 libpngpf.3 png.5
CPPFLAGS+=-I${.CURDIR} CPPFLAGS+=-I${.CURDIR}
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
# We should be able to do something like this instead of the manual # We should be able to do something like this instead of the manual
# uncommenting, but it core dumps for me at the moment: # uncommenting, but it core dumps for me at the moment:
# .if ${MACHINE_ARCH} == "i386" # .if ${MACHINE_ARCH} == "i386"
@ -37,8 +41,7 @@ CLEANFILES+=pngtest.o pngtest pnglibconf.h
.c.o: .c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp $< $@ cp $< $@
pngtest.o: pngtest.c pngtest.o: pngtest.c

View File

@ -31,11 +31,14 @@ MAN= libpng.3 libpngpf.3 png.5
DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \ DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
libpng-manual.txt libpng-manual.txt
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
.c.o: .c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp $< $@ cp $< $@
pngtest.o: pngtest.c pngtest.o: pngtest.c

View File

@ -62,6 +62,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -78,8 +82,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -72,6 +72,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -81,8 +85,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest shared libpng.pc libpng-config all: libpng.a pngtest shared libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -75,6 +75,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -84,8 +88,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest shared libpng.pc libpng-config all: libpng.a pngtest shared libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -72,6 +72,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -88,8 +92,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -68,6 +68,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -84,8 +88,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -67,6 +67,10 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH) DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH) DM=$(DESTDIR)$(MANPATH)
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -83,8 +87,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -45,6 +45,10 @@ CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS = -O # -g CFLAGS = -O # -g
LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o

View File

@ -44,6 +44,10 @@ CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=-O # $(WARNMORE) CFLAGS=-O # $(WARNMORE)
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pngwtran.o pngmem.o pngerror.o pngpread.o
@ -53,8 +57,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest all: libpng.a pngtest
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
libpng.a: $(OBJS) libpng.a: $(OBJS)

View File

@ -14,6 +14,10 @@ LIB=tlib
LDFLAGS=-m$(MODEL) -L..\zlib LDFLAGS=-m$(MODEL) -L..\zlib
CP=copy CP=copy
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
O=.obj O=.obj
E=.exe E=.exe
@ -27,8 +31,7 @@ OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O)
all: libpng$(MODEL).lib pngtest$(E) all: libpng$(MODEL).lib pngtest$(E)
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts/pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
pngtest: pngtest$(E) pngtest: pngtest$(E)

View File

@ -22,6 +22,10 @@ ARFLAGS = -nologo
CP = copy CP = copy
RM = del RM = del
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
# File extensions # File extensions
O=.obj O=.obj
@ -37,8 +41,7 @@ OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
# Targets # Targets
all: libpng.lib all: libpng.lib
# see scripts/pnglibconf.mak for more options pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
pnglibconf.h: scripts\pnglibconf.h.prebuilt
$(CP) $< $@ $(CP) $< $@
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h