Harald Welte | 06bc548 | 2016-01-03 17:54:24 +0100 | [diff] [blame] | 1 | AM_CFLAGS = $(OSMOVTY_CFLAGS) $(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) -g -I$(top_srcdir)/src -I$(top_srcdir)/src/hnbap/ |
Daniel Willmann | 29b9e00 | 2015-12-15 15:10:31 +0100 | [diff] [blame] | 2 | |
Harald Welte | 3aad6af | 2015-12-26 08:43:04 +0100 | [diff] [blame] | 3 | COMMON_LIBS = $(OSMOVTY_LIBS) $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) -lsctp |
Daniel Willmann | 29b9e00 | 2015-12-15 15:10:31 +0100 | [diff] [blame] | 4 | |
Harald Welte | 3aad6af | 2015-12-26 08:43:04 +0100 | [diff] [blame] | 5 | check_PROGRAMS = test-ranap test-helpers test-hnbap hnb-test dummy-cn |
Daniel Willmann | 29b9e00 | 2015-12-15 15:10:31 +0100 | [diff] [blame] | 6 | |
Harald Welte | 06bc548 | 2016-01-03 17:54:24 +0100 | [diff] [blame] | 7 | HNBAP_FILES = $(top_srcdir)/src/hnbap_common.c $(top_srcdir)/src/hnbap_decoder.c $(top_srcdir)/src/hnbap_encoder.c |
| 8 | RUA_FILES = $(top_srcdir)/src/rua_common.c $(top_srcdir)/src/rua_decoder.c $(top_srcdir)/src/rua_encoder.c |
Daniel Willmann | 29b9e00 | 2015-12-15 15:10:31 +0100 | [diff] [blame] | 9 | |
Harald Welte | e8a4dc6 | 2016-01-03 17:16:07 +0100 | [diff] [blame] | 10 | test_helpers_SOURCES = test-helpers.c |
Harald Welte | 056984f | 2016-01-03 16:31:31 +0100 | [diff] [blame] | 11 | test_helpers_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la |
Daniel Willmann | 29b9e00 | 2015-12-15 15:10:31 +0100 | [diff] [blame] | 12 | |
Harald Welte | 06bc548 | 2016-01-03 17:54:24 +0100 | [diff] [blame] | 13 | test_hnbap_SOURCES = $(top_srcdir)/src/hnbap_common.c $(top_srcdir)/src/hnbap_decoder.c test-hnbap.c test_common.c |
Harald Welte | 056984f | 2016-01-03 16:31:31 +0100 | [diff] [blame] | 14 | test_hnbap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a $(top_builddir)/src/libosmo-ranap.la |
Daniel Willmann | 29b9e00 | 2015-12-15 15:10:31 +0100 | [diff] [blame] | 15 | |
Harald Welte | e8a4dc6 | 2016-01-03 17:16:07 +0100 | [diff] [blame] | 16 | hnb_test_SOURCES = $(HNBAP_FILES) $(RUA_FILES) hnb-test.c rua_helper.c test_common.c |
Harald Welte | 0322feb | 2016-01-03 15:39:11 +0100 | [diff] [blame] | 17 | hnb_test_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a $(top_builddir)/src/rua/libosmo-asn1-rua.a $(top_builddir)/src/libosmo-ranap.la |
Daniel Willmann | 29b9e00 | 2015-12-15 15:10:31 +0100 | [diff] [blame] | 18 | |
Harald Welte | e8a4dc6 | 2016-01-03 17:16:07 +0100 | [diff] [blame] | 19 | test_ranap_SOURCES = $(RANAP_FILES) test-ranap.c test_common.c |
Harald Welte | 0322feb | 2016-01-03 15:39:11 +0100 | [diff] [blame] | 20 | test_ranap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la |
Daniel Willmann | 29b9e00 | 2015-12-15 15:10:31 +0100 | [diff] [blame] | 21 | |
Harald Welte | e8a4dc6 | 2016-01-03 17:16:07 +0100 | [diff] [blame] | 22 | dummy_cn_SOURCES = $(RANAP_FILES) test_common.c dummy_cn_sua.c ranap_common_cn.c |
Harald Welte | 0322feb | 2016-01-03 15:39:11 +0100 | [diff] [blame] | 23 | dummy_cn_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la |
Harald Welte | 3aad6af | 2015-12-26 08:43:04 +0100 | [diff] [blame] | 24 | |
Daniel Willmann | 29b9e00 | 2015-12-15 15:10:31 +0100 | [diff] [blame] | 25 | # The `:;' works around a Bash 3.2 bug when the output is not writeable. |
| 26 | $(srcdir)/package.m4: $(top_srcdir)/configure.ac |
| 27 | :;{ \ |
| 28 | echo '# Signature of the current package.' && \ |
| 29 | echo 'm4_define([AT_PACKAGE_NAME],' && \ |
| 30 | echo ' [$(PACKAGE_NAME)])' && \ |
| 31 | echo 'm4_define([AT_PACKAGE_TARNAME],' && \ |
| 32 | echo ' [$(PACKAGE_TARNAME)])' && \ |
| 33 | echo 'm4_define([AT_PACKAGE_VERSION],' && \ |
| 34 | echo ' [$(PACKAGE_VERSION)])' && \ |
| 35 | echo 'm4_define([AT_PACKAGE_STRING],' && \ |
| 36 | echo ' [$(PACKAGE_STRING)])' && \ |
| 37 | echo 'm4_define([AT_PACKAGE_BUGREPORT],' && \ |
| 38 | echo ' [$(PACKAGE_BUGREPORT)])'; \ |
| 39 | echo 'm4_define([AT_PACKAGE_URL],' && \ |
| 40 | echo ' [$(PACKAGE_URL)])'; \ |
| 41 | } >'$(srcdir)/package.m4' |
| 42 | |
| 43 | TESTSUITE = $(srcdir)/testsuite |
| 44 | |
| 45 | check-local: atconfig $(TESTSUITE) |
| 46 | $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) |
| 47 | |
| 48 | AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te |
| 49 | AUTOTEST = $(AUTOM4TE) --language=autotest |
| 50 | |
| 51 | $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 |
| 52 | $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at |
| 53 | mv $@.tmp $@ |
| 54 | |