Imported from libpng-1.2.2beta1.tar

This commit is contained in:
Glenn Randers-Pehrson
2002-02-21 23:14:23 -06:00
parent f50c91b7bd
commit 9c0f094b21
58 changed files with 634 additions and 425 deletions

View File

@@ -14,11 +14,12 @@ LIBPATH=$(prefix)/lib
ZLIBLIB=../zlib
ZLIBINC=../zlib
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
# have to change it.
PNGMAJ = 3
PNGMIN = 1.2.1
PNGMAJ = 0
PNGMIN = 1.2.2beta1
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
CC=cc
CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
@@ -31,19 +32,19 @@ 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.so libpng.a pngtest
all: $(LIBNAME).so libpng.a pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.so: libpng.so.$(PNGMAJ)
ln -f -s libpng.so.$(PNGMAJ) libpng.so
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
libpng.so.$(PNGVER): $(OBJS)
$(LIBNAME).so.$(PNGVER): $(OBJS)
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) -lz -lm
pngtest: pngtest.o libpng.a
@@ -52,23 +53,28 @@ pngtest: pngtest.o libpng.a
test: pngtest
./pngtest
install: libpng.a libpng.so.$(PNGVER)
install: libpng.a $(LIBNAME).so.$(PNGVER)
-@mkdir $(INCPATH)
-@mkdir $(LIBPATH)
-@mkdir $(INCPATH)/$(LIBNAME)
cp png.h $(INCPATH)
cp pngconf.h $(INCPATH)
chmod 644 $(INCPATH)/png.h
chmod 644 $(INCPATH)/pngconf.h
cp png.h $(INCPATH)/$(LIBNAME)
cp pngconf.h $(INCPATH)/$(LIBNAME)
chmod 644 $(INCPATH)/$(LIBNAME)/png.h
chmod 644 $(INCPATH)/$(LIBNAME)/pngconf.h
cp libpng.a $(LIBPATH)
cp libpng.so.$(PNGVER) $(LIBPATH)
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
chmod 644 $(LIBPATH)/libpng.a
chmod 644 $(LIBPATH)/libpng.so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
(cd $(LIBPATH); ln -f -s libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
ln -f -s libpng.so.$(PNGMAJ) libpng.so)
chmod 644 $(LIBPATH)/$(LIBNAME).so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/$(LIBNAME).so.$(PNGMAJ) $(LIBPATH)/$(LIBNAME).so
(cd $(LIBPATH); ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
clean:
/bin/rm -f *.o libpng.a libpng.so libpng.so.$(PNGMAJ)* pngtest pngout.png
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
# DO NOT DELETE THIS LINE -- make depend depends on it.