help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Beginner questions


From: Noel Yap
Subject: Re: Beginner questions
Date: Fri, 14 Nov 2003 21:40:08 -0500

address@hidden wrote:
> 
> Hi everyone, I'm new to this list.
> 
> I don't have alot of experience with make, I've always just used what 
> somebody else has setup.  Now I'm setting up a new project myself and was 
> hoping to get some suggestions about organizing he makefiles.
> 
> 1.  What is the preferred method for organizing a project's makefiles where 
> the source (C++) files are stored in a directory hierarchy rather than all in 
> a single directory?  How does the root makefile reference the makefiles in 
> the other directories?  One method I've seen is to have the root makefile "cd 
> blah && make" into each subdirectory.  The makefiles in the subdirectories 
> would then add their object code to a library which was linked in at the end 
> by the root makefile.  I'd like to do something similar, except not bother 
> with the library and have the *.o files linked into the executable as if they 
> were all in the same directory.

See http://aegis.sourceforge.net/auug97.pdf

> 2.  On the last project I worked on the makefiles were organized using *.o 
> files as the prerequisites and no rules to create the *.o (such as in section 
> 2.2 of the make manual).  Can someone give a very brief overview of how this 
> works?

Read the documentation.

> Can anyone recommend any decent books or web tuturials on the subject?  I've 
> looked at the GNU manual but I'm looking for more practical info rather than 
> just the syntax.
> 
> I'd really like to be more confident with the make system, so any 
> help/suggestions are appreciated.

IMHO, the GNU manual is the best source with the caveat that references to 
recursive make should be taken lightly.

I've found the O'Reilly book to be terrible.

Noel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]