summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-12-13 21:53:38 -0300
committerGitHub <noreply@github.com>2021-12-13 19:53:38 -0500
commit97d169a7fe1ce52d82b4b366a558815fad76864c (patch)
tree5f3f322351d670d0ae2695c24836e46f1b8884e3 /Makefile
parenta3363333d809e8089a55efc3ea32eaea9ddb8d8c (diff)
Remove `-Werror` enabled by default and remove `-march`/`-mtune` (#210)
* Remove `-Werror` enabled by default * Remove -march and -mtune flags
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 737b85e..14887dd 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ DEPRECATION_ON ?= 1
DEBUG ?= 0
COPYCHECK_ARGS ?=
LLD ?= 0
+WERROR ?= 0
# Use clang++ if available, else use g++
ifeq ($(shell command -v clang++ >/dev/null 2>&1; echo $$?),0)
@@ -23,14 +24,16 @@ ifneq ($(DEBUG),0)
CXXFLAGS += -g3 -DDEVELOPMENT -D_DEBUG
COPYCHECK_ARGS += --devel
DEPRECATION_ON = 0
-else
+endif
+
+ifneq ($(WERROR),0)
CXXFLAGS += -Werror
endif
ifeq ($(OPTIMIZATION_ON),0)
OPTFLAGS := -O0
else
- OPTFLAGS := -O2 -march=native -mtune=native
+ OPTFLAGS := -O2
endif
ifneq ($(ASAN),0)