mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
tests: avoid source dependencies from other dirs in Makefile
That causes compilation errors under certain cirquimstances.
This commit is contained in:
@@ -45,23 +45,23 @@ if LOCAL_TALLOC
|
|||||||
AM_CPPFLAGS += -I$(srcdir)/../src/ccan/talloc
|
AM_CPPFLAGS += -I$(srcdir)/../src/ccan/talloc
|
||||||
endif
|
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
|
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
|
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
|
ipv4_prefix_LDADD = ../gl/libgnu.a $(LIBTALLOC_LIBS) ../src/ccan/libccan.a
|
||||||
|
|
||||||
ban_ips_CPPFLAGS = $(AM_CPPFLAGS) -DDISABLE_LOGS
|
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
|
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
|
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
|
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
|
check_PROGRAMS = str-test ipv4-prefix ipv6-prefix kkdcp-parsing json-escape ban-ips
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include "../src/main.h"
|
#include "../src/main.h"
|
||||||
#include "../src/main-ban.h"
|
#include "../src/main-ban.h"
|
||||||
#include "../src/ip-util.h"
|
#include "../src/ip-util.h"
|
||||||
|
#include "../src/main-ban.c"
|
||||||
|
|
||||||
/* Test the IP banning functionality */
|
/* Test the IP banning functionality */
|
||||||
static
|
static
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include <talloc.h>
|
#include <talloc.h>
|
||||||
|
|
||||||
#include "../src/ip-util.h"
|
#include "../src/ip-util.h"
|
||||||
|
#include "../src/ip-util.c"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include "../src/ip-util.h"
|
#include "../src/ip-util.h"
|
||||||
|
#include "../src/ip-util.c"
|
||||||
|
|
||||||
static char* my_ipv6_prefix_to_mask(const char *str, unsigned prefix)
|
static char* my_ipv6_prefix_to_mask(const char *str, unsigned prefix)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include "../src/occtl/json.h"
|
#include "../src/occtl/json.h"
|
||||||
|
#include "../src/occtl/json.c"
|
||||||
|
|
||||||
static char *strings[] =
|
static char *strings[] =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
||||||
#include "../src/common-config.h"
|
#include "../src/common-config.h"
|
||||||
|
#include "../src/config-kkdcp.c"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,12 +15,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <talloc.h>
|
#include <talloc.h>
|
||||||
|
|
||||||
#include "../src/str.h"
|
#include "../src/str.h"
|
||||||
|
#include "../src/str.c"
|
||||||
|
|
||||||
static char *myfunc(void *pool, const char *str)
|
static char *myfunc(void *pool, const char *str)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user