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:
|
||||
CC=gcc
|
||||
AR_RC=ar rc
|
||||
MKDIR_P=mkdir -p
|
||||
@@ -16,10 +31,6 @@ RM_F=/bin/rm -f
|
||||
ZLIBLIB=/usr/local/lib
|
||||
ZLIBINC=/usr/local/include
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.9beta10
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
ALIGN=
|
||||
# For i386:
|
||||
# ALIGN=-malign-loops=2 -malign-functions=2
|
||||
@@ -33,7 +44,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
CFLAGS=-I$(ZLIBINC) -Wall -O1 -funroll-loops \
|
||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
|
||||
LDFLAGS=-L. -Wl,-soname=$(LIBNAME).so.$(PNGMAJ) -L$(ZLIBLIB) -lz -lm
|
||||
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz -lm
|
||||
|
||||
# where make install puts libpng.a, libpng12.so*, and png.h
|
||||
prefix=/usr/local
|
||||
@@ -58,8 +69,6 @@ DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
LIBNAME=libpng12
|
||||
|
||||
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
|
||||
@@ -68,7 +77,7 @@ OBJSDLL = $(OBJS)
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
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)
|
||||
@@ -85,22 +94,22 @@ 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
|
||||
cp $(LIBNAME).so* /boot/home/config/lib
|
||||
$(LIBSO): $(LIBSOMAJ)
|
||||
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||
cp $(LIBSO)* /boot/home/config/lib
|
||||
|
||||
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
|
||||
$(LN_SF) $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
|
||||
$(LIBSOMAJ): $(LIBSOVER)
|
||||
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||
|
||||
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
|
||||
$(CC) -nostart -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o \
|
||||
$(LIBNAME).so.$(PNGVER) $(OBJSDLL)
|
||||
$(LIBSOVER): $(OBJSDLL)
|
||||
$(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \
|
||||
$(LIBSOVER) $(OBJSDLL)
|
||||
|
||||
libpng.so.0.$(PNGMIN): $(OBJSDLL)
|
||||
$(CC) -nostart -Wl,-soname,libpng.so.0 -o \
|
||||
libpng.so.0.$(PNGMIN) $(OBJSDLL)
|
||||
$(OLDSOVER): $(OBJSDLL)
|
||||
$(CC) -nostart -Wl,-soname,$(OLDSOMAJ) -o \
|
||||
$(OLDSOVER) $(OBJSDLL)
|
||||
|
||||
pngtest: pngtest.o $(LIBNAME).so
|
||||
pngtest: pngtest.o $(LIBSO)
|
||||
$(CC) -L$(ZLIBLIB) -lz -lpng12 -o pngtest pngtest.o
|
||||
|
||||
test: pngtest
|
||||
@@ -122,23 +131,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).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_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
|
||||
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
||||
@@ -189,8 +198,8 @@ test-installed:
|
||||
|
||||
clean:
|
||||
$(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
|
||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtesti \
|
||||
libpng.so.0.$(PNGMIN) \
|
||||
$(LIBSO) $(LIBSOMAJ)* pngtesti \
|
||||
$(OLDSOVER) \
|
||||
libpng.pc
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
Reference in New Issue
Block a user