This is more for me because I know I’ll forget, but I’ve been doing this for little utilities like dd_rescue and cups-pdf for a while so I wanted to put it down for those too lazy to read Apple’s overly-extensive documentation on the topic — and for me when I forget.
One Step
This should work for most programs.
gcc -arch i386 -arch ppc -O3 -o cups-pdf cups-pdf.c
Two Steps
If the one step method fails for any reason, this will work:
- Build your project in two versions, one for PPC and one for Intel:
gcc -arch ppc -O3 -o cups-pdf.ppc cups-pdf.cgcc -arch i386 -O3 -o cups-pdf.intel cups-pdf.c
