ICU-10548 Use hyphen when setting cl options on Cygwin MSVC builds
X-SVN-Rev: 34821
This commit is contained in:
parent
aaca304356
commit
6beb32f883
@ -10,8 +10,8 @@ sbindir=$(bindir)
|
|||||||
## Commands to generate dependency files
|
## Commands to generate dependency files
|
||||||
GEN_DEPS.c= :
|
GEN_DEPS.c= :
|
||||||
GEN_DEPS.cc= :
|
GEN_DEPS.cc= :
|
||||||
#GEN_DEPS.c= $(COMPILE.c) /E
|
#GEN_DEPS.c= $(COMPILE.c) -E
|
||||||
#GEN_DEPS.cc= $(COMPILE.cc) /E
|
#GEN_DEPS.cc= $(COMPILE.cc) -E
|
||||||
|
|
||||||
## Flags to create/use a static library
|
## Flags to create/use a static library
|
||||||
ifneq ($(ENABLE_SHARED),YES)
|
ifneq ($(ENABLE_SHARED),YES)
|
||||||
@ -45,37 +45,37 @@ endif
|
|||||||
# /EHsc enables exception handling
|
# /EHsc enables exception handling
|
||||||
# /Zc:wchar_t makes wchar_t a native type. Required for C++ ABI compatibility.
|
# /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.
|
# -D_CRT_SECURE_NO_DEPRECATE is needed to quiet warnings about using standard C functions.
|
||||||
CFLAGS+=/GF /nologo
|
CFLAGS+=-GF -nologo
|
||||||
CXXFLAGS+=/GF /nologo /EHsc /Zc:wchar_t
|
CXXFLAGS+=-GF -nologo -EHsc -Zc:wchar_t
|
||||||
CPPFLAGS+=-D_CRT_SECURE_NO_DEPRECATE
|
CPPFLAGS+=-D_CRT_SECURE_NO_DEPRECATE
|
||||||
DEFS+=-DWIN32 -DCYGWINMSVC
|
DEFS+=-DWIN32 -DCYGWINMSVC
|
||||||
LDFLAGS+=/nologo
|
LDFLAGS+=-nologo
|
||||||
|
|
||||||
# Commands to compile
|
# Commands to compile
|
||||||
COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) /c
|
COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c
|
||||||
COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) /c
|
COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c
|
||||||
|
|
||||||
# Commands to link
|
# Commands to link
|
||||||
LINK.c= LINK.EXE /subsystem:console $(LDFLAGS)
|
LINK.c= LINK.EXE -subsystem:console $(LDFLAGS)
|
||||||
LINK.cc= LINK.EXE /subsystem:console $(LDFLAGS)
|
LINK.cc= LINK.EXE -subsystem:console $(LDFLAGS)
|
||||||
|
|
||||||
## Commands to make a shared library
|
## Commands to make a shared library
|
||||||
SHLIB.c= LINK.EXE /DLL $(LDFLAGS)
|
SHLIB.c= LINK.EXE -DLL $(LDFLAGS)
|
||||||
SHLIB.cc= LINK.EXE /DLL $(LDFLAGS)
|
SHLIB.cc= LINK.EXE -DLL $(LDFLAGS)
|
||||||
|
|
||||||
## Compiler switch to embed a runtime search path
|
## Compiler switch to embed a runtime search path
|
||||||
LD_RPATH=
|
LD_RPATH=
|
||||||
LD_RPATH_PRE=
|
LD_RPATH_PRE=
|
||||||
|
|
||||||
## Compiler switch to embed a library name
|
## Compiler switch to embed a library name
|
||||||
LD_SONAME = /IMPLIB:$(SO_TARGET:.dll=.lib)
|
LD_SONAME = -IMPLIB:$(SO_TARGET:.dll=.lib)
|
||||||
|
|
||||||
## Shared object suffix
|
## Shared object suffix
|
||||||
SO = dll
|
SO = dll
|
||||||
## Non-shared intermediate object suffix
|
## Non-shared intermediate object suffix
|
||||||
STATIC_O = ao
|
STATIC_O = ao
|
||||||
# OUTOPT is for creating a specific output name
|
# OUTOPT is for creating a specific output name
|
||||||
OUTOPT = /out:
|
OUTOPT = -out:
|
||||||
|
|
||||||
# Static library prefix and file extension
|
# Static library prefix and file extension
|
||||||
LIBSICU = $(STATIC_PREFIX)$(ICUPREFIX)
|
LIBSICU = $(STATIC_PREFIX)$(ICUPREFIX)
|
||||||
@ -83,9 +83,9 @@ A = lib
|
|||||||
|
|
||||||
# Cygwin's ar can't handle Win64 right now. So we use Microsoft's tool instead.
|
# Cygwin's ar can't handle Win64 right now. So we use Microsoft's tool instead.
|
||||||
AR = LIB.EXE#M#
|
AR = LIB.EXE#M#
|
||||||
ARFLAGS := /nologo $(ARFLAGS:r=)#M#
|
ARFLAGS := -nologo $(ARFLAGS:r=)#M#
|
||||||
RANLIB = ls -s#M#
|
RANLIB = ls -s#M#
|
||||||
AR_OUTOPT = /OUT:#M#
|
AR_OUTOPT = -OUT:#M#
|
||||||
|
|
||||||
## An import library is needed for z/OS, MSVC and Cygwin
|
## An import library is needed for z/OS, MSVC and Cygwin
|
||||||
IMPORT_LIB_EXT = .lib
|
IMPORT_LIB_EXT = .lib
|
||||||
@ -114,14 +114,14 @@ LIBCTESTFW= $(top_builddir)/tools/ctestfw/$(LIBICU)$(CTESTFW_STUBNAME)$(ICULIBSU
|
|||||||
LIBICUTOOLUTIL= $(LIBDIR)/$(LIBICU)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX).lib
|
LIBICUTOOLUTIL= $(LIBDIR)/$(LIBICU)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX).lib
|
||||||
|
|
||||||
## These are the library specific LDFLAGS
|
## These are the library specific LDFLAGS
|
||||||
LDFLAGSICUDT+= /base:"0x4ad00000" /NOENTRY# The NOENTRY option is required for creating a resource-only DLL.
|
LDFLAGSICUDT+= -base:"0x4ad00000" -NOENTRY# The NOENTRY option is required for creating a resource-only DLL.
|
||||||
LDFLAGSICUUC= /base:"0x4a800000"# in-uc = 1MB
|
LDFLAGSICUUC= -base:"0x4a800000"# in-uc = 1MB
|
||||||
LDFLAGSICUI18N= /base:"0x4a900000"# io-in = 2MB
|
LDFLAGSICUI18N= -base:"0x4a900000"# io-in = 2MB
|
||||||
LDFLAGSICUIO= /base:"0x4ab00000"# le-io = 1MB
|
LDFLAGSICUIO= -base:"0x4ab00000"# le-io = 1MB
|
||||||
LDFLAGSICULE= /base:"0x4ac00000"# lx-le = 512KB
|
LDFLAGSICULE= -base:"0x4ac00000"# lx-le = 512KB
|
||||||
LDFLAGSICULX= /base:"0x4ac80000"
|
LDFLAGSICULX= -base:"0x4ac80000"
|
||||||
LDFLAGSCTESTFW=# Unused for now.
|
LDFLAGSCTESTFW=# Unused for now.
|
||||||
LDFLAGSICUTOOLUTIL= /base:"0x4ac00000"# Same as layout. Layout and tools probably won't mix.
|
LDFLAGSICUTOOLUTIL= -base:"0x4ac00000"# Same as layout. Layout and tools probably won't mix.
|
||||||
|
|
||||||
# The #M# is used to delete lines for icu-config
|
# The #M# is used to delete lines for icu-config
|
||||||
# Current full path directory.
|
# Current full path directory.
|
||||||
@ -137,14 +137,14 @@ endif
|
|||||||
|
|
||||||
## Compilation rules
|
## Compilation rules
|
||||||
%.$(STATIC_O): $(srcdir)/%.c
|
%.$(STATIC_O): $(srcdir)/%.c
|
||||||
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) /Fo$@ $(SOURCE_FILE)
|
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -Fo$@ $(SOURCE_FILE)
|
||||||
%.o: $(srcdir)/%.c
|
%.o: $(srcdir)/%.c
|
||||||
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) /Fo$@ $(SOURCE_FILE)
|
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -Fo$@ $(SOURCE_FILE)
|
||||||
|
|
||||||
%.$(STATIC_O): $(srcdir)/%.cpp
|
%.$(STATIC_O): $(srcdir)/%.cpp
|
||||||
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) /Fo$@ $(SOURCE_FILE)
|
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -Fo$@ $(SOURCE_FILE)
|
||||||
%.o: $(srcdir)/%.cpp
|
%.o: $(srcdir)/%.cpp
|
||||||
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) /Fo$@ $(SOURCE_FILE)
|
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -Fo$@ $(SOURCE_FILE)
|
||||||
|
|
||||||
|
|
||||||
## Dependency rules
|
## Dependency rules
|
||||||
@ -175,7 +175,7 @@ endif
|
|||||||
|
|
||||||
## Compile a Windows resource file
|
## Compile a Windows resource file
|
||||||
%.res : $(srcdir)/%.rc
|
%.res : $(srcdir)/%.rc
|
||||||
rc.exe /fo$@ $(CPPFLAGS) $(SOURCE_FILE)
|
rc.exe -fo$@ $(CPPFLAGS) $(SOURCE_FILE)
|
||||||
|
|
||||||
## Versioned target for a shared library.
|
## Versioned target for a shared library.
|
||||||
FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
|
FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
|
||||||
|
@ -260,11 +260,11 @@ case $platform in
|
|||||||
THE_COMP="Microsoft Visual C++"
|
THE_COMP="Microsoft Visual C++"
|
||||||
CC=cl; export CC
|
CC=cl; export CC
|
||||||
CXX=cl; export CXX
|
CXX=cl; export CXX
|
||||||
RELEASE_CFLAGS='/Gy /MD'
|
RELEASE_CFLAGS='-Gy -MD'
|
||||||
RELEASE_CXXFLAGS='/Gy /MD'
|
RELEASE_CXXFLAGS='-Gy -MD'
|
||||||
DEBUG_CFLAGS='/Zi /MDd'
|
DEBUG_CFLAGS='-Zi -MDd'
|
||||||
DEBUG_CXXFLAGS='/Zi /MDd'
|
DEBUG_CXXFLAGS='-Zi -MDd'
|
||||||
DEBUG_LDFLAGS='/DEBUG'
|
DEBUG_LDFLAGS='-DEBUG'
|
||||||
;;
|
;;
|
||||||
Cygwin/MSVC2005)
|
Cygwin/MSVC2005)
|
||||||
THE_OS="Windows with Cygwin"
|
THE_OS="Windows with Cygwin"
|
||||||
@ -304,8 +304,8 @@ case $platform in
|
|||||||
RELEASE_CXXFLAGS='-O2'
|
RELEASE_CXXFLAGS='-O2'
|
||||||
DEBUG_CFLAGS='-g -O0'
|
DEBUG_CFLAGS='-g -O0'
|
||||||
DEBUG_CXXFLAGS='-g -O0'
|
DEBUG_CXXFLAGS='-g -O0'
|
||||||
CC=gcc; export CC
|
CC=gcc; export CC
|
||||||
CXX=g++; export CXX
|
CXX=g++; export CXX
|
||||||
;;
|
;;
|
||||||
MinGW)
|
MinGW)
|
||||||
THE_OS="MinGW"
|
THE_OS="MinGW"
|
||||||
|
Loading…
Reference in New Issue
Block a user