Compile once for i386 and x86_64

Hi, I am using libraw in one of my projects on Mac OS X.
I want to build my mac app in Xcode with architecture set to "Stand(32/64-bit Intel)", so that I need to compile libraw that can be linked in both 32 and 64 bits environment. But at this moment, I can compile either i386 version or x86_64 version, i can not make it compile once for both architectures.
Can anyone help me? Many thanks!

Forums: 

use -arch i386 -arch x86_64

use -arch i386 -arch x86_64 (both flags) in compiler flags when building the library

-- Alex Tutubalin @LibRaw LLC