Commit 4b850954056943be03452c9a2b4bb621d663e40b

Karel Miko 2018-12-02T17:56:10

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)