sandbox: do not override warning CFLAGS

Do not unconditionally add warning flags and especially -Werror to
CFLAGS, only when CFLAGS is empty.
This helps when building with noisy warning flags, like -Weverything.

Also drop -W, since it is an alias for -Wextra.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
Christian Göttsche 2024-01-05 19:35:33 +01:00 committed by James Carter
parent b18fddef2e
commit 99170284ef

View File

@ -8,7 +8,8 @@ BINDIR ?= $(PREFIX)/bin
SBINDIR ?= $(PREFIX)/sbin
MANDIR ?= $(PREFIX)/share/man
SHAREDIR ?= $(PREFIX)/share/sandbox
override CFLAGS += -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W
CFLAGS ?= -Werror -Wall -Wextra
override CFLAGS += -DPACKAGE="\"policycoreutils\""
override LDLIBS += -lselinux -lcap-ng
SEUNSHARE_OBJS = seunshare.o