What is the best practice when it comes to integrating external libraries to a project. For instance, I work on an Arduino project, to use the on board microphone I have to include a class that I can either refer in a git submodule or just copy it from the sketch examples and past it in my repo. The class can't run without an other class from an other API related to Arduino, which I can do the exact same, submodule or copy past.
-The problem I have with submoduling with git is that it clones complete repository to just refer one or two files.
-While if I copy past, I lose track of what came from where.
I am inclined to use the copy-past option with a document tracking the API and classes I use, but I fail to find any 'best practice' about that subject and maybe don't use the right words to find such thing?
If anyone can enlighten me that would be great.