28 lines
566 B
Makefile
28 lines
566 B
Makefile
CC = gcc
|
|
CFLAGS = -std=c11 -I. -I/usr/include/SDL2
|
|
RM = rm
|
|
LDFLAGS = -lm -lGL -lGL4Dummies -lSDL2
|
|
|
|
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
|
|
dev: CFLAGS += -fanalyzer -fsanitize=undefined -pedantic -g
|
|
dev: compilation
|
|
|
|
compilation: $(OBJECTS)
|
|
$(CC) -o $(EXE) $(OBJECTS) $(LDFLAGS)
|
|
|
|
all:
|
|
main
|
|
|
|
clean:
|
|
$(RM) $(OBJECTS) $(EXE)
|