mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
more linux build fixes/improvements
This commit is contained in:
parent
88c9eb9b6e
commit
bf4f148782
@ -16,6 +16,11 @@ include $(POCO_BASE)/build/rules/global
|
||||
|
||||
# adjust for the target system (usually '/usr/lib' or '/usr/local/lib')
|
||||
ODBCLIBDIR = /usr/lib$(LIB64SUFFIX)
|
||||
ifeq ($(LINKMODE),STATIC)
|
||||
LIBLINKEXT = $(STATICLIBLINKEXT)
|
||||
else
|
||||
LIBLINKEXT = $(SHAREDLIBLINKEXT)
|
||||
endif
|
||||
|
||||
INCLUDE += -I/usr/local/include -I/usr/include -I/usr/include/odbc -I/usr/local/include/odbc
|
||||
SYSLIBS += -L/usr/lib$(LIB64SUFFIX) -L/usr/local/lib$(LIB64SUFFIX) -L/usr/lib$(LIB64SUFFIX)/odbc -L/usr/local/lib$(LIB64SUFFIX)/odbc
|
||||
@ -31,19 +36,19 @@ CXXFLAGS += -DODBCVER=0x0300 -DNOMINMAX
|
||||
# CYGWIN platform has its own ODBC library in /lib/w32api
|
||||
SYSLIBS += -L/lib/w32api -lodbc32 -lodbccp32
|
||||
else
|
||||
ifeq (0, $(shell test -e /usr/lib/libodbc$(SHAREDLIBLINKEXT); echo $$?))
|
||||
ifeq (0, $(shell test -e $(ODBCLIBDIR)/libodbc$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -lodbc -lodbcinst
|
||||
COMMONFLAGS += -DPOCO_UNIXODBC
|
||||
else
|
||||
ifeq (0, $(shell test -h /usr/lib/libodbc$(SHAREDLIBLINKEXT); echo $$?))
|
||||
ifeq (0, $(shell test -h $(ODBCLIBDIR)/libodbc$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -lodbc -lodbcinst
|
||||
COMMONFLAGS += -DPOCO_UNIXODBC
|
||||
else
|
||||
ifeq (0, $(shell test -e /usr/lib/libiodbc$(SHAREDLIBLINKEXT); echo $$?))
|
||||
ifeq (0, $(shell test -e $(ODBCLIBDIR)/libiodbc$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -liodbc -liodbcinst
|
||||
COMMONFLAGS += -DPOCO_IODBC -I/usr/include/iodbc
|
||||
else
|
||||
ifeq (0, $(shell test -h /usr/lib/libiodbc$(SHAREDLIBLINKEXT); echo $$?))
|
||||
ifeq (0, $(shell test -h $(ODBCLIBDIR)/libiodbc$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -liodbc -liodbcinst -I/usr/include/iodbc
|
||||
COMMONFLAGS += -DPOCO_IODBC
|
||||
else
|
||||
|
@ -16,30 +16,53 @@ include $(POCO_BASE)/build/rules/global
|
||||
|
||||
# adjust for the target system (usually '/usr/lib' or '/usr/local/lib')
|
||||
ODBCLIBDIR = /usr/lib$(LIB64SUFFIX)
|
||||
ifeq ($(LINKMODE),STATIC)
|
||||
LIBLINKEXT = $(STATICLIBLINKEXT)
|
||||
else
|
||||
LIBLINKEXT = $(SHAREDLIBLINKEXT)
|
||||
endif
|
||||
|
||||
INCLUDE += -I/usr/local/include -I/usr/include -I/usr/include/odbc -I/usr/local/include/odbc
|
||||
SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/odbc -L/usr/lib$(LIB64SUFFIX)/odbc -L/usr/lib$(LIB64SUFFIX) -L/usr/local/lib$(LIB64SUFFIX)
|
||||
SYSLIBS += -L/usr/lib$(LIB64SUFFIX) -L/usr/local/lib$(LIB64SUFFIX) -L/usr/lib$(LIB64SUFFIX)/odbc -L/usr/local/lib$(LIB64SUFFIX)/odbc
|
||||
|
||||
ifeq ($(POCO_CONFIG),MinGW)
|
||||
# Lack of unixODBC or iODBC is not an error for MinGW platform since it uses Windows odbc32.lib
|
||||
# -DODBCVER=0x0300: SQLHandle declaration issue
|
||||
# -DNOMINMAX : MIN/MAX macros defined in windows conflict with libstdc++
|
||||
CXXFLAGS += -DODBCVER=0x0300 -DNOMINMAX
|
||||
else ifeq ($(POCO_CONFIG),CYGWIN)
|
||||
# -DODBCVER=0x0300: SQLHandle declaration issue
|
||||
# -DNOMINMAX : MIN/MAX macros defined in windows conflict with libstdc++
|
||||
CXXFLAGS += -DODBCVER=0x0300 -DNOMINMAX
|
||||
# CYGWIN platform has its own ODBC library in /lib/w32api
|
||||
SYSLIBS += -L/lib/w32api -lodbc32 -lodbccp32
|
||||
else
|
||||
ifeq (0, $(shell test -e /usr/lib/libodbc$(SHAREDLIBLINKEXT); echo $$?))
|
||||
ifeq (0, $(shell test -e $(ODBCLIBDIR)/libodbc$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -lodbc -lodbcinst
|
||||
COMMONFLAGS += -DPOCO_UNIXODBC
|
||||
else
|
||||
ifeq (0, $(shell test -e /usr/lib/libiodbc$(SHAREDLIBLINKEXT); echo $$?))
|
||||
ifeq (0, $(shell test -h $(ODBCLIBDIR)/libodbc$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -lodbc -lodbcinst
|
||||
COMMONFLAGS += -DPOCO_UNIXODBC
|
||||
else
|
||||
ifeq (0, $(shell test -e $(ODBCLIBDIR)/libiodbc$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -liodbc -liodbcinst
|
||||
COMMONFLAGS += -DPOCO_IODBC -I/usr/include/iodbc
|
||||
else
|
||||
ifeq (0, $(shell test -h $(ODBCLIBDIR)/libiodbc$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -liodbc -liodbcinst -I/usr/include/iodbc
|
||||
COMMONFLAGS += -DPOCO_IODBC
|
||||
else
|
||||
$(error No ODBC library found. Please install unixODBC or iODBC and try again)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
###########################################################################################################
|
||||
# Note: #
|
||||
# Do not change linking order or move this line up, these libs have to be linked in this order and last. #
|
||||
###########################################################################################################
|
||||
##################################################################################################
|
||||
# Note: #
|
||||
# Do not change linking order or move this line up, these libs have to be linked in this order. #
|
||||
##################################################################################################
|
||||
SYSLIBS += -lltdl -ldl
|
||||
|
||||
objects = ODBCTestSuite Driver \
|
||||
|
@ -10,5 +10,7 @@
|
||||
clean all: projects
|
||||
projects:
|
||||
$(MAKE) -f Makefile-Driver $(MAKECMDGOALS)
|
||||
ifneq ($(LINKMODE),STATIC)
|
||||
$(MAKE) -f Makefile-TestLibrary $(MAKECMDGOALS)
|
||||
endif
|
||||
$(MAKE) -f Makefile-TestApp $(MAKECMDGOALS)
|
||||
|
@ -162,6 +162,9 @@ else ifneq ($(DEBIANISH),)
|
||||
LIB64SUFFIX = $(if $(filter $(OSARCH),x86_64 sparc64 ppc64),/x86_64-linux-gnu,)
|
||||
endif
|
||||
|
||||
# Default static lib extension
|
||||
STATICLIBLINKEXT = .a
|
||||
|
||||
#
|
||||
# Find out current component
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user