mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
Added build support for stock MinGW/MSYS build of POCO.
Components now supported by default: Foundation {including internal PCRE lib} Util Net XML SQL SQL/ODBC SQL/SQLite samples/{all components supported} Components supported with additional 3rd party MinGW/MSYS libs: NetSSL w/OpenSSH Components unsupported at this time: testsuite: Fails to build due to TupleTest - needs slight code change MinGW can't deal with currently. Only thing causing failure. CppUnit: Unable to support this due to WIN32 version of this functionality relying on MFC which does not ship with MinGW/MSYS. --no-wstring support due libstdc++ - will require STLPort {support coming soon} :build/config/MinGW +Fixed compiler environment flags and switches +Linkage build supports: SHARED, STATIC, or BOTH +Fixed duplicate symbol/unresolved symbol during compile +Added PCRE build flag for internal library build/eliminate link errors +Disable support of UTF-8 by default, MinGW will require STLPort +Corrected system link libs for MinGW "dumb" linker :build/rules/global +Added MinGW environment deduction logic :configure +Fine tuned environment deduction recognizing MinGW as valid :Data/ODBC/Makefile +Fixed correct ODBC libs to link :Foundation/Makefile +Added logic for building correct subsystem dependency :Util/Makefile +Added logic for building correct subsystem dependency
This commit is contained in:
parent
af32aa7573
commit
def90185aa
@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
|
ifeq ($(POCO_CONFIG),MinGW)
|
||||||
|
SYSLIBS += -lodbc32
|
||||||
|
else
|
||||||
ifeq (0, $(shell test -e /usr/lib/libodbc$(SHAREDLIBLINKEXT); echo $$?))
|
ifeq (0, $(shell test -e /usr/lib/libodbc$(SHAREDLIBLINKEXT); echo $$?))
|
||||||
SYSLIBS += -lodbc -lodbcinst
|
SYSLIBS += -lodbc -lodbcinst
|
||||||
COMMONFLAGS += -DPOCO_UNIXODBC
|
COMMONFLAGS += -DPOCO_UNIXODBC
|
||||||
@ -25,6 +28,7 @@ else
|
|||||||
$(error No ODBC library found. Please install unixODBC or iODBC and try again)
|
$(error No ODBC library found. Please install unixODBC or iODBC and try again)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
objects = Binder ConnectionHandle Connector EnvironmentHandle \
|
objects = Binder ConnectionHandle Connector EnvironmentHandle \
|
||||||
Extractor ODBCMetaColumn ODBCException ODBCStatementImpl \
|
Extractor ODBCMetaColumn ODBCException ODBCStatementImpl \
|
||||||
|
@ -23,7 +23,7 @@ objects = ArchiveStrategy ASCIIEncoding AsyncChannel Base64Decoder Base64Encoder
|
|||||||
RegularExpression RefCountedObject Runnable RotateStrategy Condition \
|
RegularExpression RefCountedObject Runnable RotateStrategy Condition \
|
||||||
SHA1Engine Semaphore SharedLibrary SimpleFileChannel \
|
SHA1Engine Semaphore SharedLibrary SimpleFileChannel \
|
||||||
SignalHandler SplitterChannel Stopwatch StreamChannel StreamConverter StreamCopier \
|
SignalHandler SplitterChannel Stopwatch StreamChannel StreamConverter StreamCopier \
|
||||||
StreamTokenizer String StringTokenizer SynchronizedObject SyslogChannel \
|
StreamTokenizer String StringTokenizer SynchronizedObject \
|
||||||
Task TaskManager TaskNotification TeeStream Hash HashStatistic \
|
Task TaskManager TaskNotification TeeStream Hash HashStatistic \
|
||||||
TemporaryFile TextConverter TextEncoding TextIterator Thread ThreadLocal \
|
TemporaryFile TextConverter TextEncoding TextIterator Thread ThreadLocal \
|
||||||
ThreadPool ActiveDispatcher Timer Timespan Timestamp Timezone Token URI \
|
ThreadPool ActiveDispatcher Timer Timespan Timestamp Timezone Token URI \
|
||||||
@ -38,6 +38,12 @@ objects = ArchiveStrategy ASCIIEncoding AsyncChannel Base64Decoder Base64Encoder
|
|||||||
pcre_tables pcre_try_flipped pcre_ucp_searchfuncs pcre_valid_utf8 \
|
pcre_tables pcre_try_flipped pcre_ucp_searchfuncs pcre_valid_utf8 \
|
||||||
pcre_exec pcre_ord2utf8 pcre_newline pcre_fullinfo pcre_xclass
|
pcre_exec pcre_ord2utf8 pcre_newline pcre_fullinfo pcre_xclass
|
||||||
|
|
||||||
|
ifeq ($(POCO_CONFIG),MinGW)
|
||||||
|
objects += EventLogChannel WindowsConsoleChannel
|
||||||
|
else
|
||||||
|
objects += SyslogChannel
|
||||||
|
endif
|
||||||
|
|
||||||
target = PocoFoundation
|
target = PocoFoundation
|
||||||
target_version = $(LIBVERSION)
|
target_version = $(LIBVERSION)
|
||||||
target_libs =
|
target_libs =
|
||||||
|
@ -16,6 +16,10 @@ objects = AbstractConfiguration Application ConfigurationMapper \
|
|||||||
XMLConfiguration FilesystemConfiguration ServerApplication \
|
XMLConfiguration FilesystemConfiguration ServerApplication \
|
||||||
Validator IntValidator RegExpValidator OptionCallback
|
Validator IntValidator RegExpValidator OptionCallback
|
||||||
|
|
||||||
|
ifeq ($(POCO_CONFIG),MinGW)
|
||||||
|
objects += WinService
|
||||||
|
endif
|
||||||
|
|
||||||
target = PocoUtil
|
target = PocoUtil
|
||||||
target_version = $(LIBVERSION)
|
target_version = $(LIBVERSION)
|
||||||
target_libs = PocoFoundation PocoXML
|
target_libs = PocoFoundation PocoXML
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#
|
#
|
||||||
# General Settings
|
# General Settings
|
||||||
#
|
#
|
||||||
LINKMODE = SHARED
|
LINKMODE = BOTH
|
||||||
POCO_TARGET_OSNAME = MinGW
|
POCO_TARGET_OSNAME = MinGW
|
||||||
POCO_TARGET_OSARCH = ia32
|
POCO_TARGET_OSARCH = ia32
|
||||||
|
|
||||||
@ -36,6 +36,8 @@ MKDIR = mkdir -p
|
|||||||
SHAREDLIBEXT = .dll
|
SHAREDLIBEXT = .dll
|
||||||
SHAREDLIBLINKEXT = .dll
|
SHAREDLIBLINKEXT = .dll
|
||||||
|
|
||||||
|
BINEXT = .exe
|
||||||
|
|
||||||
#
|
#
|
||||||
# Compiler and Linker Flags
|
# Compiler and Linker Flags
|
||||||
#
|
#
|
||||||
@ -45,7 +47,7 @@ CFLAGS64 =
|
|||||||
CXXFLAGS =
|
CXXFLAGS =
|
||||||
CXXFLAGS32 =
|
CXXFLAGS32 =
|
||||||
CXXFLAGS64 =
|
CXXFLAGS64 =
|
||||||
LINKFLAGS =
|
LINKFLAGS = -Wl,--allow-multiple-definition
|
||||||
LINKFLAGS32 =
|
LINKFLAGS32 =
|
||||||
LINKFLAGS64 =
|
LINKFLAGS64 =
|
||||||
STATICOPT_CC =
|
STATICOPT_CC =
|
||||||
@ -53,7 +55,7 @@ STATICOPT_CXX =
|
|||||||
STATICOPT_LINK = -static
|
STATICOPT_LINK = -static
|
||||||
SHAREDOPT_CC =
|
SHAREDOPT_CC =
|
||||||
SHAREDOPT_CXX =
|
SHAREDOPT_CXX =
|
||||||
SHAREDOPT_LINK =
|
SHAREDOPT_LINK = -shared
|
||||||
DEBUGOPT_CC = -g -D_DEBUG
|
DEBUGOPT_CC = -g -D_DEBUG
|
||||||
DEBUGOPT_CXX = -g -D_DEBUG
|
DEBUGOPT_CXX = -g -D_DEBUG
|
||||||
DEBUGOPT_LINK = -g
|
DEBUGOPT_LINK = -g
|
||||||
@ -64,9 +66,9 @@ RELEASEOPT_LINK = -O2
|
|||||||
#
|
#
|
||||||
# System Specific Flags
|
# System Specific Flags
|
||||||
#
|
#
|
||||||
SYSFLAGS = -mno-cygwin -D_WIN32 -DPOCO_NO_FPENVIRONMENT
|
SYSFLAGS = -mno-cygwin -D_WIN32 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DFoundation_Config_INCLUDED
|
||||||
|
|
||||||
#
|
#
|
||||||
# System Specific Libraries
|
# System Specific Libraries
|
||||||
#
|
#
|
||||||
SYSLIBS = -liphlpapi
|
SYSLIBS = -liphlpapi -lws2_32 -lssl -lcrypto -lws2_32 -lgdi32
|
||||||
|
@ -51,6 +51,10 @@ ifeq ($(findstring CYGWIN,$(POCO_HOST_OSNAME)),CYGWIN)
|
|||||||
POCO_HOST_OSNAME = CYGWIN
|
POCO_HOST_OSNAME = CYGWIN
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
|
||||||
|
POCO_HOST_OSNAME = MinGW
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# If POCO_CONFIG is not set, use the OS name as configuration name
|
# If POCO_CONFIG is not set, use the OS name as configuration name
|
||||||
#
|
#
|
||||||
@ -189,7 +193,7 @@ LIBRARY = -L$(LIBPATH) $(POCO_LIBRARY)
|
|||||||
ifeq ($(strip $(STRIP)),)
|
ifeq ($(strip $(STRIP)),)
|
||||||
STRIPCMD =
|
STRIPCMD =
|
||||||
else
|
else
|
||||||
STRIPCMD = $(STRIP) $@
|
STRIPCMD = $(STRIP) $@*
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
7
configure
vendored
7
configure
vendored
@ -72,11 +72,18 @@ while [ "$1" != "" ] ; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# autodetect build environment
|
||||||
|
# ...special cases for CYGWIN or MinGW
|
||||||
if [ "$config" = "" ] ; then
|
if [ "$config" = "" ] ; then
|
||||||
config=`uname`
|
config=`uname`
|
||||||
cyg=`expr $config : '\(CYGWIN\).*'`
|
cyg=`expr $config : '\(CYGWIN\).*'`
|
||||||
if [ "$cyg" = "CYGWIN" ] ; then
|
if [ "$cyg" = "CYGWIN" ] ; then
|
||||||
config=CYGWIN
|
config=CYGWIN
|
||||||
|
else
|
||||||
|
ming=`expr $config : '\(MINGW\).*'`
|
||||||
|
if [ "$ming" = "MINGW" ] ; then
|
||||||
|
config=MinGW
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user