Imported from libpng-1.2.3rc5.tar

This commit is contained in:
Glenn Randers-Pehrson
2002-05-10 20:19:58 -05:00
parent 704228f7e7
commit 837a3d1745
63 changed files with 861 additions and 489 deletions

View File

@@ -15,7 +15,7 @@
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.3rc4
PNGMIN = 1.2.3rc5
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc
@@ -86,11 +86,27 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc
all: libpng.a $(LIBNAME).so pngtest pngtest-static
libpng.pc:
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo cppflags=\"-I$(INCPATH)/libpng12 -DPNG_THREAD_UNSAFE_OK \
-DPNG_USE_PNGGCCRD"; \
echo cflags=\"\"; \
echo ldflags=\"\"; \
echo libs=\"-lpng12 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
cat scripts/libpng-config.in | sed -e s\!@PREFIX@!$(prefix)! > \
-e s!\#CFLAGS!-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD! \
-e s!\#LIBS!-lm! > libpng-config
chmod +x libpng-config
pnggccrd.o: pnggccrd.c png.h pngconf.h
$(CC) -c $(CFLAGS) -o $@ $*.c
@@ -119,7 +135,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 ""
@@ -162,11 +178,11 @@ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/libpng.pc
cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/libpng12.pc
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf libpng12.pc libpng.pc)
cp libpng.pc $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
chmod 644 $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
(cd $(DESTDIR)$(LIBPATH)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
-@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
@@ -181,14 +197,14 @@ install-man: libpng.3 libpngpf.3 png.5
-@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
cp png.5 $(DESTDIR)$(MANPATH)/man5
install-config: scripts/libpng-config
install-config: libpng-config
-@if [ ! -d $(DESTDIR)$(BINPATH) ]; then \
mkdir $(DESTDIR)$(BINPATH); fi
-@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng-config
-@/bin/rm -f $(DESTDIR)$(BINPATH)/libpng12-config
cp scripts/libpng-config $(DESTDIR)$(BINPATH)/libpng12-config
chmod 755 $(DESTDIR)$(BINPATH)/libpng12-config
(cd $(DESTDIR)$(BINPATH); ln -sf libpng12-config libpng-config)
-@/bin/rm -f $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
(cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config