diff --git a/Makefile b/Makefile index 24257a80..c7620c55 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,24 @@ ifeq ($(DEBUG_SAVE), 1) ALL_CXXFLAGS += -DDEBUG_SAVE endif -ALL_CXXFLAGS += -std=c++98 -Wall -Wextra -pedantic -MMD -MP -MF $@.d +ifeq ($(WARNINGS), 1) + ALL_CXXFLAGS += -Wall -Wextra -pedantic +endif + +ifeq ($(WARNINGS_ALL), 1) + ifneq ($(findstring clang,$(CXX)),) + # Use clang-specific flag -Weverything + ALL_CXXFLAGS += -Weverything + else + $(warning Couldn't activate all warnings (unsupported compiler)) + endif +endif + +ifeq ($(WARNINGS_FATAL), 1) + ALL_CXXFLAGS += -Werror +endif + +ALL_CXXFLAGS += -std=c++98 -MMD -MP -MF $@.d ALL_LIBS += -lkernel32 -lgdi32 -lddraw -ldinput -ldsound -lversion -lshlwapi -limm32 -lwinmm -ldxguid ifeq ($(STATIC), 1) diff --git a/README.md b/README.md index 69dde3fc..fccbb0db 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,9 @@ Name | Function `JAPANESE=1` | Enable the Japanese-language build (instead of the unofficial Aeon Genesis English translation) `FIX_BUGS=1` | Fix various bugs in the game `DEBUG_SAVE=1` | Re-enable the dummied-out 'Debug Save' option, and the ability to drag-and-drop save files onto the window +`WARNINGS=1` | Enable common warnings +`WARNINGS_ALL=1` | Enable ALL warnings (clang only) +`WARNINGS_FATAL=1` | Make all warnings errors ## Licensing