* O3 not in dev
* add ldflags for fsanitize
This commit is contained in:
parent
c324fba1f5
commit
1343ebcb3f
1 changed files with 4 additions and 1 deletions
5
Makefile
5
Makefile
|
@ -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)
|
||||||
|
|
Reference in a new issue