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
2022-11-13 17:38:19 +01:00

26 lines
477 B
Makefile

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