Imported from libpng-0.90.tar

This commit is contained in:
Andreas Dilger
1997-01-17 01:34:35 -06:00
committed by Glenn Randers-Pehrson
parent c21f90c334
commit 02ad0efbc8
25 changed files with 2448 additions and 2077 deletions

View File

@@ -1,15 +1,18 @@
# makefile for libpng on (linux) ELF
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# Copyright (C) 1996, 1997 Andreas Dilger
# For conditions of distribution and use, see copyright notice in png.h
CC=gcc
CFLAGS=-I../zlib -O2 -Wall -fPIC
CFLAGS=-I../zlib -Wall -Wwrite-strings -Wpointer-arith \
-Wstrict-prototypes -Wmissing-prototypes -O2 -fPIC
LDFLAGS=-L. -Wl,-rpath,. -L../zlib/ -Wl,-rpath,../zlib/ -lpng -lz -lm
RANLIB=ranlib
#RANLIB=echo
PNGVER = 0.89
PNGMAJ = 0
PNGMIN = 90
PNGVER = $(PNGMAJ).$(PNGMIN)
# where make install puts libpng.a, libpng.so*, and png.h
prefix=/usr/local
@@ -24,14 +27,14 @@ libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.so: libpng.so.1
ln -sf libpng.so.1 libpng.so
libpng.so: libpng.so.$(PNGMAJ)
ln -sf libpng.so.$(PNGMAJ) libpng.so
libpng.so.1: libpng.so.1.$(PNGVER)
ln -sf libpng.so.1.$(PNGVER) libpng.so.1
libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
libpng.so.1.$(PNGVER): $(OBJS)
gcc -shared -Wl,-soname,libpng.so.1 -o libpng.so.1.$(PNGVER) $(OBJS)
libpng.so.$(PNGVER): $(OBJS)
gcc -shared -Wl,-soname,libpng.so.$(PNGMAJ) -o libpng.so.$(PNGVER) $(OBJS)
pngtest: pngtest.o libpng.so
$(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
@@ -39,21 +42,21 @@ pngtest: pngtest.o libpng.so
test: pngtest
./pngtest
install: libpng.so.1.$(PNGVER)
install: libpng.so.$(PNGVER)
-@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.so.1.$(PNGVER) $(prefix)/lib
chmod 755 $(prefix)/lib/libpng.so.1.$(PNGVER)
-@/bin/rm $(prefix)/lib/libpng.so.1 $(prefix)/lib/libpng.so
(cd $(prefix)/lib; ln -sf libpng.so.1.$(PNGVER) libpng.so.1; \
ln -sf libpng.so.1 libpng.so)
cp libpng.so.$(PNGVER) $(prefix)/lib
chmod 755 $(prefix)/lib/libpng.so.$(PNGVER)
-@/bin/rm $(prefix)/lib/libpng.so.$(PNGMAJ) $(prefix)/lib/libpng.so
(cd $(prefix)/lib; ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
ln -sf libpng.so.$(PNGMAJ) libpng.so)
clean:
rm -f *.o libpng.so.1.$(PNGVER) libpng.so.1 libpng.so pngtest pngout.png
rm -f *.o libpng.a libpng.so* pngtest pngout.png
# DO NOT DELETE THIS LINE -- make depend depends on it.