As you can see, even though not all of my executables need SDL_image library, I am linking all my executables against it. Does it add unnecessary things to other files that don't need that spesific library? Should I spesicify linking separately for each rule?
What make dialect is this? That's not quite the syntax I'm used to.
Anyways: If you have different executables, why are you using the same makefiles for them? If you insist on putting them all in the same makefile, then just use different options for each as appropitiate.
Actually, a non optimizing will just bake the entire library into the executable if you're linking statically, and if you're linking dynamically you will create dependiencies upon libraries that aren't even used. That's not what I'd call "not affected".
What make dialect is this? That's not quite the syntax I'm used to.
Anyways: If you have different executables, why are you using the same makefiles for them? If you insist on putting them all in the same makefile, then just use different options for each as appropitiate.
As for single makefile, I am following online tutorials, each executable is short, and somewhat related to others. I thought using a single makefile would be easiest. I am not very experienced about concept of makefiles, I guess I should have used different makefiles for each executable.
By looking at the suggestion, does that mean using unnecessary links hurts programs in any way?
Edit: I didn't see your second post when I post this. I guess I understand now.
I swear GNU Make used = instead of := for variable assignment last time I used it. Either I'm getting senile, there are 2 GNU Makes, or GNU Make for some reason has 2 assignment operators.