#
# @(#)GNUmakefile	1.18 98/08/22
#
# Makefile for JDBC-ODBC Bridge Driver 
#
# Note - the native library for the bridge is linked with the 
# shared library for the ODBC driver manager.  
#

BUILDDIR = ../..
include $(BUILDDIR)/Platform.gmk
PACKAGE = sun.jdbc.odbc
LIBRARY = JdbcOdbc
PRODUCT = sun
include $(BUILDDIR)/makefiles/Defs.gmk

#
# Files
#
include $(MINCLUDES)sun_jdbc.jmk
include $(MINCLUDES)sun_jdbc.cmk

FILES_export = \
    sun/jdbc/odbc/JdbcOdbc.java 

#
# Rules
#
include $(BUILDDIR)/makefiles/Library.gmk

#
# The UNIX define specifies conditional compilation for UNIX
# The -xCC flag is need because the C code contains C++ style comments
#
CFLAGS += -DUNIX
ifneq ($(CC_VERSION),gcc)
CFLAGS += -xCC -w
endif

#
# The ODBC Driver Manager libs
#
_ODBCDIR = /java/jdk/src/jdbc-odbc/$(ARCH)
ODBCDIR = $(_ODBCDIR$(ALT_ODBCDIR))$(ALT_ODBCDIR)

LDFLAGS += -L$(ODBCDIR)/ISLIodbc/2.11/lib -lodbcinst -lodbc

#
# The native code for the bridge uses conditional compilation to 
# support Solaris, Win95 and Mac PPC. This is the path to the shared C files
# (which unfortunately are in the same directory as shared Java files).
#
vpath %.c $(SHARE_SRC)/classes/sun/jdbc/odbc

#
# Has been converted to the JNI: generate JNI-style header files
#
JAVAHFLAGS += -jni
