Makefile : Added more warning flags and hardening flags
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,9 +1,15 @@
|
||||
CC := g++ -m64 -std=c++17
|
||||
OBJ_DIR := bin
|
||||
SRC_DIR := .
|
||||
# Optimizer flags
|
||||
#CFLAGS := -Og -g -rdynamic -pg -ggdb3 -D__DEBUG
|
||||
CFLAGS := -O4
|
||||
CFLAGS := $(CFLAGS) -Wall -Werror -Wextra -Wno-error=unused-function -Wpedantic
|
||||
CFLAGS := -O3
|
||||
# Warning flags
|
||||
CFLAGS := $(CFLAGS) -Wall -Werror -Wextra -Wpedantic -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wconversion
|
||||
CFLAGS := $(CFLAGS) -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -Wmisleading-indentation -Wduplicated-cond
|
||||
CFLAGS := $(CFLAGS) -Wduplicated-branches -Wlogical-op -Wuseless-cast -Wsuggest-override
|
||||
# Hardening flags
|
||||
CFLAGS := $(CFLAGS) -fstack-protector-strong -fcf-protection -fstack-clash-protection -fsanitize=undefined -fno-sanitize-recover=undefined
|
||||
EXEC := $(OBJ_DIR)/data
|
||||
SRC := $(wildcard $(SRC_DIR)/*.cpp)
|
||||
HEADER := $(wildcard $(SRC_DIR)/*.hpp)
|
||||
|
Reference in New Issue
Block a user