1
# Copyright (C) 2000-2004 MySQL AB
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of version 2 GNU General Public License as
5
# published by the Free Software Foundation.
7
# There are special exceptions to the terms and conditions of the GPL as it
8
# is applied to this software. View the full text of the exception in file
9
# EXCEPTIONS-CLIENT in the directory of this software distribution.
11
# This library is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
# Library General Public License for more details.
16
# You should have received a copy of the GNU Library General Public
17
# License along with this library; if not, write to the Free
18
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
21
# This file is public domain and comes with NO WARRANTY of any kind
23
target = libmysqlclient.la
24
target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
26
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -lz
28
include $(srcdir)/Makefile.shared
30
libmysqlclient_la_SOURCES = $(target_sources)
31
libmysqlclient_la_LIBADD = $(target_libadd)
32
libmysqlclient_la_LDFLAGS = $(target_ldflags)
33
EXTRA_DIST = Makefile.shared libmysql.def dll.c CMakeLists.txt
34
noinst_HEADERS = client_settings.h
38
ss=`echo $(mystringsobjects) | sed "s;\.lo;.c;g"`; \
39
ds=`echo $(dbugobjects) | sed "s;\.lo;.c;g"`; \
40
ms=`echo $(mysysobjects) | sed "s;\.lo;.c;g"`; \
41
vs=`echo $(vio_objects) | sed "s;\.lo;.c;g"`; \
42
scs=`echo $(sql_cmn_objects) | sed "s;\.lo;.c;g"`; \
45
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
47
for f in $$vs $(vioheaders); do \
49
@LN_CP_F@ $(top_srcdir)/vio/$$f $$f; \
53
@LN_CP_F@ $(top_srcdir)/sql-common/$$f $$f; \
55
for f in $(mystringsextra); do \
57
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
61
@LN_CP_F@ $(top_srcdir)/dbug/$$f $$f; \
63
for f in $$ms $(mysysheaders); do \
65
@LN_CP_F@ $(top_srcdir)/mysys/$$f $$f; \
68
@LN_CP_F@ $(top_srcdir)/sql/net_serv.cc net.c ; \
70
@LN_CP_F@ $(top_srcdir)/sql/password.c password.c
71
echo timestamp > link_sources
73
# This part requires GNUmake
75
# This makes a distribution file with only the files needed to compile
76
# a minimal MySQL client library
78
# A list of needed headers collected from the deps information 000213
79
nh = my_global.h config-win32.h dbug.h errmsg.h \
80
m_ctype.h m_string.h \
81
my_alarm.h my_config.h my_dir.h my_list.h my_net.h my_sys.h \
82
mysql.h mysql_com.h mysql_version.h mysqld_error.h \
83
mysys_err.h my_pthread.h thr_alarm.h violite.h hash.h \
84
sql_common.h ../libmysql/client_settings.h
85
# Get a list of the needed objects
86
lobjs = $(mysysobjects1) $(dbugobjects) $(mystringsobjects) $(sqlobjects)
89
dir=libmysql-$(MYSQL_NO_DASH_VERSION); \
90
srcs1=`echo $(lobjs) | sed "s;\.lo;.c;g"`; \
91
srcs2=$(target_sources); \
92
srcs="$$srcs1 $$srcs2"; \
93
objs1=`echo $(lobjs) | sed "s;\.lo;.o;g"`; \
94
objs2=`echo $(target_sources) | sed "s;\.c;.o;g"`; \
95
objs="$$objs1 $$objs2"; \
98
$(INSTALL_DATA) $$srcs $(mysysheaders) $$dir; \
99
for i in $(nh); do $(INSTALL_DATA) ../include/$$i $$dir; done; \
100
echo "# A very minimal Makefile to compile" > $$dir/Makefile; \
101
echo "# the minimized libmysql library" >> $$dir/Makefile; \
102
echo "# This file is autogenerated from Makefile.am" >> $$dir/Makefile; \
103
echo 'CFLAGS= -I. -DUNDEF_THREADS_HACK' >>$$dir/Makefile; \
104
echo "obj=$$objs" >>$$dir/Makefile; \
105
echo 'all: libmysql.a' >>$$dir/Makefile; \
106
echo 'libmysql.a: $$(obj)' >>$$dir/Makefile; \
107
echo ' $$(AR) r $$@ $$?' >>$$dir/Makefile; \
108
gtar cvzf $$dir.tar.gz $$dir; \
111
# Don't update the files from bitkeeper