poco/Data/ODBC/Makefile

71 lines
1.9 KiB
Makefile
Raw Normal View History

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
INCLUDE += $(POCO_ODBC_INCLUDE)
SYSLIBS += $(POCO_ODBC_LIBRARY)
2012-04-29 20:52:25 +02:00
ifeq ($(POCO_CONFIG),MinGW)
# -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
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
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
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
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
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