To build librsync you will need:
Generate the Makefile by running
$ cmake .
After building you can install
librsync for system-wide use.
To build and run the tests:
$ make check
$ sudo make install
To build the documentation:
$ make doc
librsync should be widely portable. Patches to fix portability bugs are welcome.
If you are using GNU libc, you might like to use
to detect some allocation bugs.
librsync has annotations for the SPLINT static checking tool.
The build is customizable by using CMake options in the configure step:
$ cmake -D <option-name>=<value> .
If you are interested in building only the
librsync target, you can skip the
rdiff build. In this way you don't need its dependencies (e.g.
popt). To do that, set the
BUILD_RDIFF option to
$ cmake -D BUILD_RDIFF=OFF .
Be aware that many tests depend on
rdiff executable, so when it is disabled, also those tests are.
Compression support is under development (see #8). It is so disabled by default. You can turn it on by using
$ cmake -D ENABLE_COMPRESSION=ON .
To build code for debug trace messages:
$ cmake -D ENABLE_TRACE=ON .
CMake generates input files for an underlying build tool that will actually do the build. Typically this is Make, but others are supported. In particular Ninja is a nice alternative. To use it:
$ cmake -G Ninja . $ ninja check
With Cygwin you can build using gcc as under a normal unix system. It is also possible to compile under Cygwin using MSVC++. You must have environment variables needed by MSVC set using the Vcvars32.bat script.