diff --git a/ANNOUNCE b/ANNOUNCE index fa4b81579..336daa539 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -46,6 +46,9 @@ Version 1.5.19beta03 [March 22, 2014] $(CP) is now used alongside $(RM_F). Also, use 'copy' instead of 'cp' where applicable, and applied other minor makefile changes. 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 (subscription required; visit diff --git a/CHANGES b/CHANGES index 6f757f701..39aff7e9e 100644 --- a/CHANGES +++ b/CHANGES @@ -4222,6 +4222,9 @@ Version 1.5.19beta03 [March 22, 2014] $(CP) is now used alongside $(RM_F). Also, use 'copy' instead of 'cp' where applicable, and applied other minor makefile changes. 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 (subscription required; visit diff --git a/scripts/makefile.amiga b/scripts/makefile.amiga index 228b5c22a..02671a97e 100644 --- a/scripts/makefile.amiga +++ b/scripts/makefile.amiga @@ -31,6 +31,10 @@ AR= oml # make directory command 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 \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.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 -pnglibconf.h: scripts/pnglibconf.h.prebuilt -$(CP) scripts/pnglibconf.h.prebuilt pnglibconf.h +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) + $(CP) $< $@ pngtest: pngtest.o libpng.lib $(LN) > pngerrs @@ -29,8 +33,7 @@ OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) all: libpng.lib -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h diff --git a/scripts/makefile.msys b/scripts/makefile.msys index e859198db..f21fc7d9d 100644 --- a/scripts/makefile.msys +++ b/scripts/makefile.msys @@ -74,6 +74,10 @@ DI=$(DESTDIR)$(INCPATH) DL=$(DESTDIR)$(LIBPATH) DM=$(DESTDIR)$(MANPATH) +# Pre-built configuration +# See scripts/pnglibconf.mak for more options +PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt + # Variables OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.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 all: static shared -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ .c.o: diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd index 143dd0512..5e65bfc3c 100644 --- a/scripts/makefile.ne12bsd +++ b/scripts/makefile.ne12bsd @@ -26,6 +26,10 @@ MAN= libpng.3 libpngpf.3 png.5 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 # uncommenting, but it core dumps for me at the moment: # .if ${MACHINE_ARCH} == "i386" @@ -37,8 +41,7 @@ CLEANFILES+=pngtest.o pngtest pnglibconf.h .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) cp $< $@ pngtest.o: pngtest.c diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd index 4230da6a9..ec73e11cb 100644 --- a/scripts/makefile.netbsd +++ b/scripts/makefile.netbsd @@ -26,6 +26,10 @@ MAN= libpng.3 libpngpf.3 png.5 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 # uncommenting, but it core dumps for me at the moment: # .if ${MACHINE_ARCH} == "i386" @@ -37,8 +41,7 @@ CLEANFILES+=pngtest.o pngtest pnglibconf.h .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) cp $< $@ pngtest.o: pngtest.c diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd index 1d41b5e60..33dee6585 100644 --- a/scripts/makefile.openbsd +++ b/scripts/makefile.openbsd @@ -31,11 +31,14 @@ MAN= libpng.3 libpngpf.3 png.5 DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \ libpng-manual.txt +# Pre-built configuration +# See scripts/pnglibconf.mak for more options +PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt + .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) cp $< $@ pngtest.o: pngtest.c diff --git a/scripts/makefile.sco b/scripts/makefile.sco index 99743b89c..c247b5a3f 100644 --- a/scripts/makefile.sco +++ b/scripts/makefile.sco @@ -62,6 +62,10 @@ DI=$(DESTDIR)$(INCPATH) DL=$(DESTDIR)$(LIBPATH) 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 \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.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 -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ libpng.a: $(OBJS) diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc index e840c7fe0..433e43c29 100644 --- a/scripts/makefile.sggcc +++ b/scripts/makefile.sggcc @@ -72,6 +72,10 @@ DI=$(DESTDIR)$(INCPATH) DL=$(DESTDIR)$(LIBPATH) 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 \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.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 -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ libpng.a: $(OBJS) diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi index 0e87abb6f..3668c57de 100644 --- a/scripts/makefile.sgi +++ b/scripts/makefile.sgi @@ -75,6 +75,10 @@ DI=$(DESTDIR)$(INCPATH) DL=$(DESTDIR)$(LIBPATH) 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 \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.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 -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ libpng.a: $(OBJS) diff --git a/scripts/makefile.so9 b/scripts/makefile.so9 index 67326a796..ee2652c45 100644 --- a/scripts/makefile.so9 +++ b/scripts/makefile.so9 @@ -72,6 +72,10 @@ DI=$(DESTDIR)$(INCPATH) DL=$(DESTDIR)$(LIBPATH) 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 \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.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 -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ libpng.a: $(OBJS) diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris index 3e138c215..1172c7180 100644 --- a/scripts/makefile.solaris +++ b/scripts/makefile.solaris @@ -68,6 +68,10 @@ DI=$(DESTDIR)$(INCPATH) DL=$(DESTDIR)$(LIBPATH) 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 \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.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 -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ libpng.a: $(OBJS) diff --git a/scripts/makefile.solaris-x86 b/scripts/makefile.solaris-x86 index f75ba2686..90149ebbb 100644 --- a/scripts/makefile.solaris-x86 +++ b/scripts/makefile.solaris-x86 @@ -67,6 +67,10 @@ DI=$(DESTDIR)$(INCPATH) DL=$(DESTDIR)$(LIBPATH) 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 \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.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 -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ libpng.a: $(OBJS) diff --git a/scripts/makefile.std b/scripts/makefile.std index db731c9be..75bb2de62 100644 --- a/scripts/makefile.std +++ b/scripts/makefile.std @@ -45,6 +45,10 @@ CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS = -O # -g 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 \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ pngwtran.o pngmem.o pngerror.o pngpread.o diff --git a/scripts/makefile.sunos b/scripts/makefile.sunos index ce2a7f2e2..df661bf83 100644 --- a/scripts/makefile.sunos +++ b/scripts/makefile.sunos @@ -44,6 +44,10 @@ CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5 CFLAGS=-O # $(WARNMORE) 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 \ pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.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 -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ libpng.a: $(OBJS) diff --git a/scripts/makefile.tc3 b/scripts/makefile.tc3 index 43f8a84f3..e4744a774 100644 --- a/scripts/makefile.tc3 +++ b/scripts/makefile.tc3 @@ -14,6 +14,10 @@ LIB=tlib LDFLAGS=-m$(MODEL) -L..\zlib CP=copy +# Pre-built configuration +# See scripts/pnglibconf.mak for more options +PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt + O=.obj E=.exe @@ -27,8 +31,7 @@ OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O) all: libpng$(MODEL).lib pngtest$(E) -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts/pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ pngtest: pngtest$(E) diff --git a/scripts/makefile.vcwin32 b/scripts/makefile.vcwin32 index 4b9c7d706..b17f6a46f 100644 --- a/scripts/makefile.vcwin32 +++ b/scripts/makefile.vcwin32 @@ -22,6 +22,10 @@ ARFLAGS = -nologo CP = copy RM = del +# Pre-built configuration +# See scripts/pnglibconf.mak for more options +PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt + # File extensions O=.obj @@ -37,8 +41,7 @@ OBJS = $(OBJS1) $(OBJS2) $(OBJS3) # Targets all: libpng.lib -# see scripts/pnglibconf.mak for more options -pnglibconf.h: scripts\pnglibconf.h.prebuilt +pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) $(CP) $< $@ png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h