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.3.tar
This commit is contained in:
@@ -17,15 +17,13 @@ ZLIBINC=../zlib
|
||||
|
||||
CC=cc
|
||||
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
|
||||
|
||||
#RANLIB=echo
|
||||
RANLIB=ranlib
|
||||
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 0. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3rc6
|
||||
PNGMIN = 1.2.3
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@@ -44,6 +42,11 @@ BINPATH=$(prefix)/bin
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
|
||||
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
|
||||
@@ -83,7 +86,7 @@ $(LIBNAME).$(PNGMAJ).dylib: $(LIBNAME).$(PNGVER).dylib
|
||||
|
||||
$(LIBNAME).$(PNGVER).dylib: $(OBJSDLL)
|
||||
$(CC) -dynamiclib \
|
||||
-install_name $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
|
||||
-install_name $(DL)/$(LIBNAME).$(PNGMAJ).dylib \
|
||||
-current_version $(PNGMIN) -compatibility_version $(PNGMIN) \
|
||||
-o $(LIBNAME).$(PNGVER).dylib \
|
||||
$(OBJSDLL) -L$(ZLIBLIB) -lz
|
||||
@@ -95,67 +98,62 @@ test: pngtest
|
||||
./pngtest
|
||||
|
||||
install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DESTDIR)$(INCPATH) ]; then mkdir $(DESTDIR)$(INCPATH); fi
|
||||
-@if [ ! -d $(DESTDIR)$(INCPATH)/$(LIBNAME) ]; then \
|
||||
mkdir $(DESTDIR)$(INCPATH)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DESTDIR)$(INCPATH)/$(LIBNAME)
|
||||
chmod 644 $(DESTDIR)$(INCPATH)/$(LIBNAME)/png.h \
|
||||
$(DESTDIR)$(INCPATH)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DESTDIR)$(INCPATH)/png.h $(DESTDIR)$(INCPATH)/pngconf.h
|
||||
-@/bin/rm -f $(DESTDIR)$(INCPATH)/libpng
|
||||
(cd $(DESTDIR)$(INCPATH); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
-@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
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
|
||||
cp libpng.a $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
|
||||
chmod 644 $(DESTDIR)$(LIBPATH)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.a
|
||||
(cd $(DESTDIR)$(LIBPATH); ln -sf $(LIBNAME).a 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 $(DL); ln -sf $(LIBNAME).a libpng.a)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).dylib libpng.pc
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH) ]; then mkdir $(DESTDIR)$(LIBPATH); fi
|
||||
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGMAJ)*.dylib
|
||||
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/$(LIBNAME).dylib
|
||||
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.dylib
|
||||
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.3.dylib
|
||||
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/libpng.3.*.dylib
|
||||
cp $(LIBNAME).$(PNGVER).dylib $(DESTDIR)$(LIBPATH)
|
||||
chmod 755 $(DESTDIR)$(LIBPATH)/$(LIBNAME).$(PNGVER).dylib
|
||||
(cd $(DESTDIR)$(LIBPATH); \
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).dylib
|
||||
-@/bin/rm -f $(DL)/libpng.dylib
|
||||
-@/bin/rm -f $(DL)/libpng.3.dylib
|
||||
-@/bin/rm -f $(DL)/libpng.3.*.dylib
|
||||
cp $(LIBNAME).$(PNGVER).dylib $(DL)
|
||||
chmod 755 $(DL)/$(LIBNAME).$(PNGVER).dylib
|
||||
(cd $(DL); \
|
||||
ln -sf $(LIBNAME).$(PNGVER).dylib libpng.dylib; \
|
||||
ln -sf $(LIBNAME).$(PNGVER).dylib libpng.3.dylib; \
|
||||
ln -sf $(LIBNAME).$(PNGVER).dylib libpng.3.$(PNGMIN).dylib; \
|
||||
ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib; \
|
||||
ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib)
|
||||
-@if [ ! -d $(DESTDIR)$(LIBPATH)/pkgconfig ]; then \
|
||||
mkdir $(DESTDIR)$(LIBPATH)/pkgconfig; fi
|
||||
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/$(LIBNAME).pc
|
||||
-@/bin/rm -f $(DESTDIR)$(LIBPATH)/pkgconfig/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)
|
||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
|
||||
|
||||
install-man: libpng.3 libpngpf.3 png.5
|
||||
-@if [ ! -d $(DESTDIR)$(MANPATH) ]; then mkdir $(DESTDIR)$(MANPATH); fi
|
||||
-@if [ ! -d $(DESTDIR)$(MANPATH)/man3 ]; then \
|
||||
mkdir $(DESTDIR)$(MANPATH)/man3; fi
|
||||
-@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpng.3
|
||||
-@/bin/rm -f $(DESTDIR)$(MANPATH)/man3/libpngpf.3
|
||||
cp libpng.3 $(DESTDIR)$(MANPATH)/man3
|
||||
cp libpngpf.3 $(DESTDIR)$(MANPATH)/man3
|
||||
-@if [ ! -d $(DESTDIR)$(MANPATH)/man5 ]; then \
|
||||
mkdir $(DESTDIR)$(MANPATH)/man5; fi
|
||||
-@/bin/rm -f $(DESTDIR)$(MANPATH)/man5/png.5
|
||||
cp png.5 $(DESTDIR)$(MANPATH)/man5
|
||||
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
|
||||
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
|
||||
-@/bin/rm -f $(DM)/man3/libpng.3
|
||||
-@/bin/rm -f $(DM)/man3/libpngpf.3
|
||||
cp libpng.3 $(DM)/man3
|
||||
cp libpngpf.3 $(DM)/man3
|
||||
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
|
||||
-@/bin/rm -f $(DM)/man5/png.5
|
||||
cp png.5 $(DM)/man5
|
||||
|
||||
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)/$(LIBNAME)-config
|
||||
cp libpng-config $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
|
||||
chmod 755 $(DESTDIR)$(BINPATH)/$(LIBNAME)-config
|
||||
(cd $(DESTDIR)$(BINPATH); ln -sf $(LIBNAME)-config libpng-config)
|
||||
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
|
||||
-@/bin/rm -f $(DB)/libpng-config
|
||||
-@/bin/rm -f $(DB)/$(LIBNAME)-config
|
||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
||||
chmod 755 $(DB)/$(LIBNAME)-config
|
||||
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
|
||||
|
||||
install: install-static install-shared install-man install-config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user