The patch should create a file named Makefile.xarm, which
contains a build script to build the cross compiler. This script
essentially automates the instructions given by Toshiyuki Maeda
at the following URL:
http://web.yl.is.s.u-tokyo.ac.jp/~tosh/ocaml-on-iphone
This unified patch contains all his patches plus some fixes of
our own. The result works with Apple's official iPhone SDK, and
we have used it to build a working iPhone application.
To build the cross-compiler:
a. Must be on an Intel Mac with Apple's iPhone SDK installed.
b. Create two full copies of the OCaml 3.10.2 release, in two
sibling directories. One must be named OCamlBase (used to
hold a native build of OCaml). The other can be named
anything; I'll use the name OCamlXARM.
$ wget http://caml.inria.fr/pub/distrib/ocaml-3.10/ocaml-3.10.2.tar.gz
$ tar xzf ocaml-3.10.2.tar.gz
$ mv ocaml-3.10.2 OCamlBase
$ cp -R OCamlBase OCamlXARM
c. Patch the OCamlXARM tree:
$ cd OCamlXARM
$ patch -p0 < ocamlxarm0.1.patch
d. Run the build process:
$ make xarm-build
This will take a while. It builds two copies of the OCaml
release, using the native copy to plug native components into
the cross-compiler at a few critical spots. (For more
information, see the URL above.)
e. There is also a make rule for installing. The default target
is /usr/local/ocamlxarm. To change this, you'll need to edit
Makefile.xarm. When the target is set as desired:
# make install
I just verified that the build works on my system. Let me know of
any difficulties.
Regards,
Jeff Scofield
Seattle