For most of the following build commands you need to be in the home directory of Rosetta source.
In order to build a release version of Rosetta executables, simply run scons:
- Release Mode This command will build the defaults: libraries devel, protocols, core, numeric, utility and all applications listed in src/apps.src.settings or src/pilot_apps.src.settings.all.
- Debug Mode In order to build a debug version of executables, remove the flag 'mode=release'.
- Other options To display more rosetta specific build options call To display general scons build options call
Automatic location of other compilers (assuming they are already in your path) such as Intel C/C++ may be enabled by uncommenting the "program_path" line in 'tools/build/user.settings'.
You can restrict compilation of the the devel and pilot_apps to build personal applications. On issuing the call
scons bin my
or
scons bin my_pilot_apps
SCons will read from src/devel.src.settings.my and src/pilot_apps.src.settings.my rather than src/devel.src.settings and src/pilot_apps.src.settings.all.
- Build the default projects with default settings (debug mode, shared libs)
- Build the target <project> with default settings
- Build only the sources of <project> in <subdirectory>
scons <project>/<subdirectory>
- Build only specified objectfile
scons <project>/<path/<objectfile>
- Build and install executables in bin directory
- Build and install executables in bin directory if current working directory is a sub-directory of Rosetta. -D option tells SCons to iteratively search towards the root for SConstruct file. The # sign is an alias for the top build directory.
- Build all pilot_apps listed in src/pilot_apps.src.settings.all and sources in src/devel.src.settings as well as the core, numeric and utility libraries
scons bin
scons bin pilot_apps_all
- Build restricted set of pilot_apps and devel sources listed in src/pilot_apps.src.settings.my and src/devel.src.settings.my
scons bin my
scons bin my_pilot_apps
- Build and install a particular executable in the bin directory e.g
scons bin/exec
scons bin/benchmark.linuxgccdebug
scons mode=release bin/benchmark.linuxgccrelease
- Build in release mode(around 10 times faster executable)
- Static linking instead of shared libraries (portable to other computers, but larger file sizes)
- Build and run unit tests. (Note the sources must be built with debug mode first.)
scons cat=test
python test/run.py
- Parallelize build into 3 threads. Intended for multiprocessor machines.
The Rosetta installation on MacOS X system is the same as the installation on Linux system. You need to make sure that the Xcode is installed, which is also available free from Apple Developer Connection. http://en.wikipedia.org/wiki/Apple_Developer_Connection
The Rosetta3 Xcode project is compatible with Xcode versions 2.4 and later. You can use it to build, run, debug, browse, and edit the source code. There are four build targets to select from:
Libraries: Rosetta3 libraries upon which apps are based
Test: Unit tests for components of Rosetta3
Libraries & Test: Both of the above
Libraries & Apps: Libraries and executable apps in rosetta-3.0/rosetta3_source/bin
There are two primary configurations, Debug and Release. Each of those has two sub-configurations. The "static" mode builds static binaries, instead of those based on the shared libraries. This can be useful for copying and running the apps on other Mac OS X systems. The "graphics" mode enables OpenGL graphics for those apps that support it.
The Xcode build and clean commands tell scons to take the appropriate actions. Xcode will by default instruct scons to use 2 processors for compilation. To change that number, double click the "Rosetta3" icon in the "Groups & Files" pane. Then switch to the "Build" tab and change the "NUM_PROCESSORS" setting to the desired number of processors.
To run/debug Rosetta3 from within Xcode, you will need to add an executable to the project. To do so, select "New Custom Executable..." from the "Project" menu. Xcode will not allow you to specify the symbolic links in the
rosetta-3.0/rosetta3_source/bin
directory as the executable. Instead, you will have to reference the actual binaries deep inside the subdirectories of rosetta-3.0/rosetta3_source/build
. Please see the Xcode documentation for information about specifying the command line arguments and the working directory.
If you want to set breakpoints from within Xcode for debugging, you have to tell the debugger to load all user libraries. To do so, go to the "Run->Show->Shared Libraries..." menu item. Change the "User Libraries:" popup from "Default (External)" to "All".
Generated on Fri Mar 6 12:55:47 2009 for Rosetta Projects by
1.5.2