2012-04-29 20:52:25 +02:00
|
|
|
#
|
|
|
|
# Makefile
|
|
|
|
#
|
|
|
|
# $Id: //poco/Main/Data/ODBC/Makefile#2 $
|
|
|
|
#
|
|
|
|
# Makefile for Poco ODBC
|
|
|
|
#
|
|
|
|
# For Unicode support, add following to COMMONFLAGS:
|
|
|
|
#
|
|
|
|
# -DUNICODE
|
|
|
|
#
|
|
|
|
# Unicode is supported only for UnixODBC
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(POCO_BASE)/build/rules/global
|
|
|
|
|
2012-07-10 05:58:41 +02:00
|
|
|
ifeq ($(LINKMODE),STATIC)
|
|
|
|
LIBLINKEXT = $(STATICLIBLINKEXT)
|
|
|
|
else
|
|
|
|
LIBLINKEXT = $(SHAREDLIBLINKEXT)
|
|
|
|
endif
|
2012-06-23 18:07:40 +02:00
|
|
|
|
2012-08-20 02:57:17 +02:00
|
|
|
INCLUDE += $(POCO_ODBC_INCLUDE)
|
|
|
|
SYSLIBS += $(POCO_ODBC_LIBRARY)
|
2012-06-23 18:07:40 +02:00
|
|
|
|
2012-04-29 20:52:25 +02:00
|
|
|
ifeq ($(POCO_CONFIG),MinGW)
|
2012-06-23 18:07:40 +02:00
|
|
|
# -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
|
2012-04-29 20:52:25 +02:00
|
|
|
else
|
2012-08-20 02:57:17 +02:00
|
|
|
ifeq (0, $(shell test -e $(POCO_ODBC_LIBRARY)/libodbc$(LIBLINKEXT); echo $$?))
|
2012-04-29 20:52:25 +02:00
|
|
|
SYSLIBS += -lodbc -lodbcinst
|
|
|
|
COMMONFLAGS += -DPOCO_UNIXODBC
|
|
|
|
else
|
2012-08-20 02:57:17 +02:00
|
|
|
ifeq (0, $(shell test -h $(POCO_ODBC_LIBRARY)/libodbc$(LIBLINKEXT); echo $$?))
|
2012-04-29 20:52:25 +02:00
|
|
|
SYSLIBS += -lodbc -lodbcinst
|
|
|
|
COMMONFLAGS += -DPOCO_UNIXODBC
|
|
|
|
else
|
2012-08-20 02:57:17 +02:00
|
|
|
ifeq (0, $(shell test -e $(POCO_ODBC_LIBRARY)/libiodbc$(LIBLINKEXT); echo $$?))
|
2012-04-29 20:52:25 +02:00
|
|
|
SYSLIBS += -liodbc -liodbcinst
|
|
|
|
COMMONFLAGS += -DPOCO_IODBC -I/usr/include/iodbc
|
|
|
|
else
|
2012-08-20 02:57:17 +02:00
|
|
|
ifeq (0, $(shell test -h $(POCO_ODBC_LIBRARY)/libiodbc$(LIBLINKEXT); echo $$?))
|
2012-04-29 20:52:25 +02:00
|
|
|
SYSLIBS += -liodbc -liodbcinst -I/usr/include/iodbc
|
|
|
|
COMMONFLAGS += -DPOCO_IODBC
|
|
|
|
else
|
2012-08-20 02:57:17 +02:00
|
|
|
ifndef (POCO_NO_ODBC)
|
|
|
|
$(warning No ODBC library found. Please install unixODBC or iODBC.)
|
|
|
|
endif
|
2012-04-29 20:52:25 +02:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
objects = Binder ConnectionHandle Connector EnvironmentHandle \
|
|
|
|
Extractor ODBCMetaColumn ODBCException ODBCStatementImpl \
|
|
|
|
Parameter Preparator SessionImpl TypeInfo Unicode Utility
|
|
|
|
|
|
|
|
target = PocoDataODBC
|
|
|
|
target_version = $(LIBVERSION)
|
|
|
|
target_libs = PocoData PocoFoundation
|
|
|
|
|
|
|
|
include $(POCO_BASE)/build/rules/lib
|