"Robert P. J. Day" <[EMAIL PROTECTED]> writes:

> typically, a directory in a recursive make tree is responsible for
> building a single object of some kind -- say, an executable, or a
> shared library, or a loadable module, or what have you.  if that's
> the case, my approach is to define a number of includable makefiles,
> one for each kind of object to be built.

This may be a much softer convention than you think. 

>   TARGETLIB = fubar.so
>   SRCS = src1.c src2.c snafu.c
>
>   include sharedlib.mk


If I get you, your problem is that you're using named variables to
express your dependencies.  In fact, Make has a syntax for such
things. ;)  How about: 


fubar.so: src1.o src2.o snafu.o


?  Then your rules only need to take care of building .so from .o, and
.o from .c, much of which might be already done for you.  Then


> what if the "building" of that directory should result in a
> multitude of final objects -- say, an executable, a shared library
> *and* two loadable modules?

foo.so: src1.o src2.o snafu.o
bar.so: src1.o src2.o fusna.o
baz.so: src1.o src2.o ufsna.o
[...]


- Allen S. Rout



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

Reply via email to