fix cygwin build
diff --git a/makefile.shared b/makefile.shared
index 05e26a7..070b308 100644
--- a/makefile.shared
+++ b/makefile.shared
@@ -58,7 +58,7 @@ objs: $(OBJECTS)
LOBJECTS = $(OBJECTS:.o=.lo)
$(LIBNAME): $(OBJECTS)
- $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LOBJECTS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO)
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LOBJECTS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO) $(LIBTOOLFLAGS)
install: $(LIBNAME)
install -d $(DESTDIR)$(LIBPATH)
diff --git a/makefile_include.mk b/makefile_include.mk
index c4ba8db..4814593 100644
--- a/makefile_include.mk
+++ b/makefile_include.mk
@@ -85,6 +85,9 @@ endif
ifeq ($(PLATFORM), Darwin)
CFLAGS += -Wno-nullability-completeness
endif
+ifeq ($(PLATFORM), CYGWIN)
+LIBTOOLFLAGS += -no-undefined
+endif
ifeq ($(PLATFORM),FreeBSD)
_ARCH := $(shell sysctl -b hw.machine_arch)