diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-16 22:46:02 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-21 20:44:26 +0000 |
commit | 7245ac11ef9be2420c8356c12acc79f93ea211bb (patch) | |
tree | e971c5c6e10c2310afe4b2cd80212feac9839f2a /testing/Makefile.inc | |
parent | 7c2b95ef5e4ccdae01bd104aa7400294c9ea391b (diff) |
Avoid implementations in .h files or #including .c files.
Also, avoid the need for putting `_XOPEN_SOURCE` in every test file.
Diffstat (limited to 'testing/Makefile.inc')
-rw-r--r-- | testing/Makefile.inc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/testing/Makefile.inc b/testing/Makefile.inc index f4ed568c..fa1c1029 100644 --- a/testing/Makefile.inc +++ b/testing/Makefile.inc | |||
@@ -1,3 +1,13 @@ | |||
1 | if BUILD_TESTS | ||
2 | TEST_LIB = misc_tools | ||
3 | endif | ||
4 | if BUILD_TESTING | ||
5 | TEST_LIB = misc_tools | ||
6 | endif | ||
7 | |||
8 | noinst_LTLIBRARIES += libmisc_tools.la | ||
9 | libmisc_tools_la_SOURCES = ../testing/misc_tools.c ../testing/misc_tools.h | ||
10 | |||
1 | if BUILD_TESTING | 11 | if BUILD_TESTING |
2 | 12 | ||
3 | noinst_PROGRAMS += DHT_test \ | 13 | noinst_PROGRAMS += DHT_test \ |
@@ -10,6 +20,7 @@ DHT_test_CFLAGS = $(LIBSODIUM_CFLAGS) \ | |||
10 | 20 | ||
11 | DHT_test_LDADD = $(LIBSODIUM_LDFLAGS) \ | 21 | DHT_test_LDADD = $(LIBSODIUM_LDFLAGS) \ |
12 | $(NACL_LDFLAGS) \ | 22 | $(NACL_LDFLAGS) \ |
23 | libmisc_tools.la \ | ||
13 | libtoxcore.la \ | 24 | libtoxcore.la \ |
14 | $(LIBSODIUM_LIBS) \ | 25 | $(LIBSODIUM_LIBS) \ |
15 | $(NACL_OBJECTS) \ | 26 | $(NACL_OBJECTS) \ |
@@ -25,13 +36,11 @@ Messenger_test_CFLAGS = $(LIBSODIUM_CFLAGS) \ | |||
25 | 36 | ||
26 | Messenger_test_LDADD = $(LIBSODIUM_LDFLAGS) \ | 37 | Messenger_test_LDADD = $(LIBSODIUM_LDFLAGS) \ |
27 | $(NACL_LDFLAGS) \ | 38 | $(NACL_LDFLAGS) \ |
39 | libmisc_tools.la \ | ||
28 | libtoxcore.la \ | 40 | libtoxcore.la \ |
29 | $(LIBSODIUM_LIBS) \ | 41 | $(LIBSODIUM_LIBS) \ |
30 | $(NACL_OBJECTS) \ | 42 | $(NACL_OBJECTS) \ |
31 | $(NACL_LIBS) \ | 43 | $(NACL_LIBS) \ |
32 | $(WINSOCK2_LIBS) | 44 | $(WINSOCK2_LIBS) |
33 | 45 | ||
34 | |||
35 | EXTRA_DIST += $(top_srcdir)/testing/misc_tools.c | ||
36 | |||
37 | endif | 46 | endif |