'gcc -M flag (phony runes) fast compilation
I have a relatively large project, it's compilation takes normally 13 mins.
I was trying to optimize it's compilation and I saw the -M flag in gcc man, it has something to do with phony rules in makefile. I'm not an makefile expert, but adding this -M caused compilation to run in only 2 mins, can someone explain what this -M does and how I can take advantage of it to speed up the compilation?!
Thanks a lot!
Solution 1:[1]
It's not about phony rules -- it's used to auto-generate dependencies for C files. See http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/ for more information on how this all works.
This should not speed up build files by itself -- it's likely that on your second run (with -M), make didn't need to rebuild some dependencies that were built in the first run, making the second run faster.
Where this does become handy is that it generates an accurate list of which files your .C file depends on, which allows you to only rebuild the files you need to.
If you happen to have a blanket dependency that makes all .c files dependent on all .h files, and you replace this with the -M convention, then this would indeed make your average incremental build go faster (as you would avoid needlessly building various c files if you modify a .h file)
Solution 2:[2]
The form must be at the top in order for you to access those keyboard f keys. How about if you add to your form_Load:
this.TopMost = true;
see if that fixes. I have created a solution similar as the well known gaming voice command apps, where you can trigger any keyboard keys with your voice command in c#, i can share the code but it's too much of code and unorganized in professional ways to post here, it was for my personal use only, look up on youtube the app called: Voice Attack. There are other similar free app too.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | HardcoreHenry |
| Solution 2 |
