Imported from libpng-1.0.6.tar

This commit is contained in:
Glenn Randers-Pehrson
2000-03-21 05:13:06 -06:00
parent a77ef625a6
commit 520a764cd7
74 changed files with 2298 additions and 1436 deletions

View File

@@ -1,2 +0,0 @@
make -fmakefile.bor -B -DMODEL=m %1 %2 %3 libpng >buildm.out
make -fmakefile.bor -B -DMODEL=l %1 %2 %3 libpng >buildl.out

151
scripts/makefile.bc32 Normal file
View File

@@ -0,0 +1,151 @@
# Makefile for libpng
# 32-bit Borland C++ (Note: All modules are compiled in C mode)
# To build the library, do:
# "make -fmakefile.bc32"
#
# ---------- 32-bit Borland C++ ----------
### Absolutely necessary for this makefile to work
.AUTODEPEND
## Where zlib.h, zconf.h and zlib.lib are
ZLIB_DIR=..\zlib
## Compiler, linker and lib stuff
CC=bcc32
LD=bcc32
LIB=tlib
#TARGET_CPU=6
# 3 = 386, 4 = 486, 5 = Pentium etc.
!ifndef TARGET_CPU
TARGET_CPU=5
!endif
# Use this if you don't want Borland's fancy exception handling
NOEHLIB=noeh32.lib
!ifdef DEBUG
CDEBUG=-v
LDEBUG=-v
!else
CDEBUG=
LDEBUG=
!endif
# STACKOFLOW=1
!ifdef STACKOFLOW
CDEBUG=$(CDEBUG) -N
LDEBUG=$(LDEBUG) -N
!endif
# -X- turn on dependency generation in the object file
# -w set all warnings on
# -O2 optimize for speed
# -Z global optimization
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(CDEBUG)
# -M generate map file
LDFLAGS=-M -L$(ZLIB_DIR) $(LDEBUG)
## Variables
OBJS = \
png.obj \
pngerror.obj \
pngget.obj \
pngmem.obj \
pngpread.obj \
pngread.obj \
pngrio.obj \
pngrtran.obj \
pngrutil.obj \
pngset.obj \
pngtrans.obj \
pngwio.obj \
pngwrite.obj \
pngwtran.obj \
pngwutil.obj
LIBOBJS = \
+png.obj \
+pngerror.obj \
+pngget.obj \
+pngmem.obj \
+pngpread.obj \
+pngread.obj \
+pngrio.obj \
+pngrtran.obj \
+pngrutil.obj \
+pngset.obj \
+pngtrans.obj \
+pngwio.obj \
+pngwrite.obj \
+pngwtran.obj \
+pngwutil.obj
LIBNAME=libpng.lib
## Implicit rules
# Braces let make "batch" calls to the compiler,
# 2 calls instead of 12; space is important.
.c.obj:
$(CC) $(CFLAGS) -c {$*.c }
.c.exe:
$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib.lib $(NOEHLIB)
.obj.exe:
$(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
## Major targets
all: libpng pngtest
libpng: $(LIBNAME)
pngtest: pngtest.exe
test: pngtest.exe
pngtest
## Minor Targets
png.obj: png.c
pngerror.obj: pngerror.c
pngget.obj: pngget.c
pngmem.obj: pngmem.c
pngpread.obj: pngpread.c
pngread.obj: pngread.c
pngrio.obj: pngrio.c
pngrtran.obj: pngrtran.c
pngrutil.obj: pngrutil.c
pngset.obj: pngset.c
pngtrans.obj: pngtrans.c
pngwio.obj: pngwio.c
pngwrite.obj: pngwrite.c
pngwtran.obj: pngwtran.c
pngwutil.obj: pngwutil.c
$(LIBNAME): $(OBJS)
-del $(LIBNAME)
$(LIB) $(LIBNAME) @&&|
$(LIBOBJS), libpng
|
# Clean up anything else you want
clean:
-del *.obj
-del *.exe
-del *.lib
-del *.lst
-del *.map
-del *.tds
# End of makefile for libpng

View File

@@ -1,5 +1,5 @@
# Makefile for png32bd.dll
# ------------- Borland C++ 4.5 -------------
# ------------- 32-bit Borland C++ -------------
# This makefile expects to find zlib.h and zlib32bd.lib in the
# $(ZLIBDIR) directory.
@@ -12,42 +12,65 @@
# compress and uncompress functions, nor any of the gz... functions,
# since libpng does not call them.
ZLIBDIR=..\zlib112
.AUTODEPEND
ZLIBDIR=..\zlib
ZLIB=zlib32bd.lib
PNGDLL=png32bd.dll
PNGLIB=png32bd.lib
CFLAGS= -ps -O2 -C -K -N- -k- -d -3 -r- -w-par -w-aus -WDE -I$(ZLIBDIR)
CC=f:\bc45\bin\bcc32
LINKFLAGS= -Tpd -aa -c
LINK=f:\bc45\bin\tlink32
LIBDIR=f:\bc45\lib
IMPLIB=f:\bc45\bin\implib
CC=bcc32
CFLAGS= -ps -O2 -N- -k- -d -r- -w-par -w-aus -I$(ZLIBDIR) \
-DPNG_NO_GLOBAL_ARRAYS #-DPNG_DEBUG=5
#LINK=tlink32
#LINK=ilink32
LINK=bcc32
#LINKFLAGS= -Tpd -aa -c
LINKFLAGS= -WDE
IMPLIB=implib
# Use this if you don't want Borland's fancy exception handling
NOEHLIB=noeh32.lib
.autodepend
.c.obj:
$(CC) -c $(CFLAGS) $<
OBJ1=png.obj pngerror.obj pngget.obj pngmem.obj pngpread.obj
OBJ2=pngread.obj pngrio.obj pngrtran.obj pngrutil.obj pngset.obj
$(CC) -c $(CFLAGS) $<
.c.exe:
$(CC) $(CFLAGS) $< $(PNGLIB) $(NOEHLIB)
OBJ1=png.obj pngerror.obj pngget.obj pngmem.obj pngpread.obj
OBJ2=pngread.obj pngrio.obj pngrtran.obj pngrutil.obj pngset.obj
OBJ3=pngtrans.obj pngwio.obj pngwrite.obj pngwtran.obj pngwutil.obj
all: $(PNGDLL)
test: pngtest.exe
pngtest
$(PNGDLL): $(OBJ1) $(OBJ2) $(OBJ3) $(ZLIBDIR)\$(ZLIB)
$(LINK) @&&|
$(LINKFLAGS) $(LIBDIR)\c0d32 +
$(OBJ1) +
$(OBJ2) +
$(LINK) @&&|
$(LINKFLAGS)
-e$(PNGDLL)
$(OBJ1)
$(OBJ2)
$(OBJ3)
$@
-x
$(ZLIBDIR)\$(ZLIB) $(LIBDIR)\import32 $(LIBDIR)\cw32
|,&&|
LIBRARY $(@B)
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
$(ZLIBDIR)\$(ZLIB)
$(NOEHLIB)
|
$(IMPLIB) -c $(@R).lib $@
$(IMPLIB) -c $(@R).lib $@
# Clean up anything else you want
clean:
-del *.obj
-del *.dll
-del *.exe
-del *.lib
-del *.lst
-del *.map
-del *.tds
# End of makefile for png32bd.dll

View File

@@ -31,7 +31,7 @@ RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.5s
PNGMIN = 1.0.6
PNGVER = $(PNGMAJ).$(PNGMIN)
# where make install puts libpng.a, libpng.so*, and png.h

View File

@@ -1,39 +1,38 @@
# Makefile for libpng
# Borland C++ 4.5 (Note: All modules are compiled in C mode)
# Will work with C++ 4.02 also
# To build the library, do:
# "make -fmakefile.borland -DMODEL=m"
# or: "make -fmakefile.borland -DMODEL=l"
# 16-bit Borland C++ (Note: All modules are compiled in C mode)
# To build the library, do:
# "make -fmakefile.bor -DMODEL=c"
# or: "make -fmakefile.bor -DMODEL=l"
#
# ------------- Borland C++ 4.5 -------------
# ------------ Borland C++ ------------
### Absolutely necessary for this makefile to work
.AUTODEPEND
## Useful user options
## Where zlib.h, zconf.h and zlib_MODEL.lib are
ZLIB_DIR=..\zlib
# Usually defined in builtins.mak or the environment
# Currently unused.
!ifndef BCROOT
BCROOT=N:\BC45
!endif
# Where zlib.h and zconf.h and zlib.lib are
ZLIB_PATH=..\zlib
## Compiler, linker and lib stuff
CC=bcc
LD=bcc
LIB=tlib
!ifndef MODEL
MODEL=l
!endif
MODEL_ARG=-m$(MODEL)
#TARGET_CPU=3
# 2 = 286, 3 = 386, etc.
!ifndef TARGET_CPU
TARGET_CPU=2
!endif
# Use this if you don't want Borland's fancy exception handling.
NOEHLIB=noeh$(MODEL).lib
# Use this if you don't want Borland's fancy exception handling
# (for Borland C++ 4.0 or later)
#NOEHLIB=noeh$(MODEL).lib
!ifdef DEBUG
CDEBUG=-v
@@ -49,59 +48,50 @@ CDEBUG=$(CDEBUG) -N
LDEBUG=$(LDEBUG) -N
!endif
## Compiler, linker, and lib stuff
CC=bcc
LD=bcc
LIB=tlib
MODELARG=-m$(MODEL)
# -X- turns on dependency generation in the object file
# -w sets all warnings on
# -X- turn on dependency generation in the object file
# -w set all warnings on
# -O2 optimize for speed
# -Z global optimization
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_PATH) -$(TARGET_CPU) $(MODELARG) $(CDEBUG)
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
# -M generate map file
LDFLAGS=-M $(LDEBUG)
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
O=obj
## variables
## Variables
OBJS = \
png.$(O) \
pngerror.$(O) \
pngmem.$(O) \
pngpread.$(O) \
pngset.$(O) \
pngget.$(O) \
pngread.$(O) \
pngrio.$(O) \
pngrtran.$(O) \
pngrutil.$(O) \
pngtrans.$(O) \
pngwrite.$(O) \
pngwtran.$(O) \
pngwio.$(O) \
pngwutil.$(O)
png.obj \
pngerror.obj \
pngget.obj \
pngmem.obj \
pngpread.obj \
pngread.obj \
pngrio.obj \
pngrtran.obj \
pngrutil.obj \
pngset.obj \
pngtrans.obj \
pngwio.obj \
pngwrite.obj \
pngwtran.obj \
pngwutil.obj
LIBOBJS = \
+png.$(O) \
+pngerror.$(O) \
+pngmem.$(O) \
+pngpread.$(O) \
+pngread.$(O) \
+pngset.$(O) \
+pngget.$(O) \
+pngrio.$(O) \
+pngrtran.$(O) \
+pngrutil.$(O) \
+pngtrans.$(O) \
+pngwrite.$(O) \
+pngwtran.$(O) \
+pngwio.$(O) \
+pngwutil.$(O)
+png.obj \
+pngerror.obj \
+pngget.obj \
+pngmem.obj \
+pngpread.obj \
+pngread.obj \
+pngrio.obj \
+pngrtran.obj \
+pngrutil.obj \
+pngset.obj \
+pngtrans.obj \
+pngwio.obj \
+pngwrite.obj \
+pngwtran.obj \
+pngwutil.obj
LIBNAME=libpng$(MODEL).lib
@@ -113,10 +103,12 @@ LIBNAME=libpng$(MODEL).lib
$(CC) $(CFLAGS) -c {$*.c }
.c.exe:
$(CC) $(CFLAGS) $(LDFLAGS) $*.c
$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
## Major targets
all: libpng pngtest
libpng: $(LIBNAME)
pngtest: pngtest$(MODEL).exe
@@ -128,17 +120,17 @@ test: pngtest$(MODEL).exe
## Minor Targets
png.obj: png.c
pngset.obj: pngset.c
pngerror.obj: pngerror.c
pngget.obj: pngget.c
pngread.obj: pngread.c
pngmem.obj: pngmem.c
pngpread.obj: pngpread.c
pngread.obj: pngread.c
pngrio.obj: pngrio.c
pngrtran.obj: pngrtran.c
pngrutil.obj: pngrutil.c
pngerror.obj: pngerror.c
pngmem.obj: pngmem.c
pngrio.obj: pngrio.c
pngwio.obj: pngwio.c
pngset.obj: pngset.c
pngtrans.obj: pngtrans.c
pngwio.obj: pngwio.c
pngwrite.obj: pngwrite.c
pngwtran.obj: pngwtran.c
pngwutil.obj: pngwutil.c
@@ -155,14 +147,16 @@ pngtest$(MODEL).obj: pngtest.c
$(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
pngtest$(MODEL).exe: pngtest$(MODEL).obj
$(CC) $(MODELARG) $(LDFLAGS) -L$(ZLIB_PATH) pngtest$(MODEL).obj $(LIBNAME) zlib$(MODEL).lib $(NOEHLIB)
$(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
# Clean up anything else you want
clean:
-del *.obj
-del *.exe
-del *.lib
-del *.lst
-del *.map
# End of makefile for libpng

View File

@@ -14,7 +14,7 @@ ZLIBINC=../zlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.5s
PNGMIN = 1.0.6
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=cc

66
scripts/makefile.gcc Normal file
View File

@@ -0,0 +1,66 @@
# makefile for libpng using gcc (generic, static library)
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# Copyright (C) 2000 Cosmin Truta
# For conditions of distribution and use, see copyright notice in png.h
# Location of the zlib library and include files
ZLIBINC = ../zlib
ZLIBLIB = ../zlib
# Compiler, linker, lib and other tools
CC = gcc
LD = $(CC)
AR = ar rcs
RANLIB = ranlib
RM = rm -f
CDEBUG = -g -DPNG_DEBUG=5
LDDEBUG =
CRELEASE = -O2
LDRELEASE = -s
CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE)
LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE)
# File extensions
O=.o
A=.a
E=
# Variables
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
# Targets
all: libpng$(A) pngtest$(E)
libpng$(A): $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
test: pngtest$(E)
./pngtest$(E)
pngtest$(E): pngtest$(O) libpng$(A)
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
clean:
$(RM) *$(O) libpng$(A) pngtest$(E) pngout.png
png$(O): png.h pngconf.h
pngerror$(O): png.h pngconf.h
pngget$(O): png.h pngconf.h
pngmem$(O): png.h pngconf.h
pngpread$(O): png.h pngconf.h
pngread$(O): png.h pngconf.h
pngrio$(O): png.h pngconf.h
pngrtran$(O): png.h pngconf.h
pngrutil$(O): png.h pngconf.h
pngset$(O): png.h pngconf.h
pngtest$(O): png.h pngconf.h
pngtrans$(O): png.h pngconf.h
pngwio$(O): png.h pngconf.h
pngwrite$(O): png.h pngconf.h
pngwtran$(O): png.h pngconf.h
pngwutil$(O): png.h pngconf.h

View File

@@ -1,6 +1,6 @@
# makefile for libpng on Linux ELF with gcc using MMX assembler code
# Copyright (C) 1996, 1997 Andreas Dilger
# Copyright (C) 1998, 1999, 2000 Greg Roelofs
# Copyright (C) 1998-2000 Greg Roelofs
# For conditions of distribution and use, see copyright notice in png.h
CC=gcc
@@ -34,7 +34,7 @@ RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.5s
PNGMIN = 1.0.6
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
@@ -53,6 +53,20 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a libpng.so pngtest
pnggccrd.o: png.h pngconf.h pngasmrd.h
@echo ""
@echo ' You can ignore the single "control reaches end of non-void function"'
@echo ' warning and multiple "<variable> defined but not used" warnings:'
@echo ""
$(CC) -c $(CFLAGS) -o $@ $*.c
pnggccrd.pic.o: png.h pngconf.h pngasmrd.h
@echo ""
@echo ' You can ignore the single "control reaches end of non-void function"'
@echo ' warning and multiple "<variable> defined but not used" warnings:'
@echo ""
$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
@@ -74,8 +88,8 @@ test: pngtest
./pngtest
install: libpng.a libpng.so.$(PNGVER)
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
cp png.h pngconf.h $(INCPATH)
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
@@ -108,6 +122,5 @@ pngwrite.o pngwrite.pic.o: png.h pngconf.h
pngwtran.o pngwtran.pic.o: png.h pngconf.h
pngwutil.o pngwutil.pic.o: png.h pngconf.h
pngpread.o pngpread.pic.o: png.h pngconf.h
pnggccrd.o pnggccrd.pic.o: png.h pngconf.h
pngtest.o: png.h pngconf.h

71
scripts/makefile.ibmvac3 Normal file
View File

@@ -0,0 +1,71 @@
# Makefile for libpng
# IBM VisualAge/C++ version 3.x for Win32 and OS/2 (static)
# Copyright (C) 2000 Cosmin Truta
# Notes:
# Derived from makefile.std
# All modules are compiled in C mode
# Tested with VAC++ 3.6.5 under Win32, expected to work under OS/2 too
# Can be easily adapted for IBM VisualAge/C++ for AIX
# For conditions of distribution and use, see copyright notice in png.h
# Location of the zlib library and include files
ZLIBINC = ../zlib
ZLIBLIB = ../zlib
# Compiler, linker, lib and other tools
CC = icc
LD = ilink
AR = ilib
RM = del
CFLAGS = -I$(ZLIBINC) -O2 -W3
LDFLAGS =
# File extensions
O=.obj
A=.lib
E=.exe
# Variables
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
# Targets
all: libpng$(A) pngtest$(E)
libpng$(A): $(OBJS)
$(AR) -out:$@ $(OBJS)
test: pngtest$(E)
pngtest$(E)
pngtest: pngtest$(E)
pngtest$(E): pngtest$(O) libpng$(A)
$(LD) $(LDFLAGS) pngtest$(O) $(LIBS)
clean:
$(RM) *$(O)
$(RM) libpng$(A)
$(RM) pngtest$(E)
$(RM) pngout.png
png$(O): png.h pngconf.h
pngerror$(O): png.h pngconf.h
pngget$(O): png.h pngconf.h
pngmem$(O): png.h pngconf.h
pngpread$(O): png.h pngconf.h
pngread$(O): png.h pngconf.h
pngrio$(O): png.h pngconf.h
pngrtran$(O): png.h pngconf.h
pngrutil$(O): png.h pngconf.h
pngset$(O): png.h pngconf.h
pngtest$(O): png.h pngconf.h
pngtrans$(O): png.h pngconf.h
pngwio$(O): png.h pngconf.h
pngwrite$(O): png.h pngconf.h
pngwtran$(O): png.h pngconf.h
pngwutil$(O): png.h pngconf.h

View File

@@ -34,7 +34,7 @@ RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.5s
PNGMIN = 1.0.6
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
@@ -74,8 +74,8 @@ test: pngtest
./pngtest
install: libpng.a libpng.so.$(PNGVER)
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
cp png.h pngconf.h $(INCPATH)
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)

View File

@@ -4,8 +4,8 @@
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
# -------- Microsoft C 5.1 and later, does not use assembler code -----
MODEL=-AL
CFLAGS=-Oait -Gs -nologo -W3 $(MODEL) -I..\zlib
MODEL=L
CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib
#-Ox generates bad code with MSC 5.1
CC=cl
LD=link

View File

@@ -25,7 +25,7 @@ RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.5s
PNGMIN = 1.0.6
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

90
scripts/makefile.sggcc Normal file
View File

@@ -0,0 +1,90 @@
# makefile for libpng, SGI IRIX with gcc
# 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
# Where the zlib library and include files are located
ZLIBLIB=/usr/local/lib32
ZLIBINC=/usr/local/include
#ZLIBLIB=../zlib
#ZLIBINC=../zlib
CC=gcc
WARNMORE=
CFLAGS=-I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 # -g -DPNG_DEBUG=5
# zlib must also be compiled with n32
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=gcc -shared
VER=1.0.6
LIBS=libpng.so.1.0.6
SHAREDLIB=libpng.so
libdir=$(prefix)/lib32
RANLIB=echo
#RANLIB=ranlib
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 $(SHAREDLIB).$(VER) pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
$(SHAREDLIB).$(VER): $(OBJS)
$(LDSHARED) -o $@ $(OBJS)
rm -f $(SHAREDLIB) $(SHAREDLIB).1
ln -s $@ $(SHAREDLIB)
ln -s $@ $(SHAREDLIB).1
pngtest: pngtest.o libpng.a
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
test: pngtest
./pngtest
install: libpng.a
-@mkdir $(prefix)/include
-@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 libpng.a $(prefix)/lib
chmod 644 $(prefix)/lib/libpng.a
cp $(SHAREDLIB).$(VER) $(libdir); chmod 755 $(SHAREDLIB).$(VER)
cd $(libdir); if test -f $(SHAREDLIB).$(VER); then \
rm -f $(SHAREDLIB) $(SHAREDLIB).1; \
ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \
ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \
(ldconfig || true) >/dev/null 2>&1; \
fi
clean:
rm -f *.o libpng.a pngtest pngout.png
# 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

View File

@@ -31,7 +31,7 @@ RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.5s
PNGMIN = 1.0.6
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@@ -1,15 +1,17 @@
# Makefile for libpng
# TurboC++ 3.0 (Note: All modules are compiled in C mode)
# TurboC/C++ (Note: All modules are compiled in C mode)
# To use, do "make -fmakefile.turboc3"
# To use, do "make -fmakefile.tc3"
# ------------- Turbo C++ 3.0 -------------
MODEL=-ml
CFLAGS=-O2 -Z $(MODEL) -I..\zlib
# ------ Turbo C 3.00 (can be modified to work with earlier versions)------
MODEL=l
CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib
#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00
CC=tcc
LD=tcc
LIB=tlib
LDFLAGS=$(MODEL) -L..\zlib
LDFLAGS=-m$(MODEL) -L..\zlib
O=.obj
E=.exe
@@ -21,7 +23,12 @@ OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O)
OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O)
OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O)
all: libpng.lib pngtest.exe
all: libpng$(MODEL).lib pngtest$(E)
pngtest: pngtest$(E)
test: pngtest$(E)
pngtest$(E)
png$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c
@@ -71,12 +78,12 @@ pngwtran$(O): png.h pngconf.h
pngwutil$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
$(LIB) libpng +$(OBJSL1)
$(LIB) libpng +$(OBJSL2)
$(LIB) libpng +$(OBJSL3)
libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
$(LIB) libpng$(MODEL) +$(OBJSL1)
$(LIB) libpng$(MODEL) +$(OBJSL2)
$(LIB) libpng$(MODEL) +$(OBJSL3)
pngtest$(E): pngtest$(O) libpng.lib
$(CC) $(LDFLAGS) pngtest.obj libpng.lib zlib.lib
pngtest$(E): pngtest$(O) libpng$(MODEL).lib
$(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib
# End of makefile for libpng

View File

@@ -11,7 +11,6 @@
# If you don't want to use assembler code, use makefile.vcwin32 instead.
MODEL=-
CFLAGS=-DPNG_USE_PNGVCRD -Ox -GA3s -nologo -W3 -I..\zlib
CC=cl

View File

@@ -7,7 +7,6 @@
# ---------- Microsoft Visual C++ 4.0 and later, no assembler code------
# If you want to use assembler code, use makefile.vcawin32 instead.
MODEL=-
CFLAGS= -Ox -GA3s -nologo -W3 -I..\zlib
CC=cl

View File

@@ -3,7 +3,7 @@ unit pngdef;
interface
const
PNG_LIBPNG_VER_STRING = '1.0.5n';
PNG_LIBPNG_VER_STRING = '1.0.6';
PNG_LIBPNG_VER = 10006;
type
@@ -450,6 +450,10 @@ procedure png_set_cHRM(png_ptr: png_structp; info_ptr: png_infop;
white_x, white_y, red_x, red_y, green_x, green_y,
blue_x, blue_y: double);
stdcall;
procedure png_set_cHRM_fixed(png_ptr: png_structp; info_ptr: png_infop;
white_x, white_y, red_x, red_y, green_x, green_y,
blue_x, blue_y: png_fixed_point);
stdcall;
procedure png_set_compression_level(png_ptr: png_structp; level: int);
stdcall;
procedure png_set_compression_mem_level(png_ptr: png_structp;
@@ -489,6 +493,9 @@ procedure png_set_flush(png_ptr: png_structp; nrows: int);
procedure png_set_gAMA(png_ptr: png_structp; info_ptr: png_infop;
file_gamma: double);
stdcall;
procedure png_set_gAMA_fixed(png_ptr: png_structp; info_ptr: png_infop;
file_gamma: png_fixed_point);
stdcall;
procedure png_set_gamma(png_ptr: png_structp; screen_gamma,
default_file_gamma: double);
stdcall;
@@ -540,7 +547,11 @@ procedure png_set_read_user_chunk_fn(png_ptr: png_structp;
procedure png_set_read_user_transform_fn(png_ptr: png_structp;
read_user_transform_fn: png_user_transform_ptr);
stdcall;
procedure png_set_rgb_to_gray(png_ptr: png_structp; int: error_action);
procedure png_set_rgb_to_gray(png_ptr: png_structp; int: error_action;
red_weight, green_weight: double);
stdcall;
procedure png_set_rgb_to_gray_fixed(png_ptr: png_structp; int: error_action;
red_weight, green_weight: png_fixed_point);
stdcall;
procedure png_set_rows(png_ptr: png_structp; info_ptr: png_infop;
row_pointers: png_bytepp);
@@ -705,6 +716,7 @@ procedure png_set_bKGD; external pngDLL;
procedure png_set_background; external pngDLL;
procedure png_set_bgr; external pngDLL;
procedure png_set_cHRM; external pngDLL;
procedure png_set_cHRM_fixed; external pngDLL;
procedure png_set_compression_level; external pngDLL;
procedure png_set_compression_mem_level; external pngDLL;
procedure png_set_compression_method; external pngDLL;
@@ -719,6 +731,7 @@ procedure png_set_filter; external pngDLL;
procedure png_set_filter_heuristics; external pngDLL;
procedure png_set_flush; external pngDLL;
procedure png_set_gAMA; external pngDLL;
procedure png_set_gAMA_fixed; external pngDLL;
procedure png_set_gamma; external pngDLL;
procedure png_set_gray_to_rgb; external pngDLL;
procedure png_set_hIST; external pngDLL;
@@ -734,6 +747,8 @@ procedure png_set_progressive_read_fn; external pngDLL;
procedure png_set_read_fn; external pngDLL;
procedure png_set_read_status_fn; external pngDLL;
procedure png_set_read_user_transform_fn; external pngDLL;
procedure png_set_rgb_to_gray; external pngDLL;
procedure png_set_rgb_to_gray_fixed; external pngDLL;
procedure png_set_rows; external pngDLL;
procedure png_set_sBIT; external pngDLL;
procedure png_set_sRGB; external pngDLL;

View File

@@ -31,6 +31,7 @@ EXPORTS
png_set_bgr
png_set_gray_to_rgb
png_set_rgb_to_gray
png_set_rgb_to_gray_fixed
png_set_rows
png_build_grayscale_palette
png_set_strip_alpha
@@ -131,8 +132,10 @@ EXPORTS
png_set_bKGD
png_get_cHRM
png_set_cHRM
png_set_cHRM_fixed
png_get_gAMA
png_set_gAMA
png_set_gAMA_fixed
png_get_hIST
png_set_hIST
png_get_IHDR