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

27 lines
474 B
Makefile
Raw Normal View History

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