intl/icu/source/config/mh-mingw64

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

michael@0 1 ## -*-makefile-*-
michael@0 2 ## Cygwin64/MinGW64 specific setup
michael@0 3 ## Copyright (c) 2012-2013, International Business Machines Corporation and
michael@0 4 ## others. All Rights Reserved.
michael@0 5
michael@0 6 # TODO: Finish the rest of this port. This platform port is incomplete.
michael@0 7
michael@0 8 # This file is similar to mh-mingw
michael@0 9 # Any changes made here may also need to be made in mh-mingw
michael@0 10
michael@0 11 # We install sbin tools into the same bin directory because
michael@0 12 # pkgdata needs some of the tools in sbin, and we can't always depend on
michael@0 13 # icu-config working on Windows.
michael@0 14 sbindir=$(bindir)
michael@0 15
michael@0 16 ## Commands to generate dependency files
michael@0 17 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
michael@0 18 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
michael@0 19
michael@0 20 ## Flags to create/use a static library
michael@0 21 ifneq ($(ENABLE_SHARED),YES)
michael@0 22 ## Make sure that the static libraries can be built and used
michael@0 23 CPPFLAGS += -DU_STATIC_IMPLEMENTATION
michael@0 24 else
michael@0 25 ## Make sure that the static libraries can be built
michael@0 26 STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION
michael@0 27 endif
michael@0 28
michael@0 29 ## Flags for position independent code
michael@0 30 SHAREDLIBCFLAGS =
michael@0 31 SHAREDLIBCXXFLAGS =
michael@0 32 SHAREDLIBCPPFLAGS = -DPIC
michael@0 33
michael@0 34 ## Additional flags when building libraries and with threads
michael@0 35 THREADSCFLAGS = -mthreads
michael@0 36 THREADSCXXFLAGS = -mthreads
michael@0 37 LIBCPPFLAGS =
michael@0 38
michael@0 39 # Commands to link. Link with C++ in case static libraries are used.
michael@0 40 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
michael@0 41 #LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
michael@0 42
michael@0 43 ## Shared library options
michael@0 44 LD_SOOPTIONS= -Wl,-Bsymbolic
michael@0 45
michael@0 46 ## Commands to make a shared library
michael@0 47 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#
michael@0 48 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#
michael@0 49
michael@0 50 ## Compiler switch to embed a runtime search path
michael@0 51 LD_RPATH=
michael@0 52 LD_RPATH_PRE= -Wl,-rpath,
michael@0 53
michael@0 54 ## Compiler switch to embed a library name
michael@0 55 LD_SONAME =
michael@0 56
michael@0 57 ## Shared object suffix
michael@0 58 SO = dll
michael@0 59 ## Non-shared intermediate object suffix
michael@0 60 STATIC_O = ao
michael@0 61
michael@0 62 ifeq ($(ENABLE_SHARED),YES)
michael@0 63 SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
michael@0 64 else
michael@0 65 SO_TARGET_VERSION_SUFFIX =
michael@0 66 endif
michael@0 67
michael@0 68 # Static library prefix and file extension
michael@0 69 LIBSICU = lib$(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
michael@0 70 A = a
michael@0 71
michael@0 72 ## An import library is needed for z/OS and MSVC
michael@0 73 IMPORT_LIB_EXT = .dll.a
michael@0 74
michael@0 75 LIBPREFIX=
michael@0 76
michael@0 77 # Change the stubnames so that poorly working FAT disks and installation programs can work.
michael@0 78 # This is also for backwards compatibility.
michael@0 79 DATA_STUBNAME = dt
michael@0 80 I18N_STUBNAME = in
michael@0 81 LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
michael@0 82
michael@0 83 # The #M# is used to delete lines for icu-config
michael@0 84 # Current full path directory.
michael@0 85 #CURR_FULL_DIR=$(shell pwd -W)#M# for MSYS
michael@0 86 CURR_FULL_DIR?=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
michael@0 87 # Current full path directory for use in source code in a -D compiler option.
michael@0 88 #CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell pwd -W))#M# for MSYS
michael@0 89 CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
michael@0 90
michael@0 91 ## Compilation rules
michael@0 92 %.$(STATIC_O): $(srcdir)/%.c
michael@0 93 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
michael@0 94 %.o: $(srcdir)/%.c
michael@0 95 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
michael@0 96
michael@0 97 %.$(STATIC_O): $(srcdir)/%.cpp
michael@0 98 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
michael@0 99 %.o: $(srcdir)/%.cpp
michael@0 100 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
michael@0 101
michael@0 102
michael@0 103 ## Dependency rules
michael@0 104 %.d: $(srcdir)/%.c
michael@0 105 @echo "generating dependency information for $<"
michael@0 106 @echo -n "$@ " > $@
michael@0 107 @$(GEN_DEPS.c) $< >> $@ || (rm -f $@ && FALSE)
michael@0 108
michael@0 109 %.d: $(srcdir)/%.cpp
michael@0 110 @echo "generating dependency information for $<"
michael@0 111 @echo -n "$@ " > $@
michael@0 112 @$(GEN_DEPS.cc) $< >> $@ || (rm -f $@ && FALSE)
michael@0 113
michael@0 114 ## Versioned target for a shared library.
michael@0 115 ## Since symbolic links don't work the same way on Windows,
michael@0 116 ## we only use the version major number.
michael@0 117 #FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
michael@0 118 FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
michael@0 119 MIDDLE_SO_TARGET=$(FINAL_SO_TARGET)
michael@0 120
michael@0 121 FINAL_IMPORT_LIB = $(dir $(SO_TARGET))$(notdir $(basename $(SO_TARGET)))$(IMPORT_LIB_EXT)#M#
michael@0 122 IMPORT_LIB = $(FINAL_IMPORT_LIB)#M#
michael@0 123 MIDDLE_IMPORT_LIB = $(FINAL_IMPORT_LIB)#M#
michael@0 124
michael@0 125 ## Special pkgdata information that is needed
michael@0 126 PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION_MAJOR)
michael@0 127 #ICUPKGDATA_INSTALL_DIR = $(shell cygpath -dma $(DESTDIR)$(ICUPKGDATA_DIR))#M#
michael@0 128 #ICUPKGDATA_INSTALL_LIBDIR = $(shell cygpath -dma $(DESTDIR)$(libdir))#M#
michael@0 129
michael@0 130 ## Versioned libraries rules
michael@0 131 #%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
michael@0 132 # $(RM) $@ && cp ${<F} $@
michael@0 133 %.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO)
michael@0 134 @echo -n
michael@0 135
michael@0 136 # Environment variable to set a runtime search path
michael@0 137 LDLIBRARYPATH_ENVVAR = PATH
michael@0 138
michael@0 139 # The type of assembly to write for generating an object file
michael@0 140 GENCCODE_ASSEMBLY=-a gcc-mingw64
michael@0 141
michael@0 142 # These are needed to allow the pkgdata GNU make files to work
michael@0 143 PKGDATA_DEFS = -DU_MAKE=\"$(MAKE)\"
michael@0 144
michael@0 145 ## End Cygwin64/MinGW64 specific setup
michael@0 146

mercurial