mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
scripts: Set the compiler warning options to "-Wall -Wextra -Wundef"
Considering that "-Wextra" is a more descriptive alternative to "-W", and that "-Wundef" is a highly useful warning option that has been available in ancient versions of gcc (version 2.x), we replace all occurrences of "-W -Wall" with "-Wall -Wextra -Wundef". Also clean up the makefiles.
This commit is contained in:
parent
8b7b99c1db
commit
c64655d058
@ -1,6 +1,6 @@
|
||||
# makefile for libpng on Solaris 2.x with cc
|
||||
# Contributed by William L. Sebok, based on makefile.linux
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1998 Greg Roelofs
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
@ -22,9 +22,9 @@ OLDSO=libpng.so
|
||||
# Utilities:
|
||||
CC=cc
|
||||
AR_RC=ar rc
|
||||
RANLIB=echo
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -f -s
|
||||
RANLIB=echo
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
SUN_CC_FLAGS=-fast -xtarget=ultra
|
||||
@ -45,7 +45,7 @@ ZLIBINC=/usr/include
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g
|
||||
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# makefile for libpng on Solaris 2.x with cc
|
||||
# Contributed by William L. Sebok, based on makefile.linux
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1998 Greg Roelofs
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
@ -22,9 +22,9 @@ OLDSO=libpng.so
|
||||
# Utilities:
|
||||
CC=cc
|
||||
AR_RC=ar rc
|
||||
RANLIB=echo
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -f -s
|
||||
RANLIB=echo
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
|
||||
@ -45,7 +45,7 @@ ZLIBINC=/usr/include
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS= $(SUN_CC_FLAGS) # $(WARNMORE) -g
|
||||
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# makefile for libpng using gcc (generic, static library)
|
||||
# Copyright (C) 2000, 2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2006-2009, 2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2000 Cosmin Truta
|
||||
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
#
|
||||
@ -16,8 +16,8 @@ ZLIBLIB = ../zlib
|
||||
CC = gcc
|
||||
LD = $(CC)
|
||||
AR_RC = ar rcs
|
||||
MKDIR_P = mkdir -p
|
||||
RANLIB = ranlib
|
||||
MKDIR_P = mkdir -p
|
||||
RM_F = rm -f
|
||||
LN_SF = ln -f -s
|
||||
|
||||
@ -43,8 +43,8 @@ DL=$(DESTDIR)$(LIBPATH)
|
||||
|
||||
WARNMORE =
|
||||
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
|
||||
LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
||||
CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
|
||||
LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||
|
||||
# File lists
|
||||
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
# makefile for libpng on BeOS x86 ELF with gcc
|
||||
# modified from makefile.linux by Sander Stoks
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1999 Greg Roelofs
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
@ -21,9 +22,9 @@ OLDSO=libpng.so
|
||||
# Utilities:
|
||||
CC=gcc
|
||||
AR_RC=ar rc
|
||||
RANLIB=ranlib
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
RANLIB=ranlib
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
@ -37,14 +38,14 @@ ALIGN=
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||
|
||||
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
|
||||
# still here in R4.5
|
||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS=-W -Wall -O1 -funroll-loops $(ALIGN) # $(WARNMORE) -g
|
||||
CFLAGS=-O1 -funroll-loops $(ALIGN) -Wall -Wextra -Wundef # $(WARNMORE) -g
|
||||
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
|
||||
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
|
||||
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz # -g
|
||||
|
||||
# where make install puts libpng.a, libpng16.so*, and png.h
|
||||
prefix=/usr/local
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# makefile for libpng using clang (generic, static library)
|
||||
# Copyright (C) 2000, 2014, 2019-2022 Cosmin Truta
|
||||
# Copyright (C) 2008, 2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2000, 2014, 2019 Cosmin Truta
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
#
|
||||
# This code is released under the libpng license.
|
||||
@ -23,8 +23,8 @@ WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
|
||||
LDFLAGS = -L$(ZLIBLIB)
|
||||
CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
|
||||
LDFLAGS = -L$(ZLIBLIB) # -g
|
||||
LIBS = -lz -lm
|
||||
|
||||
# File extensions
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng on Darwin / Mac OS X
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# makefile for libpng on Darwin / macOS
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2004, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2001 Christoph Pfisterer
|
||||
# derived from makefile.linux:
|
||||
@ -22,6 +22,7 @@ ZLIBINC=/usr/include
|
||||
# Library name:
|
||||
LIBNAME = libpng16
|
||||
PNGMAJ = 16
|
||||
RELEASE = 37
|
||||
|
||||
# Shared library names:
|
||||
LIBSO=$(LIBNAME).dylib
|
||||
@ -32,14 +33,14 @@ OLDSO=libpng.dylib
|
||||
# Utilities:
|
||||
CC=cc
|
||||
AR_RC=ar rc
|
||||
RANLIB=ranlib
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
RANLIB=ranlib
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
RM_F=rm -f
|
||||
|
||||
CPPFLAGS=-I$(ZLIBINC)
|
||||
CFLAGS=-W -Wall -O3 -funroll-loops
|
||||
CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
||||
@ -17,11 +17,11 @@ LIBSOREL=$(LIBSOMAJ).$(RELEASE)
|
||||
OLDSO=libpng.so
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
CC=cc
|
||||
AR_RC=ar rc
|
||||
RANLIB=ranlib
|
||||
MKDIR_P=mkdir
|
||||
LN_SF=ln -f -s
|
||||
RANLIB=ranlib
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
@ -75,7 +75,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# DJGPP (DOS gcc) makefile for libpng
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
#
|
||||
@ -17,8 +18,6 @@ CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
|
||||
CFLAGS=-O
|
||||
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
||||
|
||||
RANLIB=ranlib
|
||||
|
||||
CP=cp
|
||||
RM_F=rm -f
|
||||
|
||||
@ -39,8 +38,8 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
ar rc $@ $(OBJS)
|
||||
ranlib $@
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng under FreeBSD
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2014 Glenn Randers-Pehrson and Andrey A. Chernov
|
||||
# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
|
||||
#
|
||||
@ -38,7 +38,7 @@ LDADD+= -lm -lz
|
||||
DPADD+= ${LIBM} ${LIBZ}
|
||||
|
||||
CPPFLAGS+= -I. -I${ZLIBINC}
|
||||
CFLAGS+= -W -Wall
|
||||
CFLAGS+= -Wall -Wextra -Wundef
|
||||
|
||||
# Pre-built configuration
|
||||
# See scripts/pnglibconf.mak for more options
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# makefile for libpng using gcc (generic, static library)
|
||||
# Copyright (C) 2000, 2014, 2019-2022 Cosmin Truta
|
||||
# Copyright (C) 2008, 2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2000, 2014, 2019 Cosmin Truta
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
#
|
||||
# This code is released under the libpng license.
|
||||
@ -23,8 +23,8 @@ WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
|
||||
LDFLAGS = -L$(ZLIBLIB)
|
||||
CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
|
||||
LDFLAGS = -L$(ZLIBLIB) # -g
|
||||
LIBS = -lz -lm
|
||||
|
||||
# File extensions
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 1999-2002, 2006, 2009, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
||||
# Contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
||||
@ -30,11 +30,11 @@ LIBSOREL=$(LIBSOMAJ).$(RELEASE)
|
||||
OLDSO=libpng.sl
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
CC=cc
|
||||
AR_RC=ar rc
|
||||
RANLIB=ranlib
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
RANLIB=ranlib
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 2001, Laurent faillie
|
||||
# Copyright (C) 1998, 1999 Greg Roelofs
|
||||
@ -23,9 +23,9 @@ OLDSO=libpng.sl
|
||||
CC=gcc
|
||||
LD=ld
|
||||
AR_RC=ar rc
|
||||
RANLIB=ranlib
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
RANLIB=ranlib
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
@ -47,12 +47,12 @@ ZLIBINC=/opt/zlib/include
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||
|
||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS=-W -Wall -O3 -funroll-loops # $(WARNMORE) -g
|
||||
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
||||
CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
|
||||
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(exec_prefix)/lib
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 1999-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
||||
# Contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
||||
@ -31,11 +31,11 @@ LIBSOREL=$(LIBSOMAJ).$(RELEASE)
|
||||
OLDSO=libpng.sl
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
CC=cc
|
||||
AR_RC=ar rc
|
||||
RANLIB=ranlib
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
RANLIB=ranlib
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
# where make install puts libpng.a, libpng16.sl, and png.h
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng.a and libpng16.so on Linux ELF with gcc
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs and
|
||||
# Glenn Randers-Pehrson
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
@ -20,13 +20,13 @@ LIBSOREL=$(LIBSOMAJ).$(RELEASE)
|
||||
OLDSO=libpng.so
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
CC=gcc
|
||||
AR_RC=ar rc
|
||||
RANLIB=ranlib
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
RANLIB=ranlib
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
RM_F=rm -f
|
||||
|
||||
# where "make install" puts libpng16.a, libpng16.so*,
|
||||
# libpng16/png.h, libpng16/pngconf.h, and libpng16/pnglibconf.h
|
||||
@ -42,13 +42,12 @@ ZLIBINC=../zlib
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||
|
||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS=-W -Wall -O3 -funroll-loops # $(WARNMORE) -g
|
||||
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
|
||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
|
||||
CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm # -g
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(exec_prefix)/lib
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng.a and libpng16.so on Linux ELF with gcc
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014, 2017 Greg Roelofs and
|
||||
# Glenn Randers-Pehrson
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
@ -20,13 +20,13 @@ LIBSOREL=$(LIBSOMAJ).$(RELEASE)
|
||||
OLDSO=libpng.so
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
CC=gcc
|
||||
AR_RC=ar rc
|
||||
RANLIB=ranlib
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
RANLIB=ranlib
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
RM_F=rm -f
|
||||
|
||||
# where "make install" puts libpng16.a, libpng16.so*,
|
||||
# libpng16/png.h, libpng16/pngconf.h, and libpng16/pnglibconf.h
|
||||
@ -42,7 +42,7 @@ ZLIBINC=../zlib
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||
|
||||
CPPFLAGS=-I$(ZLIBINC)
|
||||
CPPFLAGS += -DPNG_ARM_NEON
|
||||
@ -50,11 +50,9 @@ CPPFLAGS += -DPNG_MIPS_MSA
|
||||
CPPFLAGS += -DPNG_INTEL_SSE
|
||||
CPPFLAGS += -DPNG_POWERPC_VSX
|
||||
|
||||
CFLAGS=-W -Wall -O3 -funroll-loops # $(WARNMORE) -g
|
||||
CFLAGS += -ansi -pedantic
|
||||
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
|
||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
|
||||
CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm # -g
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(exec_prefix)/lib
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 1998-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
#
|
||||
@ -50,7 +50,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng using MSYS/gcc (shared, static library)
|
||||
# Copyright (C) 2019-2020 Cosmin Truta
|
||||
# Copyright (C) 2019-2022 Cosmin Truta
|
||||
# Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler
|
||||
#
|
||||
# Portions taken from makefile.linux and makefile.gcc:
|
||||
@ -44,8 +44,8 @@ MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
|
||||
CPPFLAGS = # -DPNG_DEBUG=5
|
||||
CFLAGS = -W -Wall -O2 # -g
|
||||
LDFLAGS =
|
||||
CFLAGS = -O2 -Wall -Wextra -Wundef # -g
|
||||
LDFLAGS = # -g
|
||||
LIBS = -lz -lm
|
||||
|
||||
# File extensions
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
#
|
||||
@ -22,7 +23,7 @@ MAN= libpng.3 libpngpf.3 png.5
|
||||
DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO \
|
||||
libpng-manual.txt
|
||||
|
||||
CFLAGS+= -W -Wall
|
||||
CFLAGS+= -Wall -Wextra -Wundef
|
||||
CPPFLAGS+= -I${.CURDIR}
|
||||
|
||||
NOPROFILE= Yes
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
# Contributed by Mike Hopkirk (hops at sco.com) modified from Makefile.lnx
|
||||
# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1998 Greg Roelofs
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
@ -23,9 +23,9 @@ OLDSO=libpng.so
|
||||
# Utilities:
|
||||
CC=cc
|
||||
AR_RC=ar rc
|
||||
RANLIB=echo
|
||||
MKDIR_P=mkdir
|
||||
LN_SF=ln -f -s
|
||||
RANLIB=echo
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2001-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
#
|
||||
@ -18,11 +18,11 @@ LIBSOREL=$(LIBSOMAJ).$(RELEASE)
|
||||
OLDSO=libpng.so
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
CC=gcc
|
||||
AR_RC=ar rc
|
||||
RANLIB=echo
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
RANLIB=echo
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
@ -47,7 +47,7 @@ ABI=
|
||||
WARNMORE=
|
||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS=$(ABI) -O $(WARNMORE) -fPIC -mabi=n32 # -g
|
||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
|
||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||
-set_version sgi$(PNGMAJ).0
|
||||
# See "man dso" for info about shared objects
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2001-2002, 2006, 2007, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
#
|
||||
@ -18,11 +18,11 @@ LIBSOREL=$(LIBSOMAJ).$(RELEASE)
|
||||
OLDSO=libpng.so
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
CC=cc
|
||||
AR_RC=ar rc
|
||||
RANLIB=echo
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -sf
|
||||
RANLIB=echo
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
@ -48,9 +48,9 @@ WARNMORE=-fullwarn
|
||||
# Note: -KPIC is the default anyhow
|
||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
#CFLAGS= $(ABI) -O $(WARNMORE) -KPIC # -g
|
||||
CFLAGS=$(ABI) -O $(WARNMORE)
|
||||
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
CFLAGS=$(ABI) -O $(WARNMORE) # -g
|
||||
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
|
||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||
-set_version sgi$(PNGMAJ).0
|
||||
# See "man dso" for info about shared objects
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# makefile for libpng on Solaris 9 (beta) with Forte cc
|
||||
# Updated by Chad Schrock for Solaris 9
|
||||
# Contributed by William L. Sebok, based on makefile.linux
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1998-2001 Greg Roelofs
|
||||
# Copyright (C) 1996-1997 Andreas Dilger
|
||||
@ -24,9 +24,9 @@ OLDSO=libpng.so
|
||||
# gcc 2.95 doesn't work.
|
||||
CC=cc
|
||||
AR_RC=ar rc
|
||||
RANLIB=echo
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -f -s
|
||||
RANLIB=echo
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
@ -45,11 +45,7 @@ exec_prefix=$(prefix)
|
||||
ZLIBLIB=/usr/lib
|
||||
ZLIBINC=/usr/include
|
||||
|
||||
#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
#CFLAGS=-W -Wall -O3 $(WARNMORE) -g
|
||||
CFLAGS=-O3
|
||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng on Solaris 2.x with gcc
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2004, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
||||
# Contributed by William L. Sebok, based on makefile.linux
|
||||
# Copyright (C) 1998 Greg Roelofs
|
||||
@ -20,11 +20,11 @@ LIBSOREL=$(LIBSOMAJ).$(RELEASE)
|
||||
OLDSO=libpng.so
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
CC=gcc
|
||||
AR_RC=ar rc
|
||||
RANLIB=echo
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -f -s
|
||||
RANLIB=echo
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
@ -43,10 +43,10 @@ ZLIBINC=/usr/local/include
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS=-W -Wall -O # $(WARNMORE) -g
|
||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
||||
CFLAGS=-O -Wall -Wextra -Wundef # $(WARNMORE) -g
|
||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # -g
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
LIBPATH=$(exec_prefix)/lib
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
#
|
||||
@ -32,9 +32,9 @@ CC = cc
|
||||
CPP = $(CC) -E
|
||||
LD = $(CC)
|
||||
AR_RC = ar rc
|
||||
RANLIB = ranlib
|
||||
MKDIR_P = mkdir
|
||||
LN_SF = ln -sf
|
||||
RANLIB = ranlib
|
||||
CP = cp
|
||||
MV_F = mv -f
|
||||
RM_F = rm -f
|
||||
@ -44,7 +44,7 @@ DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build
|
||||
DFA_EXTRA = # extra files that can be used to control configuration
|
||||
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS = -O # -g
|
||||
LDFLAGS = -L$(ZLIBLIB)
|
||||
LDFLAGS = -L$(ZLIBLIB) # -g
|
||||
LIBS = -lz -lm
|
||||
|
||||
# Pre-built configuration
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) 2020 Cosmin Truta
|
||||
# Copyright (C) 2020-2022 Cosmin Truta
|
||||
# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
|
||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||
#
|
||||
@ -28,21 +28,16 @@ DESTDIR=
|
||||
ZLIBLIB=../zlib
|
||||
ZLIBINC=../zlib
|
||||
|
||||
|
||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes
|
||||
|
||||
CC=gcc
|
||||
AR_RC=ar rc
|
||||
RANLIB=ranlib
|
||||
MKDIR_P=mkdir -p
|
||||
LN_SF=ln -f -s
|
||||
RANLIB=ranlib
|
||||
CP=cp
|
||||
RM_F=/bin/rm -f
|
||||
|
||||
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||
CFLAGS=-O # $(WARNMORE)
|
||||
CFLAGS=-O
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
|
||||
# Pre-built configuration
|
||||
@ -62,7 +57,7 @@ pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
pngtest: pngtest.o libpng.a
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user