noinst_LTLIBRARIES = libnua.la
-check_LTLIBRARIES = libtestnua.la libtestproxy.la libtestnat.la
+check_PROGRAMS =
+TESTS =
-check_PROGRAMS = test_nua
-
-TESTS = test_nua
-
-CLEANFILES = tmp_sippasswd.??????
+if HAVE_CHECK
+check_PROGRAMS += check_nua
+TESTS += check_nua
+endif
# ----------------------------------------------------------------------
# Rules for building the targets
COVERAGE_INPUT = $(libnua_la_SOURCES) $(include_sofia_HEADERS)
+check_nua_SOURCES = check_nua.c check_nua.h \
+ check_session.c check_register.c \
+ test_s2.h test_s2.c
+
+check_nua_LDADD = $(nua_libs) @CHECK_LIBS@
+
+nua_libs = libnua.la \
+ ../iptsec/libiptsec.la \
+ ../ipt/libipt.la \
+ ../nea/libnea.la \
+ ../nta/libnta.la \
+ ../sresolv/libsresolv.la \
+ ../tport/libtport.la \
+ ../stun/libstun.la \
+ ../soa/libsoa.la \
+ ../sdp/libsdp.la \
+ ../sip/libsip.la \
+ ../http/libhttp.la \
+ ../msg/libmsg.la \
+ ../url/liburl.la \
+ ../bnf/libbnf.la \
+ ../su/libsu.la
+
test_nua_LDFLAGS = -static
libtestnua_la_SOURCES = test_nua.h test_ops.c \
../bnf/libbnf.la \
../su/libsu.la
+^ ^ ^ ^ ^ ^ ^
# ----------------------------------------------------------------------
# Install and distribution rules
#
-# Tests using check
+# Makefile.am for Sofia SIP tests
#
+# Copyright (C) 2007,2008 Nokia Corporation
+# Contact: Pekka Pessi <pekka.pessi@nokia.com>
+# Licensed under LGPL. See file COPYING.
+
+TESTS = test_nua
+check_PROGRAMS = test_nua
EXTRA_DIST = check_sofia.h check_sofia.c suite_for_nua.c
-TESTS =
-tests_PROGRAMS =
-testsdir := ${libdir}/tests/libsofia-sip-ua-tests
+test_nua_SOURCES = test_nua.c
-include $(top_srcdir)/rules/sofia.am
+test_nua_LDADD = $(check_LIBRARIES) \
+ ${sofiabuilddir}/libsofia-sip-ua.la
-INCLUDES = ${INTERNAL_INCLUDES}
+check_LIBRARIES = libtestnua.a libtestproxy.a libtestnat.a
-AM_CFLAGS += @CHECK_CFLAGS@
+libtestnua_a_SOURCES = test_nua.h test_ops.c \
+ test_init.c \
+ test_nua_api.c test_nua_params.c \
+ test_register.c test_basic_call.c \
+ test_offer_answer.c \
+ test_call_reject.c test_cancel_bye.c \
+ test_call_hold.c test_session_timer.c \
+ test_refer.c test_100rel.c \
+ test_simple.c test_sip_events.c \
+ test_extension.c
-if HAVE_CHECK
+libtestproxy_a_SOURCES = test_proxy.h test_proxy.c
+
+libtestnat_a_SOURCES = test_nat.h test_nat.c test_nat_tags.c
+
+#
+# Install in special test package
+#
+testsdir = ${libdir}/tests/libsofia-sip-ua-tests
+tests_PROGRAMS =
+if HAVE_CHECK
TESTS += check_sofia
tests_PROGRAMS += check_sofia
+endif
+
+check_sofia_CFLAGS = @CHECK_CFLAGS@
+
check_sofia_SOURCES = check_sofia.c check_sofia.h \
suite_for_nua.c
-CHECKLIBS = ${sofiabuilddir}/nua/libtestnua.la \
- ${sofiabuilddir}/nua/libtestproxy.la \
- ${sofiabuilddir}/nua/libtestnat.la
+check_sofia_LDADD = $(check_LIBRARIES) \
+ ${sofiabuilddir}/libsofia-sip-ua.la \
+ @CHECK_LIBS@
-$(CHECKLIBS):
- cd ${sofiabuilddir}/nua && make checklib
+CLEANFILES = tmp_sippasswd.??????
-check_sofia_LDADD = \
- $(CHECKLIBS) ${sofiabuilddir}/libsofia-sip-ua.la \
- @CHECK_LIBS@
-endif
+# ----------------------------------------------------------------------
+# Sofia specific rules
+
+include $(top_srcdir)/rules/sofia.am
+
+INCLUDES = ${INTERNAL_INCLUDES}