tf68:
<...>
The preprocessor will replace 'FILE' with your *.ino file name.
I work at any time with bare, UNO, Mega, mini, micro, nano, STM32F103, ESP8266 ...
So, while the FILE pre-processor trick is most interesting, I also try and organize my source files into a sensible directory. Examples:
/arduino/sources
|
Nano/2x16_LCD
/ILI9341
/128x64_OLED
/BMP180
It helps when I get ready to look for a template for the next project.
The other thing I do is embed all 3rd party libs within the sketch folder. As I post projects on my project page, it is so simple to have one ZIP. Hard disk space is cheap and all I ever have to do is install an old IDE version and download the Zip to answer a question on a project years old.
Ray