You have a problem with this statement:
Code:
$(BINARY): $(OBJS) $(CPPCOMPILER) $(COMPILERFLAGS) $(INCLUDES) -o $(BINARY) $(OBJS) $(LFLAGS) $(LIBS)
It should be:
Code:
$(BINARY): $(OBJS)
$(CPPCOMPILER) -o $(BINARY) $(OBJS) $(LFLAGS) $(LIBS)
You are also missing a rule to build the object file(s):
Code:
.cpp.o:
$(CXX) $(COMPILERFLAGS) $(INCLUDES) $<
Of course, you can simplify the rule to make your binary:
Code:
$(BINARY): $(OBJS)
$(CXX) -o $@ $^ $(LFLAGS) $(LIBS)
Typically COMPILERFLAGS are defined as either CFLAGS or CXXFLAGS. There is no need to explicitly state your compiler, using CC or CXX or even CPPCOMPILER. CC and CXX are built-in types known by the make command. You really should only specify these if you are using a compiler other than the default gcc or g++ compiler.
Also, you should avoid using a wildcard when removing files. If you want to remove your object files, use $(OBJS), not *.o. Also, your Makefile should not be used to clean up after your editor. Do that yourself, or just instruct the editor not to create backup files.