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:
@@ -5,6 +5,21 @@
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.9beta11
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# 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=gcc
|
||||
MKDIR_P=mkdir -p
|
||||
@@ -32,11 +47,6 @@ CFLAGS=-I$(ZLIBINC) -Wall -O \
|
||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.9beta10
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(exec_prefix)/lib
|
||||
MANPATH=$(prefix)/man
|
||||
@@ -68,7 +78,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
@@ -88,13 +98,13 @@ libpng-config:
|
||||
cat scripts/libpng-config-body.in ) > libpng-config
|
||||
chmod +x libpng-config
|
||||
|
||||
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
|
||||
$(LN_FS) $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
|
||||
$(LIBSO): $(LIBSOMAJ)
|
||||
$(LN_FS) $(LIBSOMAJ) $(LIBSO)
|
||||
|
||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
||||
$(LN_FS) $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
||||
$(LIBSOMAJ): $(LIBSOVER)
|
||||
$(LN_FS) $(LIBSOVER) $(LIBSOMAJ)
|
||||
|
||||
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
||||
$(LIBSOVER): $(OBJSDLL)
|
||||
@case "`type ld`" in *ucb*) \
|
||||
echo; \
|
||||
echo '## WARNING:'; \
|
||||
@@ -107,14 +117,14 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
||||
echo; \
|
||||
;; \
|
||||
esac
|
||||
$(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \
|
||||
-o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
|
||||
$(LD) -G -h $(LIBSOMAJ) \
|
||||
-o $(LIBSOVER) $(OBJSDLL)
|
||||
|
||||
libpng.so.0.$(PNGMIN): $(OBJS)
|
||||
$(LD) -G -h libpng.so.0 \
|
||||
-o libpng.so.0.$(PNGMIN) $(OBJSDLL)
|
||||
$(OLDSOVER): $(OBJS)
|
||||
$(LD) -G -h $(OLDSOMAJ) \
|
||||
-o $(OLDSOVER) $(OBJSDLL)
|
||||
|
||||
pngtest: pngtest.o $(LIBNAME).so
|
||||
pngtest: pngtest.o $(LIBSO)
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
test: pngtest
|
||||
@@ -136,23 +146,23 @@ install-static: install-headers libpng.a
|
||||
-@$(RM_F) $(DL)/libpng.a
|
||||
(cd $(DL); $(LN_FS) $(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
|
||||
-@$(RM_F) $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
|
||||
-@$(RM_F) $(DL)/$(LIBNAME).so.$(PNGMAJ)
|
||||
-@$(RM_F) $(DL)/libpng.so
|
||||
-@$(RM_F) $(DL)/libpng.so.0
|
||||
-@$(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)
|
||||
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||
-@$(RM_F) $(DL)/$(OLDSO)
|
||||
-@$(RM_F) $(DL)/$(OLDSOMAJ)
|
||||
-@$(RM_F) $(DL)/$(OLDSOVER)*
|
||||
cp $(LIBSOVER) $(DL)
|
||||
cp $(OLDSOVER) $(DL)
|
||||
chmod 755 $(DL)/$(LIBSOVER)
|
||||
chmod 755 $(DL)/$(OLDSOVER)
|
||||
(cd $(DL); \
|
||||
$(LN_FS) libpng.so.0.$(PNGMIN) libpng.so.0; \
|
||||
$(LN_FS) libpng.so.0 libpng.so; \
|
||||
$(LN_FS) $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \
|
||||
$(LN_FS) $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ))
|
||||
$(LN_FS) $(OLDSOVER) $(OLDSOMAJ); \
|
||||
$(LN_FS) $(OLDSOMAJ) $(OLDSO); \
|
||||
$(LN_FS) $(LIBSOVER) $(LIBSO); \
|
||||
$(LN_FS) $(LIBSOVER) $(LIBSOMAJ))
|
||||
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
||||
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||
@@ -205,8 +215,8 @@ test-installed:
|
||||
|
||||
clean:
|
||||
$(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
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
|
||||
Reference in New Issue
Block a user