Recently our project structure changed and now we have subdirectories. My old makefile assumed that and just said:
SOURCES := $(wildcard $(SRCDIR)/*.cpp)
OBJECTS := $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
Now with arbitrary deep nested directories it changed to
SOURCES := $(wildcard $(SRCDIR)/**/*.cpp)
But I still want all objects to land in the same directory, how would I have to change the OBJECTS ( or compile? ) definition so that it does not fail, because the given subdirectories don't exist in the objectdirectory.
edit: Someone flagged this as a duplicate of Getting make to create object files in a specific directory
Now I am asked as to say how this is different. Which i find insulting, since why should I provide the reason as to why this is a duplicate. Whoever flagged this as duplicate should provide the reason.
I don't even know where to begin as to why it is different. You might as well have linked me to some excel-question and ask my why it is different.
Explain to me why the linked question should answer my question and then I will tell you how it is or not is.