Commit Graph

33 Commits

Author SHA1 Message Date
Andrew Bettison
1efe6686fc Use config.h instead of -DHAVE_FOO=1
swiftc(1) requires every -D option to be prefixed with -Xcc, which
is not easy to achieve using autoconf.

Now instead of setting configuration macros like HAVE_LSEEK64 on the
command line using -D, they are defined in config.h, which is generated
by ./configure, ignored by Git, and included by all headers and source
files that use any configuration macro.

The dependency on Makefile has been replaced with a dependency on
Makefile.in and config.h, which helps avoid some redundant full
recompiles after running ./configure, because the configure script
does not overwrit config.h if its content does not change.
2016-10-19 16:27:20 +10:30
Andrew Bettison
937e402794 Improve build-libsodium.sh
Add the --branch option to specify which libsodium branch to checkout
and build.

Invoke libsodium's autogen.sh script if libsodium's 'configure' script
is not present (eg, on development branches).
2016-10-13 17:00:17 +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
c45e92b731 Fix OS-X build with libsodium
Add a new 'build-libsodium.sh' script and instructions in
doc/Development.md.  Update the configure.in script to check for
libsodium headers and library, and print helpful messages if not
present.
2016-09-12 15:09:41 +09:30
Andrew Bettison
e51189a1c8 Remove aclocal.m4 from version control
Henceforward, aclocal.m4 will be generated by the 'autoreconf' command.

The 'autoreconf -f -i' command may now emit a warning "Unsupported
attribute section, the test may fail" on some systems, but it will still
generate the proper aclocal.m4 and ./configure files.  To suppress this
warning, simply invoke autoreconf with '-I m4' argument:

    autoreconf -f -i -I m4

The INSTALL.md has been updated accordingly, and a new 'Notes for
Developers' technical document added, explaining the use of aclocal and
autoreconf, and documenting that these warning messages are of no
concern.
2016-01-11 18:02:26 +10:30
Jeremy Lakeman
628faaedbf Ignore new test binary 2015-02-06 09:56:36 +10:30
Andrew Bettison
3d537f9645 Improve test framework: test coverage support 2014-06-06 14:47:54 +09:30
Jeremy Lakeman
e835d0230f Stop ignoring .o files 2014-05-29 14:54:18 +09:30
Andrew Bettison
aa670fc8a5 Ignore new objs subdirectories 2014-05-27 04:59:09 +09:30
Jeremy Lakeman
7420f46653 Create new AF_UNIX based network simulator 2014-05-23 10:47:22 +09:30
Andrew Bettison
8e9440860b version_string.sh uses VERSION.txt if not in a Git repo 2014-03-03 15:21:53 +10:30
Andrew Bettison
92253ca97d Revive config_test.c
Move config-dependent code (recvwithttl) from net.c to mdp_net.c (new)

Move log-implementation-independent code from log.c to log_util.c (new)

Build config_test binary in Makefile
2013-11-21 16:05:17 +10:30
Jeremy Lakeman
852c8b235c Build fakeradio with other test binaries 2013-08-19 13:56:19 +09:30
Andrew Bettison
d38ce66c95 Improve test framework: create_file()
New executable in Makefile 'all' target: tfw_createfile.

New str.h function: str_to_ll_scaled().
2012-10-31 18:13:33 +10:30
Jeremy Lakeman
7c73ca7a78 Finish test and implementation of directory service 2012-09-18 12:30:15 +09:30
Jeremy Lakeman
ac8d9b93e6 Add stub directory service 2012-09-14 11:50:45 +09:30
Andrew Bettison
cd35c5e2ae Fix issues arising from new strlcpy.c 2012-08-14 11:23:27 +09:30
Andrew Bettison
d63318cd2f Mop up executable rename from 'dna' to 'servald' 2012-07-30 16:15:42 +09:30
Andrew Bettison
db04f30b08 Ignore test log directory 2012-06-27 17:23:43 +09:30
Andrew Bettison
b82a8c35cd Add other libtool scripts created by libtoolize -i
- needed for ./configure to work on libtool-less platforms
2012-04-24 11:46:35 +09:30
Andrew Bettison
1494172da6 Trival test of dna JNI command line entry point 2012-04-23 18:25:26 +09:30
Daniel O'Connor
1d10ee7ba8 Merge branch 'master' of github.com:servalproject/serval-dna 2012-04-23 16:33:44 +09:30
Daniel O'Connor
63ec1d017b Ignore [g]libtoolize detritus. 2012-04-23 16:33:12 +09:30
Andrew Bettison
87e072f172 Fix <jni.h> detection on Mac OS X 2012-04-23 15:29:26 +09:30
Andrew Bettison
36c7e492e8 Native build now supports JNI code on GNU/Linux
- ./configure detects if javac and JDK are present
- Makefile default target builds libservald.so
- probably doesn't work on Mac OS X (yet)
2012-04-20 16:57:36 +09:30
Andrew Bettison
ce5dc011b8 Split dna bit error tests into separate script
- Put common utility functions into testdefs.sh
 - Add abspath() and realpath() functions to test framework
 - Test framework now executes all tests with working directory in a temporary
   directory, to avoid pollution of caller's working directory
 - Improve test log verbosity
 - Name test log files by test script name
2012-04-10 12:41:15 +09:30
Andrew Bettison
f5acb301d8 Transcribe from ./testdna to new test framework
- testframework.sh is now a very full-featured, creates test.log
 - some tests fail, looks like bugs in dna
2012-04-05 19:47:57 +09:30
Andrew Bettison
c31860986f Get native build working on Debian Linux
- now './autoconf && ./configure && make' will produce ./dna executable
 - added various missing libraries to configure.in
 - fixed nacl CFLAGS and LDFLAGS settings in configure.in
 - make git ignore autoconf and configure detritus
2012-04-03 10:33:21 +09:30
Andrew Bettison
8df5af7a93 Ignore Vim swap files 2012-03-13 16:35:15 +10:30
Daniel O'Connor
a8411edf3f - Use system wide sqlite3 lib via pkg-config
- Remove nacl-gcc-prep, it's now in nacl
- Sort sources and have 1 per line.
- Add missing source files.
- Use naclinc.txt and nacllib.txt generated by nacl/nacl-gcc-prep
- Update ignore file now nacl files don't pollute this directory.
2012-02-27 12:41:48 +10:30
Jeremy Lakeman
ccb86b45e9 Tidy up build process 2011-11-03 11:23:19 +10:30
Jeremy Lakeman
ad53f85f8f Update .gitignore to ignore object files 2011-05-23 21:16:45 +09:30
Jeremy Lakeman
59a0a4a2a0 Build a win32 console exe with VS2008 express 2011-03-30 22:17:11 +10:30