I have managed to build a static C library on OSX using make on the command line.
I have tried to use the same Makefile (with ARCHFLAGS=-arch armv6 -arch armv7) to build a static library for iOS, but it fails with:
gcc-4.2: error trying to exec '/usr/bin/arm-apple-darwin10-gcc-4.2.1': execvp: No such file or directory
I guess it is not working because I’m using the OSX SDK make instead of a some part of the iOS SDK. Any clues?
N.B. For more details on the library in question (levmar) and for the Makefile, please refer to this Stack Overflow answer.
You need to find:
The easiest way is to create a test iPhone/iPad app in XCode, build it, and then look at the build log to find how XCode invokes the compiler.