27 lines
541 B
Makefile
27 lines
541 B
Makefile
CXX = g++
|
|
CXXFLAGS = -std=c++11
|
|
RM = rm
|
|
|
|
SOURCES = $(wildcard src/*.cpp)
|
|
OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES)))
|
|
|
|
EXE = rand_player
|
|
|
|
%.cpp.o: src/%.cpp
|
|
$(CXX) -c -o $@ $< $(CXXFLAGS) $(DEVFLAGS)
|
|
|
|
rand_player: CXXFLAGS += -Wall -O2
|
|
rand_player: compilation
|
|
|
|
dev: CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -Og -g
|
|
dev: CXXFLAGS += -Wold-style-cast -Wsign-conversion
|
|
dev: compilation
|
|
|
|
compilation: $(OBJETS)
|
|
$(CXX) -o $(EXE) $(OBJETS)
|
|
|
|
all:
|
|
rand_player
|
|
|
|
clean:
|
|
$(RM) $(OBJETS) $(EXE)
|