* O3 not in dev

* add ldflags for fsanitize
This commit is contained in:
Mylloon 2022-11-16 10:31:06 +01:00
parent c324fba1f5
commit 1343ebcb3f
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,5 +1,6 @@
CC = gcc CC = gcc
CFLAGS = -std=c11 -O3 CFLAGS = -std=c11
LDFLAGS =
RM = rm RM = rm
SOURCES = $(wildcard src/*.c) SOURCES = $(wildcard src/*.c)
@ -10,10 +11,12 @@ EXE = othello
%.c.o: src/%.c %.c.o: src/%.c
$(CC) $(CFLAGS) $(DEVFLAGS)-c $< -o $@ $(CC) $(CFLAGS) $(DEVFLAGS)-c $< -o $@
main: CFLAGS += -O3
main: compilation main: compilation
dev: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes dev: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes
dev: CFLAGS += -fanalyzer -fsanitize=undefined -pedantic -g dev: CFLAGS += -fanalyzer -fsanitize=undefined -pedantic -g
dev: LDFLAGS += -fsanitize=undefined
dev: compilation dev: compilation
compilation: $(OBJECTS) compilation: $(OBJECTS)