Move additional libraries to appropriate place

According to
https://www.gnu.org/software/automake/manual/automake.html#Libtool-Flags
the libraries supposed to be added to *_LDADD or *_LIBADD
while *_LDFLAGS should contain additional libtool linking
flags. Previously we used both. Let's unify this and move all the
libraries into proper automake variable. While at it - also add
libosmocore.la for tests to LDADD since all the tests link against it
anyway.

Change-Id: Ia657a66db75df831421af5df1175a992da5ba80f
diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am
index 32b38fb..7b5e1e5 100644
--- a/src/vty/Makefile.am
+++ b/src/vty/Makefile.am
@@ -12,6 +12,6 @@
 libosmovty_la_SOURCES = buffer.c command.c vty.c vector.c utils.c \
 			telnet_interface.c logging_vty.c stats_vty.c \
 			fsm_vty.c talloc_ctx_vty.c
-libosmovty_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS)
-libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la
+libosmovty_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined
+libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la $(TALLOC_LIBS)
 endif