tests: avoid source dependencies from other dirs in Makefile

That causes compilation errors under certain cirquimstances.
This commit is contained in:
Nikos Mavrogiannopoulos
2015-11-19 14:35:13 +01:00
parent 854fd8f421
commit 45c2fb55c8
7 changed files with 13 additions and 6 deletions

View File

@@ -45,23 +45,23 @@ if LOCAL_TALLOC
AM_CPPFLAGS += -I$(srcdir)/../src/ccan/talloc
endif
kkdcp_parsing_SOURCES = ../src/config-kkdcp.c kkdcp-parsing.c
kkdcp_parsing_SOURCES = kkdcp-parsing.c
kkdcp_parsing_LDADD = ../gl/libgnu.a $(LIBTALLOC_LIBS) ../src/ccan/libccan.a
json_escape_SOURCES = ../src/occtl/json.c json-escape.c
json_escape_SOURCES = json-escape.c
json_escape_LDADD = ../gl/libgnu.a $(LIBTALLOC_LIBS) ../src/ccan/libccan.a
ipv4_prefix_SOURCES = ../src/ip-util.c ../src/ip-util.h ipv4-prefix.c
ipv4_prefix_SOURCES = ipv4-prefix.c
ipv4_prefix_LDADD = ../gl/libgnu.a $(LIBTALLOC_LIBS) ../src/ccan/libccan.a
ban_ips_CPPFLAGS = $(AM_CPPFLAGS) -DDISABLE_LOGS
ban_ips_SOURCES = ../src/main-ban.c ../src/main.h ban-ips.c
ban_ips_SOURCES = ban-ips.c
ban_ips_LDADD = ../gl/libgnu.a $(LIBTALLOC_LIBS) ../src/ccan/libccan.a
str_test_SOURCES = ../src/str.c ../src/str.h str-test.c
str_test_SOURCES = str-test.c
str_test_LDADD = ../gl/libgnu.a $(LIBTALLOC_LIBS) ../src/ccan/libccan.a
ipv6_prefix_SOURCES = ../src/ip-util.c ../src/ip-util.h ipv6-prefix.c
ipv6_prefix_SOURCES = ipv6-prefix.c
ipv6_prefix_LDADD = ../gl/libgnu.a $(LIBTALLOC_LIBS) ../src/ccan/libccan.a
check_PROGRAMS = str-test ipv4-prefix ipv6-prefix kkdcp-parsing json-escape ban-ips

View File

@@ -28,6 +28,7 @@
#include "../src/main.h"
#include "../src/main-ban.h"
#include "../src/ip-util.h"
#include "../src/main-ban.c"
/* Test the IP banning functionality */
static

View File

@@ -21,6 +21,7 @@
#include <talloc.h>
#include "../src/ip-util.h"
#include "../src/ip-util.c"
int main()
{

View File

@@ -21,6 +21,7 @@
#include <arpa/inet.h>
#include "../src/ip-util.h"
#include "../src/ip-util.c"
static char* my_ipv6_prefix_to_mask(const char *str, unsigned prefix)
{

View File

@@ -24,6 +24,7 @@
#include <sys/socket.h>
#include <netdb.h>
#include "../src/occtl/json.h"
#include "../src/occtl/json.c"
static char *strings[] =
{

View File

@@ -25,6 +25,7 @@
#include <netdb.h>
#include "../src/common-config.h"
#include "../src/config-kkdcp.c"
int main()
{

View File

@@ -15,12 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <talloc.h>
#include "../src/str.h"
#include "../src/str.c"
static char *myfunc(void *pool, const char *str)
{