Hello,

I know this may sound newbie-ish, but I really need some help.

I want to name each of my object files prefixed with the current target
name.
That way when I change targets, I won't have to recompile everything to make
sure there is no residue from the previous compilation (which may have been
for a different target).

For example:

target1: c_flags = -DSOMETHING
target1: main.o

target2: c_flags = -DSOMETHING_ELSE
target2: main.o

main.o:
gcc $(c_flags) etc...

The only way I can avoid recompiling every time is by manually making a rule
for, let's say, target1-main.o and target2-main.o, but I have a lot of
source files and it's a real hassle.

Sorry again for the newbie-ish question.
-- 
View this message in context: 
http://www.nabble.com/Naming-object-files-according-to-target-tp23358342p23358342.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to