Skip to content

Commit

Permalink
optional warnings flag
Browse files Browse the repository at this point in the history
  • Loading branch information
catriverr committed Sep 7, 2024
1 parent 273a42e commit 8587cbb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Compiler and flags
CXX := g++
CXXFLAGS := --std=c++2a -pthread -Wno-deprecated-declarations -Wno-writable-strings -Wno-switch-bool -Wno-format-security `pkg-config --libs --cflags libcurl`
CXXWARNINGS := -Wno-deprecated-declarations -Wno-writable-strings -Wno-switch-bool -Wno-format-security
CXXFLAGS := --std=c++2a -pthread `pkg-config --libs --cflags libcurl`
OUTFILE := -o gmeng

UNAME_S := $(shell uname -s)
Expand All @@ -21,6 +22,12 @@ ifeq ($(filter debug,$(MAKECMDGOALS)), debug)
CXXFLAGS += -g
endif

ifeq ($(filter warnings,$(MAKECMDGOALS)), warnings)
CXXFLAGS += -Wall
else
CXXFLAGS += $(CXXWARNINGS)
endif

ifeq ($(filter no-ncurses,$(MAKECMDGOALS)), no-ncurses)
CXXFLAGS += -DGMENG_NO_CURSES
endif
Expand Down

0 comments on commit 8587cbb

Please sign in to comment.