diff options
author | jin-eld <jin at mediatomb dot cc> | 2013-08-13 21:55:32 +0300 |
---|---|---|
committer | jin-eld <jin at mediatomb dot cc> | 2013-08-24 03:25:07 +0300 |
commit | 50c8a820e5ab46acc129a49ab849f8848e40d915 (patch) | |
tree | 4eb66794fd31fd96cf0ac0c6cbb01bca5e122283 /testing/Makefile.inc | |
parent | e658892793c42b2d058eed0937025ef2ddaaa372 (diff) |
Implemented autotools based build scripts
supported options:
--with-dependency-search=DIR will tell configure to look for various
dependencies in DIR/include and DIR/lib
Alternatively you can also specify libsodium header and libs location
with --with-libsodium-headers and --with-libsodium-libs if it is
installed elsewhere.
Ncurses and libconfig are handled via the default pkg-config way, see
./configure --help=short for detailed information.
The tox library is compiled as libtoxcore in shared and static variants,
public headers are installed to ${prefix}/include/tox
A pkg-config libtoxcore.pc configuration file is provided.
Use ./configure --help for a full list of configure options or
./configure --help=short for the options that I added.
To generate the configure script after pulling from git use:
autoreconf -i
To generate a release tarball use:
make dist
Unit tests are handled by the libcheck library integration that is provided
by autotools, use:
make check
to compile and run the tests.
Unit tests are currently optional, i.e. - if the check library is not
found on the system, then tests will be disabled. Same goes for nTox and
DHT bootstrap daemon - they will be enabled or disabled depending on the
availability of ncurses (for nTox) or libconfig (for DHT bootstrap
daemon).
The above can be also tuned by:
--enable-tests / --disable-tests
--enable-ntox / --disable-ntox
--enable-dht-bootstrap-daemon / --disable-dht-bootstrap-daemon
Diffstat (limited to 'testing/Makefile.inc')
-rw-r--r-- | testing/Makefile.inc | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/testing/Makefile.inc b/testing/Makefile.inc new file mode 100644 index 00000000..28604958 --- /dev/null +++ b/testing/Makefile.inc | |||
@@ -0,0 +1,97 @@ | |||
1 | if BUILD_NTOX | ||
2 | |||
3 | bin_PROGRAMS += nTox | ||
4 | |||
5 | nTox_SOURCES = $(top_srcdir)/testing/misc_tools.h \ | ||
6 | $(top_srcdir)/testing/misc_tools.c \ | ||
7 | $(top_srcdir)/testing/nTox.h \ | ||
8 | $(top_srcdir)/testing/nTox.c | ||
9 | |||
10 | nTox_CFLAGS = $(LIBSODIUM_CFLAGS) \ | ||
11 | $(NCURSES_CFLAGS) | ||
12 | |||
13 | nTox_LDADD = $(LIBSODIUM_LDFLAGS) \ | ||
14 | libtoxcore.la \ | ||
15 | $(LIBSODIUM_LIBS) \ | ||
16 | $(NCURSES_LIBS) | ||
17 | |||
18 | endif | ||
19 | |||
20 | |||
21 | noinst_PROGRAMS += DHT_test \ | ||
22 | Lossless_UDP_testclient \ | ||
23 | Lossless_UDP_testserver \ | ||
24 | Messenger_test \ | ||
25 | crypto_speed_test | ||
26 | |||
27 | DHT_test_SOURCES = $(top_srcdir)/testing/DHT_test.c \ | ||
28 | $(top_srcdir)/testing/misc_tools.h \ | ||
29 | $(top_srcdir)/testing/misc_tools.c | ||
30 | |||
31 | DHT_test_CFLAGS = $(LIBSODIUM_CFLAGS) | ||
32 | |||
33 | DHT_test_LDADD = $(LIBSODIUM_LDFLAGS) \ | ||
34 | libtoxcore.la \ | ||
35 | $(LIBSODIUM_LIBS) \ | ||
36 | $(WINSOCK2_LIBS) | ||
37 | |||
38 | |||
39 | Lossless_UDP_testclient_SOURCES = \ | ||
40 | $(top_srcdir)/testing/Lossless_UDP_testclient.c | ||
41 | |||
42 | Lossless_UDP_testclient_CFLAGS = \ | ||
43 | $(LIBSODIUM_CFLAGS) | ||
44 | |||
45 | Lossless_UDP_testclient_LDADD = \ | ||
46 | $(LIBSODIUM_LDFLAGS) \ | ||
47 | libtoxcore.la \ | ||
48 | $(LIBSODIUM_LIBS) \ | ||
49 | $(WINSOCK2_LIBS) | ||
50 | |||
51 | |||
52 | Lossless_UDP_testserver_SOURCES = \ | ||
53 | $(top_srcdir)/testing/Lossless_UDP_testserver.c | ||
54 | |||
55 | Lossless_UDP_testserver_CFLAGS = \ | ||
56 | $(LIBSODIUM_CFLAGS) | ||
57 | |||
58 | Lossless_UDP_testserver_LDADD = \ | ||
59 | $(LIBSODIUM_LDFLAGS) \ | ||
60 | libtoxcore.la \ | ||
61 | $(LIBSODIUM_LIBS) \ | ||
62 | $(WINSOCK2_LIBS) | ||
63 | |||
64 | |||
65 | Messenger_test_SOURCES = \ | ||
66 | $(top_srcdir)/testing/Messenger_test.c \ | ||
67 | $(top_srcdir)/testing/misc_tools.h \ | ||
68 | $(top_srcdir)/testing/misc_tools.c | ||
69 | |||
70 | Messenger_test_CFLAGS = $(LIBSODIUM_CFLAGS) | ||
71 | |||
72 | Messenger_test_LDADD = $(LIBSODIUM_LDFLAGS) \ | ||
73 | libtoxcore.la \ | ||
74 | $(LIBSODIUM_LIBS) \ | ||
75 | $(WINSOCK2_LIBS) | ||
76 | |||
77 | |||
78 | crypto_speed_test_SOURCES = \ | ||
79 | $(top_srcdir)/testing/crypto_speed_test.c | ||
80 | |||
81 | crypto_speed_test_CFLAGS = \ | ||
82 | $(LIBSODIUM_CFLAGS) | ||
83 | |||
84 | crypto_speed_test_LDADD = \ | ||
85 | $(LIBSODIUM_LDFLAGS) \ | ||
86 | libtoxcore.la \ | ||
87 | $(LIBSODIUM_LIBS) \ | ||
88 | $(WINSOCK2_LIBS) | ||
89 | |||
90 | |||
91 | EXTRA_DIST += $(top_srcdir)/testing/cmake/Messenger_test.cmake \ | ||
92 | $(top_srcdir)/testing/cmake/DHT_test.cmake \ | ||
93 | $(top_srcdir)/testing/cmake/Lossless_UDP_testclient.cmake \ | ||
94 | $(top_srcdir)/testing/cmake/Lossless_UDP_testserver.cmake \ | ||
95 | $(top_srcdir)/testing/cmake/nTox.cmake \ | ||
96 | $(top_srcdir)/testing/cmake/crypto_speed_test.cmake \ | ||
97 | $(top_srcdir)/testing/CMakeLists.txt | ||