DO NOT MERGE Update libpng to 1.6.20
BUG:23265085
Change-Id: I85199805636d771f3597b691b63bc0bf46084833
(cherry picked from commit bbe98b40cda082024b669fa508931042eed18f82)
diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin
index 7c38c26..be3f92c 100644
--- a/scripts/makefile.darwin
+++ b/scripts/makefile.darwin
@@ -34,13 +34,13 @@
MKDIR_P=mkdir -p
LN_SF=ln -sf
RANLIB=ranlib
+CP=cp
RM_F=/bin/rm -f
-ARCH=-arch ppc -arch i386 -arch x86_64
CPPFLAGS=-I$(ZLIBINC)
# CFLAGS=-W -Wall -O3 -funroll-loops
-CFLAGS=-W -Wall -O -funroll-loops $(ARCH)
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz $(ARCH)
+CFLAGS=-W -Wall -O -funroll-loops
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
@@ -62,6 +62,10 @@
DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH)
+# Pre-built configuration
+# See scripts/pnglibconf.mak for more options
+PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
+
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
@@ -78,9 +82,8 @@
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-# see scripts/pnglibconf.mak for more options
-pnglibconf.h: scripts/pnglibconf.h.prebuilt
- cp scripts/pnglibconf.h.prebuilt $@
+pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
+ $(CP) $(PNGLIBCONF_H_PREBUILT) $@
libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
@@ -109,7 +112,7 @@
$(CC) -dynamiclib \
-install_name $(LIBPATH)/$(LIBSOMAJ) \
-current_version 16 -compatibility_version 16 \
- $(ARCH) -o $(LIBSOMAJ) \
+ -o $(LIBSOMAJ) \
$(OBJSDLL) -L$(ZLIBLIB) -lz
pngtest: pngtest.o $(LIBSO)