Commit b85a5110 authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI
Browse files

Split the tester in two components: liblinphonetester.la and the executable liblinphone_tester .

This will ease iOS usage (and probably others).
parent 244b028f
......@@ -39,7 +39,7 @@ AC_CONFIG_MACRO_DIR([m4])
dnl don't put anythingelse before AC_PROG_CC unless checking if macro still work for clang
AC_PROG_CXX(["xcrun clang++" g++])
AC_PROG_CC(["xcrun clang" gcc])
AC_PROG_OBJC
AC_PROG_OBJC(["xcrun clang" gcc])
gl_LD_OUTPUT_DEF
......
......@@ -3,9 +3,14 @@ EXTRA_DIST= tester_hosts sounds images certificates rcfiles
if BUILD_CUNIT_TESTS
noinst_PROGRAMS=liblinphone_tester
# there are 2 targets: liblinphonetester.la and the executable liblinphone_tester
liblinphone_tester_SOURCES= liblinphone_tester.c liblinphone_tester.h\
liblinphonedir = $(includedir)/linphone
liblinphone_HEADERS = liblinphone_tester.h
lib_LTLIBRARIES = liblinphonetester.la
liblinphonetester_la_SOURCES = \
setup_tester.c \
register_tester.c \
message_tester.c \
......@@ -18,31 +23,34 @@ liblinphone_tester_SOURCES= liblinphone_tester.c liblinphone_tester.h\
remote_provisioning_tester.c
AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/coreapi
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/coreapi
AM_CFLAGS = $(STRICT_OPTIONS) -DIN_LINPHONE $(ORTP_CFLAGS) $(MEDIASTREAMER_CFLAGS) $(CUNIT_CFLAGS) $(BELLESIP_CFLAGS) $(LIBXML2_CFLAGS)
AM_OBJCFLAGS = $(AM_CFLAGS)
LDADD=$(top_builddir)/coreapi/liblinphone.la $(BELLESIP_LIBS) $(LIBXML2_LIBS)
AM_LDFLAGS = $(CUNIT_LIBS)
if BUILD_IOS
AM_CFLAGS = $(STRICT_OPTIONS) -DIN_LINPHONE $(ORTP_CFLAGS) $(MEDIASTREAMER_CFLAGS) $(CUNIT_CFLAGS) $(BELLESIP_CFLAGS) $(LIBXML2_CFLAGS)
AM_OBJCFLAGS = $(AM_CFLAGS) -DNO_XCODE
#we build the liblinphonetester as a library, not as an executable, so that it is usable in XCode
liblinphonetester_la_SOURCES += liblinphonetester_ios.m liblinphonetester_ios.h
liblinphonetester_la_LDFLAGS = -framework CoreFoundation -framework AudioToolbox -framework CoreAudio -framework Foundation -framework QuartzCore -framework OpenGLES -framework UIKit -framework AVFoundation $(CUNIT_LIBS)
liblinphone_tester_LDFLAGS=
else
noinst_PROGRAMS = liblinphone_tester
liblinphone_tester_LDFLAGS = $(CUNIT_LIBS)
liblinphone_tester_SOURCES = liblinphone_tester.c
liblinphone_tester_LDADD = $(top_builddir)/coreapi/liblinphone.la $(BELLESIP_LIBS) $(LIBXML2_LIBS) liblinphonetester.la
if BUILD_IOS
liblinphone_tester_SOURCES += liblinphonetester_ios.m liblinphonetester_ios.h
liblinphone_tester_LDFLAGS += -framework CoreFoundation -framework AudioToolbox -framework CoreAudio -framework Foundation -framework QuartzCore -framework OpenGLES -framework UIKit -framework AVFoundation
# we have to force the linker to use c-style link when mixing Obj-C and C sources, otherwise the Obj-C linker is used, which gives strange errors (UTF8?)
liblinphone_tester_LINK = $(LINK)
endif
test: liblinphone_tester
./liblinphone_tester --config $(abs_srcdir)
else
else !BUILD_CUNIT_TESTS
test:
@echo "CUnit must be installed to be able to run the tests!"
endif
endif !BUILD_CUNIT_TESTS
......@@ -71,11 +71,11 @@ extern int liblinphone_tester_run_tests(const char *suite_name, const char *test
#endif
const char* test_domain;
const char* auth_domain;
const char* test_username;
const char* test_password;
const char* test_route;
extern const char* test_domain;
extern const char* auth_domain;
extern const char* test_username;
extern const char* test_password;
extern const char* test_route;
typedef struct _stats {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment