This repository has been archived on 2022-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
Othello/Makefile
Mylloon 1343ebcb3f
* O3 not in dev
* add ldflags for fsanitize
2022-11-16 10:31:06 +01:00

29 lines
549 B
Makefile

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