comp.unix.programmer
Re: make: Automatic variable for all dependencies
Steve Keller , dans le message <j6j653$2ovo$1_at_adenine.netfront.net>, a
?crit?:
> Is there a portable way to name all dependencies of a target in the
> command to build this target? Say, I want to link a number of object
> files to the resulting binary, I'd like not to have to repeat the list
> of object files in the linker command
>
> program: foo.o bar.o yadda.o
> $(CC) -o $_at_ foo.o bar.o yadda.o
PROGRAM_OBJ = foo.o bar.o yadda.o
program: $(PROGRAM_OBJ)
$(CC) -o $_at_ $(PROGRAM_OBJ)
Written by Nicolas George
06/10/2011 7.23.37
Check some pics on this site!
23/05/2012 22.40.08