2004-08-05 11:59:17 +02:00
|
|
|
# Copyright (C) 2000-2004 MySQL AB
|
2000-07-31 21:29:14 +02:00
|
|
|
#
|
2004-08-05 11:59:17 +02:00
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of version 2 GNU General Public License as
|
|
|
|
# published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# There are special exceptions to the terms and conditions of the GPL as it
|
|
|
|
# is applied to this software. View the full text of the exception in file
|
2004-08-05 17:05:11 +02:00
|
|
|
# EXCEPTIONS-CLIENT in the directory of this software distribution.
|
2000-07-31 21:29:14 +02:00
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Library General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Library General Public
|
|
|
|
# License along with this library; if not, write to the Free
|
|
|
|
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
|
|
|
# MA 02111-1307, USA
|
2004-08-05 11:59:17 +02:00
|
|
|
#
|
2000-07-31 21:29:14 +02:00
|
|
|
# This file is public domain and comes with NO WARRANTY of any kind
|
|
|
|
|
2002-07-23 17:31:22 +02:00
|
|
|
target = libmysqlclient.la
|
2003-05-31 12:15:46 +02:00
|
|
|
target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
|
2005-11-28 16:28:00 +01:00
|
|
|
LIBS = @CLIENT_LIBS@
|
2005-07-05 23:24:48 +02:00
|
|
|
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
2006-06-06 13:21:07 +02:00
|
|
|
$(openssl_includes) @ZLIB_INCLUDES@
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2000-08-18 20:49:31 +02:00
|
|
|
include $(srcdir)/Makefile.shared
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2000-08-18 20:49:31 +02:00
|
|
|
libmysqlclient_la_SOURCES = $(target_sources)
|
2006-04-03 12:07:18 +02:00
|
|
|
libmysqlclient_la_LIBADD = $(target_libadd) $(yassl_las)
|
2000-08-18 20:49:31 +02:00
|
|
|
libmysqlclient_la_LDFLAGS = $(target_ldflags)
|
2006-05-12 10:51:07 +02:00
|
|
|
EXTRA_DIST = Makefile.shared libmysql.def dll.c mytest.c CMakeLists.txt
|
2003-06-19 10:46:45 +02:00
|
|
|
noinst_HEADERS = client_settings.h
|
2000-07-31 21:29:14 +02:00
|
|
|
|
|
|
|
# This is called from the toplevel makefile
|
|
|
|
link_sources:
|
|
|
|
set -x; \
|
|
|
|
ss=`echo $(mystringsobjects) | sed "s;\.lo;.c;g"`; \
|
|
|
|
ds=`echo $(dbugobjects) | sed "s;\.lo;.c;g"`; \
|
|
|
|
ms=`echo $(mysysobjects) | sed "s;\.lo;.c;g"`; \
|
2001-06-09 05:26:59 +02:00
|
|
|
vs=`echo $(vio_objects) | sed "s;\.lo;.c;g"`; \
|
2003-04-23 16:37:33 +02:00
|
|
|
scs=`echo $(sql_cmn_objects) | sed "s;\.lo;.c;g"`; \
|
2000-07-31 21:29:14 +02:00
|
|
|
for f in $$ss; do \
|
2005-09-24 15:51:45 +02:00
|
|
|
rm -f $$f; \
|
|
|
|
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
|
2000-07-31 21:29:14 +02:00
|
|
|
done; \
|
2003-08-27 01:51:39 +02:00
|
|
|
for f in $$vs $(vioheaders); do \
|
2005-09-24 15:51:45 +02:00
|
|
|
rm -f $$f; \
|
|
|
|
@LN_CP_F@ $(top_srcdir)/vio/$$f $$f; \
|
2001-06-09 05:26:59 +02:00
|
|
|
done; \
|
2003-04-23 16:37:33 +02:00
|
|
|
for f in $$scs; do \
|
2005-09-24 15:51:45 +02:00
|
|
|
rm -f $$f; \
|
|
|
|
@LN_CP_F@ $(top_srcdir)/sql-common/$$f $$f; \
|
2003-04-23 16:37:33 +02:00
|
|
|
done; \
|
2000-07-31 21:29:14 +02:00
|
|
|
for f in $(mystringsextra); do \
|
2005-09-24 15:51:45 +02:00
|
|
|
rm -f $$f; \
|
|
|
|
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
|
2000-07-31 21:29:14 +02:00
|
|
|
done; \
|
|
|
|
for f in $$ds; do \
|
2005-09-24 15:51:45 +02:00
|
|
|
rm -f $$f; \
|
|
|
|
@LN_CP_F@ $(top_srcdir)/dbug/$$f $$f; \
|
2000-07-31 21:29:14 +02:00
|
|
|
done; \
|
|
|
|
for f in $$ms $(mysysheaders); do \
|
2005-09-24 15:51:45 +02:00
|
|
|
rm -f $$f; \
|
|
|
|
@LN_CP_F@ $(top_srcdir)/mysys/$$f $$f; \
|
2002-07-23 17:31:22 +02:00
|
|
|
done; \
|
2005-09-24 15:51:45 +02:00
|
|
|
rm -f net.c; \
|
|
|
|
@LN_CP_F@ $(top_srcdir)/sql/net_serv.cc net.c ; \
|
|
|
|
rm -f password.c; \
|
|
|
|
@LN_CP_F@ $(top_srcdir)/sql/password.c password.c
|
2000-07-31 21:29:14 +02:00
|
|
|
|
|
|
|
# This part requires GNUmake
|
|
|
|
#
|
|
|
|
# This makes a distribution file with only the files needed to compile
|
|
|
|
# a minimal MySQL client library
|
|
|
|
#
|
|
|
|
# For a really minimal distribution (without debugging code) we could
|
|
|
|
# keep only the stubs for safemalloc.c and debug.c
|
|
|
|
#
|
|
|
|
# A list of needed headers collected from the deps information 000213
|
2001-09-29 14:37:53 +02:00
|
|
|
nh = my_global.h config-win32.h dbug.h errmsg.h \
|
2000-07-31 21:29:14 +02:00
|
|
|
m_ctype.h m_string.h \
|
|
|
|
my_alarm.h my_config.h my_dir.h my_list.h my_net.h my_sys.h \
|
2001-09-29 14:37:53 +02:00
|
|
|
mysql.h mysql_com.h mysql_version.h mysqld_error.h \
|
2003-05-31 12:15:46 +02:00
|
|
|
mysys_err.h my_pthread.h thr_alarm.h violite.h hash.h \
|
|
|
|
sql_common.h ../libmysql/client_settings.h
|
2000-07-31 21:29:14 +02:00
|
|
|
# Get a list of the needed objects
|
2002-07-23 17:31:22 +02:00
|
|
|
lobjs = $(mysysobjects1) $(dbugobjects) $(mystringsobjects) $(sqlobjects)
|
2000-07-31 21:29:14 +02:00
|
|
|
|
|
|
|
do-lib-dist:
|
|
|
|
dir=libmysql-$(MYSQL_NO_DASH_VERSION); \
|
|
|
|
srcs1=`echo $(lobjs) | sed "s;\.lo;.c;g"`; \
|
2000-08-18 20:49:31 +02:00
|
|
|
srcs2=$(target_sources); \
|
2000-07-31 21:29:14 +02:00
|
|
|
srcs="$$srcs1 $$srcs2"; \
|
|
|
|
objs1=`echo $(lobjs) | sed "s;\.lo;.o;g"`; \
|
2000-08-18 20:49:31 +02:00
|
|
|
objs2=`echo $(target_sources) | sed "s;\.c;.o;g"`; \
|
2000-07-31 21:29:14 +02:00
|
|
|
objs="$$objs1 $$objs2"; \
|
|
|
|
rm -rf $$dir; \
|
|
|
|
mkdir $$dir; \
|
2001-02-02 02:49:04 +01:00
|
|
|
$(INSTALL_DATA) $$srcs $(mysysheaders) $$dir; \
|
|
|
|
for i in $(nh); do $(INSTALL_DATA) ../include/$$i $$dir; done; \
|
2000-07-31 21:29:14 +02:00
|
|
|
echo "# A very minimal Makefile to compile" > $$dir/Makefile; \
|
|
|
|
echo "# the minimized libmysql library" >> $$dir/Makefile; \
|
|
|
|
echo "# This file is autogenerated from Makefile.am" >> $$dir/Makefile; \
|
|
|
|
echo 'CFLAGS= -I. -DUNDEF_THREADS_HACK' >>$$dir/Makefile; \
|
|
|
|
echo "obj=$$objs" >>$$dir/Makefile; \
|
|
|
|
echo 'all: libmysql.a' >>$$dir/Makefile; \
|
|
|
|
echo 'libmysql.a: $$(obj)' >>$$dir/Makefile; \
|
|
|
|
echo ' $$(AR) r $$@ $$?' >>$$dir/Makefile; \
|
|
|
|
gtar cvzf $$dir.tar.gz $$dir; \
|
|
|
|
cd $$dir; gmake
|