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.4beta2.tar
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
# Modeled after libxml-config.
|
||||
|
||||
version=1.2.4beta1
|
||||
version=1.2.4beta2
|
||||
prefix=""
|
||||
cppflags=""
|
||||
cflags=""
|
||||
|
||||
@@ -6,6 +6,6 @@ includedir=${exec_prefix}/include
|
||||
|
||||
Name: libpng12
|
||||
Description: Loads and saves PNG files
|
||||
Version: 1.2.4beta1
|
||||
Version: 1.2.4beta2
|
||||
Libs: -L${libdir} -lpng12 -lz -lm
|
||||
Cflags: -I${includedir}/libpng12
|
||||
|
||||
@@ -33,7 +33,7 @@ RANLIB=echo
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
||||
@@ -33,7 +33,7 @@ RANLIB=echo
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
||||
@@ -17,7 +17,7 @@ RANLIB = ranlib
|
||||
RM = rm -f
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
@@ -12,7 +12,7 @@ ZLIBLIB=/usr/local/lib
|
||||
ZLIBINC=/usr/local/include
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
ALIGN=
|
||||
|
||||
@@ -78,8 +78,8 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGDLL = 12
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGDLL = 13
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
SHAREDLIB=cygpng$(PNGDLL).dll
|
||||
|
||||
@@ -23,7 +23,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
|
||||
RANLIB=ranlib
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ ZLIBLIB=../zlib
|
||||
ZLIBINC=../zlib
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@@ -73,7 +73,8 @@ $(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
||||
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
||||
|
||||
$(LIBNAME).so.$(PNGVER): $(OBJS)
|
||||
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) -lz -lm
|
||||
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB)
|
||||
-soname $(LIBNAME).so.$(PNGMAJ) -lz -lm
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
@@ -15,16 +15,17 @@
|
||||
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=gcc
|
||||
|
||||
# where "make install" puts libpng.a, libpng12/libpng12.so*,
|
||||
# $(LIBNAME)/png.h and $(LIBNAME)/pngconf.h
|
||||
# where "make install" puts libpng12.a, libpng12.so*,
|
||||
# libpng12/png.h and libpng12/pngconf.h
|
||||
# Prefix must be a full pathname.
|
||||
prefix=/usr/local
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
# Where the zlib library and include files are located.
|
||||
#ZLIBLIB=/usr/local/lib
|
||||
#ZLIBINC=/usr/local/include
|
||||
ZLIBLIB=../zlib
|
||||
@@ -93,6 +94,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
@@ -102,7 +107,7 @@ libpng-config:
|
||||
echo cppflags=\"-I$(INCPATH)/$(LIBNAME) -DPNG_THREAD_UNSAFE_OK \
|
||||
-DPNG_USE_PNGGCCRD\"; \
|
||||
echo cflags=\"\"; \
|
||||
echo ldflags=\"\"; \
|
||||
echo ldflags=\"-L$(LIBPATH) -Wl,-rpath,$(LIBPATH)\"; \
|
||||
echo libs=\"-lpng12 -lz -lm\"; \
|
||||
cat scripts/libpng-config-body.in ) > libpng-config
|
||||
chmod +x libpng-config
|
||||
@@ -113,10 +118,6 @@ pnggccrd.o: pnggccrd.c png.h pngconf.h
|
||||
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
|
||||
@@ -124,8 +125,9 @@ $(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
||||
|
||||
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
||||
$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \
|
||||
$(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc
|
||||
$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
|
||||
-o $(LIBNAME).so.$(PNGVER) \
|
||||
$(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc
|
||||
|
||||
pngtest: pngtest.o $(LIBNAME).so
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
@@ -201,9 +203,16 @@ install-config: libpng-config
|
||||
|
||||
install: install-static install-shared install-man install-config
|
||||
|
||||
test-installed:
|
||||
$(CC) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/libpng12-config --cppflags --cflags` pngtest.c \
|
||||
-o pngtesti `$(BINPATH)/libpng12-config --ldflags --libs` \
|
||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB)
|
||||
pngtesti pngtest.png
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
||||
pngtest pngout.png
|
||||
/bin/rm -f *.o libpng.a pngtest pngout.png libpng.pc libpng-config \
|
||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
|
||||
@@ -33,7 +33,7 @@ RANLIB=ranlib
|
||||
#RANLIB=echo
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
RANLIB=ranlib
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
|
||||
@@ -5,16 +5,17 @@
|
||||
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=gcc
|
||||
|
||||
# where "make install" puts libpng12.a, libpng12/libpng12.so*,
|
||||
# where "make install" puts libpng12.a, libpng12.so*,
|
||||
# libpng12/png.h and libpng12/pngconf.h
|
||||
# Prefix must be a full pathname.
|
||||
prefix=/usr/local
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
# Where the zlib library and include files are located.
|
||||
#ZLIBLIB=/usr/local/lib
|
||||
#ZLIBINC=/usr/local/include
|
||||
ZLIBLIB=../zlib
|
||||
@@ -70,7 +71,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
||||
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@@ -108,7 +109,7 @@ pngtest-static: pngtest.o libpng.a
|
||||
|
||||
test: pngtest pngtest-static
|
||||
@echo ""
|
||||
@echo " Running pngtest dynamically linked with libpng12.so:"
|
||||
@echo " Running pngtest dynamically linked with $(LIBNAME).so:"
|
||||
@echo ""
|
||||
./pngtest
|
||||
@echo ""
|
||||
@@ -174,9 +175,16 @@ install-config: libpng-config
|
||||
|
||||
install: install-static install-shared install-man install-config
|
||||
|
||||
test-installed:
|
||||
$(CC) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/libpng12-config --cppflags --cflags` pngtest.c \
|
||||
-o pngtesti `$(BINPATH)/libpng12-config --ldflags --libs` \
|
||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB)
|
||||
pngtesti pngtest.png
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNMAJ)* \
|
||||
pngtest pngout.png
|
||||
/bin/rm -f *.o libpng.a pngtest pngout.png libpng.pc libpng-config \
|
||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
|
||||
@@ -17,7 +17,7 @@ ZLIBINC=../zlib
|
||||
CC=cc
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
|
||||
|
||||
@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng12
|
||||
|
||||
LIB= png12
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.2.4beta1
|
||||
SHLIB_MINOR= 1.2.4beta2
|
||||
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.4beta1
|
||||
SHLIB_MINOR= 1.2.4beta2
|
||||
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.4beta1
|
||||
SHLIB_MINOR= 1.2.4beta2
|
||||
|
||||
LIB= png
|
||||
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
|
||||
|
||||
@@ -24,7 +24,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
|
||||
RANLIB=echo
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
|
||||
@@ -1,36 +1,43 @@
|
||||
# makefile for libpng, SGI IRIX with gcc
|
||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
||||
# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc'
|
||||
# Copyright (C) 2001-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 puts libpng.a, libpng12.so, and libpng12/png.h
|
||||
# Prefix must be a full pathname.
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
ZLIBLIB=/usr/local/lib32
|
||||
ZLIBINC=/usr/local/include
|
||||
#ZLIBLIB=../zlib
|
||||
#ZLIBINC=../zlib
|
||||
#ZLIBLIB=/usr/local/lib32
|
||||
#ZLIBINC=/usr/local/include
|
||||
#ZLIBLIB=/usr/local/lib
|
||||
#ZLIBINC=/usr/local/include
|
||||
ZLIBLIB=../zlib
|
||||
ZLIBINC=../zlib
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
CC=gcc
|
||||
|
||||
# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
|
||||
# See "man abi". zlib must be built with the same ABI.
|
||||
ABI=
|
||||
|
||||
CC=gcc
|
||||
|
||||
WARNMORE= # -g -DPNG_DEBUG=5
|
||||
CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
|
||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
LDSHARED=CC $(ABI) -shared
|
||||
LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ)
|
||||
# See "man dso" for info about shared objects
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBS=$(LIBNAME).so.$(PNGVER)
|
||||
RANLIB=echo
|
||||
#RANLIB=ranlib
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(prefix)/lib32
|
||||
LIBPATH=$(prefix)/lib
|
||||
#LIBPATH=$(prefix)/lib32
|
||||
MANPATH=$(prefix)/man
|
||||
BINPATH=$(prefix)/bin
|
||||
|
||||
@@ -49,21 +56,21 @@ DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
RANLIB=echo
|
||||
#RANLIB=ranlib
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
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 $(LIBNAME).so.$(PNGVER) pngtest libpng.pc libpng-config
|
||||
all: libpng.a pngtest shared libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
shared: $(LIBNAME).so.$(PNGVER)
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > \
|
||||
libpng.pc
|
||||
|
||||
libpng-config:
|
||||
( cat scripts/libpng-config-head.in; \
|
||||
@@ -71,24 +78,29 @@ libpng-config:
|
||||
echo cppflags=\"-I$(INCPATH)/$(LIBNAME) -DPNG_USE_PNGGCCRD \
|
||||
-DPNG_NO_ASSEMBLER_CODE\"; \
|
||||
echo cflags=\"$(ABI)\"; \
|
||||
echo ldflags=\"-L$(LIBPATH)\"; \
|
||||
echo ldflags=\"-L$(LIBPATH) -rpath $(LIBPATH) \"; \
|
||||
echo libs=\"-lpng12 -lz -lm\"; \
|
||||
cat scripts/libpng-config-body.in ) > libpng-config
|
||||
chmod +x libpng-config
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
|
||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
||||
|
||||
$(LIBNAME).so.$(PNGVER): $(OBJS)
|
||||
$(LDSHARED) -o $@ $(OBJS)
|
||||
rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -s -f $@ $(LIBNAME).so
|
||||
ln -s -f $@ $(LIBNAME).so.$(PNGMAJ)
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
test: pngtest
|
||||
echo
|
||||
echo Testing local static library.
|
||||
./pngtest
|
||||
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
@@ -147,8 +159,25 @@ install-config: libpng-config
|
||||
|
||||
install: install-static install-shared install-man install-config
|
||||
|
||||
# If you installed in $(DESTDIR), test-installed won't work until you
|
||||
# move the library to its final location.
|
||||
|
||||
test-installed:
|
||||
$(CC) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/libpng12-config --cppflags --cflags` pngtest.c \
|
||||
-o pngtesti `$(BINPATH)/libpng12-config --ldflags --libs` \
|
||||
-L$(ZLIBLIB) -rpath $(ZLIBLIB)
|
||||
echo
|
||||
echo Testing installed dynamic shared library.
|
||||
pngtesti pngtest.png
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a pngtest pngout.png
|
||||
rm -f *.o libpng.a pngtest pngout.png libpng.pc libpng-config \
|
||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* so_locations
|
||||
|
||||
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.
|
||||
|
||||
@@ -168,4 +197,5 @@ 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
|
||||
|
||||
|
||||
@@ -3,7 +3,14 @@
|
||||
# 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, libpng12.so and libpng12/png.h
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Where make install puts libpng.a, libpng12.so, and libpng12/png.h
|
||||
# Prefix must be a full pathname.
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
@@ -26,14 +33,9 @@ WARNMORE=-fullwarn
|
||||
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE
|
||||
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm
|
||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
LDSHARED=cc $(ABI) -shared
|
||||
LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ)
|
||||
# See "man dso" for info about shared objects
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
RANLIB=echo
|
||||
#RANLIB=ranlib
|
||||
|
||||
@@ -42,7 +44,6 @@ LIBPATH=$(prefix)/lib
|
||||
#LIBPATH=$(prefix)/lib32
|
||||
MANPATH=$(prefix)/man
|
||||
BINPATH=$(prefix)/bin
|
||||
BINPATH=$(prefix)/bin
|
||||
|
||||
# override DESTDIR= on the make install command line to easily support
|
||||
# installing into a temporary location. Example:
|
||||
@@ -65,6 +66,10 @@ OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
|
||||
all: libpng.a pngtest shared libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
shared: $(LIBNAME).so.$(PNGVER)
|
||||
|
||||
libpng.pc:
|
||||
@@ -76,33 +81,34 @@ libpng-config:
|
||||
echo cppflags=\"-I$(INCPATH)/$(LIBNAME) -DPNG_USE_PNGGCCRD \
|
||||
-DPNG_NO_ASSEMBLER_CODE\"; \
|
||||
echo cflags=\"$(ABI)\"; \
|
||||
echo ldflags=\"-L$(LIBPATH)\"; \
|
||||
echo ldflags=\"-L$(LIBPATH) -rpath $(LIBPATH) \"; \
|
||||
echo libs=\"-lpng12 -lz -lm\"; \
|
||||
cat scripts/libpng-config-body.in ) > libpng-config
|
||||
chmod +x libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
|
||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
||||
|
||||
$(LIBNAME).so.$(PNGVER): $(OBJS)
|
||||
$(LDSHARED) -o $@ $(OBJS)
|
||||
rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)
|
||||
ln -s -f $@ $(LIBNAME).so
|
||||
ln -s -f $@ $(LIBNAME).so.$(PNGMAJ)
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
test: pngtest
|
||||
echo
|
||||
echo Testing local static library.
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
@@ -156,9 +162,21 @@ install-config: libpng-config
|
||||
|
||||
install: install-static install-shared install-man install-config
|
||||
|
||||
# If you installed in $(DESTDIR), test-installed won't work until you
|
||||
# move the library to its final location.
|
||||
|
||||
test-installed:
|
||||
echo
|
||||
echo Testing installed dynamic shared library.
|
||||
$(CC) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/libpng12-config --cppflags --cflags` pngtest.c \
|
||||
-o pngtesti `$(BINPATH)/libpng12-config --ldflags --libs` \
|
||||
-L$(ZLIBLIB) -rpath $(ZLIBLIB)
|
||||
pngtesti pngtest.png
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a pngtest pngout.png $(LIBNAME).so \
|
||||
$(LIBNAME).so.$(PNGMAJ)*
|
||||
rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \
|
||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* so_locations
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
|
||||
@@ -34,7 +34,7 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
|
||||
RANLIB=echo
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@@ -123,14 +123,14 @@ install-headers: png.h pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng)
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
cp libpng.a $(DL)/$(LIBNAME).a
|
||||
chmod 644 $(DL)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(DL)/libpng.a
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
||||
(cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
|
||||
@@ -30,7 +30,7 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
|
||||
RANLIB=echo
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGMIN = 1.2.4beta2
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ unit pngdef;
|
||||
interface
|
||||
|
||||
const
|
||||
PNG_LIBPNG_VER_STRING = '1.2.4beta1';
|
||||
PNG_LIBPNG_VER_STRING = '1.2.4beta2';
|
||||
PNG_LIBPNG_VER = 10204;
|
||||
|
||||
type
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
; PNG.LIB module definition file for OS/2
|
||||
;----------------------------------------
|
||||
|
||||
; Version 1.2.4beta1
|
||||
; Version 1.2.4beta2
|
||||
|
||||
LIBRARY PNG
|
||||
DESCRIPTION "PNG image compression library for OS/2"
|
||||
|
||||
Reference in New Issue
Block a user