Imported from libpng-1.2.2.tar

This commit is contained in:
Glenn Randers-Pehrson
2002-04-15 09:25:51 -05:00
parent fcbd7870e9
commit 4fb046a52d
62 changed files with 374 additions and 154 deletions

View File

@@ -6,6 +6,6 @@ includedir=${exec_prefix}/include
Name: libpng12
Description: Loads and saves PNG files
Version: 1.2.2rc1
Version: 1.2.2
Libs: -L${libdir} -lpng12
Cflags: -I${includedir}/libpng12

View File

@@ -33,7 +33,7 @@ RANLIB=echo
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@@ -33,7 +33,7 @@ RANLIB=echo
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@@ -18,7 +18,7 @@ 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.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local

View File

@@ -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.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
ALIGN=

View File

@@ -41,7 +41,7 @@ CFLAGS=$(MINGW_CCFLAGS) -I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
PNGMAJ = 0
#PNGDLL = $12
PNGMIN = 1.2.2rc1
PNGMIN = 1.2.2
PNGMIN_BASE = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)

View File

@@ -25,7 +25,7 @@ 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.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12

View File

@@ -17,7 +17,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.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12

93
scripts/makefile.freebsd Normal file
View File

@@ -0,0 +1,93 @@
# makefile for libpng under FreeBSD
# Copyright (C) 2002 Glenn Randers-Pehrson and Andrey A. Chernov
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# For conditions of distribution and use, see copyright notice in png.h
# where make install puts libpng.a and png.h
prefix=/usr/local
PNGMAJ= 5
.if (${OBJFORMAT} == "elf")
PNGVER= $(PNGMAJ)
.else
PNGMIN= 0
PNGVER= $(PNGMAJ).$(PNGMIN)
.endif
CFLAGS+= -I. -DPNG_USE_PNGGCCRD
.if (${MACHINE_ARCH} != "i386")
CFLAGS+= -DPNG_NO_ASSEMBLER_CODE
.endif
LDFLAGS+=-L. -lpng -lz -lm -static
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o pnggccrd.o
.SUFFIXES: .c .so .o
.c.so:
${CC} ${CFLAGS} -fPIC -DPIC -o $@ -c $<
all: libpng.a libpng.so.${PNGVER} pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.so.${PNGVER}: $(OBJS:S/o$/so/g)
.if (${OBJFORMAT} == "elf")
${CC} -shared -Wl,-x,-soname,$@ -o $@ $(OBJS:S/o$/so/g) -lz -lm
.else
${CC} -shared -Wl,-x -o $@ $(OBJS:S/o$/so/g) -lz -lm
.endif
pngtest: pngtest.o libpng.a
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
test: pngtest
./pngtest
install: libpng.a libpng.so.${PNGVER}
-@mkdir $(prefix)/include/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
${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
/sbin/ldconfig -R
${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
libpng.3 libpngpf.3 $(prefix)/man/man3
${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
png.5 $(prefix)/man/man5
clean:
rm -f *.o libpng.a libpng.so libpng.so.${PNGVER} pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:
chmod a-w *.[ch35] $(DOCS) scripts/*
# DO NOT DELETE THIS LINE -- make depend depends on it.
png.o: png.h pngconf.h
pngerror.o: png.h pngconf.h
pngrio.o: png.h pngconf.h
pngwio.o: png.h pngconf.h
pngmem.o: png.h pngconf.h
pngset.o: png.h pngconf.h
pngget.o: png.h pngconf.h
pngread.o: png.h pngconf.h
pngrtran.o: png.h pngconf.h
pngrutil.o: png.h pngconf.h
pngtest.o: png.h pngconf.h
pngtrans.o: png.h pngconf.h
pngwrite.o: png.h pngconf.h
pngwtran.o: png.h pngconf.h
pngwutil.o: png.h pngconf.h
pngpread.o: png.h pngconf.h
pnggccrd.o: png.h pngconf.h

View File

@@ -15,7 +15,7 @@
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc
@@ -43,7 +43,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
# Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety
### for generic gcc:
CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \
-O3 $(ALIGN) -funroll-loops \
-O3 $(ALIGN) -funroll-loops \
-fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5
### for gcc 2.95.2 on 686:
#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \

View File

@@ -35,7 +35,7 @@ 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.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12

View File

@@ -19,7 +19,7 @@ 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.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12

View File

@@ -5,7 +5,7 @@
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc

View File

@@ -20,7 +20,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
LDSHARED=cc -lz -dynamiclib -compatibility_version $(VER) -current_version $(VER)
PNGMAJ = 0
PNGMIN = 1.2.2rc1
PNGMIN = 1.2.2
VER = $(PNGMAJ).$(PNGMIN)
LIBNAME=libpng12
SHAREDLIB_POSTFIX=dylib
@@ -79,11 +79,11 @@ install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
chmod 755 $(LIBPATH)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
(cd $(LIBPATH); \
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
libpng.$(SHARED_POSTFIX); \
libpng.$(SHARED_POSTFIX); \
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
libpng.3.$(SHARED_POSTFIX); \
libpng.3.$(SHARED_POSTFIX); \
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) ]
libpng.3.$(PNGMIN).$(SHARED_POSTFIX); \
libpng.3.$(PNGMIN).$(SHARED_POSTFIX); \
ln -sf $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \
$(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \
ln -sf $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \

44
scripts/makefile.ne12bsd Normal file
View File

@@ -0,0 +1,44 @@
# makefile for libpng for NetBSD for the standard
# make obj && make depend && make && make test
# make includes && make install
# Copyright (C) 2002 Patrick R.L. Welche
# For conditions of distribution and use, see copyright notice in png.h
# You should also run makefile.netbsd
LOCALBASE?=/usr/local
LIBDIR= ${LOCALBASE}/lib
MANDIR= ${LOCALBASE}/man
INCSDIR=${LOCALBASE}/include/libpng12
LIB= png12
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.2.2
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
INCS= png.h pngconf.h
MAN= libpng.3 libpngpf.3 png.5
CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
# something like this for mmx assembler, but it core dumps for me at the moment
# .if ${MACHINE_ARCH} == "i386"
# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
# MKLINT= no
# .else
CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
# .endif
CLEANFILES+=pngtest.o pngtest
pngtest.o: pngtest.c
${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
pngtest: pngtest.o libpng.a
${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
test: pngtest
cd ${.CURDIR} && ${.OBJDIR}/pngtest
.include <bsd.lib.mk>

View File

@@ -1,22 +1,22 @@
# makefile for libpng for NetBSD for the standard
# make obj && make depend && make && make test
# make includes && make install
# Copyright (C) 2001 Patrick R.L. Welche
# Copyright (C) 2002 Patrick R.L. Welche
# For conditions of distribution and use, see copyright notice in png.h
# You should also run makefile.ne0bsd
LOCALBASE?=/usr/local
LIBDIR= ${LOCALBASE}/lib
MANDIR= ${LOCALBASE}/man
INCSDIR=${LOCALBASE}/include/libpng
# Should also copy png.h and pngconf.h to $(INCSDIR)/libpng12.
LIB=png
# Shared lib name should be png12.
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.2.2rc1
LIB= png
SHLIB_MAJOR= 3
SHLIB_MINOR= 1.2.2
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
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
INCS= png.h pngconf.h
MAN= libpng.3 libpngpf.3 png.5

View File

@@ -7,7 +7,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.2.2rc1
SHLIB_MINOR= 1.2.2
LIB= png
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \

View File

@@ -25,7 +25,7 @@ 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.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12

View File

@@ -24,7 +24,7 @@ LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=CC $(ABI) -shared
PNGMAJ = 0
PNGMIN = 1.2.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
# See "man dso" for info about shared objects
LIBS=libpng12.so.$(PNGMAJ).$(PNGVER)

View File

@@ -31,7 +31,7 @@ LDSHARED=cc $(ABI) -shared
# See "man dso" for info about shared objects
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
RANLIB=echo

View File

@@ -35,7 +35,7 @@ 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.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12

View File

@@ -32,7 +32,7 @@ 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.2rc1
PNGMIN = 1.2.2
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12

View File

@@ -7,7 +7,7 @@ unit pngdef;
interface
const
PNG_LIBPNG_VER_STRING = '1.2.2rc1';
PNG_LIBPNG_VER_STRING = '1.2.2';
PNG_LIBPNG_VER = 10202;
type

View File

@@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
; Version 1.2.2rc1
; Version 1.2.2
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"

77
scripts/xmakefile.freebsd Normal file
View File

@@ -0,0 +1,77 @@
# 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