mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng10] Imported from libpng-1.0.15rc1.tar
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
LIBNAME=libpng10
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.0.14
|
||||
PNGMIN = 1.0.15rc1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Where make install puts libpng.a, libpng10.so, and libpng10/png.h
|
||||
@@ -34,6 +34,7 @@ CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_
|
||||
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng10 -lz -lm
|
||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ)
|
||||
LDLEGACY=cc $(ABI) -shared -soname libpng.so.2
|
||||
# See "man dso" for info about shared objects
|
||||
|
||||
RANLIB=echo
|
||||
@@ -81,7 +82,8 @@ libpng-config:
|
||||
echo cppflags=\"-I$(INCPATH)/$(LIBNAME) -DPNG_USE_PNGGCCRD \
|
||||
-DPNG_NO_ASSEMBLER_CODE\"; \
|
||||
echo cflags=\"$(ABI)\"; \
|
||||
echo ldflags=\"-L$(LIBPATH) -rpath $(LIBPATH) \"; \
|
||||
echo ldflags=\"-L$(LIBPATH) \"; \
|
||||
echo rpath=\"$(LIBPATH) \"; \
|
||||
echo libs=\"-lpng10 -lz -lm\"; \
|
||||
cat scripts/libpng-config-body.in ) > libpng-config
|
||||
chmod +x libpng-config
|
||||
@@ -96,6 +98,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJS)
|
||||
$(LDSHARED) -o $@ $(OBJS)
|
||||
rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)
|
||||
|
||||
libpng.so.2.$(PNGMIN): $(OBJS)
|
||||
$(LDLEGACY) -o $@ $(OBJS)
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
@@ -120,18 +125,20 @@ 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
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
|
||||
libpng.so.2.$(PNGMIN)
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.2
|
||||
-@/bin/rm -f $(DL)/libpng.so.2.*
|
||||
-@/bin/rm -f $(DL)/libpng.so.2.$(PNGMIN)*
|
||||
cp $(LIBNAME).so.$(PNGVER) $(DL)
|
||||
cp libpng.so.2.$(PNGMIN) $(DL)
|
||||
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
|
||||
chmod 755 $(DL)/libpng.so.2.$(PNGMIN)
|
||||
(cd $(DL); \
|
||||
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so; \
|
||||
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.2; \
|
||||
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.2.$(PNGMIN); \
|
||||
ln -sf libpng.so.2.$(PNGMIN) libpng.so.2; \
|
||||
ln -sf libpng.so.2 libpng.so; \
|
||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
||||
@@ -170,13 +177,15 @@ test-installed:
|
||||
echo Testing installed dynamic shared library.
|
||||
$(CC) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/libpng10-config --cppflags --cflags` pngtest.c \
|
||||
-L$(ZLIBLIB) -rpath $(ZLIBLIB) \
|
||||
-L$(ZLIBLIB) -rpath $(ZLIBLIB):`$(BINPATH)/libpng10-config --rpath` \
|
||||
-o pngtesti `$(BINPATH)/libpng10-config --ldflags --libs`
|
||||
./pngtesti pngtest.png
|
||||
|
||||
clean:
|
||||
rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \
|
||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* so_locations
|
||||
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
|
||||
libpng.so.2.$(PNGMIN) \
|
||||
so_locations
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
|
||||
Reference in New Issue
Block a user