1
by brian
clean slate |
1 |
# Copyright (C) 2000-2004 MySQL AB
|
2 |
#
|
|
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.
|
|
6 |
#
|
|
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.
|
|
10 |
#
|
|
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.
|
|
15 |
#
|
|
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,
|
|
19 |
# MA 02111-1307, USA
|
|
20 |
#
|
|
21 |
# This file is public domain and comes with NO WARRANTY of any kind
|
|
22 |
||
23 |
target = libmysqlclient.la |
|
25
by Brian Aker
Clean up of configure.in |
24 |
target_defs = -DUNDEF_THREADS_HACK |
1
by brian
clean slate |
25 |
LIBS = @CLIENT_LIBS@ |
26 |
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -lz |
|
27 |
||
28 |
include $(srcdir)/Makefile.shared
|
|
29 |
||
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 |
|
35 |
||
36 |
link_sources: |
|
37 |
set -x; \ |
|
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"`; \ |
|
43 |
for f in $$ss; do \ |
|
44 |
rm -f $$f; \ |
|
45 |
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \ |
|
46 |
done; \ |
|
47 |
for f in $$vs $(vioheaders); do \ |
|
48 |
rm -f $$f; \ |
|
49 |
@LN_CP_F@ $(top_srcdir)/vio/$$f $$f; \ |
|
50 |
done; \ |
|
51 |
for f in $$scs; do \ |
|
52 |
rm -f $$f; \ |
|
53 |
@LN_CP_F@ $(top_srcdir)/sql-common/$$f $$f; \ |
|
54 |
done; \ |
|
55 |
for f in $(mystringsextra); do \ |
|
56 |
rm -f $$f; \ |
|
57 |
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \ |
|
58 |
done; \ |
|
59 |
for f in $$ds; do \ |
|
60 |
rm -f $$f; \ |
|
61 |
@LN_CP_F@ $(top_srcdir)/dbug/$$f $$f; \ |
|
62 |
done; \ |
|
63 |
for f in $$ms $(mysysheaders); do \ |
|
64 |
rm -f $$f; \ |
|
65 |
@LN_CP_F@ $(top_srcdir)/mysys/$$f $$f; \ |
|
66 |
done; \ |
|
67 |
rm -f net.c; \ |
|
68 |
@LN_CP_F@ $(top_srcdir)/sql/net_serv.cc net.c ; \ |
|
69 |
rm -f password.c; \ |
|
70 |
@LN_CP_F@ $(top_srcdir)/sql/password.c password.c |
|
71 |
echo timestamp > link_sources
|
|
72 |
||
73 |
# This part requires GNUmake
|
|
74 |
#
|
|
75 |
# This makes a distribution file with only the files needed to compile
|
|
76 |
# a minimal MySQL client library
|
|
77 |
#
|
|
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) |
|
87 |
||
88 |
do-lib-dist: |
|
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"; \ |
|
96 |
rm -rf $$dir; \ |
|
97 |
mkdir $$dir; \ |
|
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; \ |
|
109 |
cd $$dir; gmake |
|
110 |
||
111 |
# Don't update the files from bitkeeper
|
|
112 |
%::SCCS/s.% |