2012-10-29 06:12:39 +00:00
|
|
|
Serval DNA Build and Test
|
|
|
|
=========================
|
2016-10-20 06:22:53 +00:00
|
|
|
[Serval Project][], December 2017
|
2013-03-06 01:13:44 +00:00
|
|
|
|
2014-02-14 07:23:31 +00:00
|
|
|
Supported Architectures
|
|
|
|
-----------------------
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2014-02-14 07:23:31 +00:00
|
|
|
These instructions will build [Serval DNA][] successfully for the following platforms:
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2018-05-18 04:49:02 +00:00
|
|
|
* Debian Linux, ix86 and x86\_64, kernel versions 2.6 and later, using [gcc
|
|
|
|
4.4][] and later, [gcc 5][], [gcc 6][] and [gcc 7][]
|
|
|
|
* Mac OS x86\_64, releases 10.7 “Lion” to 10.13 “High Sierra”, using [Xcode][]
|
|
|
|
versions 3.2 to 9.3, supplemented by [homebrew][]
|
2016-01-26 13:26:27 +00:00
|
|
|
* Oracle SunOs 5.10 (Solaris), Sparc, using [gcc 4.4][] and GNU tools
|
|
|
|
installed
|
2014-02-14 07:23:31 +00:00
|
|
|
|
Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:
iPhoneOS on armv7
iPhoneOS on arm64
iPhoneSimulator on i386
iPhoneSimulator on x86_64
The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.
Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode. It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.
Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones. Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.
Update INSTALL.md and add a technical document for Apple iOS.
This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2016-10-25 02:22:21 +00:00
|
|
|
[Serval DNA][] also builds and runs on the following platforms, for which there
|
|
|
|
are separate build instructions:
|
2014-02-14 07:23:31 +00:00
|
|
|
|
Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:
iPhoneOS on armv7
iPhoneOS on arm64
iPhoneSimulator on i386
iPhoneSimulator on x86_64
The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.
Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode. It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.
Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones. Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.
Update INSTALL.md and add a technical document for Apple iOS.
This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2016-10-25 02:22:21 +00:00
|
|
|
* [Serval Mesh app for Android][batphone] includes instructions for building
|
|
|
|
Serval DNA as part of an app for [Android 2.2 “Froyo”][] and later versions;
|
|
|
|
Linux kernels 2.6.x and 3.x, Arm architecture, using [gcc 4.4][] supplied as
|
|
|
|
part of [Android NDK][] Revision 7b
|
|
|
|
|
|
|
|
* [Serval DNA on iOS][iOS] gives instructions for [Apple iOS][] using
|
|
|
|
[Xcode][] versions 8, supplemented by [homebrew][]
|
|
|
|
|
|
|
|
* [Serval DNA on OpenWRT][OpenWRT] gives instructions for the embedded router
|
|
|
|
Linux distribution, as used by the [Serval Mesh Extender][], the [Mesh
|
|
|
|
Potato][], and the [Commotion Wireless][] project
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2013-05-29 03:51:41 +00:00
|
|
|
Download
|
|
|
|
--------
|
|
|
|
|
|
|
|
Serval DNA source code is available from the [serval-dna][] repository on
|
2014-02-14 07:23:31 +00:00
|
|
|
GitHub. You can use [Git][] to download the latest version:
|
2013-05-29 03:51:41 +00:00
|
|
|
|
|
|
|
$ cd $HOME/src
|
|
|
|
$ git clone -q git://github.com/servalproject/serval-dna.git
|
|
|
|
$ cd serval-dna
|
|
|
|
$
|
|
|
|
|
2012-10-30 04:19:50 +00:00
|
|
|
Dependencies
|
|
|
|
------------
|
|
|
|
|
2016-09-23 04:28:16 +00:00
|
|
|
The dependencies for build are expressed in [configure.ac](./configure.ac).
|
2013-05-29 03:51:41 +00:00
|
|
|
Most mandatory dependencies are present in the standard Linux development
|
|
|
|
environment.
|
2012-10-30 04:19:50 +00:00
|
|
|
|
|
|
|
Mandatory dependencies:
|
|
|
|
|
2016-09-06 07:57:02 +00:00
|
|
|
* standard C library **libc** and standard headers
|
|
|
|
* standard math library **libm** and headers `<math.h>` `<float.h>`
|
|
|
|
* network services library **libnsl** and headers
|
|
|
|
* dynamic link library **libdl** and header `<dlfcn.h>`
|
|
|
|
* Native Posix Threads Library **libpthread** and header `<pthread.h>`
|
|
|
|
* on Solaris, the realtime library **librt** (for the `nanosleep()` function)
|
2018-05-18 04:49:02 +00:00
|
|
|
* **GNU autoconf** 2.67-2.69 (2.70 may work but has not been tested)
|
|
|
|
* **GNU automake** 1.15 or later
|
|
|
|
* **GNU libtool** 2.4.6 or later (for the `libtoolize` utility)
|
2016-09-06 07:57:02 +00:00
|
|
|
|
2012-10-30 04:19:50 +00:00
|
|
|
Optional:
|
|
|
|
|
Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:
iPhoneOS on armv7
iPhoneOS on arm64
iPhoneSimulator on i386
iPhoneSimulator on x86_64
The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.
Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode. It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.
Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones. Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.
Update INSTALL.md and add a technical document for Apple iOS.
This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2016-10-25 02:22:21 +00:00
|
|
|
* [Java][] compiler and SDK 1.6.0 or later
|
2016-10-20 06:22:53 +00:00
|
|
|
* [Swift][] 3 or 4 compiler
|
2016-09-27 07:26:04 +00:00
|
|
|
* ALSA sound library and headers (present on Linux, not on Android)
|
2012-10-30 04:19:50 +00:00
|
|
|
|
2014-01-06 02:41:54 +00:00
|
|
|
Test dependencies:
|
|
|
|
|
2018-05-18 04:49:02 +00:00
|
|
|
* **Bash** 3.2.48 or later
|
|
|
|
* **GNU grep**, **GNU sed** and **GNU awk**
|
|
|
|
* **jq** 1.3 or later
|
|
|
|
* **curl** 7.45 or later
|
2014-01-06 02:41:54 +00:00
|
|
|
|
2018-05-18 04:49:02 +00:00
|
|
|
Apple Mac OS
|
|
|
|
------------
|
|
|
|
|
|
|
|
On Apple Mac OS, the following dependencies are provided by the [Xcode][]
|
|
|
|
package:
|
|
|
|
* all libraries and headers listed above
|
|
|
|
* **Swift** 3 or 4
|
|
|
|
* **Bash** 3.2.48
|
|
|
|
* **curl** 7.45
|
|
|
|
|
|
|
|
The following dependencies must be installed on Mac OS using the [homebrew][]
|
|
|
|
package manager:
|
|
|
|
* **GNU autoconf** 2.69
|
|
|
|
* **GNU automake** 1.15
|
|
|
|
* **GNU libtool** 2.4.6 (provides `glibtoolize`)
|
|
|
|
* **GNU grep** (provides `ggrep`)
|
|
|
|
* **GNU sed** (provides `gsed`)
|
|
|
|
* **GNU awk** (provides `gawk`)
|
|
|
|
* **jq**
|
|
|
|
|
|
|
|
See [Notes for Developers][] for more details.
|
2016-01-26 13:26:27 +00:00
|
|
|
|
2016-10-20 06:22:53 +00:00
|
|
|
Native Build
|
|
|
|
------------
|
|
|
|
|
|
|
|
A *native build* of Serval DNA will produce libraries and executable programs
|
|
|
|
that can be run on the same platform on which the build is performed. This is
|
|
|
|
useful for development and testing.
|
2013-05-29 03:51:41 +00:00
|
|
|
|
2016-10-20 06:22:53 +00:00
|
|
|
The following commands will compile a native (ie, not cross-compiled) Serval
|
|
|
|
DNA from source:
|
2013-05-29 03:51:41 +00:00
|
|
|
|
|
|
|
$ cd $HOME/src/serval-dna
|
2016-01-11 06:10:15 +00:00
|
|
|
$ autoreconf -f -i -I m4
|
2013-05-29 03:51:41 +00:00
|
|
|
$ ./configure
|
|
|
|
$ make
|
|
|
|
$
|
|
|
|
|
|
|
|
A successful session should appear something like:
|
|
|
|
|
|
|
|
$ cd $HOME/src/serval-dna
|
2016-01-11 06:10:15 +00:00
|
|
|
$ autoreconf -f -i -I m4
|
2013-05-29 03:51:41 +00:00
|
|
|
$ ./configure
|
|
|
|
checking build system type... i686-pc-linux-gnu
|
|
|
|
checking host system type... i686-pc-linux-gnu
|
|
|
|
checking target system type... i686-pc-linux-gnu
|
|
|
|
checking for pkg-config... /usr/bin/pkg-config
|
|
|
|
checking pkg-config is at least version 0.9.0... yes
|
|
|
|
checking for gcc... gcc
|
|
|
|
...
|
|
|
|
checking for library containing strlcpy... no
|
|
|
|
configure: creating ./config.status
|
|
|
|
config.status: creating Makefile
|
|
|
|
config.status: creating testconfig.sh
|
|
|
|
$ make
|
2017-09-12 06:08:21 +00:00
|
|
|
SERVALD CC servald_features.c
|
|
|
|
MAKE libsodium-dev
|
|
|
|
make[1]: Entering directory '/home/username/src/serval-dna/libsodium'
|
|
|
|
Making install in contrib
|
|
|
|
make[2]: Entering directory '/home/username/src/serval-dna/libsodium/contrib'
|
|
|
|
...
|
|
|
|
make[4]: Leaving directory '/home/username/src/serval-dna/libsodium/src/libsodium/include'
|
|
|
|
make[4]: Entering directory '/home/username/src/serval-dna/libsodium/src/libsodium'
|
|
|
|
CC crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_chacha20poly1305.lo
|
|
|
|
CC crypto_aead/xchacha20poly1305/sodium/libsodium_la-aead_xchacha20poly1305.lo
|
|
|
|
CC crypto_auth/libsodium_la-crypto_auth.lo
|
|
|
|
...
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
Libraries have been installed in:
|
|
|
|
/home/username/src/serval-dna/libsodium-dev/lib
|
2013-05-29 03:51:41 +00:00
|
|
|
...
|
2017-09-12 06:08:21 +00:00
|
|
|
make[1]: Leaving directory '/home/username/src/serval-dna/libsodium'
|
|
|
|
SERVALD CC jni_common.c
|
|
|
|
SERVALD CC jni_commandline.c
|
|
|
|
SERVALD CC jni_instance.c
|
|
|
|
...
|
|
|
|
CC version_servald.c
|
|
|
|
AR _servald.a
|
|
|
|
LINK libservaldaemon.so
|
|
|
|
LIB CC base64.c
|
|
|
|
LIB CC cli.c
|
|
|
|
LIB CC cli_stdio.c
|
2014-05-28 08:10:47 +00:00
|
|
|
...
|
2016-10-20 06:22:53 +00:00
|
|
|
LINK servald
|
|
|
|
CC directory_service.c
|
|
|
|
LINK directory_service
|
|
|
|
SERVALD CC servalwrap.c
|
|
|
|
LINK servaldwrap
|
2017-09-12 06:08:21 +00:00
|
|
|
SERVALD CC test_features.c
|
2016-10-13 22:53:04 +00:00
|
|
|
LINK serval-tests
|
2016-10-20 06:22:53 +00:00
|
|
|
CC fakeradio.c
|
|
|
|
LINK fakeradio
|
|
|
|
CC simulator.c
|
|
|
|
LINK simulator
|
|
|
|
CC tfw_createfile.c
|
|
|
|
LINK tfw_createfile
|
|
|
|
SWIFT servaldswift
|
2017-09-12 06:08:21 +00:00
|
|
|
make[1]: Entering directory '/home/username/src/serval-dna/java-api'
|
|
|
|
JAVAC classes
|
|
|
|
JAVAC testclasses
|
|
|
|
Note: Some input files use or override a deprecated API.
|
|
|
|
Note: Recompile with -Xlint:deprecation for details.
|
|
|
|
make[1]: Leaving directory '/home/username/src/serval-dna/java-api'
|
2016-10-25 05:46:08 +00:00
|
|
|
SWIFT MODULE servald.swiftmodule
|
|
|
|
cd swift-api && make SOURCE_PREFIX= all
|
|
|
|
make[1]: Entering directory '/home/username/src/serval-dna/swift-api'
|
|
|
|
swift build --package-path package
|
|
|
|
Compile Swift Module 'ServalClient' (5 sources)
|
|
|
|
Archiving /home/username/src/serval-dna/swift-api/package/.build/x86_64-unknown-linux/debug/libServalClient.a
|
|
|
|
SWIFT test-swift
|
|
|
|
make[1]: Leaving directory '/home/username/src/serval-dna/swift-api'
|
2017-09-12 06:08:21 +00:00
|
|
|
rm _servalclient.a _monitorclient.a _servald.a
|
2013-05-29 03:51:41 +00:00
|
|
|
$
|
|
|
|
|
2017-09-12 06:08:21 +00:00
|
|
|
On some systems, the system `make` command may not be GNU Make, and the system
|
|
|
|
`cc` command may not be GNU gcc. The following may work:
|
2013-05-29 03:51:41 +00:00
|
|
|
|
|
|
|
$ cd $HOME/src/serval-dna
|
2016-01-11 06:10:15 +00:00
|
|
|
$ autoreconf -f -i -I m4
|
2017-09-12 06:08:21 +00:00
|
|
|
$ ./configure CC=gcc
|
2013-05-29 03:51:41 +00:00
|
|
|
$ gmake
|
|
|
|
$
|
|
|
|
|
2016-09-06 07:57:02 +00:00
|
|
|
In the event of a build failure:
|
|
|
|
|
|
|
|
* ensure that all the [dependencies](#dependencies) are present
|
2016-10-13 22:53:04 +00:00
|
|
|
* consult the [Notes for Developers][]
|
2016-09-06 07:57:02 +00:00
|
|
|
* as a last resort, [contact the Serval Project][]
|
2016-01-11 06:10:15 +00:00
|
|
|
|
2016-10-20 06:22:53 +00:00
|
|
|
Android build
|
|
|
|
-------------
|
|
|
|
|
|
|
|
The [batphone][] app for Android builds Serval DNA from source by including
|
|
|
|
[Android.mk](./Android.mk) in its own build process; see the [batphone build
|
|
|
|
instructions][] for more information.
|
|
|
|
|
|
|
|
It is not necessary to perform a [native build](#native-build) before or after
|
|
|
|
an Android build; the two produce completely unrelated artifacts.
|
|
|
|
|
2012-10-30 04:19:50 +00:00
|
|
|
Built artifacts
|
2012-10-29 06:12:39 +00:00
|
|
|
---------------
|
|
|
|
|
2016-10-20 06:22:53 +00:00
|
|
|
The [native build](#native-build) process produces the following artifacts:
|
2012-10-30 04:19:50 +00:00
|
|
|
|
2016-10-13 22:53:04 +00:00
|
|
|
* **servald** is the main Serval DNA daemon executable. All the Serval DNA
|
2017-09-12 06:08:21 +00:00
|
|
|
daemon, SQLite and libsodium code is statically linked into this executable,
|
2016-10-20 06:22:53 +00:00
|
|
|
and only common system libraries are dynamically linked, which keeps its
|
|
|
|
run-time dependencies to a minimum. Its unstripped size is about 9.5 MB on a
|
|
|
|
typical 64-bit system, of which about 7 MB is SQLite. Its stripped size is
|
|
|
|
about 3 MB.
|
2016-10-13 22:53:04 +00:00
|
|
|
|
|
|
|
* **servaldwrap** is a Serval DNA executable identical to *servald*, but
|
2017-09-12 06:08:21 +00:00
|
|
|
it loads `libservaldaemon.so` at run-time using [dlopen(3)][] instead of
|
|
|
|
being statically linked, so it is only a dozen KB in size. This executable
|
|
|
|
mainly exists to test that the shared library is loadable.
|
2016-10-13 22:53:04 +00:00
|
|
|
|
|
|
|
* **serval-tests** is an executable utility that performs various system tests
|
|
|
|
such as memory speed, cryptographic speed, byte ordering, and configuration
|
|
|
|
parsing. These tests are not normally required in a deployed system, so are
|
|
|
|
provided in a separate executable in order to keep the size of the *servald*
|
|
|
|
executable to a minimum.
|
|
|
|
|
2017-09-12 06:08:21 +00:00
|
|
|
* **libservaldaemon.a** is a static library containing the complete executable
|
|
|
|
code of the Serval DNA daemon, including SQLite and libsodium cryptographic
|
|
|
|
functions. An executable (such as *servald*) can be built with any desired
|
|
|
|
subset of Serval functions by linking in only the required parts of this
|
|
|
|
library using the *features* mechanism described in [feature.h](./feature.h).
|
Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:
iPhoneOS on armv7
iPhoneOS on arm64
iPhoneSimulator on i386
iPhoneSimulator on x86_64
The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.
Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode. It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.
Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones. Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.
Update INSTALL.md and add a technical document for Apple iOS.
This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2016-10-25 02:22:21 +00:00
|
|
|
The Serval DNA [Swift][] API, which is used by the Serval Chat app for iOS,
|
|
|
|
uses this static library.
|
2016-10-13 22:53:04 +00:00
|
|
|
|
2017-09-12 06:08:21 +00:00
|
|
|
* **libservaldaemon.so** is a dynamic library containing the complete executable
|
|
|
|
code of the Serval DNA daemon, including [JNI][] entry points, SQLite and
|
2016-10-20 06:22:53 +00:00
|
|
|
libsodium cryptographic functions. The *servaldwrap* executable and the
|
Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:
iPhoneOS on armv7
iPhoneOS on arm64
iPhoneSimulator on i386
iPhoneSimulator on x86_64
The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.
Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode. It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.
Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones. Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.
Update INSTALL.md and add a technical document for Apple iOS.
This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2016-10-25 02:22:21 +00:00
|
|
|
Serval DNA [Java][] API, which is used by [batphone][], both use this dynamic
|
2016-10-20 06:22:53 +00:00
|
|
|
library.
|
2016-10-13 22:53:04 +00:00
|
|
|
|
|
|
|
* **directory_service** is the executable for the [Serval Infrastructure][]
|
|
|
|
daemon.
|
|
|
|
|
|
|
|
* **libservalclient.a** and **libservalclient.so** are static and dynamic
|
|
|
|
libraries implementing the client end of the interface with the servald
|
|
|
|
daemon, which includes the [MDP API][], a subset of the [CLI API][], and
|
|
|
|
functions for starting and stopping the daemon. The dynamic library is
|
|
|
|
linked into the [batphone][] Java executable at run time and contains [JNI][]
|
|
|
|
entry points to these APIs.
|
|
|
|
|
|
|
|
* **libmonitorclient.a** and **libmonitorclient.so** are static and dynamic
|
|
|
|
libraries implementing the client end of the monitor interface with the
|
|
|
|
servald daemon. The dynamic library is linked into the [batphone][] Java
|
|
|
|
executable at run time and contains [JNI][] entry points to functions for
|
|
|
|
managing the client end of a monitor connection with the servald daemon.
|
|
|
|
*The monitor interface is deprecated and will eventually be replaced by a set
|
|
|
|
of equivalent [MDP][] services that can be accessed using libservalclient.*
|
|
|
|
|
|
|
|
* **fakeradio** is an executable utility used by test scripts to simulate the
|
|
|
|
serial interface to the [RFD900][] packet radio used in the [Serval Mesh
|
|
|
|
Extender][]
|
|
|
|
|
|
|
|
* **simulator** is an executable utility used by test scripts for simulating
|
|
|
|
wireless packet transmission under different conditions.
|
|
|
|
|
|
|
|
* **tfw_createfile** is an executable utility needed by test scripts for
|
|
|
|
creating large data files with unique, non-repeating content.
|
2014-05-28 08:10:47 +00:00
|
|
|
|
2016-10-20 06:22:53 +00:00
|
|
|
In addition, the following artifacts are produced [if a Swift compiler is
|
|
|
|
present][Swift development]:
|
|
|
|
|
|
|
|
* **servaldswift** is a statically linked Serval DNA executable identical to
|
|
|
|
*servald*, but its *main* entry point is compiled from a [Swift][] program to
|
|
|
|
prove that Swift code can invoke internal Serval DNA daemon APIs. It
|
|
|
|
dynamically links to many more system libraries than *servald* because of the
|
|
|
|
Swift language's run-time support and resultant library dependencies, so is
|
|
|
|
not suitable for deployment.
|
|
|
|
|
2017-12-15 06:40:56 +00:00
|
|
|
* **ServalDNA.swiftmodule**
|
|
|
|
**ServalDNA.swiftdoc**
|
|
|
|
**libServalDNA.a**
|
|
|
|
are the [Swift Daemon API module][].
|
|
|
|
|
2016-10-25 05:46:08 +00:00
|
|
|
* **swift-client-api/build/debug/ServalClient.swiftmodule**
|
|
|
|
**swift-client-api/build/debug/ServalClient.swiftdoc**
|
|
|
|
**swift-client-api/build/debug/libServalClient.a**
|
|
|
|
are the [Swift Client API module][].
|
|
|
|
|
2013-05-29 03:51:41 +00:00
|
|
|
Test scripts
|
|
|
|
------------
|
|
|
|
|
2014-05-28 08:10:47 +00:00
|
|
|
After building the native `servald` executable, run all the tests with the
|
|
|
|
following command:
|
2013-05-29 03:51:41 +00:00
|
|
|
|
|
|
|
$ ./tests/all
|
|
|
|
1 [PASS.] (logging) By default, only errors and warnings are logged to stderr
|
|
|
|
2 [PASS.] (logging) Configure all messages logged to stderr
|
|
|
|
3 [PASS.] (logging) Configure no messages logged to stderr
|
|
|
|
4 [PASS.] (logging) By Default, all messages are appended to a configured file
|
|
|
|
...
|
2016-10-13 22:53:04 +00:00
|
|
|
375 [PASS.] (meshmsjava) Java API send MeshMS message from unknown identity
|
|
|
|
376 [PASS.] (meshmsjava) Java API MeshMS mark all conversations read
|
|
|
|
377 [PASS.] (meshmsjava) Java API MeshMS mark all conversations read
|
|
|
|
378 [PASS.] (meshmsjava) Java API MeshMS mark a message as read
|
|
|
|
378 tests, 378 pass, 0 fail, 0 error
|
2013-05-29 03:51:41 +00:00
|
|
|
$
|
|
|
|
|
2014-05-28 08:10:47 +00:00
|
|
|
Every test run writes log files into the [testlog/all](./testlog/all/)
|
|
|
|
directory (relative to the current working directory), deleting any logs from
|
|
|
|
the previous run.
|
2013-05-29 03:51:41 +00:00
|
|
|
|
2014-05-28 08:10:47 +00:00
|
|
|
See [Serval DNA Testing](./doc/Testing.md) for more information on running and
|
|
|
|
developing test scripts.
|
2013-05-29 03:51:41 +00:00
|
|
|
|
|
|
|
Configure
|
|
|
|
---------
|
|
|
|
|
2016-01-11 06:10:15 +00:00
|
|
|
Before running `servald`, it must be configured correctly. The
|
|
|
|
[doc/Servald-Configuration](./doc/Servald-Configuration.md) document describes
|
|
|
|
the configuration of Serval DNA in detail.
|
2013-05-29 03:51:41 +00:00
|
|
|
|
|
|
|
About the examples
|
|
|
|
------------------
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2013-05-29 03:51:41 +00:00
|
|
|
The examples in this document are [Bourne shell][] commands, using standard
|
|
|
|
quoting and variable expansion. Commands issued by the user are prefixed with
|
|
|
|
the shell prompt `$` to distinguish them from the output of the command.
|
|
|
|
Single and double quotes around arguments are part of the shell syntax, so are
|
|
|
|
not seen by the command. Lines ending in backslash `\` continue the command on
|
|
|
|
the next line.
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2013-05-29 03:51:41 +00:00
|
|
|
The directory paths used in the examples are for illustrative purposes only,
|
|
|
|
and may need to be changed for your particular circumstances.
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2014-05-20 05:22:57 +00:00
|
|
|
-----
|
2016-09-21 09:01:31 +00:00
|
|
|
**Copyright 2013-2015 Serval Project Inc.**
|
2017-09-12 06:08:21 +00:00
|
|
|
**Copyright 2016-2017 Flinders University**
|
2014-05-20 05:22:57 +00:00
|
|
|
![CC-BY-4.0](./cc-by-4.0.png)
|
|
|
|
This document is available under the [Creative Commons Attribution 4.0 International licence][CC BY 4.0].
|
|
|
|
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2013-05-29 03:51:41 +00:00
|
|
|
[Serval Project]: http://www.servalproject.org/
|
|
|
|
[Serval DNA]: ./README.md
|
|
|
|
[serval-dna]: https://github.com/servalproject/serval-dna
|
2012-10-29 06:12:39 +00:00
|
|
|
[batphone]: https://github.com/servalproject/batphone
|
2016-10-20 06:22:53 +00:00
|
|
|
[batphone build instructions]: https://github.com/servalproject/batphone/blob/development/INSTALL.md
|
2012-10-29 06:12:39 +00:00
|
|
|
[Android 2.2 “Froyo”]: http://developer.android.com/about/versions/android-2.2-highlights.html
|
|
|
|
[Android NDK]: http://developer.android.com/tools/sdk/ndk/index.html
|
2016-01-26 13:26:27 +00:00
|
|
|
[Xcode]: https://developer.apple.com/xcode/
|
2012-10-29 06:12:39 +00:00
|
|
|
[gcc 4.4]: http://gcc.gnu.org/gcc-4.4/
|
2016-09-19 04:01:49 +00:00
|
|
|
[gcc 5]: http://gcc.gnu.org/gcc-5/
|
|
|
|
[gcc 6]: http://gcc.gnu.org/gcc-6/
|
2018-05-18 04:49:02 +00:00
|
|
|
[gcc 7]: http://gcc.gnu.org/gcc-7/
|
2016-10-13 22:53:04 +00:00
|
|
|
[Notes for Developers]: ./doc/Development.md
|
2016-10-20 06:22:53 +00:00
|
|
|
[Swift development]: ./doc/Development.md#swift
|
2017-12-15 06:40:56 +00:00
|
|
|
[Swift Daemon API module]: ./doc/Development.md#swift-daemon-api
|
2016-10-25 05:46:08 +00:00
|
|
|
[Swift Client API module]: ./doc/Development.md#swift-client-api
|
2014-02-14 07:23:31 +00:00
|
|
|
[OpenWRT]: ./doc/OpenWRT.md
|
2016-10-13 22:53:04 +00:00
|
|
|
[Serval Infrastructure]: ./doc/Serval-Infrastructure.md
|
Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:
iPhoneOS on armv7
iPhoneOS on arm64
iPhoneSimulator on i386
iPhoneSimulator on x86_64
The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.
Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode. It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.
Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones. Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.
Update INSTALL.md and add a technical document for Apple iOS.
This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2016-10-25 02:22:21 +00:00
|
|
|
[iOS]: ./doc/Apple-iOS.md
|
|
|
|
[Apple iOS]: https://en.wikipedia.org/wiki/IOS
|
2014-03-05 04:56:28 +00:00
|
|
|
[Serval Mesh Extender]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:meshextender:
|
2016-01-11 06:10:15 +00:00
|
|
|
[contact the Serval Project]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:contact
|
2014-05-28 08:10:47 +00:00
|
|
|
[RFD900]: http://rfdesign.com.au/index.php/rfd900
|
2014-03-05 04:56:28 +00:00
|
|
|
[Mesh Potato]: http://villagetelco.org/mesh-potato/
|
|
|
|
[Commotion Wireless]: http://commotionwireless.net/
|
2016-10-13 22:53:04 +00:00
|
|
|
[MDP]: ./doc/Mesh-Datagram-Protocol.md
|
|
|
|
[MDP API]: ./doc/Mesh-Datagram-Protocol.md#mdp-api
|
|
|
|
[CLI API]: ./doc/CLI-API.md
|
2012-10-29 06:12:39 +00:00
|
|
|
[JNI]: http://en.wikipedia.org/wiki/Java_Native_Interface
|
Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:
iPhoneOS on armv7
iPhoneOS on arm64
iPhoneSimulator on i386
iPhoneSimulator on x86_64
The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.
Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode. It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.
Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones. Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.
Update INSTALL.md and add a technical document for Apple iOS.
This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2016-10-25 02:22:21 +00:00
|
|
|
[Java]: https://en.wikipedia.org/wiki/Java_(programming_language)
|
2016-10-20 06:22:53 +00:00
|
|
|
[Swift]: https://en.wikipedia.org/wiki/Swift_(programming_language)
|
2016-10-25 05:46:08 +00:00
|
|
|
[dlopen(3)]: http://man7.org/linux/man-pages/man3/dlopen.3.html
|
2012-10-29 06:12:39 +00:00
|
|
|
[Bash]: http://en.wikipedia.org/wiki/Bash_(Unix_shell)
|
|
|
|
[GNU make]: http://www.gnu.org/software/make/
|
2013-05-29 03:51:41 +00:00
|
|
|
[Git]: http://git-scm.com/
|
2012-10-30 04:19:50 +00:00
|
|
|
[Subversion]: http://subversion.apache.org/
|
2013-05-29 03:51:41 +00:00
|
|
|
[Bourne shell]: http://en.wikipedia.org/wiki/Bourne_shell
|
Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:
iPhoneOS on armv7
iPhoneOS on arm64
iPhoneSimulator on i386
iPhoneSimulator on x86_64
The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.
Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode. It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.
Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones. Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.
Update INSTALL.md and add a technical document for Apple iOS.
This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2016-10-25 02:22:21 +00:00
|
|
|
[Xcode]: https://developer.apple.com/xcode/
|
2016-01-26 13:26:27 +00:00
|
|
|
[homebrew]: http://brew.sh/
|
2014-05-21 07:59:22 +00:00
|
|
|
[CC BY 4.0]: ./LICENSE-DOCUMENTATION.md
|