Imported from libpng-1.2.2beta2.tar

This commit is contained in:
Glenn Randers-Pehrson
2002-02-23 18:55:25 -06:00
parent 9c0f094b21
commit c6de22da1d
56 changed files with 530 additions and 337 deletions

View File

@@ -32,8 +32,9 @@ 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.2beta1
PNGMIN = 1.2.2beta2
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
@@ -49,19 +50,19 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a libpng12.so pngtest
all: libpng.a $(LIBNAME).so pngtest
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng12.so: libpng12.so.$(PNGMAJ)
ln -f -s libpng12.so.$(PNGMAJ) libpng12.so
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
libpng12.so.$(PNGMAJ): libpng12.so.$(PNGVER)
ln -f -s libpng12.so.$(PNGVER) libpng12.so.$(PNGMAJ)
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
libpng12.so.$(PNGVER): $(OBJSDLL)
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
@case "`type ld`" in *ucb*) \
echo; \
echo '## WARNING:'; \
@@ -74,33 +75,45 @@ libpng12.so.$(PNGVER): $(OBJSDLL)
echo; \
;; \
esac
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng12.so.$(PNGMAJ) \
-o libpng12.so.$(PNGVER) $(OBJSDLL) -lz
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
-o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -lz
pngtest: pngtest.o libpng12.so
pngtest: pngtest.o $(LIBNAME).so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
test: pngtest
./pngtest
install: libpng.a libpng12.so.$(PNGVER)
-@mkdir $(INCPATH) $(LIBPATH)
-@mkdir $(INCPATH)/libpng12
cp png.h pngconf.h $(INCPATH)/libpng12
cp png.h pngconf.h $(INCPATH)/libpng12
install-static: libpng.a
-@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
chmod 644 $(INCPATH)/libpng12/png.h \
$(INCPATH)/libpng12/pngconf.h
cp libpng.a libpng12.so.$(PNGVER) $(LIBPATH)
chmod 755 $(LIBPATH)/libpng12.so.$(PNGVER)
-@/bin/rm -f $(LIBPATH)/libpng12.so.$(PNGMAJ) \
$(LIBPATH)/libpng12.so
(cd $(LIBPATH); \
ln -f -s libpng12.so.$(PNGVER) libpng12.so.$(PNGMAJ); \
ln -f -s libpng12.so.$(PNGMAJ) libpng12.so)
cp libpng.a $(LIBPATH)
chmod 644 $(LIBPATH)/libpng.a
install: libpng.a $(LIBNAME).so.$(PNGVER)
-@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi
-@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
-@if [ ! -d $(INCPATH)/$(LIBNAME) ]; then mkdir $(INCPATH)/$(LIBNAME); fi
cp png.h pngconf.h $(INCPATH)/$(LIBNAME)
chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
-@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
ln -f -s $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)
ln -f -s $(INCPATH)/$(LIBNAME)/pngconf.h $(INCPATH)
cp libpng.a $(LIBPATH)/$(LIBNAME).a
chmod 644 $(LIBPATH)/$(LIBNAME).a
-@/bin/rm -f $(LIBPATH)/libpng.a
ln -f -s $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
cp $(LIBNAME).so.$(PNGVER) $(LIBPATH)
chmod 755 $(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 libpng12.so libpng12.so.$(PNGMAJ)* \
/bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
pngtest pngout.png
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO