Using bsd.prog.mk in a project with multiple binaries

Brooks Davis brooks at freebsd.org
Wed Nov 6 23:06:39 UTC 2013


On Wed, Nov 06, 2013 at 02:33:01PM -0800, Luigi Rizzo wrote:
> On Wed, Nov 6, 2013 at 2:25 PM, Brooks Davis <brooks at freebsd.org> wrote:
> 
> > On Wed, Nov 06, 2013 at 08:45:26AM -0800, R. Tyler Croy wrote:
> > > Howdy, I'm trying to find some documentation or examples of using
> > bsd.prog.mk
> > > inside of a project with multiple binaries that need to get created. I'm
> > able
> > ...
> > This seems plusable as a layout.  Note that while you need one Makefile
> > per program, you don't necessicairly need to spread the code out if you
> > don't want to.  If you'd rather keep the source files in one place you
> > can use .PATH: directives to access them from a central location.
> >
> 
> Since I have had a similar problem in the past...
> i am also under the impression that those Makefile must be
> in different directories -- am i wrong ?
> (in this case having all the sources in a single place does
> not help too much; and I'd rather have a single Makefile
> to handle a small set of closely related programs)

The Makefiles do need to be in different directories since they need to
be called Makefile.  I suppose you could hand roll a toplevel Makefile
that called a series of Makefile.prog1, Makefile.prog2, etc files, but
that seems not very useful.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20131106/cd99556a/attachment.sig>


More information about the freebsd-hackers mailing list