ICU-20322 Install dll in $prefix/bin instead of $prefix/lib
diff --git a/icu4c/source/common/Makefile.in b/icu4c/source/common/Makefile.in
index d21f5d0..9e7fa22 100644
--- a/icu4c/source/common/Makefile.in
+++ b/icu4c/source/common/Makefile.in
@@ -12,6 +12,7 @@
 ## Source directory information
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
+platform = @platform@
 
 top_builddir = ..
 
@@ -159,6 +160,10 @@
 	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
 endif
 ifneq ($(ENABLE_SHARED),)
+ifeq ($(platform), U_MINGW)
+	@$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
+else
 	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
@@ -166,6 +171,7 @@
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
 endif
 endif
+endif
 ifneq ($(IMPORT_LIB_EXT),)
 	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
diff --git a/icu4c/source/i18n/Makefile.in b/icu4c/source/i18n/Makefile.in
index f22c20e..2f27261 100644
--- a/icu4c/source/i18n/Makefile.in
+++ b/icu4c/source/i18n/Makefile.in
@@ -12,6 +12,7 @@
 ## Source directory information
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
+platform = @platform@
 
 top_builddir = ..
 
@@ -153,6 +154,10 @@
 	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
 endif
 ifneq ($(ENABLE_SHARED),)
+ifeq ($(platform), U_MINGW)
+	@$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
+else
 	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
@@ -160,6 +165,7 @@
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
 endif
 endif
+endif
 ifneq ($(IMPORT_LIB_EXT),)
 	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
diff --git a/icu4c/source/io/Makefile.in b/icu4c/source/io/Makefile.in
index 45dbe87..a8629fd 100644
--- a/icu4c/source/io/Makefile.in
+++ b/icu4c/source/io/Makefile.in
@@ -12,6 +12,7 @@
 ## Source directory information
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
+platform = @platform@
 
 top_builddir = ..
 
@@ -101,6 +102,10 @@
 	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
 endif
 ifneq ($(ENABLE_SHARED),)
+ifeq ($(platform), U_MINGW)
+	@$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
+else
 	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
@@ -108,6 +113,7 @@
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
 endif
 endif
+endif
 ifneq ($(IMPORT_LIB_EXT),)
 	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
diff --git a/icu4c/source/stubdata/Makefile.in b/icu4c/source/stubdata/Makefile.in
index 4e2f03f..03c7ade 100644
--- a/icu4c/source/stubdata/Makefile.in
+++ b/icu4c/source/stubdata/Makefile.in
@@ -12,6 +12,7 @@
 ## Source directory information
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
+platform = @platform@
 
 top_builddir = ..
 
@@ -87,6 +88,10 @@
 	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
 endif
 ifneq ($(ENABLE_SHARED),)
+ifeq ($(platform), U_MINGW)
+	@$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
+else
 	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
@@ -94,6 +99,7 @@
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
 endif
 endif
+endif
 ifneq ($(IMPORT_LIB_EXT),)
 	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
diff --git a/icu4c/source/tools/ctestfw/Makefile.in b/icu4c/source/tools/ctestfw/Makefile.in
index 2560092..50aae13 100644
--- a/icu4c/source/tools/ctestfw/Makefile.in
+++ b/icu4c/source/tools/ctestfw/Makefile.in
@@ -12,6 +12,7 @@
 ## Source directory information
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
+platform = @platform@
 
 top_builddir = ../..
 
@@ -83,6 +84,10 @@
 	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
 endif
 ifneq ($(ENABLE_SHARED),)
+ifeq ($(platform), U_MINGW)
+	@$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
+else
 	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
@@ -90,6 +95,7 @@
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
 endif
 endif
+endif
 ifneq ($(IMPORT_LIB_EXT),)
 	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
diff --git a/icu4c/source/tools/toolutil/Makefile.in b/icu4c/source/tools/toolutil/Makefile.in
index 82ca0d8..923be3c 100644
--- a/icu4c/source/tools/toolutil/Makefile.in
+++ b/icu4c/source/tools/toolutil/Makefile.in
@@ -12,6 +12,7 @@
 ## Source directory information
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
+platform = @platform@
 
 top_builddir = ../..
 
@@ -94,6 +95,10 @@
 	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
 endif
 ifneq ($(ENABLE_SHARED),)
+ifeq ($(platform), U_MINGW)
+	@$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
+else
 	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
@@ -101,6 +106,7 @@
 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
 endif
 endif
+endif
 ifneq ($(IMPORT_LIB_EXT),)
 	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))