Makefile issues
neuromancer opened this issue · 6 comments
Some Makefile issues to discuss:
- Some parts of Makefile specified the use of clang and other just use any compiler (e.g. Box2D)
- Some parts of Makefile specified the use of sanitizers but not all of them (e.g Box2D) (this is my fault, I know 😞 )
- The shell expansion to select the number of cores is not working properly, we should change it like this.
I guess makefile variables could solve all these problems ?
I want to say that the user is one who should choose compiler, enable or disable sanitizers and set preferred number of cores. We cannot make a decision for him.
Yeap, well, for preferred number of cores, make has the -j
but this won't work in our current setting because we cannot pass that flag directly to premake. That's why I believe it is a reasonable choice to use half of the available cores by default.
Btw, let's start removing the hard-coded uses of clang. I guess the user could set the CC
environment variable to change the compiler, there is no need to add extra code.
Okay! Hard code is bad thing in all times :)
It's unclear how to add the sanitizers in the Box2D source if we are using a gitsubmodule. The main developer does not want to accept any contribution (just issue reports and minor fixes). Perhaps it is a good idea to use a more active Box2D fork?
I see few options here:
- add Box2D sources directly to project to src/Box2D (as it was done for GLFW)
- don't use sanitizers for Box2D
I'd rather prefer opt. 2 :)
Yeap, Box2D is probably a mature project, so it shouldn't need them. Let's close this.