## Cygwin with Microsoft Visual C++ compiler specific setup ## Copyright (C) 2016and later: Unicode, Inc. and others. ## License & terms of use: http://www.unicode.org/copyright.html ## Copyright (c) 2001-2013, International Business Machines Corporation and ## others. All Rights Reserved.
# We install sbin tools into the same bin directory because # pkgdata needs some of the tools in sbin, and we can't always depend on # icu-config working on Windows.
sbindir=$(bindir)
## Flags to create/use a static library
ifneq ($(ENABLE_SHARED),YES) ## Make sure that the static libraries can be built and used
CPPFLAGS += -DU_STATIC_IMPLEMENTATION#Mjava.lang.NullPointerException else ## Make sure that the static libraries can be built
STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION
endif
## ICU requires a minimum target of Windows 7, and WINVER is not set to 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 =
SHAREDLIBCPPFLAGS =
## Additional flags when building libraries and with threads
LIBCPPFLAGS =
ifeq ($(ENABLE_RELEASE),1) # Make sure that assertions are disabled
CPPFLAGS+=-DU_RELEASE=1#Mjava.lang.NullPointerException
endif
ifeq ($(ENABLE_DEBUG),1) # Pass debugging flag through
CPPFLAGS+=-D_DEBUG=1#Mjava.lang.NullPointerException
ICULIBSUFFIX:=$(ICULIBSUFFIX)d#Mjava.lang.NullPointerException
endif
# /GF pools strings and places them into read-only memory # /EHsc enables exception handling # /Zc:wchar_t makes wchar_t a native type. Required for C++ ABI compatibility. # -D_CRT_SECURE_NO_DEPRECATE is needed to quiet warnings about using standard C functions. # -utf-8 set source file encoding to utf-8.
CFLAGS+=-GF -nologo -utf-8
CXXFLAGS+=-GF -nologo -EHsc -Zc:wchar_t -utf-8
CPPFLAGS+=-D_CRT_SECURE_NO_DEPRECATE
DEFS+=-DWIN32 -DCYGWINMSVC
LDFLAGS+=-nologo
# Commands to link
LINK.c= LINK.EXE -subsystem:console $(LDFLAGS)
LINK.cc= LINK.EXE -subsystem:console $(LDFLAGS)
## Commands to make a shared library
SHLIB.c= LINK.EXE -DLL $(LDFLAGS)
SHLIB.cc= LINK.EXE -DLL $(LDFLAGS)
## Compiler switch to embed a runtime search path
LD_RPATH=
LD_RPATH_PRE=
## Compiler switch to embed a library name
LD_SONAME = -IMPLIB:$(SO_TARGET:.dll=.lib)
## Shared object suffix
SO = dll ## Non-shared intermediate object suffix
STATIC_O = ao # OUTOPT is for creating a specific output name
OUTOPT = -out:
# Static library prefix and file extension
LIBSICU = $(STATIC_PREFIX)$(ICUPREFIX)
A = lib
# Cygwin's ar can't handle Win64 right now. So we use Microsoft's tool instead.
AR = LIB.EXE#Mjava.lang.NullPointerException
ARFLAGS := -nologo $(ARFLAGS:r=)#Mjava.lang.NullPointerException
RANLIB = ls -s#Mjava.lang.NullPointerException
AR_OUTOPT = -OUT:#Mjava.lang.NullPointerException
## An import library is needed for z/OS, MSVC and Cygwin
IMPORT_LIB_EXT = .lib
LIBPREFIX=
DEFAULT_LIBS = advapi32.lib
# 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
LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
## Link commands to link to ICU libs
ifeq ($(wildcard $(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).lib),)
LIBICUDT= $(top_builddir)/stubdata/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).lib else
LIBICUDT= $(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).lib
endif
LIBICUUC= $(LIBDIR)/$(LIBICU)$(COMMON_STUBNAME)$(ICULIBSUFFIX).lib $(LIBICUDT)
LIBICUI18N= $(LIBDIR)/$(LIBICU)$(I18N_STUBNAME)$(ICULIBSUFFIX).lib
LIBICULE= $(LIBDIR)/$(LIBICU)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX).lib
LIBICULX= $(LIBDIR)/$(LIBICU)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX).lib
LIBICUIO= $(LIBDIR)/$(LIBICU)$(IO_STUBNAME)$(ICULIBSUFFIX).lib
LIBCTESTFW= $(top_builddir)/tools/ctestfw/$(LIBICU)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX).lib
LIBICUTOOLUTIL= $(LIBDIR)/$(LIBICU)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX).lib
## These are the library specific LDFLAGS
LDFLAGSICUDT+= -NOENTRY# The NOENTRY option is required for creating a resource-only DLL.
LDFLAGSICUUC=# Unused for now.
LDFLAGSICUI18N=# Unused for now.
LDFLAGSICUIO=# Unused for now.
LDFLAGSICULX=# Unused for now.
LDFLAGSCTESTFW=# Unused for now.
LDFLAGSICUTOOLUTIL=# Unused for now.
# The #M# is used to delete lines for icu-config # Current full path directory.
CURR_FULL_DIR?=$(subst \,/,$(shell cygpath -da .))#M# -m isn't used because it doesn't work on Win98 # Current full path directory for use in source code in a -D compiler option.
CURR_SRCCODE_FULL_DIR=$(subst \,\\,$(shell cygpath -da .))#Mjava.lang.NullPointerException
## Dependency rules ## This is a start to how dependencies could work # The commented out rules may not properly delete the file when ^C is pressed # or the compiler fails. # make currently doesn't like rules with C:\\PROGRA~1\\.. in the dependency. # So system headers are ignored by ignoring \\
%.d : $(srcdir)/%.c
@echo "generating dependency information for $<"
@$(GEN_DEPS.c) $< > $@ # @echo -n "generating dependency information for " # @echo -n "$@ $(basename $<).o : " > $@ # @$(SHELL) -ec '$(GEN_DEPS.c) $< \ # | grep "#line 1 " | grep -v \\\\ | cut -d " " -f 3 \ # | /usr/bin/sort -u | sed s/\"$$/\\\\/ | sed s/^\"/\ / >> $@ \ # || (rm -f $@ && echo $@ && false)'
# The following rule is sometimes a no op. # We only want to do a post-build step when a manifest file doesn't exist.
%.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO)
@echo -n
$(POST_SO_BUILD_STEP)
## Install libraries as executable
INSTALL-L=$(INSTALL_PROGRAM)
# Environment variable to set a runtime search path
LDLIBRARYPATH_ENVVAR = PATH
# These are needed to allow the pkgdata nmake files to work
PKGDATA_INVOKE_OPTS = MAKEFLAGS=
# Include the version information in the shared library
ENABLE_SO_VERSION_DATA=1
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.