From f660377768067993b4379af6e4a1a6a472948682 Mon Sep 17 00:00:00 2001 From: AnnaSnoeijs Date: Thu, 14 Aug 2025 18:33:56 +0200 Subject: [PATCH] Add compiler flags --- makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 5d10e86..28eb98f 100644 --- a/makefile +++ b/makefile @@ -4,7 +4,7 @@ ARCH = native # Optimization level -O = 3 +O = 2 # Flags for the compiler FLAGS = -std=c23 @@ -18,7 +18,13 @@ FLAGS += -pedantic FLAGS += -Wall FLAGS += -Wextra FLAGS += -Werror -# This flag is because of the compiler otherwise giving too much warning +FLAGS += -Wconversion +FLAGS += -Wmissing-prototypes +FLAGS += -Wlogical-op +FLAGS += -Wdisabled-optimization +FLAGS += -fanalyzer +# These flags are because of the compiler otherwise giving too much warning +FLAGS += -Wno-sign-conversion #FLAGS += -Wformat-truncation=0 # Compile flag for defining GITHASH to put at the end of the version string @@ -49,7 +55,7 @@ MSG_CLEANING_OBJ = Cleaning $(OBJDIR): MSG_CLEANING_OUT = Cleaning $(OUTDIR): # Compile for all UI targets -all: $(addprefix $(OUTDIR)/connect4_,ncurses.elf vt100.elf) +all: $(addprefix $(OUTDIR)/connect4_,ncurses.elf vt100.elf stub.elf) # Compile and run the default UI target run: $(OUTDIR)/connect4_$(UI_TARGET).elf