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.3rc1.tar
This commit is contained in:
@@ -6,6 +6,6 @@ includedir=${exec_prefix}/include
|
||||
|
||||
Name: libpng12
|
||||
Description: Loads and saves PNG files
|
||||
Version: 1.2.2
|
||||
Version: 1.2.3rc1
|
||||
Libs: -L${libdir} -lpng12
|
||||
Cflags: -I${includedir}/libpng12
|
||||
|
||||
@@ -33,11 +33,22 @@ RANLIB=echo
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
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=
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -50,12 +61,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
|
||||
@@ -85,42 +99,61 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm $(INCPATH)/libpng
|
||||
ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
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)
|
||||
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
||||
pngtest pngout.png
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
|
||||
@@ -33,11 +33,22 @@ RANLIB=echo
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
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=
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -50,12 +61,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
|
||||
@@ -85,42 +99,61 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm $(INCPATH)/libpng
|
||||
ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
ln -sf $(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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
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)
|
||||
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
||||
pngtest pngout.png
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# makefile for libpng using gcc (generic, static library)
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2000 Cosmin Truta
|
||||
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# Location of the zlib library and include files
|
||||
@@ -18,13 +19,23 @@ 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.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
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=
|
||||
|
||||
CDEBUG = -g -DPNG_DEBUG=5
|
||||
LDDEBUG =
|
||||
CRELEASE = -O2
|
||||
@@ -56,14 +67,17 @@ pngtest$(E): pngtest$(O) libpng$(A)
|
||||
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
|
||||
|
||||
install: libpng.a
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/libpng ]; then mkdir $(INCPATH)/libpng; fi
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@rm $(INCPATH)/png.h
|
||||
-@rm $(INCPATH)/pngconf.h
|
||||
cp png.h pngconf.h $(INCPATH)/libpng
|
||||
chmod 644 $(INCPATH)/libpng/png.h $(INCPATH)/libpng/pngconf.h
|
||||
cp libpng.a $(LIBPATH)
|
||||
-@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)
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a pngtest pngout.png
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
# modified for LC56/ATARI assumes libz.lib is in same dir and uses default
|
||||
@@ -10,6 +11,18 @@ LDFLAGS=-lpng -lz -lm
|
||||
|
||||
# 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=
|
||||
|
||||
OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
|
||||
$(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
|
||||
@@ -25,12 +38,14 @@ pngtest.ttp: pngtest.o $(LBR)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
|
||||
|
||||
install: libpng.a
|
||||
-@mkdir $(prefix)/include
|
||||
-@mkdir $(prefix)/include/libpng
|
||||
-@mkdir $(prefix)/lib
|
||||
-@rm -f $(prefix)/include/png.h
|
||||
-@rm -f $(prefix)/include/pngconf.h
|
||||
cp png.h $(prefix)/include/libpng
|
||||
cp pngconf.h $(prefix)/include/libpng
|
||||
chmod 644 $(prefix)/include/libpng/png.h
|
||||
chmod 644 $(prefix)/include/libpng/pngconf.h
|
||||
-@mkdir $(DESTDIR)$(INCPATH)
|
||||
-@mkdir $(DESTDIR)$(INCPATH)/libpng
|
||||
-@mkdir $(DESTDIR)$(LIBPATH)
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/png.h
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
|
||||
cp png.h $(DESTDIR)$(INCPATH)/libpng
|
||||
cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
|
||||
(cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
@@ -14,7 +14,7 @@ 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.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
ALIGN=
|
||||
@@ -39,6 +39,18 @@ RANLIB=ranlib
|
||||
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=
|
||||
|
||||
LIBNAME=libpng12
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
@@ -49,12 +61,15 @@ OBJSDLL = $(OBJS)
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
cp $(LIBNAME).so* /boot/home/config/lib
|
||||
@@ -74,41 +89,56 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf libpng12.pc libpng.pc)
|
||||
|
||||
install: install-static install-shared
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
||||
|
||||
@@ -8,6 +8,16 @@
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# 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=
|
||||
|
||||
# To enable assembler optimizations, add '-DPNG_USE_PNGGCCRD' to
|
||||
# $CFLAGS, and include pnggccrd.o in $OBJS, below.
|
||||
|
||||
@@ -21,8 +31,8 @@ endif
|
||||
prefix=/usr
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
ZLIBLIB=${prefix}/lib
|
||||
ZLIBINC=${prefix}/include
|
||||
ZLIBLIB=$(DESTDIR)$(LIBPATH)
|
||||
ZLIBINC=$(DESTDIR)$(INCPATH)
|
||||
#ZLIBLIB=../zlib
|
||||
#ZLIBINC=../zlib
|
||||
|
||||
@@ -39,10 +49,10 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
CFLAGS=$(MINGW_CCFLAGS) -I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
|
||||
-fomit-frame-pointer
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
#PNGDLL = $12
|
||||
PNGMIN = 1.2.2
|
||||
PNGMIN_BASE = 1.2.2
|
||||
PNGDLL = 12
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
SHAREDLIB=cygpng$(PNGDLL).dll
|
||||
@@ -53,18 +63,19 @@ LIBS=$(SHAREDLIB) $(STATLIB)
|
||||
EXE=.exe
|
||||
|
||||
LDFLAGS=-L. $(MINGW_LDFLAGS) -L$(ZLIBLIB) -lpng -lz
|
||||
LDSFLAGS=-shared -L. $(MINGW_LDFLAGS) -Wl,--enable-auto-image-base
|
||||
LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(SHAREDDEF)
|
||||
LDSFLAGS=-shared -L. $(MINGW_LDFLAGS) -Wl,--export-all
|
||||
LDEXTRA=-Wl,--out-implib=$(IMPLIB)
|
||||
|
||||
RANLIB=ranlib
|
||||
#RANLIB=echo
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(prefix)/lib
|
||||
|
||||
BINPATH=$(prefix)/bin
|
||||
MANPATH=$(prefix)/man
|
||||
MAN3PATH=$(MANPATH)/man3
|
||||
DOCPATH=$(prefix)/doc/libpng-$(PNGMIN_BASE)
|
||||
MAN5PATH=$(MANPATH)/man5
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -75,12 +86,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.SUFFIXES: .c .o .pic.o
|
||||
|
||||
%.o : %.c
|
||||
$(CC) -c $(CFLAGS) -DPNG_STATIC -DZLIB_STATIC -o $@ $<
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
%.pic.o : %.c
|
||||
$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
|
||||
|
||||
all: all-static all-shared
|
||||
all: all-static all-shared libpng.pc
|
||||
|
||||
libpng.pc: scripts/libpng.pc.in
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
static: all-static
|
||||
|
||||
@@ -95,7 +109,7 @@ pnggccrd.o: png.h pngconf.h
|
||||
@echo ' You can ignore the single "control reaches end of non-void function"'
|
||||
@echo ' warning and multiple "<variable> defined but not used" warnings:'
|
||||
@echo ""
|
||||
$(CC) -c $(CFLAGS) -DPNG_STATIC -DZLIB_STATIC -o $@ $*.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $*.c
|
||||
|
||||
pnggccrd.pic.o: png.h pngconf.h
|
||||
@echo ""
|
||||
@@ -125,7 +139,7 @@ pngtest.pic.o: pngtest.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
pngtest.o: pngtest.c
|
||||
$(CC) $(CFLAGS) -DPNG_STATIC -DZLIB_STATIC -c $< -o $@
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
test: test-static test-shared
|
||||
|
||||
@@ -137,30 +151,38 @@ test-shared: pngtest$(EXE)
|
||||
|
||||
install: install-static install-shared
|
||||
|
||||
install-static: $(STATLIB) install-headers install-docs install-man
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir -p $(LIBPATH); fi
|
||||
install -m 755 $(STATLIB) $(LIBPATH)
|
||||
install-static: $(STATLIB) install-headers install-man
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir -p $(DESTDIR)$(LIBPATH); fi
|
||||
install -m 644 $(STATLIB) $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
|
||||
-@rm -f $(DESTDIR)$(LIBPATH)/$(STATLIB)
|
||||
(cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a $(STATLIB))
|
||||
|
||||
install-shared: $(SHAREDLIB) install-headers install-docs install-man
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir -p $(LIBPATH); fi
|
||||
-@if [ ! -d $(BINPATH) ]; then mkdir -p $(BINPATH); fi
|
||||
install -m 755 $(IMPLIB) $(LIBPATH)
|
||||
install -s -m 755 $(SHAREDLIB) $(BINPATH)
|
||||
install-shared: $(SHAREDLIB) libpng.pc install-headers install-man
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir -p $(DESTDIR)$(LIBPATH); fi
|
||||
-@if [ ! -d $(DESTDIR)$(BINPATH) ]; then mkdir -p $(DESTDIR)$(BINPATH); fi
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir -p $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
install -m 644 $(IMPLIB) $(DESTDIR)$(LIBPATH)/$(LIBNAME).dll.a
|
||||
-@rm -f $(DESTDIR)$(LIBPATH)/$(IMPLIB)
|
||||
(cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).dll.a $(IMPLIB))
|
||||
install -s -m 755 $(SHAREDLIB) $(DESTDIR)$(BINPATH)
|
||||
install -m 644 libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
|
||||
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf libpng12.pc libpng.pc)
|
||||
|
||||
install-headers:
|
||||
-@if [ ! -d $(INCPATH)]; then mkdir -p $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/libpng ]; then mkdir -p $(INCPATH)/libpng; fi
|
||||
-@rm -f ${INCPATH)/png.h
|
||||
-@rm -f ${INCPATH)/pngconf.h
|
||||
install -m 644 png.h pngconf.h $(INCPATH)
|
||||
|
||||
install-docs:
|
||||
-@if [ ! -d $(DOCPATH) ]; then mkdir -p $(DOCPATH); fi
|
||||
install -m 644 $(DOCS) $(DOCPATH)
|
||||
-@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir -p $(DESTDIR)$(INCPATH); fi
|
||||
-@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then mkdir -p $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/png.h
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
|
||||
install -m 644 png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/libpng
|
||||
(cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
|
||||
install-man:
|
||||
-@if [ ! -d $(MAN3PATH) ]; then mkdir -p $(MAN3PATH); fi
|
||||
install -m 644 libpngpf.3 libpng.3 $(MAN3PATH)
|
||||
-@if [ ! -d $(DESTDIR)$(MAN3PATH) ]; then mkdir -p $(DESTDIR)$(MAN3PATH); fi
|
||||
-@if [ ! -d $(DESTDIR)$(MAN5PATH) ]; then mkdir -p $(DESTDIR)$(MAN5PATH); fi
|
||||
install -m 644 libpngpf.3 libpng.3 $(DESTDIR)$(MAN3PATH)
|
||||
install -m 644 png.5 $(DESTDIR)$(MAN5PATH)
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \
|
||||
|
||||
@@ -25,12 +25,23 @@ 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.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
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=
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -43,12 +54,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).dylib pngtest
|
||||
all: libpng.a $(LIBNAME).dylib pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).dylib: $(LIBNAME).$(PNGMAJ).dylib
|
||||
ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib
|
||||
|
||||
@@ -57,7 +71,7 @@ $(LIBNAME).$(PNGMAJ).dylib: $(LIBNAME).$(PNGVER).dylib
|
||||
|
||||
$(LIBNAME).$(PNGVER).dylib: $(OBJSDLL)
|
||||
$(CC) -dynamiclib \
|
||||
-install_name $(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
|
||||
-install_name $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
|
||||
-current_version $(PNGMIN) -compatibility_version $(PNGMIN) \
|
||||
-o $(LIBNAME).$(PNGVER).dylib \
|
||||
$(OBJSDLL) -L$(ZLIBLIB) -lz
|
||||
@@ -69,42 +83,54 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).dylib
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).$(PNGMAJ)*.dylib
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).dylib
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.dylib
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.3.dylib
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.3.*.dylib
|
||||
cp $(LIBNAME).$(PNGVER).dylib $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).$(PNGVER).dylib
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf libpng12.pc libpng.pc)
|
||||
|
||||
install: install-static install-shared
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a $(LIBNAME).*dylib pngtest pngout.png
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# makefile for libpng on DEC Alpha Unix
|
||||
# Copyright (C) 2000 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2000-2002 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
@@ -7,6 +7,17 @@
|
||||
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=
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
#ZLIBLIB=/usr/local/lib
|
||||
@@ -17,7 +28,7 @@ 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.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@@ -32,12 +43,15 @@ 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
|
||||
|
||||
all: $(LIBNAME).so libpng.a pngtest
|
||||
all: $(LIBNAME).so libpng.a pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
|
||||
@@ -54,41 +68,56 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf libpng12.pc libpng.pc)
|
||||
|
||||
install: install-static install-shared
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# DJGPP (DOS gcc) makefile for libpng
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# where make install puts libpng.a and png.h
|
||||
# where make install will put libpng.a and png.h
|
||||
#prefix=/usr/local
|
||||
prefix=.
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(prefix)/lib
|
||||
|
||||
CC=gcc
|
||||
CFLAGS=-I../zlib -O
|
||||
|
||||
@@ -3,8 +3,23 @@
|
||||
# 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>
|
||||
|
||||
# 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")
|
||||
@@ -49,23 +64,22 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install: libpng.a libpng.so.${PNGVER}
|
||||
-@mkdir $(prefix)/include/libpng
|
||||
-@mkdir $(DESTDIR)$(INCPATH)/libpng
|
||||
${INSTALL} -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \
|
||||
png.h pngconf.h $(prefix)/include/libpng
|
||||
ln -sf libpng/png.h $(prefix)/include/png.h
|
||||
ln -sf libpng/pngconf.h $(prefix)/include/pngconf.h
|
||||
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} $(prefix)/lib
|
||||
$(RANLIB) $(prefix)/lib/libpng.a
|
||||
ln -sf libpng.so.${PNGVER} $(prefix)/lib/libpng.so
|
||||
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 $(prefix)/man/man3
|
||||
libpng.3 libpngpf.3 $(DESTDIR)$(MANPATH)/man3
|
||||
${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
|
||||
png.5 $(prefix)/man/man5
|
||||
png.5 $(DESTDIR)$(MANPATH)/man5
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a libpng.so libpng.so.${PNGVER} pngtest pngout.png
|
||||
rm -f *.o *.so libpng.a libpng.so.${PNGVER} pngtest pngout.png
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=gcc
|
||||
@@ -62,6 +62,17 @@ RANLIB=ranlib
|
||||
|
||||
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=
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -74,7 +85,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest pngtest-static
|
||||
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
pnggccrd.o: pnggccrd.c png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) -o $@ $*.c
|
||||
@@ -82,7 +96,7 @@ pnggccrd.o: pnggccrd.c png.h pngconf.h
|
||||
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
|
||||
|
||||
$(LIBNAME).a: $(OBJS)
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
@@ -99,7 +113,7 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
||||
pngtest: pngtest.o $(LIBNAME).so
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
pngtest-static: pngtest.o $(LIBNAME).a
|
||||
pngtest-static: pngtest.o libpng.a
|
||||
$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
|
||||
|
||||
test: pngtest pngtest-static
|
||||
@@ -113,41 +127,56 @@ test: pngtest pngtest-static
|
||||
./pngtest-static
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf libpng12.pc libpng.pc)
|
||||
|
||||
install: install-static install-shared
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
||||
|
||||
@@ -35,12 +35,23 @@ 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.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
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=
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -53,12 +64,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).sl pngtest
|
||||
all: libpng.a $(LIBNAME).sl pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
|
||||
ln -f -s $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
|
||||
|
||||
@@ -77,41 +91,57 @@ test: pngtest
|
||||
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).sl.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).sl.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).sl
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).sl.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).sl.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then mkdir \
|
||||
$(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf libpng12.pc libpng.pc)
|
||||
|
||||
install: install-static install-shared
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(SHAREDLIB).sl $(SHAREDLIB).sl.$(PNGMAJ)* \
|
||||
|
||||
@@ -19,14 +19,25 @@ 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.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
# where make install puts libpng.a, libpng12.sl, and png.h
|
||||
prefix=/opt/libpng
|
||||
LIBPATH=$prefix/lib
|
||||
INCPATH=$prefix/include
|
||||
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=
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -39,12 +50,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) +z -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).sl pngtest
|
||||
all: libpng.a $(LIBNAME).sl pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
|
||||
ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
|
||||
|
||||
@@ -63,41 +77,56 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).sl.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).sl.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).sl
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.sl
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.sl.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.sl.3.*
|
||||
cp $(LIBNAME).sl.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).sl.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf libpng12.pc libpng.pc)
|
||||
|
||||
install: install-static install-shared
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
@@ -9,6 +10,18 @@
|
||||
|
||||
# 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=
|
||||
|
||||
CC=cc
|
||||
CFLAGS=-I../zlib -O
|
||||
@@ -46,17 +59,18 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install: libpng.a
|
||||
-@mkdir $(prefix)/include
|
||||
-@mkdir $(prefix)/include/libpng
|
||||
-@mkdir $(prefix)/lib
|
||||
-@rm -f $(prefix)/include/png.h
|
||||
-@rm -f $(prefix)/include/pngconf.h
|
||||
cp png.h $(prefix)/include/libpng
|
||||
cp pngconf.h $(prefix)/include/libpng
|
||||
chmod 644 $(prefix)/include/libpng/png.h
|
||||
chmod 644 $(prefix)/include/libpng/pngconf.h
|
||||
cp libpng.a $(prefix)/lib
|
||||
chmod 644 $(prefix)/lib/libpng.a
|
||||
-@mkdir $(DESTDIR)$(INCPATH)
|
||||
-@mkdir $(DESTDIR)$(INCPATH)/libpng
|
||||
-@mkdir $(DESTDIR)$(LIBPATH)
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/png.h
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
|
||||
cp png.h $(DESTDIR)$(INCPATH)/libpng
|
||||
cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
|
||||
(cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
|
||||
cp libpng.a $(DESTDIR)$(LIBPATH)
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a pngtest pngout.png ansi2knr
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=gcc
|
||||
|
||||
# where "make install" puts libpng.a, libpng12/libpng12.so*,
|
||||
# where "make install" puts libpng12.a, libpng12/libpng12.so*,
|
||||
# libpng12/png.h and libpng12/pngconf.h
|
||||
prefix=/usr/local
|
||||
|
||||
@@ -41,6 +41,17 @@ RANLIB=ranlib
|
||||
|
||||
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=
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -53,12 +64,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
|
||||
@@ -73,7 +87,7 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
||||
pngtest: pngtest.o $(LIBNAME).so
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
pngtest-static: pngtest.o $(LIBNAME).a
|
||||
pngtest-static: pngtest.o libpng.a
|
||||
$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
|
||||
|
||||
test: pngtest pngtest-static
|
||||
@@ -87,42 +101,56 @@ test: pngtest pngtest-static
|
||||
./pngtest-static
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then mkdir \
|
||||
$(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf libpng12.pc libpng.pc)
|
||||
|
||||
install: install-static install-shared
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNMAJ)* \
|
||||
|
||||
@@ -15,17 +15,31 @@ ZLIBLIB=../zlib
|
||||
ZLIBINC=../zlib
|
||||
|
||||
CC=cc
|
||||
CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
|
||||
LDSHARED=cc -lz -dynamiclib -compatibility_version $(VER) -current_version $(VER)
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.2
|
||||
VER = $(PNGMAJ).$(PNGMIN)
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
|
||||
LDSHARED=cc -lz -dynamiclib -compatibility_version $(PNGVER) \
|
||||
-current_version $(PNGVER)
|
||||
|
||||
LIBNAME=libpng12
|
||||
SHAREDLIB_POSTFIX=dylib
|
||||
LIBPATH=$(prefix)/lib
|
||||
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=
|
||||
|
||||
#RANLIB=echo
|
||||
RANLIB=ranlib
|
||||
@@ -34,15 +48,18 @@ 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
|
||||
|
||||
all: libpng.a pngtest shared
|
||||
all: libpng.a pngtest shared libpng.pc
|
||||
|
||||
shared: $(LIBNAME).$(VER).$(SHAREDLIB_POSTFIX)
|
||||
shared: $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(LIBNAME).$(VER).$(SHAREDLIB_POSTFIX): $(OBJS)
|
||||
$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX): $(OBJS)
|
||||
$(LDSHARED) -o $@ $(OBJS)
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
@@ -53,51 +70,67 @@ test: pngtest
|
||||
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).$(PNGMAJ)*.$(SHAREDLIB_POSTFIX)
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).$(SHAREDLIB_POSTFIX)
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
|
||||
-@/bin/rm -f \
|
||||
$(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGMAJ)*.$(SHAREDLIB_POSTFIX)
|
||||
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(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) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
|
||||
(cd $(LIBPATH); \
|
||||
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
|
||||
cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(DESTDIR)$(LIBPATH)
|
||||
chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
|
||||
(cd $(DESTDIR)$(LIBPATH); \
|
||||
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) \
|
||||
libpng.$(SHARED_POSTFIX); \
|
||||
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
|
||||
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) \
|
||||
libpng.3.$(SHARED_POSTFIX); \
|
||||
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
|
||||
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) \
|
||||
libpng.3.$(PNGMIN).$(SHARED_POSTFIX); \
|
||||
ln -sf $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \
|
||||
$(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \
|
||||
ln -sf $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \
|
||||
$(LIBNAME).$(SHAREDLIB_POSTFIX))
|
||||
-@if [ ! -d $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
|
||||
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf libpng12.pc libpng.pc)
|
||||
|
||||
install: install-shared
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a pngtest pngout.png \
|
||||
$(LIBNAME).$(VER).$(SHAREDLIB_POSTFIX) \
|
||||
$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \
|
||||
$(LIBNAME).$(SHAREDLIB_POSTFIX)
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# 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=
|
||||
|
||||
CC=cc
|
||||
CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips
|
||||
@@ -30,17 +43,18 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install: libpng.a
|
||||
-@mkdir $(prefix)/include
|
||||
-@mkdir $(prefix)/include/libpng
|
||||
-@mkdir $(prefix)/lib
|
||||
-@rm -f $(prefix)/include/png.h
|
||||
-@rm -f $(prefix)/include/pngconf.h
|
||||
cp png.h $(prefix)/include/libpng
|
||||
cp pngconf.h $(prefix)/include/libpng
|
||||
chmod 644 $(prefix)/include/libpng/png.h
|
||||
chmod 644 $(prefix)/include/libpng/pngconf.h
|
||||
cp libpng.a $(prefix)/lib
|
||||
chmod 644 $(prefix)/lib/libpng.a
|
||||
-@mkdir $(DESTDIR)$(INCPATH)
|
||||
-@mkdir $(DESTDIR)$(INCPATH)/libpng
|
||||
-@mkdir $(DESTDIR)$(LIBPATH)
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/png.h
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
|
||||
cp png.h $(DESTDIR)$(INCPATH)/libpng
|
||||
cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
|
||||
(cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
|
||||
cp libpng.a $(DESTDIR)$(LIBPATH)
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a pngtest pngout.png
|
||||
|
||||
@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng12
|
||||
|
||||
LIB= png12
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.2.2
|
||||
SHLIB_MINOR= 1.2.3rc1
|
||||
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.2
|
||||
SHLIB_MINOR= 1.2.3rc1
|
||||
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.2
|
||||
SHLIB_MINOR= 1.2.3rc1
|
||||
|
||||
LIB= png
|
||||
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
|
||||
@@ -64,6 +64,8 @@ afterinstall:
|
||||
@rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
|
||||
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
|
||||
-m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng
|
||||
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
|
||||
-m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
|
||||
${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
|
||||
-m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
|
||||
# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1998 Greg Roelofs
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
@@ -25,12 +26,23 @@ 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.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
INCPATH=$(prefix)/include/libpng
|
||||
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=
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -43,12 +55,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
|
||||
@@ -67,43 +82,60 @@ test: pngtest
|
||||
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
-@/bin/rm -f $(INCPATH)/png.h
|
||||
-@/bin/rm -f $(INCPATH)/pngconf.h
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
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)
|
||||
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
install: install-static install-shared
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
|
||||
|
||||
@@ -5,6 +5,18 @@
|
||||
|
||||
# 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
|
||||
@@ -24,12 +36,24 @@ LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
LDSHARED=CC $(ABI) -shared
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
# See "man dso" for info about shared objects
|
||||
LIBS=libpng12.so.$(PNGMAJ).$(PNGVER)
|
||||
LIBS=libpng12.so.$(PNGVER)
|
||||
LIBNAME=libpng12
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(prefix)/lib32
|
||||
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=
|
||||
|
||||
RANLIB=echo
|
||||
#RANLIB=ranlib
|
||||
@@ -38,12 +62,15 @@ 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
|
||||
|
||||
all: libpng.a $(LIBNAME).so.$(PNGVER) pngtest
|
||||
all: libpng.a $(LIBNAME).so.$(PNGVER) pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).so.$(PNGVER): $(OBJS)
|
||||
$(LDSHARED) -o $@ $(OBJS)
|
||||
rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)
|
||||
@@ -58,41 +85,57 @@ test: pngtest
|
||||
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
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)
|
||||
|
||||
install: install-static install-shared
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a pngtest pngout.png
|
||||
|
||||
@@ -31,7 +31,7 @@ LDSHARED=cc $(ABI) -shared
|
||||
# See "man dso" for info about shared objects
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
RANLIB=echo
|
||||
@@ -40,14 +40,28 @@ RANLIB=echo
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(prefix)/lib
|
||||
#LIBPATH=$(prefix)/lib32
|
||||
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=
|
||||
|
||||
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
|
||||
|
||||
all: libpng.a pngtest shared
|
||||
all: libpng.a pngtest shared libpng.pc
|
||||
|
||||
shared: $(LIBNAME).so.$(PNGMAJ).$(PNGVER)
|
||||
shared: $(LIBNAME).so.$(PNGVER)
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@@ -66,41 +80,58 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
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)
|
||||
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
install: install-static install-shared
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a pngtest pngout.png $(LIBNAME).so \
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# makefile for libpng on Solaris 9 (beta) with Forte cc
|
||||
# Updated by Chad Schrock for Solaris 9
|
||||
# Contributed by William L. Sebok, based on makefile.linux
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1998-2001 Greg Roelofs
|
||||
# Copyright (C) 1996-1997 Andreas Dilger
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
@@ -35,12 +36,23 @@ 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.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
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=
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -53,12 +65,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
|
||||
@@ -88,41 +103,58 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then mkdir \
|
||||
$(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
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)
|
||||
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
install: install-static install-shared
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
||||
|
||||
@@ -32,12 +32,23 @@ 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.2
|
||||
PNGMIN = 1.2.3rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
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=
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@@ -50,12 +61,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
|
||||
@@ -85,41 +99,57 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
|
||||
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(INCPATH)/libpng
|
||||
ln -f -s $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
|
||||
-@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; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
cp libpng.a $(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.a
|
||||
ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/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)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER)
|
||||
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
|
||||
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ)* $(LIBPATH)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.3.*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
|
||||
(cd $(LIBPATH); \
|
||||
-@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); \
|
||||
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 $(LIBPATH)/pkgconfig ]; then mkdir $(LIBPATH)/pkgconfig; fi
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cp libpng.pc $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
chmod 644 $(LIBPATH)/pkgconfig/libpng12.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
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)
|
||||
|
||||
install: install-static install-shared
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(MANPATH) ]; then mkdir $(MANPATH); fi
|
||||
-@if [ ! -d $(MANPATH)/man3 ]; then mkdir $(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(MANPATH)/man3
|
||||
cp libpngpf.3 $(MANPATH)/man3
|
||||
-@if [ ! -d $(MANPATH)/man5 ]; then mkdir $(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(MANPATH)/man5/png.5
|
||||
cp png.5 $(MANPATH)/man5
|
||||
|
||||
install: install-static install-shared install-man
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# 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/lib
|
||||
@@ -35,17 +48,18 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install: libpng.a
|
||||
-@mkdir $(prefix)/include
|
||||
-@mkdir $(prefix)/include/libpng
|
||||
-@mkdir $(prefix)/lib
|
||||
-@rm -f $(prefix)/include/png.h
|
||||
-@rm -f $(prefix)/include/pngconf.h
|
||||
cp png.h $(prefix)/include/libpng
|
||||
cp pngconf.h $(prefix)/include/libpng
|
||||
chmod 644 $(prefix)/include/libpng/png.h
|
||||
chmod 644 $(prefix)/include/libpng/pngconf.h
|
||||
cp libpng.a $(prefix)/lib
|
||||
chmod 644 $(prefix)/lib/libpng.a
|
||||
-@mkdir $(DESTDIR)$(INCPATH)
|
||||
-@mkdir $(DESTDIR)$(INCPATH)/libpng
|
||||
-@mkdir $(DESTDIR)$(LIBPATH)
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/png.h
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
|
||||
cp png.h $(DESTDIR)$(INCPATH)/libpng
|
||||
cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
|
||||
(cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
|
||||
cp libpng.a $(DESTDIR)$(LIBPATH)
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a pngtest pngout.png
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# 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/lib
|
||||
@@ -39,17 +52,18 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install: libpng.a
|
||||
-@mkdir $(prefix)/include
|
||||
-@mkdir $(prefix)/include/libpng
|
||||
-@mkdir $(prefix)/lib
|
||||
-@rm -f $(prefix)/include/png.h
|
||||
-@rm -f $(prefix)/include/pngconf.h
|
||||
cp png.h $(prefix)/include/libpng
|
||||
cp pngconf.h $(prefix)/include/libpng
|
||||
chmod 644 $(prefix)/include/libpng/png.h
|
||||
chmod 644 $(prefix)/include/libpng/pngconf.h
|
||||
cp libpng.a $(prefix)/lib
|
||||
chmod 644 $(prefix)/lib/libpng.a
|
||||
-@mkdir $(DESTDIR)$(INCPATH)
|
||||
-@mkdir $(DESTDIR)$(INCPATH)/libpng
|
||||
-@mkdir $(DESTDIR)$(LIBPATH)
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/png.h
|
||||
-@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
|
||||
cp png.h $(DESTDIR)$(INCPATH)/libpng
|
||||
cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
|
||||
(cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
|
||||
cp libpng.a $(DESTDIR)$(LIBPATH)
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a pngtest pngout.png
|
||||
|
||||
@@ -7,8 +7,8 @@ unit pngdef;
|
||||
interface
|
||||
|
||||
const
|
||||
PNG_LIBPNG_VER_STRING = '1.2.2';
|
||||
PNG_LIBPNG_VER = 10202;
|
||||
PNG_LIBPNG_VER_STRING = '1.2.3rc1';
|
||||
PNG_LIBPNG_VER = 10203;
|
||||
|
||||
type
|
||||
png_uint_32 = Cardinal;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
; PNG.LIB module definition file for OS/2
|
||||
;----------------------------------------
|
||||
|
||||
; Version 1.2.2
|
||||
; Version 1.2.3rc1
|
||||
|
||||
LIBRARY PNG
|
||||
DESCRIPTION "PNG image compression library for OS/2"
|
||||
@@ -197,8 +197,6 @@ EXPORTS
|
||||
png_init_mmx_flags
|
||||
|
||||
; Added at version 1.2.2:
|
||||
png_zalloc
|
||||
png_zfree
|
||||
png_handle_as_unknown
|
||||
|
||||
; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# makefile for libpng under FreeBSD
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# where make install puts libpng.a and png.h
|
||||
prefix=/usr/local
|
||||
|
||||
# Building shared libraries is handled by the FreeBSD external Makefile,
|
||||
# which uses this makefile.
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
CFLAGS+= -I. -O -DPNG_USE_PNGGCCRD
|
||||
.else
|
||||
CFLAGS+= -I. -O -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE
|
||||
.endif
|
||||
LDFLAGS+=-L. -lpng -lz -lm
|
||||
|
||||
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
|
||||
|
||||
all: libpng.a pngtest
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
test: pngtest
|
||||
./pngtest
|
||||
|
||||
install: libpng.a
|
||||
-@mkdir $(prefix)/include
|
||||
-@mkdir $(prefix)/include/libpng
|
||||
-@mkdir $(prefix)/lib
|
||||
cp png.h $(prefix)/include
|
||||
cp pngconf.h $(prefix)/include
|
||||
chmod 644 $(prefix)/include/png.h
|
||||
chmod 644 $(prefix)/include/pngconf.h
|
||||
cp png.h $(prefix)/include/libpng
|
||||
cp pngconf.h $(prefix)/include/libpng
|
||||
chmod 644 $(prefix)/include/libpng/png.h
|
||||
chmod 644 $(prefix)/include/libpng/pngconf.h
|
||||
cp libpng.a $(prefix)/lib
|
||||
chmod 644 $(prefix)/lib/libpng.a
|
||||
$(RANLIB) $(prefix)/lib/libpng.a
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a 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
|
||||
|
||||
Reference in New Issue
Block a user