mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.0.5q.tar
This commit is contained in:
@@ -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.5h
|
||||
PNGMIN = 1.0.5q
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# where make install puts libpng.a, libpng.so*, and png.h
|
||||
|
||||
@@ -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.5h
|
||||
PNGMIN = 1.0.5q
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=cc
|
||||
|
||||
112
scripts/makefile.gcmmx
Normal file
112
scripts/makefile.gcmmx
Normal file
@@ -0,0 +1,112 @@
|
||||
# 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
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
CC=gcc
|
||||
|
||||
# where "make install" puts libpng.a, libpng.so*, png.h and pngconf.h
|
||||
prefix=/usr/local
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
#ZLIBLIB=/usr/local/lib
|
||||
#ZLIBINC=/usr/local/include
|
||||
ZLIBLIB=../zlib
|
||||
ZLIBINC=../zlib
|
||||
|
||||
ALIGN=
|
||||
# for i386:
|
||||
#ALIGN=-malign-loops=2 -malign-functions=2
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
|
||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||
|
||||
CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 $(ALIGN) \
|
||||
-funroll-loops -fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
|
||||
|
||||
RANLIB=ranlib
|
||||
#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.5q
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(prefix)/lib
|
||||
|
||||
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
|
||||
|
||||
OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
|
||||
.SUFFIXES: .c .o .pic.o
|
||||
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a libpng.so pngtest
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.so: libpng.so.$(PNGMAJ)
|
||||
ln -sf libpng.so.$(PNGMAJ) libpng.so
|
||||
|
||||
libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
|
||||
ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
|
||||
|
||||
libpng.so.$(PNGVER): $(OBJSDLL)
|
||||
$(CC) -shared -Wl,-soname,libpng.so.$(PNGMAJ) -o libpng.so.$(PNGVER) \
|
||||
$(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc
|
||||
|
||||
pngtest: pngtest.o libpng.so
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
test: pngtest
|
||||
./pngtest
|
||||
|
||||
install: libpng.a libpng.so.$(PNGVER)
|
||||
-@mkdir $(INCPATH) $(LIBPATH)
|
||||
cp png.h pngconf.h $(INCPATH)
|
||||
chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
|
||||
cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
|
||||
chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
|
||||
-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
|
||||
(cd $(LIBPATH); ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
|
||||
ln -sf libpng.so.$(PNGMAJ) libpng.so)
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a libpng.so* 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.pic.o: png.h pngconf.h
|
||||
pngerror.o pngerror.pic.o: png.h pngconf.h
|
||||
pngrio.o pngrio.pic.o: png.h pngconf.h
|
||||
pngwio.o pngwio.pic.o: png.h pngconf.h
|
||||
pngmem.o pngmem.pic.o: png.h pngconf.h
|
||||
pngset.o pngset.pic.o: png.h pngconf.h
|
||||
pngget.o pngget.pic.o: png.h pngconf.h
|
||||
pngread.o pngread.pic.o: png.h pngconf.h
|
||||
pngrtran.o pngrtran.pic.o: png.h pngconf.h
|
||||
pngrutil.o pngrutil.pic.o: png.h pngconf.h
|
||||
pngtrans.o pngtrans.pic.o: png.h pngconf.h
|
||||
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
|
||||
@@ -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.5h
|
||||
PNGMIN = 1.0.5q
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
||||
@@ -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.5h
|
||||
PNGMIN = 1.0.5q
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
||||
@@ -6,17 +6,6 @@
|
||||
|
||||
CC=gcc
|
||||
|
||||
case "`type ld`" in *ucb*) echo "
|
||||
# WARNING:
|
||||
# The commands "CC" and "LD" must NOT refer to /usr/ucb/cc and
|
||||
# /usr/ucb/ld. If they do, you need to adjust your PATH environment
|
||||
# variable to put /usr/ccs/bin ahead of /usr/ucb. The environment
|
||||
# variable LD_LIBRARY_PATH should not be set at all. If it is,
|
||||
# things are likely to break because of the libucb dependency that
|
||||
# is created.
|
||||
" ;;
|
||||
esac
|
||||
|
||||
# Where make install puts libpng.a, libpng.so*, and png.h
|
||||
prefix=/usr/local
|
||||
|
||||
@@ -42,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.5h
|
||||
PNGMIN = 1.0.5q
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
@@ -72,6 +61,18 @@ libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
|
||||
ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
|
||||
|
||||
libpng.so.$(PNGVER): $(OBJSDLL)
|
||||
@case "`type ld`" in *ucb*) \
|
||||
echo; \
|
||||
echo '## WARNING:'; \
|
||||
echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
|
||||
echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
|
||||
echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
|
||||
echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
|
||||
echo '## at all. If it is, things are likely to break because of'; \
|
||||
echo '## the libucb dependency that is created.'; \
|
||||
echo; \
|
||||
;; \
|
||||
esac
|
||||
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.$(PNGMAJ) \
|
||||
-o libpng.so.$(PNGVER) $(OBJSDLL) -lz
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ pngwutil$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
||||
echo something to del > libpng.lib
|
||||
del libpng.lib
|
||||
lib /OUT:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3)
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ pngwutil$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
||||
echo something to del > libpng.lib
|
||||
del libpng.lib
|
||||
lib /OUT:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ unit pngdef;
|
||||
interface
|
||||
|
||||
const
|
||||
PNG_LIBPNG_VER_STRING = '1.0.5h';
|
||||
PNG_LIBPNG_VER_STRING = '1.0.5n';
|
||||
PNG_LIBPNG_VER = 10006;
|
||||
|
||||
type
|
||||
@@ -56,6 +56,9 @@ type
|
||||
png_write_status_ptr = procedure(png_ptr: Pointer;
|
||||
row_number: png_uint_32; pass: int);
|
||||
stdcall;
|
||||
png_user_chunk_ptr = procedure(png_ptr: Pointer;
|
||||
data: png_unknown_chunkp);
|
||||
stdcall;
|
||||
png_user_transform_ptr = procedure(png_ptr: Pointer;
|
||||
row_info: Pointer; data: png_bytep);
|
||||
stdcall;
|
||||
@@ -380,6 +383,9 @@ function png_get_text(png_ptr: png_structp; info_ptr: png_infop;
|
||||
var text_ptr: png_textp; var num_text: int):
|
||||
png_uint_32;
|
||||
stdcall;
|
||||
function png_get_user_chunk_ptr(png_ptr: png_structp):
|
||||
png_voidp;
|
||||
stdcall;
|
||||
function png_get_valid(png_ptr: png_structp; info_ptr: png_infop;
|
||||
flag: png_uint_32): png_uint_32;
|
||||
stdcall;
|
||||
@@ -525,6 +531,9 @@ procedure png_set_read_fn(png_ptr: png_structp;
|
||||
procedure png_set_read_status_fn(png_ptr: png_structp;
|
||||
read_row_fn: png_read_status_ptr);
|
||||
stdcall;
|
||||
procedure png_set_read_user_chunk_fn(png_ptr: png_structp;
|
||||
read_user_chunk_fn: png_user_chunk_ptr);
|
||||
stdcall;
|
||||
procedure png_set_read_user_transform_fn(png_ptr: png_structp;
|
||||
read_user_transform_fn: png_user_transform_ptr);
|
||||
stdcall;
|
||||
@@ -613,14 +622,22 @@ procedure png_get_spalettes(png_ptr: png_structp;
|
||||
stdcall;
|
||||
procedure png_free_pCAL(png_ptr: png_structp; info_ptr: png_infop);
|
||||
stdcall;
|
||||
procedure png_free_sCAL(png_ptr: png_structp; info_ptr: png_infop);
|
||||
stdcall;
|
||||
procedure png_set_iCCP(png_ptr: png_structp; info_ptr: png_infop;
|
||||
name: png_charp; compression_type: int; profile: png_charp;
|
||||
proflen: int);
|
||||
stdcall;
|
||||
procedure png_free_hIST(png_ptr: png_structp; info_ptr: png_infop);
|
||||
stdcall;
|
||||
procedure png_free_iCCP(png_ptr: png_structp; info_ptr: png_infop);
|
||||
stdcall;
|
||||
procedure png_free_PLTE(png_ptr: png_structp; info_ptr: png_infop);
|
||||
stdcall;
|
||||
procedure png_free_text(png_ptr: png_structp; info_ptr: png_infop);
|
||||
stdcall;
|
||||
procedure png_free_tRNS(png_ptr: png_structp; info_ptr: png_infop);
|
||||
stdcall;
|
||||
procedure png_set_spalettes(png_ptr: png_structp; info_ptr: png_infop;
|
||||
entries: png_spalette_p; nentries: int);
|
||||
stdcall;
|
||||
@@ -673,6 +690,7 @@ function png_get_signature; external pngDLL;
|
||||
function png_get_tIME; external pngDLL;
|
||||
function png_get_tRNS; external pngDLL;
|
||||
function png_get_text; external pngDLL;
|
||||
function png_get_user_chunk_ptr; external pngDLL;
|
||||
function png_get_valid; external pngDLL;
|
||||
function png_get_x_offset_microns; external pngDLL;
|
||||
function png_get_x_offset_pixels; external pngDLL;
|
||||
@@ -735,6 +753,7 @@ procedure png_set_swap_alpha; external pngDLL;
|
||||
procedure png_set_tIME; external pngDLL;
|
||||
procedure png_set_tRNS; external pngDLL;
|
||||
procedure png_set_text; external pngDLL;
|
||||
procedure png_set_user_chunk_fn; external pngDLL;
|
||||
procedure png_set_write_fn; external pngDLL;
|
||||
procedure png_set_write_status_fn; external pngDLL;
|
||||
procedure png_set_write_user_transform_fn; external pngDLL;
|
||||
@@ -755,8 +774,12 @@ procedure png_get_iCCP; external pngDLL;
|
||||
procedure png_get_spalettes; external pngDLL;
|
||||
procedure png_free_pCAL; external pngDLL;
|
||||
procedure png_set_iCCP; external pngDLL;
|
||||
procedure png_free_hIST; external pngDLL;
|
||||
procedure png_free_iCCP; external pngDLL;
|
||||
procedure png_free_PLTE; external pngDLL;
|
||||
procedure png_free_sCAL; external pngDLL;
|
||||
procedure png_free_text; external pngDLL;
|
||||
procedure png_free_tRNS; external pngDLL;
|
||||
procedure png_set_spalettes; external pngDLL;
|
||||
procedure png_free_sPLT; external pngDLL;
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ EXPORTS
|
||||
png_set_dither
|
||||
png_set_gamma
|
||||
png_set_flush
|
||||
png_set_user_chunk_fn
|
||||
png_write_flush
|
||||
png_start_read_image
|
||||
png_read_update_info
|
||||
@@ -79,6 +80,7 @@ EXPORTS
|
||||
png_get_header_ver
|
||||
png_get_header_version
|
||||
png_get_libpng_ver
|
||||
png_get_user_chunk_ptr
|
||||
; png_get_mem_fn
|
||||
; png_set_mem_fn
|
||||
png_set_write_fn
|
||||
@@ -177,20 +179,24 @@ EXPORTS
|
||||
png_write_PLTE
|
||||
png_write_IDAT
|
||||
png_write_IEND
|
||||
png_write_gAMA
|
||||
png_write_sBIT
|
||||
png_write_cHRM
|
||||
png_write_sRGB
|
||||
png_write_tRNS
|
||||
png_write_bKGD
|
||||
png_write_cHRM
|
||||
png_write_gAMA
|
||||
png_write_hIST
|
||||
png_check_keyword
|
||||
png_write_tEXt
|
||||
png_write_zTXt
|
||||
png_write_iCCP
|
||||
png_write_iTXt
|
||||
png_write_oFFs
|
||||
png_write_pCAL
|
||||
png_write_pHYs
|
||||
png_write_sBIT
|
||||
png_write_sCAL
|
||||
png_write_sPLT
|
||||
png_write_sRGB
|
||||
png_check_keyword
|
||||
png_write_tEXt
|
||||
png_write_tIME
|
||||
png_write_tRNS
|
||||
png_write_zTXt
|
||||
png_write_finish_row
|
||||
png_write_start_row
|
||||
png_build_gamma_table
|
||||
@@ -229,18 +235,22 @@ EXPORTS
|
||||
png_handle_IHDR
|
||||
png_handle_PLTE
|
||||
png_handle_IEND
|
||||
png_handle_gAMA
|
||||
png_handle_sBIT
|
||||
png_handle_cHRM
|
||||
png_handle_sRGB
|
||||
png_handle_tRNS
|
||||
png_handle_bKGD
|
||||
png_handle_cHRM
|
||||
png_handle_gAMA
|
||||
png_handle_hIST
|
||||
png_handle_iCCP
|
||||
png_handle_iTXt
|
||||
png_handle_oFFs
|
||||
png_handle_pCAL
|
||||
png_handle_pHYs
|
||||
png_handle_tIME
|
||||
png_handle_sBIT
|
||||
png_handle_sCAL
|
||||
png_handle_sPLT
|
||||
png_handle_sRGB
|
||||
png_handle_tEXt
|
||||
png_handle_tIME
|
||||
png_handle_tRNS
|
||||
png_handle_zTXt
|
||||
png_handle_unknown
|
||||
png_check_chunk_name
|
||||
@@ -282,13 +292,16 @@ EXPORTS
|
||||
png_get_iCCP
|
||||
png_get_sCAL
|
||||
png_get_spalettes
|
||||
png_free_pCAL
|
||||
png_set_iCCP
|
||||
png_free_iCCP
|
||||
png_free_text
|
||||
png_free_sCAL
|
||||
png_set_spalettes
|
||||
png_free_hIST
|
||||
png_free_iCCP
|
||||
png_free_pCAL
|
||||
png_free_PLTE
|
||||
png_free_sCAL
|
||||
png_free_sPLT
|
||||
png_free_text
|
||||
png_free_tRNS
|
||||
|
||||
png_IHDR
|
||||
png_IDAT
|
||||
|
||||
Reference in New Issue
Block a user