After googling almost every possible question on this subject I did not find any solution. I am trying build a make file which puts the object files into a separate directory. First I though this must be very easy since even the make file document has an example of it in chapter 4. Well, I was wrong. The problem is that I do not want to manually fill in the object file list so I use pattern rules so when I add another .cpp .h pair I do not have to update the make file. Sounds logical to me, maybe it isn’t since it turns out this is not a routine thing to do in the make world or at least not with short non-overcomplicated makefiles.
This works like charm however it places the .o files in the same folder as the executable and .cpp (very annoying)
CXX = g++
CXXFLAGS = -std=c++14 -g -O0 -Wall
INCL_FLAGS = -I/usr/local/include -I/usr/include/boost -I/usr/local/include/gsl
GSL_LIBS = -L/usr/local/lib
BOOST_LIBS = -L/usr/lib/x86_64-linux-gnu
CBLAS_LIBS= -L/usr/lib
LDFLAGS = -lgsl -lcblas -lboost_filesystem -lboost_system