]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/config/mh-mingw
ICU-64232.0.1.tar.gz
[apple/icu.git] / icuSources / config / mh-mingw
index 5e6acad210a440a8394702dab75fb6690e447fa7..78df54af07e9a9e92503f845c00ae822e1458582 100644 (file)
@@ -1,4 +1,6 @@
 ## -*-makefile-*-
+## Copyright (C) 2016 and later: Unicode, Inc. and others.
+## License & terms of use: http://www.unicode.org/copyright.html
 ## Cygwin/MinGW specific setup
 ## Copyright (c) 2001-2014, International Business Machines Corporation and
 ## others. All Rights Reserved.
@@ -26,6 +28,10 @@ else
 STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION
 endif
 
+## ICU requires a minimum target of Windows 7, and MinGW does not set this by default.
+## https://msdn.microsoft.com/en-us/library/aa383745.aspx
+CPPFLAGS += -DWINVER=0x0601 -D_WIN32_WINNT=0x0601
+
 ## Flags for position independent code
 SHAREDLIBCFLAGS = 
 SHAREDLIBCXXFLAGS = 
@@ -36,6 +42,11 @@ THREADSCFLAGS = -mthreads
 THREADSCXXFLAGS = -mthreads
 LIBCPPFLAGS =
 
+## Add 'd' suffix to the names of binary files with Debug configuration
+ifeq ($(ENABLE_DEBUG),1)
+ICULIBSUFFIX:=$(ICULIBSUFFIX)d#M#
+endif
+
 # Commands to link. Link with C++ in case static libraries are used.
 LINK.c=       $(CXX) $(CXXFLAGS) $(LDFLAGS)
 #LINK.cc=      $(CXX) $(CXXFLAGS) $(LDFLAGS)
@@ -66,13 +77,13 @@ SO_TARGET_VERSION_SUFFIX =
 endif
 
 # Static library prefix and file extension
-LIBSICU = lib$(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
+LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
 A = a
 
 ## An import library is needed for z/OS and MSVC
 IMPORT_LIB_EXT = .dll.a
 
-LIBPREFIX=
+LIBPREFIX=lib
 
 # Change the stubnames so that poorly working FAT disks and installation programs can work.
 # This is also for backwards compatibility.