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:
Cosmin Truta
2022-09-14 21:18:20 +03:00
parent 8b7b99c1db
commit c64655d058
25 changed files with 97 additions and 107 deletions

View File

@@ -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 \