vlmcsd icon indicating copy to clipboard operation
vlmcsd copied to clipboard

Fix faults in Make builds

Open theosotr opened this issue 5 years ago • 4 comments

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

theosotr avatar Jan 01 '20 13:01 theosotr

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?

rouben avatar Mar 30 '20 05:03 rouben

The -MD option is supported by tcc.

theosotr avatar Mar 30 '20 07:03 theosotr

CLang also supports it: https://clang.llvm.org/docs/ClangCommandLineReference.html#dependency-file-generation

Barracuda72 avatar Mar 31 '20 19:03 Barracuda72

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.

rouben avatar Mar 31 '20 22:03 rouben