X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/73c04bcfe1096173b00431f0cdc742894b15eef0..51004dcb01e06fef634b61be77ed73dd61cb6db9:/icuSources/config/mh-cygwin diff --git a/icuSources/config/mh-cygwin b/icuSources/config/mh-cygwin index aa58e0e9..fdbd0e71 100644 --- a/icuSources/config/mh-cygwin +++ b/icuSources/config/mh-cygwin @@ -1,6 +1,6 @@ ## -*-makefile-*- ## Cygwin-specific setup -## Copyright (c) 2001-2006, International Business Machines Corporation and +## Copyright (c) 2001-2010, International Business Machines Corporation and ## others. All Rights Reserved. ## Commands to generate dependency files @@ -29,9 +29,19 @@ LIBCPPFLAGS = LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) #LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) +## Shared library options +LD_SOOPTIONS= -Wl,-Bsymbolic + ## Commands to make a shared library -SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared -SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared +# $(subst) won't work in shell script. #M# at the end omits these +# lines from the shell script (Make only) +SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(subst cyg,lib,$@).$(A)#M# +SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(subst cyg,lib,$@).$(A)#M# +# the #SH# lines don't go through further postprocessing. +# so, they must be valid shell script starting from column 4 +#SH#SHLIB_c="$(CC) $(CFLAGS) $(LDFLAGS) -shared " +#SH#SHLIB_cc="$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared " + ## Compiler switch to embed a runtime search path LD_RPATH= @@ -45,11 +55,8 @@ SO = dll ## Non-shared intermediate object suffix STATIC_O = ao LIBICU = cyg$(ICUPREFIX) - -# Change the stubnames so that poorly working FAT disks and installation programs can work. -# This is also for backwards compatibility. -DATA_STUBNAME = dt -I18N_STUBNAME = in +## To have an import library is better on Cygwin +IMPORT_LIB_EXT = .dll.a ## Compilation rules %.$(STATIC_O): $(srcdir)/%.c @@ -81,6 +88,10 @@ I18N_STUBNAME = in FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO) MIDDLE_SO_TARGET=$(FINAL_SO_TARGET) +IMPORT_LIB = $(subst cyg,lib,$(FINAL_SO_TARGET)).$(A)#M# +MIDDLE_IMPORT_LIB = $(subst cyg,lib,$(basename $(SO_TARGET)))$(SO_TARGET_VERSION_MAJOR).$(SO).$(A)#M# +FINAL_IMPORT_LIB = $(IMPORT_LIB)#M# + # The following is for Makefile.inc's use. ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR) @@ -88,7 +99,7 @@ ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR) #%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO) # $(RM) $@ && cp ${