1#
2#  Makefile.am
3#
4#  The iODBC driver manager.
5#
6#  Copyright (C) 1995 by Ke Jin <kejin@empress.com>
7#  Copyright (C) 1996-2006 by OpenLink Software <iodbc@openlinksw.com>
8#  All Rights Reserved.
9#
10#  This software is released under the terms of either of the following
11#  licenses:
12#
13#      - GNU Library General Public License (see LICENSE.LGPL)
14#      - The BSD License (see LICENSE.BSD).
15#
16#  Note that the only valid version of the LGPL license as far as this
17#  project is concerned is the original GNU Library General Public License
18#  Version 2, dated June 1991.
19#
20#  While not mandated by the BSD license, any patches you make to the
21#  iODBC source code may be contributed back into the iODBC project
22#  at your discretion. Contributions will benefit the Open Source and
23#  Data Access community as a whole. Submissions may be made at:
24#
25#      http://www.iodbc.org
26#
27#
28#  GNU Library Generic Public License Version 2
29#  ============================================
30#  This library is free software; you can redistribute it and/or
31#  modify it under the terms of the GNU Library General Public
32#  License as published by the Free Software Foundation; only
33#  Version 2 of the License dated June 1991.
34#
35#  This library is distributed in the hope that it will be useful,
36#  but WITHOUT ANY WARRANTY; without even the implied warranty of
37#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
38#  Library General Public License for more details.
39#
40#  You should have received a copy of the GNU Library General Public
41#  License along with this library; if not, write to the Free
42#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
43#
44#
45#  The BSD License
46#  ===============
47#  Redistribution and use in source and binary forms, with or without
48#  modification, are permitted provided that the following conditions
49#  are met:
50#
51#  1. Redistributions of source code must retain the above copyright
52#     notice, this list of conditions and the following disclaimer.
53#  2. Redistributions in binary form must reproduce the above copyright
54#     notice, this list of conditions and the following disclaimer in
55#     the documentation and/or other materials provided with the
56#     distribution.
57#  3. Neither the name of OpenLink Software Inc. nor the names of its
58#     contributors may be used to endorse or promote products derived
59#     from this software without specific prior written permission.
60#
61#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
62#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
63#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
64#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR
65#  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
66#  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
67#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
68#  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
69#  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
70#  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
71#  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
72#
73
74
75SUBDIRS			= trace .
76
77INCLUDES		= -I$(top_srcdir)/include -I$(top_srcdir)/iodbcinst
78
79lib_LTLIBRARIES		= libiodbc.la
80
81libiodbc_la_LDFLAGS	= -version-info @lib_version@ \
82	                  -export-symbols $(srcdir)/iodbc.exp
83libiodbc_la_LIBADD	= trace/libiodbctrace.la \
84			  ../iodbcinst/libiodbc_common.la \
85			  $(LIBADD_DL) $(LIBADD_OS)
86libiodbc_la_SOURCES	= catalog.c connect.c dlproc.c execute.c \
87			  fetch.c hdbc.c henv.c herr.c hstmt.c info.c \
88			  misc.c prepare.c result.c odbc3.c
89
90noinst_HEADERS		= dlproc.h hdbc.h henv.h herr.h iodbc_misc.h \
91			  hstmt.h itrace.h henv.ci herr.ci hdesc.h ithread.h
92			  
93
94if DARWIN
95libiodbc.la: $(libiodbc_la_OBJECTS) $(libiodbc_la_DEPENDENCIES)
96	$(LINK) -rpath $(libdir) $(libiodbc_la_LDFLAGS) $(libiodbc_la_OBJECTS) $(libiodbc_la_LIBADD) $(LIBS)
97	-$(STRIP) -s $(top_srcdir)/mac/iodbc.exp -u .libs/*.dylib
98endif
99
100EXTRA_DIST		= iodbc.def iodbc.exp main.c vmscompile.com \
101			  install_libodbc.sh
102
103
104#
105#  Add symbolic link for libodbc.so as some apps need this
106#
107install-exec-hook:
108if INSTALL_LIBODBC
109	$(SHELL) $(srcdir)/install_libodbc.sh $(DESTDIR)$(libdir)
110endif
111
112