From 879a4dc7ecacccd42a42a8fa9e63dac0ae45f0b6 Mon Sep 17 00:00:00 2001 From: Seven Du Date: Fri, 26 Oct 2018 22:14:47 +0800 Subject: [PATCH] FS-11487 #resolve convert to Makefile.am fix regression from 53533118cd7eedf7d25a9c6227558736fa5d0b2f --- configure.ac | 1 + tests/unit/Makefile.am | 9 +++++++++ tests/unit/unit.mk | 24 ------------------------ 3 files changed, 10 insertions(+), 24 deletions(-) create mode 100644 tests/unit/Makefile.am delete mode 100644 tests/unit/unit.mk diff --git a/configure.ac b/configure.ac index 8a26ff2159..1144a5faac 100644 --- a/configure.ac +++ b/configure.ac @@ -1807,6 +1807,7 @@ ac_cv_file_dbd_apr_dbd_mysql_c=no AC_CONFIG_FILES([Makefile build/Makefile + tests/unit/Makefile src/Makefile src/mod/Makefile src/mod/applications/mod_abstraction/Makefile diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am new file mode 100644 index 0000000000..8f4eb4e7cf --- /dev/null +++ b/tests/unit/Makefile.am @@ -0,0 +1,9 @@ +include $(top_srcdir)/build/modmake.rulesam + +bin_PROGRAMS = switch_event switch_hash switch_ivr_originate +AM_LDFLAGS = -avoid-version -no-undefined $(SWITCH_AM_LDFLAGS) $(openssl_LIBS) +AM_LDFLAGS += $(FREESWITCH_LIBS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS) +AM_CFLAGS = $(SWITCH_AM_CPPFLAGS) +AM_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) + +TESTS = $(bin_PROGRAMS) diff --git a/tests/unit/unit.mk b/tests/unit/unit.mk deleted file mode 100644 index dd4ba2c00b..0000000000 --- a/tests/unit/unit.mk +++ /dev/null @@ -1,24 +0,0 @@ -AUTOMAKE_OPTIONS = foreign -FSLD = $(top_builddir)/libfreeswitch.la $(top_builddir)/libs/apr/libapr-1.la $(top_builddir)/libs/apr-util/libaprutil-1.la - -check_PROGRAMS += tests/unit/switch_event - -tests_unit_switch_event_SOURCES = tests/unit/switch_event.c -tests_unit_switch_event_CFLAGS = $(SWITCH_AM_CFLAGS) -tests_unit_switch_event_LDADD = $(FSLD) -tests_unit_switch_event_LDFLAGS = $(SWITCH_AM_LDFLAGS) - -check_PROGRAMS += tests/unit/switch_hash - -tests_unit_switch_hash_SOURCES = tests/unit/switch_hash.c -tests_unit_switch_hash_CFLAGS = $(SWITCH_AM_CFLAGS) -tests_unit_switch_hash_LDADD = $(FSLD) -tests_unit_switch_hash_LDFLAGS = $(SWITCH_AM_LDFLAGS) - -check_PROGRAMS += tests/unit/switch_ivr_originate - -tests_unit_switch_ivr_originate_SOURCES = tests/unit/switch_ivr_originate.c -tests_unit_switch_ivr_originate_CFLAGS = $(SWITCH_AM_CFLAGS) -tests_unit_switch_ivr_originate_LDADD = $(FSLD) -tests_unit_switch_ivr_originate_LDFLAGS = $(SWITCH_AM_LDFLAGS) -