Makefile revision 3767
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# This code is free software; you can redistribute it and/or modify it
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# under the terms of the GNU General Public License version 2 only, as
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# published by the Free Software Foundation. Oracle designates this
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# particular file as subject to the "Classpath" exception as provided
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# by Oracle in the LICENSE file that accompanied this code.
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# This code is distributed in the hope that it will be useful, but WITHOUT
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# version 2 for more details (a copy is included in the LICENSE file that
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# accompanied this code).
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# You should have received a copy of the GNU General Public License version
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# 2 along with this work; if not, write to the Free Software Foundation,
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# or visit www.oracle.com if you need additional information or have any
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# Makefile for JDBC-ODBC Bridge Driver
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# Note - the native library for the bridge may be linked with the
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# shared library for the ODBC driver manager. Or dummy libraries
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# may be used to just create libJdbcOdbc.so with a dependency on
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# Use fake libraries on Solaris and Linux just so the library we create has
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# a dependency on these two library names. (which are not part of the jdk)
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor # In jdk5 and jdk6, and on Solaris 32bit, we would have required that
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor # these two libraries exist at: $(ALT_ODBCDIR)/ISLIodbc/2.11/lib
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor # In jdk7, we just fake them out like we did on Linux in jdk5 and jdk6.
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor # If you wanted to use the real odbc libraries, change the value of
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor # ODBC_LIBRARY_LOCATION, and delete the variable assignments below.
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor # Tell linker to ignore missing externals when building this shared library.
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker nodefs
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor # Define a place to create the fake libraries and their names.
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor ODBC_FAKE_LIBRARIES = $(ODBC_LIBRARY_LOCATION)/libodbcinst.so $(ODBC_LIBRARY_LOCATION)/libodbc.so
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor # Make sure they get created early.
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# The UNIX define specifies conditional compilation for UNIX
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor LDFLAGS += -L$(ODBC_LIBRARY_LOCATION) -lodbcinst -lodbc
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# The native code for the bridge uses conditional compilation to
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# support Solaris, Win95 and Mac PPC. This is the path to the shared C files
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# (which unfortunately are in the same directory as shared Java files).
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylorvpath %.c $(CLOSED_SHARE_SRC)/classes/sun/jdbc/odbc
9e39c5ba00a55fa05777cc94b148296af305e135Bill Taylor# Rules to generate fake libraries
clean::
FILES_copy = \
FILES_mkdirs = \
FILES_copydirs = \
$(CLASSBINDIR) \
$(FILES_mkdirs)