Is created in parts a few individual folders with source code for each separately invoke the compiler-linker that is passed to all source code files located in this folder, so multiple executables, there is nothing supernatural about any connection between the modules the compiler need to know.
a single executable and a few libraries?
Libraries are all exactly the same as the executable, only set to a special option (command line switch) to the compiler, the linker, which indicates that you want to create a library that will not be the entry point, etc.
examples of settings and Secondly for C/C++
This is unlikely to have in Vim, likely you will need to make to master, it does the same thing that I described the paragraph above, but all the settings you save in a file (script), then it is sufficient to just call the make command without any arguments and it will apply all settings.