Suppose I have a project with several modules and a main program. This works well by adding the modules to main_program.
module1.cpp
module1.h
module2.cpp
module2.h
...
main_program.ino
I'm having problems when I have test programs for each of the modules. These allow the various devices to be tested in isolation.
module1.cpp
module1.h
module1.ino # test program
module2.cpp
module2.h
module2.ino # test program
...
main_program.ino
I'm required to have each ino file in a directory of the same name. I can add the files to main_program by adding (e.g.) ../module1/module1.{cpp,h}. But, I discover that it has actually copied module1.{cpp,h} to main_program/.
How do I set this up? Is there any option other than making each module a library? If possible I would like to keep these files more local than the library directory, since they're specific to this project and not general-purpose libraries.