Building

License: GPLv2

Get subsurface from the git repository:

git clone git://subsurface.hohndel.org/subsurface.git .

or

git clone http://subsurface.hohndel.org/subsurface.git .

You can also browse the sources via gitweb.

Building subsurface under Linux

You need libxml2-devel, gtk2-devel, glib-2.0 and gconf2-devel to build this (and libusb-1.0 if you have libdivecomputer built with it, but then you obviously already have it installed). Check with your Linux distribution how to install these packages.

On Debian the package names are different; try libxml2-dev libgtk2.0-dev glib-2.0 libgconf2-dev, but it seems the cairo package at least in Squeeze is too old.

You also need to have libdivecomputer installed, which goes something like this:

git clone \
git://libdivecomputer.git.sourceforge.net/gitroot/libdivecomputer/libdivecomputer
cd libdivecomputer
autoreconf --install
./configure
make
sudo make install

NOTE! You may need to tell the main subsurface Makefile where you installed libdivecomputer if you didn’t do it in the default /usr/local location. I don’t trust pkg-config for libdivecomputer, since pkg-config usually doesn’t work unless the project has been installed by the distro.

Just edit the makefile directly. autoconf and friends are the devil’s tools.

Building subsurface under Windows

Subsurface builds nicely with MinGW – I tend to do all the builds as cross builds under Linux. A shell script to do that (plus the .nsi file to create the installer with makensis) are included in the packaging/Windows directory.

Building subsurface on a Mac

Provided by Henrik Brautaset Aronsen

Install MacPorts and install the dependencies from MacPorts:
sudo port install gtk2 +no_x11 +quartz -x11 libusb gtk-osx-application

Install libdivecomputer:
git clone git://libdivecomputer.git.sourceforge.net/gitroot/libdivecomputer/libdivecomputer
cd libdivecomputer
autoreconf --install
LIBUSB_CFLAGS=-I/opt/local/include ./configure
make
sudo make install

Install subsurface:
git clone git://subsurface.hohndel.org/subsurface.git
cd subsurface
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" make
sudo make install-macosx