diff options
author | Cosmin Truta <ctruta@gmail.com> | 2022-09-14 21:18:20 +0300 |
---|---|---|
committer | Cosmin Truta <ctruta@gmail.com> | 2022-09-14 21:18:20 +0300 |
commit | c64655d058b1b8156af45af0f6f4cdf95cf303c1 (patch) | |
tree | 2b75e9a092a6151a8647b9633e2fcbd958a8b536 /scripts/makefile.linux-opt | |
parent | 8b7b99c1db32e8f2266b310f64bb61486aa4c52e (diff) | |
download | libpng-c64655d058b1b8156af45af0f6f4cdf95cf303c1.tar.gz |
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.
Diffstat (limited to 'scripts/makefile.linux-opt')
-rw-r--r-- | scripts/makefile.linux-opt | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/scripts/makefile.linux-opt b/scripts/makefile.linux-opt index d2619f9e9..52874c91a 100644 --- a/scripts/makefile.linux-opt +++ b/scripts/makefile.linux-opt @@ -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 |