mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.3.tar
This commit is contained in:
0
scripts/libpng-config-body.in
Normal file → Executable file
0
scripts/libpng-config-body.in
Normal file → Executable file
2
scripts/libpng-config-head.in
Normal file → Executable file
2
scripts/libpng-config-head.in
Normal file → Executable file
@@ -8,7 +8,7 @@
|
||||
|
||||
# Modeled after libxml-config.
|
||||
|
||||
version=1.2.3rc6
|
||||
version=1.2.3
|
||||
prefix=""
|
||||
cppflags=""
|
||||
cflags=""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
-@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
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
LIB= png
|
||||
SHLIB_MAJOR= ${SHLIB_VER}
|
||||
SHLIB_MINOR= 0
|
||||
NOPROFILE= YES
|
||||
NOOBJ= YES
|
||||
|
||||
# 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=
|
||||
|
||||
PNGMAJ= 5
|
||||
.if (${OBJFORMAT} == "elf")
|
||||
PNGVER= $(PNGMAJ)
|
||||
.else
|
||||
PNGMIN= 0
|
||||
PNGVER= $(PNGMAJ).$(PNGMIN)
|
||||
.endif
|
||||
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>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user