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

Re: Making Makefiles



On Thu, May 27, 1999 at 01:47:29 -0500, Brad wrote:
>i'm getting started writing C/C++ programs that are more than one file
>long, so i decided it's about time i learn to make a makefile. The make
>info page mentions automake, the automake manpage hints at configure.in...
>i'm getting confused!

Autoconf, automake and libtool are tools that are very useful when writing
software that has to run on a number of different operating systems and
configurations. They are very useful, but if you're just starting with make,
just ignore references to them.

> What's a good way to learn to make good makefiles? Which packages do i
> need, and where do i even start to learn to use them?

http://www.wi.leidenuniv.nl/~kuyper/stuva2/debug.ps.gz has an example and
references to make tutorials.

On Thu, May 27, 1999 at 09:21:23 +0200, Stephan Engelke wrote:
> > What's a good way to learn to make good makefiles? 
> 
> Stick to the info files and look at other people's Makefiles - just
> remember to have your own idea about what's good for you and what's not.

Well, when you're beginning with make, it is sometimes difficult to see
what's good. I'd strongly recommend using implicit rules and pattern rules
as soon as you understand them, and to use the variable names from the
implicit rules (CC, CFLAGS, LOADLIBES etc.) as much as possible; it will
make your makefiles more easily understandable and modifiable by others.

HTH,
Ray
-- 
Cyberspace, a final frontier. These are the voyages of my messages, 
on a lightspeed mission to explore strange new systems and to boldly go
where no data has gone before. 


Reply to: