New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makefile doesn't respect externally supplied variables #10
Comments
Thanks for your feedback! This issue is about two things: 1. Use
|
You should first keep CFLAGS when supplied by the caller (?=), assuming it has all optimization options. Then add -I flags that are needed with +=.
Right, without -flto -O3 doesn't do anything during linking. Both should be enabled together. |
You are absolutely correct. For some reason, I made |
Makefile should keep CFLAGS/CXXFLAGS/LDFLAGS, because build frameworks can supply their own optimization variables.
Also, LDFLAGS doesn't need -O3. Optimization only occurs during compilation.
It should be something like this:
CFLAGS?=-g -O3 ...
The text was updated successfully, but these errors were encountered: