root/GCM/modelII/trunk/Makefile.README

Revision 860, 3.1 kB (checked in by mankoff, 4 months ago)

clarified windows instructions

Line 
1
2Makefile.README
3
4We have a couple makefiles for a couple different target platforms and
5a couple different compilers. This document attempts to provide an
6intro to building the GISS Model II. For more information please
7contact Ken Mankoff (mankoff@giss.nasa.gov)
8
9Current supported builds are:
10 * Windows (XP, Vista)
11 * Mac PPC
12 * Mac Intel
13
14=== Makefile ===
15
16This is the top level makefile for Mac systems. Eventually, perhaps,
17it'll detect the current OS and desired target OS and do everything
18for you. Right now it serves the function of modifying README.f.in to
19include PRINT statements about the current date and SVN version # of
20the model.
21
22
23=== Windows ===
24
25On Windows development is done with Absoft 8.2. I have a Parallels
26Windows XP image for EdGCM development. It would be easiest to use the
27exact same environment and I can clone this image for you.
28
29Assuming Absoft 8.2 is installed in C:\Absoft82 ModelII can be built
30as follows:
31
32* Start Menu > Run > "cmd" (not "command")
33* Run c:\absoft82\bin\absvars.bat or make sure the following
34  environment vars are set:
35  ABSOFT=C:\Absoft82
36  PATH=C:\Absoft82\BIN;%PATH%
37  LIB=C:\Absoft82\LIB;%LIB%
38  INCLUDE=C:\Absoft82\CINCLUDE;%INCLUDE%
39
40Set up a share folder between Mac and Windows. This can be done easily
41through Parallels, or at the DOS prompt:
42> net use y: \\.psf\GISS\GCM\modelII\trunk
43
44Navigate to the build directory:
45> y:
46> cd GCM\modelII\trunk
47
48Build the model:
49> amake -f Makefile.win
50
51The result should be a file called "model.exe". If not, make sure you
52can build correctly in OS X. Debug. Email for help.
53
54Makefile.win.gui is the GUI Makefile for using with the Absoft 8.2
55IDE. I prefer the command line.
56
57
58=== Makefile.Mac.PPC ===
59
60Your environment should look like this (Customize for the name and
61location of your Absoft install. I am using Absoft 9.2 on an Intel
62MacBook
63
64export SDK="/Developer/SDKs/MacOSX10.4.0.sdk"
65export ABSOFT=/Users/mankoff/local/Applications/Absoft.ppc
66export ABSOFT_AS="as -arch ppc"
67export ABSOFT_LINKER="c++ -isysroot ${SDK} -Wl,-syslibroot,${SDK} -arch ppc
68export PATH=$ABSOFT/bin:$PATH
69export MANPATH=$ABSOFT/man:$MANPATH
70export MACOSX_DEPLOYMENT_TARGET=10.4
71export COMPILER=Absoft
72
73Then:
74% make -f Makefile.Mac.PPC
75
76should build "modelII_ppc.exe" that will run on both Mac Intel and Mac
77PPC. On Mac Intel it runs in Rosetta, so it runs very slowly.
78
79
80=== Makefile.ifort ===
81
82We are using the Intel ifort 10.1 compiler for Intel native builds on
83OS X. Your environment should be set like so:
84
85source /opt/intel/fc/10.1.008/bin/ifortvars.sh
86export COMPILER=Intel
87
88Then:
89% make -f Makefile.ifort
90
91should build "modelII_intel.exe" that will run on Mac Intel native, and
92not on Mac PPC.
93
94=== Makefile.gfortran ===
95
96This is a second Mac Intel native build. We use ifort because it is
97faster, but I provide this Makefile and try to keep it up-to-date so
98that the community can build their own Model II without needing to
99purchase a compiler.
100
101% gfortran -v
102gcc version 4.2.3
103
104I think this version of GCC comes with installing the iPhone SDK, then
105copying "gcc_select" from a Mac that has it (10.4? PPC?) and then a
106"sudo gcc_select 4.2"
107
Note: See TracBrowser for help on using the browser.