Question: I am looking for a simple library ( and/or app - eventually want both ) example ( like a math library or whatever) for iOS which has a makefile for it that I can use as a template to make other makefiles from and learn. Static of course, (and dynamic if iOS supports it so I can have 2+ apps that share common code)

There is lots of incomplete and cryptic info out there but so far I havn't found any nice concise "with these source files" you create a makefile this way to build an iOS "fat" library I can import into other projects.

This would be on a Mac with the ios4 sdk installed.
It is always great to start with something that basically works.

I have created complex makefiles before for unix and windows and for other devices.

thanks.

Answer: 
The first link pictorially represents the process step by step that you've asked then the second link contains a package that allows a programmer to compile a make file based project

[click me](http://blog.boreal-kiss.net/2011/03/15/how-to-create-universal-static-libraries-on-xcode-4/)

[click me](https://github.com/hasseily/Makefile-to-iOS-Framework)
If you want to build a static library using a make file and link against it every time you build your Xcode project, you can add a "run script" build phase in your project before all the others, which runs this make file, and then add the built library to your linking phase. If you want a make file that builds the entire iOS project, I don't think it's posible (you can use the command line to compile the project without Xcode opened though).