ECHO = @echo
GCC = g++
CCFLAGS = -c -O3 -g -std=c++11 -pedantic -Wall 
SRC = $(wildcard *.cpp) 
OBJECTS = $(SRC:.cpp=.o)
EXE = test

$(EXE) : $(OBJECTS)
	$(ECHO) "-Linking $(EXE)-"
	$(GCC) -o $@ $^

./%.o:%.cpp
	$(ECHO) "-Compilation $<- "
	$(GCC) $(CCFLAGS) -o $@ $<

.PHONY: clean 
clean:
	$(ECHO) "-Cleaning-"
	$(RM) $(OBJECTS) $(EXE)

