Title: Hacking rules - only for experts.

Is there a way that something like this will work?

myprog_SOURCE = a.c b.c c.c
hisprog_SOURCE = x.c y.c z.c

TARGET = myprog hisprog

$(TARGET): % : $(%_SOURCE)
        $(CC) -o $@ $^

For some reason %_SOURCE has the right value but $(%_SOURCE) is not being replaced.


Is there a similar way to do this?

Thanks in advance.


Reply via email to