mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +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
|
||||
|
||||
ifeq ($(POCO_CONFIG),MinGW)
|
||||
SYSLIBS += -lodbc32
|
||||
else
|
||||
ifeq (0, $(shell test -e /usr/lib/libodbc$(SHAREDLIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -lodbc -lodbcinst
|
||||
COMMONFLAGS += -DPOCO_UNIXODBC
|
||||
@ -25,6 +28,7 @@ else
|
||||
$(error No ODBC library found. Please install unixODBC or iODBC and try again)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
objects = Binder ConnectionHandle Connector EnvironmentHandle \
|
||||
Extractor ODBCMetaColumn ODBCException ODBCStatementImpl \
|
||||
|
@ -23,7 +23,7 @@ objects = ArchiveStrategy ASCIIEncoding AsyncChannel Base64Decoder Base64Encoder
|
||||
RegularExpression RefCountedObject Runnable RotateStrategy Condition \
|
||||
SHA1Engine Semaphore SharedLibrary SimpleFileChannel \
|
||||
SignalHandler SplitterChannel Stopwatch StreamChannel StreamConverter StreamCopier \
|
||||
StreamTokenizer String StringTokenizer SynchronizedObject SyslogChannel \
|
||||
StreamTokenizer String StringTokenizer SynchronizedObject \
|
||||
Task TaskManager TaskNotification TeeStream Hash HashStatistic \
|
||||
TemporaryFile TextConverter TextEncoding TextIterator Thread ThreadLocal \
|
||||
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_exec pcre_ord2utf8 pcre_newline pcre_fullinfo pcre_xclass
|
||||
|
||||
ifeq ($(POCO_CONFIG),MinGW)
|
||||
objects += EventLogChannel WindowsConsoleChannel
|
||||
else
|
||||
objects += SyslogChannel
|
||||
endif
|
||||
|
||||
target = PocoFoundation
|
||||
target_version = $(LIBVERSION)
|
||||
target_libs =
|
||||
|
@ -16,6 +16,10 @@ objects = AbstractConfiguration Application ConfigurationMapper \
|
||||
XMLConfiguration FilesystemConfiguration ServerApplication \
|
||||
Validator IntValidator RegExpValidator OptionCallback
|
||||
|
||||
ifeq ($(POCO_CONFIG),MinGW)
|
||||
objects += WinService
|
||||
endif
|
||||
|
||||
target = PocoUtil
|
||||
target_version = $(LIBVERSION)
|
||||
target_libs = PocoFoundation PocoXML
|
||||
|
@ -9,7 +9,7 @@
|
||||
#
|
||||
# General Settings
|
||||
#
|
||||
LINKMODE = SHARED
|
||||
LINKMODE = BOTH
|
||||
POCO_TARGET_OSNAME = MinGW
|
||||
POCO_TARGET_OSARCH = ia32
|
||||
|
||||
@ -36,24 +36,26 @@ MKDIR = mkdir -p
|
||||
SHAREDLIBEXT = .dll
|
||||
SHAREDLIBLINKEXT = .dll
|
||||
|
||||
BINEXT = .exe
|
||||
|
||||
#
|
||||
# Compiler and Linker Flags
|
||||
#
|
||||
CFLAGS =
|
||||
CFLAGS =
|
||||
CFLAGS32 =
|
||||
CFLAGS64 =
|
||||
CXXFLAGS =
|
||||
CXXFLAGS =
|
||||
CXXFLAGS32 =
|
||||
CXXFLAGS64 =
|
||||
LINKFLAGS =
|
||||
LINKFLAGS = -Wl,--allow-multiple-definition
|
||||
LINKFLAGS32 =
|
||||
LINKFLAGS64 =
|
||||
STATICOPT_CC =
|
||||
STATICOPT_CXX =
|
||||
STATICOPT_LINK = -static
|
||||
SHAREDOPT_CC =
|
||||
SHAREDOPT_CXX =
|
||||
SHAREDOPT_LINK =
|
||||
SHAREDOPT_CC =
|
||||
SHAREDOPT_CXX =
|
||||
SHAREDOPT_LINK = -shared
|
||||
DEBUGOPT_CC = -g -D_DEBUG
|
||||
DEBUGOPT_CXX = -g -D_DEBUG
|
||||
DEBUGOPT_LINK = -g
|
||||
@ -64,9 +66,9 @@ RELEASEOPT_LINK = -O2
|
||||
#
|
||||
# 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
|
||||
#
|
||||
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
|
||||
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
|
||||
#
|
||||
@ -189,7 +193,7 @@ LIBRARY = -L$(LIBPATH) $(POCO_LIBRARY)
|
||||
ifeq ($(strip $(STRIP)),)
|
||||
STRIPCMD =
|
||||
else
|
||||
STRIPCMD = $(STRIP) $@
|
||||
STRIPCMD = $(STRIP) $@*
|
||||
endif
|
||||
|
||||
#
|
||||
|
9
configure
vendored
9
configure
vendored
@ -72,12 +72,19 @@ while [ "$1" != "" ] ; do
|
||||
shift
|
||||
done
|
||||
|
||||
# autodetect build environment
|
||||
# ...special cases for CYGWIN or MinGW
|
||||
if [ "$config" = "" ] ; then
|
||||
config=`uname`
|
||||
cyg=`expr $config : '\(CYGWIN\).*'`
|
||||
if [ "$cyg" = "CYGWIN" ] ; then
|
||||
config=CYGWIN
|
||||
fi
|
||||
else
|
||||
ming=`expr $config : '\(MINGW\).*'`
|
||||
if [ "$ming" = "MINGW" ] ; then
|
||||
config=MinGW
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f "$base/build/config/$config" ] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user