Unfortunately this file structure cannot be avoided. Sometimes I will want to build a project for the UNO board (using a dedicated Makefile), and others for the Due board (with another Makefile).
Don't worry for the duplicates, let's focus just in a file inside a folder:
Last night it didn't work, but today it does. I don't know how and why, so I must assume your wonderful project already handles sources inside folders.
Actually Arduino-Makefile doesn't handle source files inside folders. For example:
Unfortunately this file structure cannot be avoided. Sometimes I will want to build a project for the UNO board (using a dedicated Makefile), and others for the Due board (with another Makefile).
Don't worry for the duplicates, let's focus just in a file inside a folder:
How can I tell the Makefile to find and compile the port.c file? Any hint?