cygwin: Link many libraries with -no-undefined to create a dll

Only the Gb library relies on having undefined references to a
symbol that needs to be provided by the host application. For
all other libraries we can link with -no-undefined.
diff --git a/src/Makefile.am b/src/Makefile.am
index 081be96..e85f3e3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,9 +18,9 @@
 
 if ENABLE_PLUGIN
 libosmocore_la_SOURCES += plugin.c
-libosmocore_la_LDFLAGS = -version-info $(LIBVERSION) $(LIBRARY_DL)
+libosmocore_la_LDFLAGS = -version-info $(LIBVERSION) $(LIBRARY_DL) -no-undefined
 else
-libosmocore_la_LDFLAGS = -version-info $(LIBVERSION)
+libosmocore_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined
 endif
 
 if ENABLE_TALLOC
diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am
index 6110cbf..f4dec62 100644
--- a/src/codec/Makefile.am
+++ b/src/codec/Makefile.am
@@ -7,4 +7,4 @@
 lib_LTLIBRARIES = libosmocodec.la
 
 libosmocodec_la_SOURCES = gsm610.c gsm620.c gsm660.c gsm690.c
-libosmocodec_la_LDFLAGS = -version-info $(LIBVERSION)
+libosmocodec_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined
diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am
index 6e2a785..59d4234 100644
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -20,7 +20,7 @@
 			milenage/aes-encblock.c milenage/aes-internal.c \
 			milenage/aes-internal-enc.c milenage/milenage.c gan.c
 
-libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION)
+libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined
 libosmogsm_la_LIBADD = $(top_builddir)/src/libosmocore.la
 
 EXTRA_DIST = libosmogsm.map
diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am
index 76d7f27..a6cfd6f 100644
--- a/src/vty/Makefile.am
+++ b/src/vty/Makefile.am
@@ -9,6 +9,6 @@
 
 libosmovty_la_SOURCES = buffer.c command.c vty.c vector.c utils.c \
 			telnet_interface.c logging_vty.c
-libosmovty_la_LDFLAGS = -version-info $(LIBVERSION)
+libosmovty_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined
 libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la
 endif