I would like to know how to makefile for Unix.
Here's a good Makefile Tutorial (first result on Google after searching "how to create a makefile").
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.
can check out documentation on automake (which most unix-y projects use) as well
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).
I have compiled some notes here: http://ustunozgur.blogspot.com/2008/04/sample-makefile.html