diff --git a/Makefile b/Makefile index 5665c29..fc221ec 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,23 @@ -CXX = gcc -CXXFLAGS = -std=c99 -pedantic -RM = rm +CC = gcc +CFLAGS = -std=c99 -pedantic +RM = rm -SOURCES = $(wildcard src/*.c) -OBJETS = $(patsubst %.c,%.c.o,$(notdir $(SOURCES))) +SOURCES = $(wildcard src/*.c) +OBJETS = $(patsubst %.c,%.c.o,$(notdir $(SOURCES))) -EXE = othello +EXE = othello %.c.o: src/%.c - $(CXX) -c -o $@ $< $(CXXFLAGS) $(DEVFLAGS) + $(CC) -c -o $@ $< $(CFLAGS) $(DEVFLAGS) -main: CXXFLAGS += -O3 +main: CFLAGS += -O3 main: compilation -dev: CXXFLAGS += -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -fsanitize=undefined -g +dev: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -fsanitize=undefined -g dev: compilation compilation: $(OBJETS) - $(CXX) -o $(EXE) $(OBJETS) + $(CC) -o $(EXE) $(OBJETS) all: main