Add gcc flags to improve reliability

This commit is contained in:
Dr-Noob
2018-06-22 21:01:16 +02:00
parent 3199ac739a
commit e9b5fe5f0a
3 changed files with 7 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
CXX=gcc
CXXFLAGS=-g -Wall -Werror -fstack-protector-all -pedantic -Wno-unused
CXXFLAGS=-g -Wall -Wextra -Werror -fstack-protector-all -pedantic -Wno-unused
SANITY_FLAGS=-Wfloat-equal -Wshadow -Wpointer-arith -Wstrict-overflow=5 -Wformat=2
SOURCE=main.c standart.c extended.c cpuid.c udev.c printer.c args.c global.c
HEADERS=standart.h extended.h cpuid.h udev.h printer.h ascii.h args.h global.h
@@ -8,7 +9,7 @@ HEADERS=standart.h extended.h cpuid.h udev.h printer.h ascii.h args.h global.h
OUTPUT=cpufetch
$(OUTPUT): Makefile $(SOURCE) $(HEADERS)
$(CXX) $(CXXFLAGS) $(SOURCE) -o $(OUTPUT)
$(CXX) $(CXXFLAGS) $(SANITY_FLAGS) $(SOURCE) -o $(OUTPUT)
run:
./$(OUTPUT)