1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/config/mh-mingw Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,146 @@ 1.4 +## -*-makefile-*- 1.5 +## Cygwin/MinGW specific setup 1.6 +## Copyright (c) 2001-2013, International Business Machines Corporation and 1.7 +## others. All Rights Reserved. 1.8 + 1.9 +# TODO: Finish the rest of this port. This platform port is incomplete. 1.10 + 1.11 +# This file is similar to mh-mingw64 1.12 +# Any changes made here may also need to be made in mh-mingw64 1.13 + 1.14 +# We install sbin tools into the same bin directory because 1.15 +# pkgdata needs some of the tools in sbin, and we can't always depend on 1.16 +# icu-config working on Windows. 1.17 +sbindir=$(bindir) 1.18 + 1.19 +## Commands to generate dependency files 1.20 +GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) 1.21 +GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) 1.22 + 1.23 +## Flags to create/use a static library 1.24 +ifneq ($(ENABLE_SHARED),YES) 1.25 +## Make sure that the static libraries can be built and used 1.26 +CPPFLAGS += -DU_STATIC_IMPLEMENTATION 1.27 +else 1.28 +## Make sure that the static libraries can be built 1.29 +STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION 1.30 +endif 1.31 + 1.32 +## Flags for position independent code 1.33 +SHAREDLIBCFLAGS = 1.34 +SHAREDLIBCXXFLAGS = 1.35 +SHAREDLIBCPPFLAGS = -DPIC 1.36 + 1.37 +## Additional flags when building libraries and with threads 1.38 +THREADSCFLAGS = -mthreads 1.39 +THREADSCXXFLAGS = -mthreads 1.40 +LIBCPPFLAGS = 1.41 + 1.42 +# Commands to link. Link with C++ in case static libraries are used. 1.43 +LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) 1.44 +#LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) 1.45 + 1.46 +## Shared library options 1.47 +LD_SOOPTIONS= -Wl,-Bsymbolic 1.48 + 1.49 +## Commands to make a shared library 1.50 +SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M# 1.51 +SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M# 1.52 + 1.53 +## Compiler switch to embed a runtime search path 1.54 +LD_RPATH= 1.55 +LD_RPATH_PRE= -Wl,-rpath, 1.56 + 1.57 +## Compiler switch to embed a library name 1.58 +LD_SONAME = 1.59 + 1.60 +## Shared object suffix 1.61 +SO = dll 1.62 +## Non-shared intermediate object suffix 1.63 +STATIC_O = ao 1.64 + 1.65 +ifeq ($(ENABLE_SHARED),YES) 1.66 +SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR) 1.67 +else 1.68 +SO_TARGET_VERSION_SUFFIX = 1.69 +endif 1.70 + 1.71 +# Static library prefix and file extension 1.72 +LIBSICU = lib$(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX) 1.73 +A = a 1.74 + 1.75 +## An import library is needed for z/OS and MSVC 1.76 +IMPORT_LIB_EXT = .dll.a 1.77 + 1.78 +LIBPREFIX= 1.79 + 1.80 +# Change the stubnames so that poorly working FAT disks and installation programs can work. 1.81 +# This is also for backwards compatibility. 1.82 +DATA_STUBNAME = dt 1.83 +I18N_STUBNAME = in 1.84 +LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) 1.85 + 1.86 +# The #M# is used to delete lines for icu-config 1.87 +# Current full path directory. 1.88 +#CURR_FULL_DIR=$(shell pwd -W)#M# for MSYS 1.89 +CURR_FULL_DIR?=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell 1.90 +# Current full path directory for use in source code in a -D compiler option. 1.91 +#CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell pwd -W))#M# for MSYS 1.92 +CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell 1.93 + 1.94 +## Compilation rules 1.95 +%.$(STATIC_O): $(srcdir)/%.c 1.96 + $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< 1.97 +%.o: $(srcdir)/%.c 1.98 + $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< 1.99 + 1.100 +%.$(STATIC_O): $(srcdir)/%.cpp 1.101 + $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< 1.102 +%.o: $(srcdir)/%.cpp 1.103 + $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< 1.104 + 1.105 + 1.106 +## Dependency rules 1.107 +%.d: $(srcdir)/%.c 1.108 + @echo "generating dependency information for $<" 1.109 + @echo -n "$@ " > $@ 1.110 + @$(GEN_DEPS.c) $< >> $@ || (rm -f $@ && FALSE) 1.111 + 1.112 +%.d: $(srcdir)/%.cpp 1.113 + @echo "generating dependency information for $<" 1.114 + @echo -n "$@ " > $@ 1.115 + @$(GEN_DEPS.cc) $< >> $@ || (rm -f $@ && FALSE) 1.116 + 1.117 +## Versioned target for a shared library. 1.118 +## Since symbolic links don't work the same way on Windows, 1.119 +## we only use the version major number. 1.120 +#FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO) 1.121 +FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO) 1.122 +MIDDLE_SO_TARGET=$(FINAL_SO_TARGET) 1.123 + 1.124 +FINAL_IMPORT_LIB = $(dir $(SO_TARGET))$(notdir $(basename $(SO_TARGET)))$(IMPORT_LIB_EXT)#M# 1.125 +IMPORT_LIB = $(FINAL_IMPORT_LIB)#M# 1.126 +MIDDLE_IMPORT_LIB = $(FINAL_IMPORT_LIB)#M# 1.127 + 1.128 +## Special pkgdata information that is needed 1.129 +PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION_MAJOR) 1.130 +#ICUPKGDATA_INSTALL_DIR = $(shell cygpath -dma $(DESTDIR)$(ICUPKGDATA_DIR))#M# 1.131 +#ICUPKGDATA_INSTALL_LIBDIR = $(shell cygpath -dma $(DESTDIR)$(libdir))#M# 1.132 + 1.133 +## Versioned libraries rules 1.134 +#%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO) 1.135 +# $(RM) $@ && cp ${<F} $@ 1.136 +%.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO) 1.137 + @echo -n 1.138 + 1.139 +# Environment variable to set a runtime search path 1.140 +LDLIBRARYPATH_ENVVAR = PATH 1.141 + 1.142 +# The type of assembly to write for generating an object file 1.143 +GENCCODE_ASSEMBLY=-a gcc-cygwin 1.144 + 1.145 +# These are needed to allow the pkgdata GNU make files to work 1.146 +PKGDATA_DEFS = -DU_MAKE=\"$(MAKE)\" 1.147 + 1.148 +## End Cygwin/MinGW specific setup 1.149 +