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

29 lines
597 B
Makefile
Raw Permalink Normal View History

2022-11-13 17:37:34 +01:00
CC = gcc
2022-11-15 00:26:11 +01:00
CFLAGS = -I. -I/usr/include/SDL2 -std=c11 -O3
2022-11-13 17:37:34 +01:00
RM = rm
2022-11-15 13:47:20 +01:00
LDFLAGS = -lm -lGL -lGL4Dummies -lSDL2 -lSDL2_ttf
2022-11-13 17:34:17 +01:00
2022-11-13 17:37:34 +01:00
SOURCES = $(wildcard src/*.c)
2022-11-13 17:38:19 +01:00
OBJECTS = $(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-15 13:47:20 +01:00
$(CC) $(CFLAGS) $(DEVFLAGS)-c $< -o $@
2022-11-13 17:34:17 +01:00
main: compilation
2022-11-14 16:05:04 +01:00
dev: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes
dev: CFLAGS += -fanalyzer -fsanitize=undefined -pedantic -g
2022-11-14 23:44:21 +01:00
dev: LDFLAGS += -fsanitize=undefined
2022-11-13 17:34:17 +01:00
dev: compilation
2022-11-13 17:38:19 +01:00
compilation: $(OBJECTS)
2022-11-14 16:05:04 +01:00
$(CC) -o $(EXE) $(OBJECTS) $(LDFLAGS)
2022-11-13 17:34:17 +01:00
all:
main
clean:
2022-11-13 17:38:19 +01:00
$(RM) $(OBJECTS) $(EXE)