Wiki Markup |
---|
h5. ivp-extend |
...
We start in the ivp-extend directory of the hovergroup svn. The svn can be viewed or checked out by anyone at [https://code.google.com/p/hovergroup/]. |
...
{code |
} ↓hovergroup ↓ivp-extend →base →josh →missions →trunk {code} The {{missions}} directory contains all of the configuration files used to run a MOOS mission on the vehicles. For more information check out [hovergroup:Mission File Organization]. Ignore the {{project_files}} directories and any files located immediately in the {{ivp-extend}} directory. |
...
The remaining directories are all for source code. {{trunk}} contains the majority of the hovergroup applications and libraries. Individuals also have their own directories for programs that are specific to their experiments. The {{base}} directory can be copied and renamed to create new individual directories. h5. |
...
ivp-extend \-> base |
...
Let's look at the basic structure of one of these directories. |
...
{code |
} ↓hovergroup ↓ivp-extend ↓base →bin →build →data →docs →lib →missions →scripts →src build_proto.sh CMakeLists.txt {code} Here's what you should know: |
...
bin
- Where built executables are placed.
data
- If you need to associate some sort of data file with your program that doesn't depend on the mission, this might be the place for it.
docs
- For documentation, though usually the wiki is preferred.
lib
- Where built libraries are placed.
missions
- You can use this directory for testing mission files, but actual missions should use the ivp-extend/missions
directory.
scripts
- For command line scripts, which we'll come back to.
src
- The source code itself.
build_proto.sh
and CMakeLists.txt
are both part of the build process, which we'll also come back to.
...
{{bin}} \- Where built executables are placed.
{{data}} \- If you need to associate some sort of data file with your program that doesn't depend on the mission, this might be the place for it.
{{docs}} \- For documentation, though usually the wiki is preferred.
{{lib}} \- Where built libraries are placed.
{{missions}} \- You can use this directory for testing mission files, but actual missions should use the {{ivp-extend/missions}} directory.
{{scripts}} \- For command line scripts, which we'll come back to.
{{src}} \- The source code itself.
{{build_proto.sh}} and {{CMakeLists.txt}} are both part of the build process, which we'll also come back to.
Within the {{src}} directory you'll see that each library or application has its own folder, and within those folder are header and source files. Folders for libraries are prefixed with {{lib\_}}. Almost every folder also contains a {{CMakeLists.txt}}.
h5. Building
Let's switch to {{ivp-extend/trunk}} now to look at how the code gets built. {{make}} is responsible for building the c+\+ source code into an executable, but it needs a {{Makefile}} to tell it what to do. We use {{cmake}} to create these {{Makefiles}}.
Cmake is run in the top directory ({{ivp-extend/trunk}}) using the command {highlight:#a0a0a0}{{cmake .}}{highlight} or {#a0a0a0}{{ccmake .}}{highlight} if you need a user interface. It drills down through the source tree looking at every {{CMakeLists.txt}} file on the way. |