Add compiler flags
This commit is contained in:
parent
a5fcaa00d7
commit
f660377768
1 changed files with 9 additions and 3 deletions
12
makefile
12
makefile
|
|
@ -4,7 +4,7 @@
|
||||||
ARCH = native
|
ARCH = native
|
||||||
|
|
||||||
# Optimization level
|
# Optimization level
|
||||||
O = 3
|
O = 2
|
||||||
|
|
||||||
# Flags for the compiler
|
# Flags for the compiler
|
||||||
FLAGS = -std=c23
|
FLAGS = -std=c23
|
||||||
|
|
@ -18,7 +18,13 @@ FLAGS += -pedantic
|
||||||
FLAGS += -Wall
|
FLAGS += -Wall
|
||||||
FLAGS += -Wextra
|
FLAGS += -Wextra
|
||||||
FLAGS += -Werror
|
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
|
#FLAGS += -Wformat-truncation=0
|
||||||
|
|
||||||
# Compile flag for defining GITHASH to put at the end of the version string
|
# 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):
|
MSG_CLEANING_OUT = Cleaning $(OUTDIR):
|
||||||
|
|
||||||
# Compile for all UI targets
|
# 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
|
# Compile and run the default UI target
|
||||||
run: $(OUTDIR)/connect4_$(UI_TARGET).elf
|
run: $(OUTDIR)/connect4_$(UI_TARGET).elf
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue