Commit Graph

92 Commits

Author SHA1 Message Date
Andrew Bettison
ca8e846264 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.
2018-03-06 15:29:29 +10:30
Jeremy Lakeman
f83b15d251 Compile without warnings with android ndk 15 beta 2 2017-06-06 15:14:33 +09:30
Andrew Bettison
2690a5795b Add SERVAL_ENABLE_DEBUG macro 2016-11-14 11:40:22 +10:30
Jeremy Lakeman
5b75221c91 Fix compiler warnings when building with android ndk 13b 2016-11-07 10:38:23 +10:30
Andrew Bettison
5191d424cb Fix broken Android build
Renamed libservald.so to libservaldaemon.so everywhere to avoid conflicts
with the "servald" module name in Android.mk, and to avoid the overly
generic name "libserval".

Include the JNI entry points in the Android build.
2016-10-20 13:28:12 +10:30
Andrew Bettison
8325aacc5d Fix broken Batphone build
Recent changes such as the Makefile.in overhaul and the introduction of
feature-driven linking broke the Android build.  This commit fixes the
breakage:
- detects the presence of gettid() in configure.ac and only defines
  gettid() in serval.c if HAVE_GETTID is not defined
- builds libserval.so not libservald.so on Android, to avoid a conflict
  on the module name "servald" in Android.mk
- renames cli_cleanup() to command_cleanup(), defines it in
  commandline.h instead of cli.h, and supplies it in android.c
- supplies the 'keyring' global in android.c
- removes log_stderr.c from the Android build, since it conflicted with
  log.c
2016-10-19 09:52:07 +10:30
Andrew Bettison
29a771e315 Overhaul Makefile.in
Changed the built libraries and updated INSTALL.md accordingly:
- the 'servaldwrap' executable is now built
- libservald.[a,so] now contains the full daemon executable
- libservalclient.[a,so] contains the client library
- libserval.a is no longer built

Building the 'servaldwrap' executable is a step towards ensuring that
the libservald.so library can be linked and executed, without requiring
an Android build to reveal any failure.

Added the SOURCE_PREFIX variable that allows the make to be invoked from
within any current working directory, not just the serval-dna
repository's root directory.

Fixed the serval_version.o target to invoke the version_string.sh
script with the --repository=DIR option, so that the build will work
even if the current working directory is not within the serval-dna
repository.

Re-ordered and added some comments for clarity, and added some missing
.PHONY declarations.
2016-10-13 16:23:09 +10:30
Andrew Bettison
d572da2529 Fix Android build with SQLite 3.14.2 2016-09-23 12:57:52 +09:30
Jeremy Lakeman
37bdd0b5f9 Link against pre-built libsodium.a in android build 2016-05-09 10:32:04 +09:30
Jeremy Lakeman
1cf46dcef9 Add default instance path for android debug servald binary 2016-04-04 11:46:31 +09:30
Jeremy Lakeman
7b6f167b9b Update sqlite 2016-01-27 16:27:03 +10:30
Jeremy Lakeman
b5c62a19d5 Add Java API for setting the instance path 2016-01-18 13:22:36 +10:30
Andrew Bettison
e8e87b8a34 Fix broken clang and Android builds
Recent addition of the GCC __attribute__(alloc_size) to some functions
in mem.h broke the build when using Clang 3.5.  This commit introduces
configure-time checks for all GCC attributes used in the Serval source
code, and adapts accordingly.
2015-11-23 15:00:25 +10:30
Jeremy Lakeman
0c275e67ef Clean up compilation warnings 2015-10-19 13:45:57 +10:30
Jeremy Lakeman
3049252c8a Poll netlink socket for interface changes on linux systems 2015-10-12 18:11:44 +10:30
Jeremy Lakeman
653039e685 Sqlite needs to be threadsafe on android 2015-06-29 09:52:08 +09:30
Jeremy Lakeman
fd0b7eda59 Pass PIE flags for compiling on Android L 2014-10-13 14:14:28 +10:30
Jeremy Lakeman
83949f6585 Never call at_exit functions from android dalvik vm 2014-09-08 11:24:19 +09:30
Jeremy Lakeman
bdac56cdb4 Omit more features of sqlite, and fix warnings 2014-06-30 10:14:12 +09:30
Jeremy Lakeman
5df5a33721 Measure free space on Android using statfs() 2014-06-26 12:17:36 +09:30
Jeremy Lakeman
77dc7fc14c Disable and remove pthreads to support compiling with clang 2014-06-11 20:32:16 +09:30
Andrew Bettison
21f51965c1 Overhaul Makefile and header files
Make .o files in separate subdirectories for servald and library
Factor struct __sourceloc and __WHENCE__ from "log.h" into "whence.h"
Factor sid_t etc from "serval.h" into "serval_types.h"
Factor rhizome_bid_t etc from "rhizome.h" into "rhizome_types.h"
Do not include "serval.h" in library sources
Add log_stderr.c and logMessage.c for stand-alone executables
2014-05-26 15:36:26 +09:30
Jeremy Lakeman
025726dcab Fix android build, related to issue #76 fix 2014-04-07 15:25:43 +09:30
Andrew Bettison
ba44088eb8 Move Android INSTANCE_PATH from instance.c to Android.mk 2014-03-26 16:07:28 +10:30
Andrew Bettison
e1949c15de Refactor Makefile.in and Android.mk
Immediate benefit: does not recompile sqlite3.c when any Serval header
file is touched.

Also makes it a bit clearer which source files are imported and which
can be used in "client" binaries other than servald.
2014-03-04 21:53:01 +10:30
Jeremy Lakeman
89b1ca2e2f Tidy up android build file for inclusion in other projects 2014-03-02 17:46:11 -08:00
Jeremy Lakeman
ff2188b248 Add new flags to android build 2014-02-19 16:32:25 +10:30
Jeremy Lakeman
a7b43581ce Rename libservald to libserval for consistency with android build 2014-02-12 14:29:13 +10:30
Jeremy Lakeman
99fb8b6108 Move jni interface classes from batphone repo 2014-02-12 13:09:17 +10:30
Jeremy Lakeman
1ed03e5bf3 Add compiler flags for android ndk build 2013-12-06 15:08:40 +10:30
Andrew Bettison
2b3119b49b Issue #20: merge branch 'sockets' into 'development'
Daniel's improvements to the local file/abstract socket code, with many
improvements to bring it up to date.
2013-09-19 04:30:14 +09:30
Jeremy Lakeman
3f76505e21 Remove audio code from android build 2013-07-09 13:49:12 +09:30
Andrew Bettison
7d312f51fb Fix broken Android build 2013-03-18 15:35:37 +10:30
Andrew Bettison
5430b70640 Fix Android build with latest bcopy/bzero changes 2013-02-26 11:34:41 +10:30
gardners
be3b529504 refactored Makefile.in and Anrdoid.mk so that source file lists are
included into each from separate .mk files. #32
2012-10-25 04:30:14 +10:30
Jeremy Lakeman
f93216f369 Remove dead code 2012-10-19 15:02:22 +10:30
Jeremy Lakeman
f1b0374b97 Extract crypto signing primitives from mdp processing 2012-10-19 14:54:41 +10:30
gardners
a40fcfec66 cleaned up NaCl build to just compile using make. #17 2012-10-18 17:26:52 +10:30
Andrew Bettison
89343c69cd Merge branch 'rhizomedirect' into 'master' 2012-10-05 17:45:30 +09:30
Jeremy Lakeman
fa7719fbe8 Write simple vomp console client 2012-09-28 15:23:50 +09:30
Jeremy Lakeman
ac3864ff20 Reuse command line parsing framework with monitor interface 2012-09-25 13:31:34 +09:30
gardners
f0472abf43 added new rhizome direct sources to android build process. 2012-09-14 11:26:40 +02:00
Jeremy Lakeman
ac8d9b93e6 Add stub directory service 2012-09-14 11:50:45 +09:30
Jeremy Lakeman
6483d9e0ae Split client mdp functions so they can be built separately 2012-09-14 11:47:48 +09:30
Jeremy Lakeman
545c05fddb Relay broadcast payloads via olsr plugin 2012-09-01 12:41:50 +09:30
Jeremy Lakeman
e05806f25e Separate routing calculation from resulting rules, refactor more code to use subscriber structure 2012-08-31 15:11:18 +09:30
Jeremy Lakeman
22c6b530ed Rework broadcast address handling, working towards a unified address struct 2012-08-31 15:03:07 +09:30
Jeremy Lakeman
7705676a9e Move str functions to c file to enable reuse 2012-08-09 13:30:52 +09:30
Andrew Bettison
03da89225d Add xprintf() extensible stream formatter
Use it to replace open_memstream(3) in logServalPacket() -- not available on
Mac OS X
2012-08-03 16:44:05 +09:30
Andrew Bettison
2bd7c38483 Remove unused trans_cache.c 2012-07-31 18:12:20 +09:30