vlmcsd
vlmcsd copied to clipboard
Fix faults in Make builds
Hello
This pull request fixes the build script of this project. Specifically, it adds missing Make dependencies so that the targets of the project are re-generated correctly whenever there are updates to any of the dependent source files.
In this way, the project is incrementally built and we no longer sacrifice time in clean builds (i.e., builds after a make clean).
Note that this fix follows the best practices for tracking dependencies automatically (through gcc -MD
)
For more details, see here. https://www.gnu.org/software/make/manual/html_node/Automatic-Prerequisites.html
I like this in principle, however, is this dependent on gcc? For example, one supported compiler for this make file is tcc (Tiny C Compiler?). Has anyone tested it with tcc?
The -MD
option is supported by tcc.
CLang also supports it: https://clang.llvm.org/docs/ClangCommandLineReference.html#dependency-file-generation
Yeah, I've been testing with with tcc and clang, both work. The build fails with tcc, but that's an issue unrelated to this change. Given that this will fork the project from upstream, I'd like @Wind4 to weigh in as well.