diff --git a/Makefile b/Makefile index 7701e162..6da7f7b7 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,16 @@ DISTCLEANSUBDIRS=libselinux libsemanage ifeq ($(DEBUG),1) export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror export LDFLAGS = -g +else + export CFLAGS ?= -O2 -Werror -Wall -Wextra \ + -Wmissing-format-attribute \ + -Wmissing-noreturn \ + -Wpointer-arith \ + -Wshadow \ + -Wstrict-prototypes \ + -Wundef \ + -Wunused \ + -Wwrite-strings endif ifneq ($(DESTDIR),)