Mac OS X - compiling AFNI

basic instructions

Assumption(s):

    The computer's operating system should be Mac OS X (preferably 10.3 or 10.4,
    and possibly a G5 or an Intel CPU).  It is assumed that the user has already
    gone through the steps to install an AFNI package.  If not, these instructions
    should replace "Step 1" of Installing AFNI.

    It is also assumed that /sw/bin is in the user's PATH, to allow direct
    access to the 'wget' command.  Alternately, run /sw/bin/wget directly.
    (see notes: setting the PATH)
----------------------------------------------------------------------

Description:

    The basic steps are:
	1) download and extract the source package
	2) choose a Makefile, based on the computer setup
	3) build the package
	4) move the programs to the appropriate directory

----------------------------------------------------------------------

    Step 1: download the source package

	The afni_src.tgz package can be downloaded from pub/dist/tgz.  It may
	be a good idea to put this under the ~/afni directory.  If such a
	directory does not exist, create it.  Also, if ~/abin does not exist,
        create it.
	    
	    mkdir ~/abin

	    mkdir ~/afni
	    cd ~/afni

	    wget http://afni.nimh.nih.gov/pub/dist/tgz/afni_src.tgz
	    tar xfz afni_src.tgz
	    cd afni_src
	    


    Step 2: choose a Makefile, based on the computer setup

	The afni_src directory has many Makefiles in it.  Choose one that is
	appropriate for your operating system and libraries.  To view the
	choices, look at Makefile.* :

	    ls Makefile.macosx*

	While more than one Makefile will probably work, better perfomance may
        be gained by using the most appropriate one.  Let us assume that the
	user is running Mac OS X 10.3, and therefore wants to use Makefile
	Makefile.macosx_10.3 (or Makefile.macosx_10.3_G5).

	For ease of repeated compiling, copy the chosen Makefile to 'Makefile'.

	    cp Makefile.macosx_10.3 Makefile


    Step 3: actually build the package (woohoo! :)

	For building an installation package, the best target to use may be
	'totality'.  Using any of Makefile.macosx_*, the SUMA package will be
	built automatically with the AFNI package.  Enter the command:
	    
	    make totality
	    

	The result of this command is that everything is compiled and moved
	into a new macosx_10.3 directory (based on the name of the Makefile
	that was used).


    Step 4: move the programs to the appropriate directory

	Once everything is built, and assumably sitting in the macosx_10.3
	directory, the user need only move it all to their afni bin directory.
	    
	    /bin/mv -f macosx_10.3/* ~/abin
	    

	The reason the 'mv' command is given with the full path is that for
	many users it is aliased to 'mv -i' (to inquire about over-writes).
	The user probably does not want to enter 'y' 300+ times, so the alias
	is ignored (which can also be done via '\mv -f macosx_10.3/* ~/abin').


    Step 5: it's chocolate time!

----------------------------------------------------------------------