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