summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2002-05-21 18:06:08 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-04-06 16:07:10 -0500
commitcfbed9bdf200652db330ccefdc3ba0e4b4d20d25 (patch)
tree4ee2f68a973a4bbca99d72848caad7659aec1e96 /scripts
parent22f28966c467c174eabf5735e0ed852021d62539 (diff)
downloadlibpng-cfbed9bdf200652db330ccefdc3ba0e4b4d20d25.tar.gz
Imported from libpng-1.2.3.tarv1.2.3
Diffstat (limited to 'scripts')
-rwxr-xr-x[-rw-r--r--]scripts/libpng-config-body.in0
-rwxr-xr-x[-rw-r--r--]scripts/libpng-config-head.in2
-rw-r--r--scripts/libpng.pc.in2
-rw-r--r--scripts/makefile.32sunu98
-rw-r--r--scripts/makefile.64sunu98
-rw-r--r--scripts/makefile.aix28
-rw-r--r--scripts/makefile.beos100
-rw-r--r--scripts/makefile.cygwin120
-rw-r--r--scripts/makefile.darwin104
-rw-r--r--scripts/makefile.dec100
-rw-r--r--scripts/makefile.freebsd111
-rw-r--r--scripts/makefile.gcmmx98
-rw-r--r--scripts/makefile.hpgcc106
-rw-r--r--scripts/makefile.hpux100
-rw-r--r--scripts/makefile.linux99
-rw-r--r--scripts/makefile.macosx92
-rw-r--r--scripts/makefile.ne12bsd2
-rw-r--r--scripts/makefile.netbsd2
-rw-r--r--scripts/makefile.openbsd2
-rw-r--r--scripts/makefile.sco106
-rw-r--r--scripts/makefile.sggcc110
-rw-r--r--scripts/makefile.sgi98
-rw-r--r--scripts/makefile.so9103
-rw-r--r--scripts/makefile.solaris102
-rw-r--r--scripts/pngdef.pas2
-rw-r--r--scripts/pngos2.def2
26 files changed, 850 insertions, 937 deletions
diff --git a/scripts/libpng-config-body.in b/scripts/libpng-config-body.in
index ad3697f4f..ad3697f4f 100644..100755
--- a/scripts/libpng-config-body.in
+++ b/scripts/libpng-config-body.in
diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in
index 5196c43a2..ebbfe7f80 100644..100755
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -8,7 +8,7 @@
# Modeled after libxml-config.
-version=1.2.3rc6
+version=1.2.3
prefix=""
cppflags=""
cflags=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index 4024c6e68..81e37107c 100644
--- a/scripts/libpng.pc.in
+++ b/scripts/libpng.pc.in
@@ -6,6 +6,6 @@ includedir=${exec_prefix}/include
Name: libpng12
Description: Loads and saves PNG files
-Version: 1.2.3rc6
+Version: 1.2.3
Libs: -L${libdir} -lpng12 -lz -lm
Cflags: -I${includedir}/libpng12
diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu
index 25db68989..58efd8332 100644
--- a/scripts/makefile.32sunu
+++ b/scripts/makefile.32sunu
@@ -33,7 +33,7 @@ RANLIB=echo
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
@@ -51,6 +51,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
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
@@ -110,68 +115,63 @@ test: pngtest
./pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm $(DI)/libpng
+ (cd $(DI); ln -f -s $(LIBNAME) libpng; \
ln -f -s $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -f -s $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s libpng12.pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig
+ -@/bin/rm -f $(DL)/pkgconfig/libpng12.pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/libpng12.pc
+ chmod 644 $(DL)/pkgconfig/libpng12.pc
+ (cd $(DL)/pkgconfig; ln -f -s libpng12.pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng12-config
- cp libpng-config $(DESTDIR)$(BINPATH)/libpng12-config
- chmod 755 $(DESTDIR)$(BINPATH)/libpng12-config
- (cd $(DESTDIR)$(BINPATH); ln -sf libpng12-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/libpng12-config
+ cp libpng-config $(DB)/libpng12-config
+ chmod 755 $(DB)/libpng12-config
+ (cd $(DB); ln -sf libpng12-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu
index 323f5475c..d6c89cd98 100644
--- a/scripts/makefile.64sunu
+++ b/scripts/makefile.64sunu
@@ -33,7 +33,7 @@ RANLIB=echo
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
@@ -51,6 +51,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
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
@@ -110,68 +115,63 @@ test: pngtest
./pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm $(DI)/libpng
+ (cd $(DI); ln -f -s $(LIBNAME) libpng; \
ln -f -s $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -f -s $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.aix b/scripts/makefile.aix
index 857851529..f5a75a50d 100644
--- a/scripts/makefile.aix
+++ b/scripts/makefile.aix
@@ -16,10 +16,8 @@ AR = ar rcs
RANLIB = ranlib
RM = rm -f
-# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
-# have to change it.
PNGMAJ = 0
-PNGMIN = 1.2.3rc4
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local
@@ -36,6 +34,9 @@ LIBPATH=$(prefix)/lib
# you execute make install.
DESTDIR=
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+
CDEBUG = -g -DPNG_DEBUG=5
LDDEBUG =
CRELEASE = -O2
@@ -67,17 +68,16 @@ pngtest$(E): pngtest$(O) libpng$(A)
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
install: libpng.a
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/libpng ]; then mkdir \
- $(DESTDIR)$(INCPATH)/libpng; fi
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@rm $(DESTDIR)$(INCPATH)/png.h
- -@rm $(DESTDIR)$(INCPATH)/pngconf.h
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/libpng
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h \
- $(DESTDIR)$(INCPATH)/libpng/pngconf.h
- (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
- cp libpng.a $(DESTDIR)$(LIBPATH)
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/libpng ]; then mkdir $(DI)/libpng; fi
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@rm $(DI)/png.h
+ -@rm $(DI)/pngconf.h
+ cp png.h pngconf.h $(DI)/libpng
+ chmod 644 $(DI)/libpng/png.h \
+ $(DI)/libpng/pngconf.h
+ (cd $(DI); ln -f -s libpng/* .)
+ cp libpng.a $(DL)
clean:
/bin/rm -f *.o libpng.a pngtest pngout.png
diff --git a/scripts/makefile.beos b/scripts/makefile.beos
index 5f7e4bc05..90793c4f9 100644
--- a/scripts/makefile.beos
+++ b/scripts/makefile.beos
@@ -11,10 +11,8 @@ CC=gcc
ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include
-# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
-# have to change it.
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
ALIGN=
@@ -52,6 +50,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
LIBNAME=libpng12
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
@@ -100,67 +103,62 @@ test: pngtest
./pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.cygwin b/scripts/makefile.cygwin
index 6e78b92b5..d406afb41 100644
--- a/scripts/makefile.cygwin
+++ b/scripts/makefile.cygwin
@@ -1,15 +1,16 @@
# makefile for cygwin on x86
-# builds both dll (with import lib) and static lib versions
+# Builds both dll (with import lib) and static lib versions
# of the library, and builds two copies of pngtest: one
# statically linked and one dynamically linked.
#
+# Copyright (C) 2002 Soren Anderson, Charles Wilson, and Glenn Randers-Pehrson
# based on makefile for linux-elf w/mmx by:
# Copyright (C) 1998-2000 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
# For conditions of distribution and use, see copyright notice in png.h
-# this makefile intends to support building outside the src directory
-# if desired. when invoking it, specify an argument to SRCDIR on the
+# This makefile intends to support building outside the src directory
+# if desired. When invoking it, specify an argument to SRCDIR on the
# command line that points to the top of the directory where your source
# is located.
@@ -19,7 +20,7 @@ else
SRCDIR = .
endif
-# override DESTDIR= on the make install command line to easily support
+# Override DESTDIR= on the make install command line to easily support
# installing into a temporary location. Example:
#
# make install DESTDIR=/tmp/build/libpng
@@ -30,12 +31,9 @@ endif
DESTDIR=
-# cosmetic: shortened strings:
-S =$(SRCDIR)
-D =$(DESTDIR)
-
# To enable assembler optimizations, add '-DPNG_USE_PNGGCCRD' to
-# $CFLAGS, and include pnggccrd.o in $OBJS, below.
+# $CFLAGS, and include pnggccrd.o in $OBJS, below, and in the dependency
+# list at the bottom of this makefile.
CC=gcc
ifdef MINGW
@@ -43,7 +41,7 @@ MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw
MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
endif
-# where "make install" puts libpng.a, libpng.so*, png.h, and pngconf.h
+# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h
ifndef prefix
prefix=/usr
$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr")
@@ -81,7 +79,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng12
PNGMAJ = 0
PNGDLL = 12
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(PNGDLL).dll
@@ -107,6 +105,13 @@ MANPATH=$(prefix)/man
MAN3PATH=$(MANPATH)/man3
MAN5PATH=$(MANPATH)/man5
+# cosmetic: shortened strings:
+S =$(SRCDIR)
+D =$(DESTDIR)
+DB =$(D)/$(BINPATH)
+DI =$(D)/$(INCPATH)
+DL =$(D)/$(LIBPATH)
+
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 # pnggccrd.o
@@ -123,7 +128,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: all-static all-shared libpng.pc libpng-config
-# make this to verify that "make [...] install" will do what you want.
+# Make this to verify that "make [...] install" will do what you want.
buildsetup-tell:
@echo VPATH is set to: \"$(VPATH)\"
@echo prefix is set to: \"$(prefix)\"
@@ -134,9 +139,10 @@ buildsetup-tell:
libpng.pc: scripts/libpng.pc.in
@echo -e Making pkg-config file for this libpng installation..'\n' \
using PREFIX=\"$(prefix)\"'\n'
- cat $(S)/scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+ cat $(S)/scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \
+ sed -e s/-lm// > libpng.pc
-libpng-config: scripts/libpng-config.in
+libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in
@echo -e Making $(LIBNAME) libpng-config file for this libpng \
installation..'\n' using PREFIX=\"$(prefix)\"'\n'
( cat $(S)/scripts/libpng-config-head.in; \
@@ -155,15 +161,15 @@ all-shared: $(SHAREDLIB) pngtest$(EXE)
pnggccrd.o: pnggccrd.c png.h pngconf.h
@echo ""
- @echo ' You can ignore the single "control reaches end of non-void function"'
- @echo ' warning and multiple "<variable> defined but not used" warnings:'
+ @echo ' You can ignore the "control reaches end of non-void function"'
+ @echo ' warning and "<variable> defined but not used" warnings:'
@echo ""
$(CC) -c $(CFLAGS) -o $@ $<
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
@echo ""
- @echo ' You can ignore the single "control reaches end of non-void function"'
- @echo ' warning and multiple "<variable> defined but not used" warnings:'
+ @echo ' You can ignore the "control reaches end of non-void function"'
+ @echo ' warning and "<variable> defined but not used" warnings:'
@echo ""
$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
@@ -199,62 +205,56 @@ test-shared: pngtest$(EXE)
./pngtest $(S)/pngtest.png
install-static: $(STATLIB) install-headers install-man
- -@if [ ! -d $(D)$(LIBPATH) ]; then $(MKDIR) $(D)$(LIBPATH); fi
- install -m 644 $(STATLIB) $(D)$(LIBPATH)/$(LIBNAME).a
- -@rm -f $(D)$(LIBPATH)/$(STATLIB)
- (cd $(D)$(LIBPATH); ln -sf $(LIBNAME).a $(STATLIB))
+ -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi
+ install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a
+ -@rm -f $(DL)/$(STATLIB)
+ (cd $(DL); ln -sf $(LIBNAME).a $(STATLIB))
install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
- -@if [ ! -d $(D)$(LIBPATH) ]; then $(MKDIR) $(D)$(LIBPATH); fi
- -@if [ ! -d $(D)$(BINPATH) ]; then $(MKDIR) $(D)$(BINPATH); fi
- -@if [ ! -d $(D)$(LIBPATH)/pkgconfig ]; then \
- $(MKDIR) $(D)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(D)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(D)$(LIBPATH)/pkgconfig/libpng.pc
- install -m 644 $(IMPLIB) $(D)$(LIBPATH)/$(LIBNAME).dll.a
- -@rm -f $(D)$(LIBPATH)/$(IMPLIB)
- (cd $(D)$(LIBPATH); ln -sf $(LIBNAME).dll.a $(IMPLIB))
- install -s -m 755 $(SHAREDLIB) $(D)$(BINPATH)
- install -m 644 libpng.pc $(D)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(D)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi
+ -@if [ ! -d $(DB) ]; then $(MKDIR) $(DB); fi
+ -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR) $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a
+ -@rm -f $(DL)/$(IMPLIB)
+ (cd $(DL); ln -sf $(LIBNAME).dll.a $(IMPLIB))
+ install -s -m 755 $(SHAREDLIB) $(DB)
+ install -m 644 libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-headers:
- -@if [ ! -d $(D)$(INCPATH) ]; then \
- $(MKDIR) $(D)$(INCPATH); fi
- -@if [ ! -d $(D)$(INCPATH)/$(LIBNAME) ]; then \
- $(MKDIR) $(D)$(INCPATH)/$(LIBNAME); fi
- -@rm -f $(D)$(INCPATH)/png.h
- -@rm -f $(D)$(INCPATH)/pngconf.h
- install -m 644 $(S)/png.h $(S)/pngconf.h $(D)$(INCPATH)/$(LIBNAME)
- -@rm -f $(D)$(INCPATH)/libpng
- (cd $(D)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+ -@if [ ! -d $(DI) ]; then $(MKDIR) $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR) $(DI)/$(LIBNAME); fi
+ -@rm -f $(DI)/png.h
+ -@rm -f $(DI)/pngconf.h
+ install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME)
+ -@rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
install-man:
- -@if [ ! -d $(D)$(MAN3PATH) ]; then \
- $(MKDIR) $(D)$(MAN3PATH); fi
- -@if [ ! -d $(D)$(MAN5PATH) ]; then \
- $(MKDIR) $(D)$(MAN5PATH); fi
+ -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR) $(D)$(MAN3PATH); fi
+ -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR) $(D)$(MAN5PATH); fi
install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH)
install -m 644 $(S)/png.5 $(D)$(MAN5PATH)
install-config: libpng-config
- -@if [ ! -d $(D)$(BINPATH) ]; then \
- mkdir $(D)$(BINPATH); fi
- -@/bin/rm -f $(D)$(BINPATH)/libpng-config
- -@/bin/rm -f $(D)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(D)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(D)$(BINPATH)/$(LIBNAME)-config
- (cd $(D)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
-
-# run this to verify that a future `configure' run will pick up the settings
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
+
+# Run this to verify that a future `configure' run will pick up the settings
# you want.
test-config-install: SHELL=/bin/bash
-test-config-install: $(D)$(BINPATH)/libpng-config
+test-config-install: $(DB)/libpng-config
@echo -e Testing libpng-config functions...'\n'
@ for TYRA in LDFLAGS CPPFLAGS CFLAGS LIBS VERSION; \
do \
- printf "(%d)\t %s = %s\n" $$(($$gytiu + 1)) $$TYRA \
- "$$($(D)$(BINPATH)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \
+ printf "(%d)\t %10s =%s\n" $$(($$gytiu + 1)) $$TYRA \
+ "$$($(DB)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \
gytiu=$$(( $$gytiu + 1 )); \
done
@@ -295,5 +295,3 @@ pngtest-stat.o: png.h pngconf.h pngtest.c
-
-
diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin
index 4e8901ebb..05388ceca 100644
--- a/scripts/makefile.darwin
+++ b/scripts/makefile.darwin
@@ -17,15 +17,13 @@ ZLIBINC=../zlib
CC=cc
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
#RANLIB=echo
RANLIB=ranlib
-# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
-# have to change it.
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -44,6 +42,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
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,7 +86,7 @@ $(LIBNAME).$(PNGMAJ).dylib: $(LIBNAME).$(PNGVER).dylib
$(LIBNAME).$(PNGVER).dylib: $(OBJSDLL)
$(CC) -dynamiclib \
- -install_name $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
+ -install_name $(DL)/$(LIBNAME).$(PNGMAJ).dylib \
-current_version $(PNGMIN) -compatibility_version $(PNGMIN) \
-o $(LIBNAME).$(PNGVER).dylib \
$(OBJSDLL) -L$(ZLIBLIB) -lz
@@ -95,67 +98,62 @@ test: pngtest
./pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).dylib libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGMAJ)*.dylib
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).dylib
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.dylib
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.3.dylib
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.3.*.dylib
- cp $(LIBNAME).$(PNGVER).dylib $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGVER).dylib
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib
+ -@/bin/rm -f $(DL)/$(LIBNAME).dylib
+ -@/bin/rm -f $(DL)/libpng.dylib
+ -@/bin/rm -f $(DL)/libpng.3.dylib
+ -@/bin/rm -f $(DL)/libpng.3.*.dylib
+ cp $(LIBNAME).$(PNGVER).dylib $(DL)
+ chmod 755 $(DL)/$(LIBNAME).$(PNGVER).dylib
+ (cd $(DL); \
ln -sf $(LIBNAME).$(PNGVER).dylib libpng.dylib; \
ln -sf $(LIBNAME).$(PNGVER).dylib libpng.3.dylib; \
ln -sf $(LIBNAME).$(PNGVER).dylib libpng.3.$(PNGMIN).dylib; \
ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib; \
ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.dec b/scripts/makefile.dec
index 1dbf3b8b1..5c6a9d96c 100644
--- a/scripts/makefile.dec
+++ b/scripts/makefile.dec
@@ -20,16 +20,19 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
ZLIBLIB=../zlib
ZLIBINC=../zlib
-# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
-# have to change it.
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -79,67 +82,62 @@ test: pngtest
./pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.freebsd b/scripts/makefile.freebsd
index 717e755d5..d7d5faedd 100644
--- a/scripts/makefile.freebsd
+++ b/scripts/makefile.freebsd
@@ -1,107 +1,48 @@
# makefile for libpng under FreeBSD
# Copyright (C) 2002 Glenn Randers-Pehrson and Andrey A. Chernov
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# For conditions of distribution and use, see copyright notice in png.h
-.include <bsd.own.mk>
+PREFIX?= /usr/local
+SHLIB_VER?= 5
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, that location must already exist before
-# you execute make install.
-DESTDIR=
+LIB= png
+SHLIB_MAJOR= ${SHLIB_VER}
+SHLIB_MINOR= 0
+NOPROFILE= YES
+NOOBJ= YES
-PNGMAJ= 5
-.if (${OBJFORMAT} == "elf")
-PNGVER= $(PNGMAJ)
-.else
-PNGMIN= 0
-PNGVER= $(PNGMAJ).$(PNGMIN)
-.endif
+# where make install puts libpng.a and png.h
+DESTDIR= ${PREFIX}
+LIBDIR= /lib
+INCS= png.h pngconf.h
+INCSDIR= /include/libpng
+INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
+MAN= libpng.3 libpngpf.3 png.5
+MANDIR= /man/man
+SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
+ libpng/pngconf.h ${INCSDIR}/../pngconf.h
+LDADD+= -lm -lz
+DPADD+= ${LIBM} ${LIBZ}
CFLAGS+= -I. -DPNG_USE_PNGGCCRD
.if (${MACHINE_ARCH} != "i386")
CFLAGS+= -DPNG_NO_ASSEMBLER_CODE
.endif
-LDFLAGS+=-L. -lpng -lz -lm -static
-
-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 pnggccrd.o
-
-.SUFFIXES: .c .so .o
-
-.c.so:
- ${CC} ${CFLAGS} -fPIC -DPIC -o $@ -c $<
-
-all: libpng.a libpng.so.${PNGVER} pngtest
-libpng.a: $(OBJS)
- ar rc $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.so.${PNGVER}: $(OBJS:S/o$/so/g)
-.if (${OBJFORMAT} == "elf")
- ${CC} -shared -Wl,-x,-soname,$@ -o $@ $(OBJS:S/o$/so/g) -lz -lm
-.else
- ${CC} -shared -Wl,-x -o $@ $(OBJS:S/o$/so/g) -lz -lm
-.endif
+SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
+ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
+ pngwtran.c pngmem.c pngerror.c pngpread.c pnggccrd.c
pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+ ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm
+
+CLEANFILES= pngtest pngtest.o pngout.png
test: pngtest
./pngtest
-install: libpng.a libpng.so.${PNGVER}
- -@mkdir $(DESTDIR)$(INCPATH)/libpng
- ${INSTALL} -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \
- png.h pngconf.h $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); rm -f png.h pngconf.h; ln -sf libpng/*.h .)
- ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- libpng.a libpng.so.${PNGVER} $(DESTDIR)$(LIBPATH)
- $(RANLIB) $(DESTDIR)$(LIBPATH)/libpng.a
- ln -sf libpng.so.${PNGVER} $(DESTDIR)$(LIBPATH)/libpng.so
- /sbin/ldconfig -R
- ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
- libpng.3 libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
- png.5 $(DESTDIR)$(MANPATH)/man5
-
-clean:
- rm -f *.o *.so libpng.a libpng.so.${PNGVER} pngtest pngout.png
-
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:
chmod a-w *.[ch35] $(DOCS) scripts/*
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h
-pngerror.o: png.h pngconf.h
-pngrio.o: png.h pngconf.h
-pngwio.o: png.h pngconf.h
-pngmem.o: png.h pngconf.h
-pngset.o: png.h pngconf.h
-pngget.o: png.h pngconf.h
-pngread.o: png.h pngconf.h
-pngrtran.o: png.h pngconf.h
-pngrutil.o: png.h pngconf.h
-pngtest.o: png.h pngconf.h
-pngtrans.o: png.h pngconf.h
-pngwrite.o: png.h pngconf.h
-pngwtran.o: png.h pngconf.h
-pngwutil.o: png.h pngconf.h
-pngpread.o: png.h pngconf.h
-pnggccrd.o: png.h pngconf.h
-
+.include <bsd.lib.mk>
diff --git a/scripts/makefile.gcmmx b/scripts/makefile.gcmmx
index a7cac2c0f..abde79c1f 100644
--- a/scripts/makefile.gcmmx
+++ b/scripts/makefile.gcmmx
@@ -15,7 +15,7 @@
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc
@@ -75,6 +75,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
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 pnggccrd.o
@@ -139,67 +144,62 @@ test: pngtest pngtest-static
./pngtest-static
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc
index 5e8bc27aa..6f78470ea 100644
--- a/scripts/makefile.hpgcc
+++ b/scripts/makefile.hpgcc
@@ -26,16 +26,14 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
+#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
RANLIB=ranlib
#RANLIB=echo
-# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
-# have to change it.
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -54,6 +52,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
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
@@ -102,68 +105,63 @@ test: pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then \
- mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).sl.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).sl
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).sl.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER)
+ (cd $(DL); \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.3; \
ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.3.$(PNGMIN); \
ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then mkdir \
- $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir \
+ $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux
index 9c9b9ccd4..4a307100f 100644
--- a/scripts/makefile.hpux
+++ b/scripts/makefile.hpux
@@ -16,10 +16,8 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
RANLIB=ranlib
-# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
-# have to change it.
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -40,6 +38,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
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,67 +91,62 @@ test: pngtest
./pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.sl
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.sl.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.sl.3.*
- cp $(LIBNAME).sl.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).sl.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).sl
+ -@/bin/rm -f $(DL)/libpng.sl
+ -@/bin/rm -f $(DL)/libpng.sl.3
+ -@/bin/rm -f $(DL)/libpng.sl.3.*
+ cp $(LIBNAME).sl.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER)
+ (cd $(DL); \
ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl; \
ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.3; \
ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.3.$(PNGMIN); \
ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index 8ab6e7784..e8637accf 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -5,7 +5,7 @@
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc
@@ -54,6 +54,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
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
@@ -112,67 +117,63 @@ test: pngtest pngtest-static
./pngtest-static
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then mkdir \
- $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir \
+ $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.macosx b/scripts/makefile.macosx
index b8c916a0b..16c3cce83 100644
--- a/scripts/makefile.macosx
+++ b/scripts/makefile.macosx
@@ -17,7 +17,7 @@ ZLIBINC=../zlib
CC=cc
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
@@ -42,6 +42,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
#RANLIB=echo
RANLIB=ranlib
@@ -81,35 +86,34 @@ test: pngtest
./pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -f -s $(LIBNAME) libpng; \
ln -f -s $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -f -s $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGMAJ)*.$(SHAREDLIB_POSTFIX)
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(SHAREDLIB_POSTFIX)
+ $(DL)/$(LIBNAME).$(PNGMAJ)*.$(SHAREDLIB_POSTFIX)
+ -@/bin/rm -f $(DL)/$(LIBNAME).$(SHAREDLIB_POSTFIX)
-@/bin/rm -f libpng.$(SHARED_POSTFIX)
-@/bin/rm -f libpng.3.$(SHARED_POSTFIX)
-@/bin/rm -f libpng.3.*.$(SHARED_POSTFIX)
- cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
- (cd $(DESTDIR)$(LIBPATH); \
+ cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
+ (cd $(DL); \
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) \
libpng.$(SHARED_POSTFIX); \
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) \
@@ -120,35 +124,31 @@ install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) libpng
$(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \
ln -f -s $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \
$(LIBNAME).$(SHAREDLIB_POSTFIX))
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
index cbb0a6227..6f47a5b64 100644
--- a/scripts/makefile.ne12bsd
+++ b/scripts/makefile.ne12bsd
@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng12
LIB= png12
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.2.3rc6
+SHLIB_MINOR= 1.2.3
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd
index eea55f807..705647880 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng
LIB= png
SHLIB_MAJOR= 3
-SHLIB_MINOR= 1.2.3rc6
+SHLIB_MINOR= 1.2.3
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd
index fdd830da5..0edaee0f6 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -7,7 +7,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.2.3rc4
+SHLIB_MINOR= 1.2.3
LIB= png
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/makefile.sco b/scripts/makefile.sco
index 08d556d99..061e3e24d 100644
--- a/scripts/makefile.sco
+++ b/scripts/makefile.sco
@@ -18,15 +18,13 @@ ZLIBLIB=../zlib
ZLIBINC=../zlib
CFLAGS= -dy -belf -I$(ZLIBINC) -O3
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
#RANLIB=ranlib
RANLIB=echo
-# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
-# have to change it.
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -45,6 +43,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
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
@@ -93,70 +96,65 @@ test: pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/pngconf.h
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ -@/bin/rm -f $(DI)/png.h
+ -@/bin/rm -f $(DI)/pngconf.h
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -f -s $(LIBNAME) libpng; \
ln -f -s $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -f -s $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc
index 985a355cf..d1c6e7eca 100644
--- a/scripts/makefile.sggcc
+++ b/scripts/makefile.sggcc
@@ -5,18 +5,6 @@
# where make install puts libpng.a and png.h
prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, that location must already exist before
-# you execute make install.
-DESTDIR=
# Where the zlib library and include files are located
ZLIBLIB=/usr/local/lib32
@@ -38,7 +26,7 @@ LDSHARED=CC $(ABI) -shared
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBS=$(LIBNAME).so.$(PNGVER)
INCPATH=$(prefix)/include
@@ -56,6 +44,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
RANLIB=echo
#RANLIB=ranlib
@@ -97,68 +90,63 @@ test: pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; \
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; \
ln -sf $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi
index e8b64910f..8c0d557e2 100644
--- a/scripts/makefile.sgi
+++ b/scripts/makefile.sgi
@@ -31,7 +31,7 @@ LDSHARED=cc $(ABI) -shared
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
RANLIB=echo
@@ -54,6 +54,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
OBJS = pnggccrd.o 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
@@ -93,68 +98,63 @@ test: pngtest
./pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; \
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -sf $(LIBNAME) libpng; \
ln -sf $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.so9 b/scripts/makefile.so9
index a0675d7af..249b16844 100644
--- a/scripts/makefile.so9
+++ b/scripts/makefile.so9
@@ -28,15 +28,13 @@ ZLIBINC=/usr/include
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
#CFLAGS=-I$(ZLIBINC) -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5
CFLAGS=-I$(ZLIBINC) -O3
-LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng -lz -lm
+LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
#RANLIB=ranlib
RANLIB=echo
-# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
-# have to change it.
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -55,6 +53,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
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
@@ -114,68 +117,64 @@ test: pngtest
./pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng)
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -f -s $(LIBNAME) libpng)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DI); ln -f -s $(LIBNAME) libpng; \
ln -f -s $(LIBNAME)/* .)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then mkdir \
- $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir \
+ $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris
index 3e6628498..6e678b7a7 100644
--- a/scripts/makefile.solaris
+++ b/scripts/makefile.solaris
@@ -24,15 +24,13 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
CFLAGS=-I$(ZLIBINC) -Wall -O3 \
# $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng -lz -lm
+LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
#RANLIB=ranlib
RANLIB=echo
-# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
-# have to change it.
PNGMAJ = 0
-PNGMIN = 1.2.3rc6
+PNGMIN = 1.2.3
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -51,6 +49,11 @@ BINPATH=$(prefix)/bin
# you execute make install.
DESTDIR=
+DB=$(DESTDIR)/$(BINPATH)
+DI=$(DESTDIR)/$(INCPATH)
+DL=$(DESTDIR)/$(LIBPATH)
+DM=$(DESTDIR)/$(MANPATH)
+
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
@@ -111,68 +114,63 @@ test: pngtest
./pngtest
install-headers: png.h pngconf.h
- -@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
- -@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
- mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
- cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
- chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
- $(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
- -@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
- (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
+ -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+ -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+ cp png.h pngconf.h $(DI)/$(LIBNAME)
+ chmod 644 $(DI)/$(LIBNAME)/png.h \
+ $(DI)/$(LIBNAME)/pngconf.h
+ -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+ -@/bin/rm -f $(DI)/libpng
+ (cd $(DI); ln -f -s $(LIBNAME) libpng; \
ln -f -s $(LIBNAME)/* .)
install-static: install-headers libpng.a
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
- (cd $(DESTDIR)$(LIBPATH); ln -f -s $(LIBNAME).a libpng.a)
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ cp libpng.a $(DL)/$(LIBNAME).a
+ chmod 644 $(DL)/$(LIBNAME).a
+ -@/bin/rm -f $(DL)/libpng.a
+ (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
- -@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* \
- $(DESTDIR)$(LIBPATH)/$(LIBNAME).so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.so.3.*
- cp $(LIBNAME).so.$(PNGVER) $(DESTDIR)$(LIBPATH)
- chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).so.$(PNGVER)
- (cd $(DESTDIR)$(LIBPATH); \
+ -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+ -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
+ $(DL)/$(LIBNAME).so
+ -@/bin/rm -f $(DL)/libpng.so
+ -@/bin/rm -f $(DL)/libpng.so.3
+ -@/bin/rm -f $(DL)/libpng.so.3.*
+ cp $(LIBNAME).so.$(PNGVER) $(DL)
+ chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+ (cd $(DL); \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ))
- -@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
- mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
- cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
- (cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
+ -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+ -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+ -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+ cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+ chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+ (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man3; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
- cp libpng.3 $(DESTDIR)$(MANPATH)/man3
- cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
- -@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
- mkdir $(DESTDIR)$(MANPATH)/man5; fi
- -@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
- cp png.5 $(DESTDIR)$(MANPATH)/man5
+ -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+ -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+ -@/bin/rm -f $(DM)/man3/libpng.3
+ -@/bin/rm -f $(DM)/man3/libpngpf.3
+ cp libpng.3 $(DM)/man3
+ cp libpngpf.3 $(DM)/man3
+ -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+ -@/bin/rm -f $(DM)/man5/png.5
+ cp png.5 $(DM)/man5
install-config: libpng-config
- -@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
- mkdir $(DESTDIR)$(BINPATH); fi
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
- -@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
- (cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
+ -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+ -@/bin/rm -f $(DB)/libpng-config
+ -@/bin/rm -f $(DB)/$(LIBNAME)-config
+ cp libpng-config $(DB)/$(LIBNAME)-config
+ chmod 755 $(DB)/$(LIBNAME)-config
+ (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
diff --git a/scripts/pngdef.pas b/scripts/pngdef.pas
index b60afc7b2..c39c2f047 100644
--- a/scripts/pngdef.pas
+++ b/scripts/pngdef.pas
@@ -7,7 +7,7 @@ unit pngdef;
interface
const
- PNG_LIBPNG_VER_STRING = '1.2.3rc6';
+ PNG_LIBPNG_VER_STRING = '1.2.3';
PNG_LIBPNG_VER = 10203;
type
diff --git a/scripts/pngos2.def b/scripts/pngos2.def
index 9f0540e1c..2ad1e4241 100644
--- a/scripts/pngos2.def
+++ b/scripts/pngos2.def
@@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
-; Version 1.2.3rc6
+; Version 1.2.3
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"