views:

306

answers:

7

I would like to know how to makefile for Unix.

+4  A: 

Here's a good Makefile Tutorial (first result on Google after searching "how to create a makefile").

Dave
+1  A: 

Run make. ;)

Though you'd be better served by reading the make documentation. Do this by typing 'man make' from the command line. It should be enough to get you started and confused, at which point a Google search will help a lot.

samoz
A: 

can check out documentation on automake (which most unix-y projects use) as well

Matt Briggs
I'd recommend against this until, the asker can at least read a makefile with confidence... the autotools are ugly.
dmckee
+1  A: 

The Gnu make manual would be a good place to look.

T.E.D.
+3  A: 

Because (g)make has many non-intuitive aspects, e.g. its backward chaining, I'd highly recommend having a look at Robert Mecklenburg's book Managing Projects with GNU Make.

Or even better is Andrew Talbot's Managing Projects with Make (second edition), which I feel has the better introduction to make. (IMHO naturally).

Rob Wells
+1  A: 

I have compiled some notes here: http://ustunozgur.blogspot.com/2008/04/sample-makefile.html

ustun