Comment by silasdavis 1 year ago Someone remind me, is it $@ or $< ? 2 comments silasdavis Reply spc476 1 year ago In a given rule: foo.o : foo.c $(CC) $(CFLAGS) -o $@ $< The "$@" is the output (or target, think of @ as a bullseye on a target), and the "$<" is the input (think redirection). The only other commonly used variable is "$^": foo : foo.o util.o other.o $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) In this case, "$^" means "all inputs". pwdisswordfishz 1 year ago For what?
spc476 1 year ago In a given rule: foo.o : foo.c $(CC) $(CFLAGS) -o $@ $< The "$@" is the output (or target, think of @ as a bullseye on a target), and the "$<" is the input (think redirection). The only other commonly used variable is "$^": foo : foo.o util.o other.o $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) In this case, "$^" means "all inputs".
In a given rule:
The "$@" is the output (or target, think of @ as a bullseye on a target), and the "$<" is the input (think redirection). The only other commonly used variable is "$^":
In this case, "$^" means "all inputs".
For what?