Makefile: use -Wno-deprecated-declarations to avoid OpenSSL 3.0 warnings
Signed-off-by: Eric Biggers <ebiggers@google.com>
diff --git a/Makefile b/Makefile
index c97790e..81b7b6d 100644
--- a/Makefile
+++ b/Makefile
@@ -44,8 +44,13 @@
MINGW = 1
endif
+# Set the CFLAGS. First give the warning-related flags (unconditionally, though
+# the user can override any of them by specifying the opposite flag); then give
+# the user-specifed CFLAGS, defaulting to -O2 if none were specified.
+#
+# Use -Wno-deprecated-declarations to avoid warnings about the Engine API having
+# been deprecated in OpenSSL 3.0; the replacement isn't ready yet.
CFLAGS ?= -O2
-
override CFLAGS := -Wall -Wundef \
$(call cc-option,-Wdeclaration-after-statement) \
$(call cc-option,-Wimplicit-fallthrough) \
@@ -54,6 +59,7 @@
$(call cc-option,-Wstrict-prototypes) \
$(call cc-option,-Wunused-parameter) \
$(call cc-option,-Wvla) \
+ $(call cc-option,-Wno-deprecated-declarations) \
$(CFLAGS)
override CPPFLAGS := -Iinclude -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $(CPPFLAGS)