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.9beta11.tar
This commit is contained in:
@@ -3,6 +3,28 @@
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# Library name:
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.9beta11
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
# Shared library names:
|
||||
LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
CC=cc
|
||||
MKDIR_P=mkdir
|
||||
LN_SF=ln -f -s
|
||||
RANLIB=ranlib
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
# where make install puts libpng.a and png.h
|
||||
prefix=/usr/local
|
||||
exec_prefix=$prefix
|
||||
@@ -32,18 +54,6 @@ DM=$(DESTDIR)$(MANPATH)
|
||||
ZLIBLIB=../zlib
|
||||
ZLIBINC=../zlib
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.9beta10
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
AR_RC=ar rc
|
||||
CC=cc
|
||||
MKDIR_P=mkdir
|
||||
LN_SF=ln -f -s
|
||||
RANLIB=ranlib
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
|
||||
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
||||
|
||||
@@ -51,7 +61,7 @@ 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: $(LIBNAME).so libpng.a pngtest libpng.pc libpng-config
|
||||
all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
@@ -70,19 +80,19 @@ libpng-config:
|
||||
cat scripts/libpng-config-body.in ) > libpng-config
|
||||
chmod +x libpng-config
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
$(LN_SF) $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
$(LIBSO): $(LIBSOMAJ)
|
||||
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||
|
||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
||||
$(LN_SF) $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
||||
$(LIBSOMAJ): $(LIBSOVER)
|
||||
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||
|
||||
$(LIBNAME).so.$(PNGVER): $(OBJS)
|
||||
$(LIBSOVER): $(OBJS)
|
||||
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
|
||||
-soname $(LIBNAME).so.$(PNGMAJ)
|
||||
-soname $(LIBSOMAJ)
|
||||
|
||||
libpng.so.0.$(PNGMIN): $(OBJS)
|
||||
$(OLDSOVER): $(OBJS)
|
||||
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
|
||||
-soname libpng.so.0
|
||||
-soname $(OLDSOMAJ)
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
@@ -106,23 +116,23 @@ install-static: install-headers libpng.a
|
||||
-@/bin/rm -f $(DL)/libpng.a
|
||||
(cd $(DL); $(LN_SF)(LIBNAME).a libpng.a)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
|
||||
libpng.so.0.$(PNGMIN)
|
||||
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||
$(OLDSOVER)
|
||||
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.0
|
||||
-@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(DL)
|
||||
cp libpng.so.0.$(PNGMIN) $(DL)
|
||||
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
|
||||
chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
|
||||
-@/bin/rm -f $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||
-@/bin/rm -f $(DL)/$(LIBSOMAJ)
|
||||
-@/bin/rm -f $(DL)/$(OLDSO)
|
||||
-@/bin/rm -f $(DL)/$(OLDSOMAJ)
|
||||
-@/bin/rm -f $(DL)/$(OLDSOVER)*
|
||||
cp $(LIBSOVER) $(DL)
|
||||
cp $(OLDSOVER) $(DL)
|
||||
chmod 755 $(DL)/$(LIBSOVER)
|
||||
chmod 755 $(DL)/$(OLDSOVER)
|
||||
(cd $(DL); \
|
||||
$(LN_SF) libpng.so.0.$(PNGMIN) libpng.so.0; \
|
||||
$(LN_SF) libpng.so.0 libpng.so; \
|
||||
$(LN_SF)(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
||||
$(LN_SF)(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
||||
$(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
|
||||
$(LN_SF) $(OLDSOMAJ) $(OLDSO); \
|
||||
$(LN_SF)(LIBSOVER) $(LIBSOMAJ); \
|
||||
$(LN_SF)(LIBSOMAJ) $(LIBSO))
|
||||
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
||||
@@ -175,8 +185,8 @@ test-installed:
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
|
||||
libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
||||
libpng.so.0.$(PNGMIN) \
|
||||
libpng-config $(LIBSO) $(LIBSOMAJ)* \
|
||||
$(OLDSOVER) \
|
||||
libpng.pc
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
Reference in New Issue
Block a user