I am working my way through a make tutorial. Very simple test projects I am trying to build has only 3 files: ./src/main.cpp ./src/implementation.cpp and
The implicit rule for linking object files is:
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
But $(LINK.o) uses $(CC), which is not quite correct for compiling C++ programs, so the easiest fix is:
$(LINK.o)
$(CC)
CC = $(CXX)