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).sl
|
||||
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
|
||||
OLDSO=libpng.sl
|
||||
OLDSOMAJ=libpng.sl.0
|
||||
OLDSOVER=libpng.sl.0.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=gcc
|
||||
LD=ld
|
||||
AR_RC=ar rc
|
||||
@@ -13,7 +28,7 @@ LN_SF=ln -sf
|
||||
RANLIB=ranlib
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
# where "make install" puts libpng.a, libpng.sl*, png.h and pngconf.h
|
||||
# where "make install" puts libpng.a, $(OLDSO)*, png.h and pngconf.h
|
||||
prefix=/usr/local
|
||||
exec_prefix=$prefix
|
||||
|
||||
@@ -43,11 +58,6 @@ CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
|
||||
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
|
||||
LDFLAGS=-L. -L$(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
|
||||
@@ -79,7 +89,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
|
||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
@@ -96,21 +106,21 @@ libpng-config:
|
||||
cat scripts/libpng-config-body.in ) > libpng-config
|
||||
chmod +x libpng-config
|
||||
|
||||
$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
|
||||
$(LN_SF) $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
|
||||
$(LIBSO): $(LIBSOMAJ)
|
||||
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||
|
||||
$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
|
||||
$(LN_SF) $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
|
||||
$(LIBSOMAJ): $(LIBSOVER)
|
||||
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||
|
||||
$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
|
||||
$(LIBSOVER): $(OBJSDLL)
|
||||
$(LD) -b +s \
|
||||
+h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL)
|
||||
+h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
|
||||
|
||||
libpng.sl.3.$(PNGMIN): $(OBJSDLL)
|
||||
$(OLDSOVER): $(OBJSDLL)
|
||||
$(LD) -b +s \
|
||||
+h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL)
|
||||
+h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL)
|
||||
|
||||
pngtest: pngtest.o $(LIBNAME).sl
|
||||
pngtest: pngtest.o $(LIBSO)
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
test: pngtest
|
||||
@@ -133,23 +143,23 @@ install-static: install-headers libpng.a
|
||||
-@$(RM_F) $(DL)/libpng.a
|
||||
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \
|
||||
libpng.sl.3.$(PNGMIN)
|
||||
install-shared: install-headers $(LIBSOVER) libpng.pc \
|
||||
$(OLDSOVER)
|
||||
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||
-@$(RM_F) $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl
|
||||
-@$(RM_F) $(DL)/$(LIBNAME).sl.$(PNGMAJ)
|
||||
-@$(RM_F) $(DL)/libpng.sl
|
||||
-@$(RM_F) $(DL)/libpng.sl.3
|
||||
-@$(RM_F) $(DL)/libpng.sl.3.$(PNGMIN)*
|
||||
cp $(LIBNAME).sl.$(PNGVER) $(DL)
|
||||
cp libpng.sl.3.$(PNGMIN) $(DL)
|
||||
chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER)
|
||||
chmod 755 $(DL)/libpng.sl.3.$(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_SF) libpng.sl.3.$(PNGMIN) libpng.sl.3; \
|
||||
$(LN_SF) libpng.sl.3 libpng.sl; \
|
||||
$(LN_SF) $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
|
||||
$(LN_SF) $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
|
||||
$(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
|
||||
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||
@@ -202,8 +212,8 @@ test-installed:
|
||||
|
||||
clean:
|
||||
$(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
|
||||
libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \
|
||||
libpng.sl.3.$(PNGMIN) \
|
||||
libpng-config $(LIBSO) $(LIBSOMAJ)* \
|
||||
$(OLDSOVER) \
|
||||
libpng.pc
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
|
||||
Reference in New Issue
Block a user