~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libmysql/Makefile.am

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008 Sun Microsystems, Inc.
 
1
# Copyright (C) 2000-2004 MySQL AB
2
2
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of version 2 GNU General Public License as
13
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
14
# Library General Public License for more details.
15
15
16
 
# You should have received a copy of the GNU General Public License
17
 
# along with this program; if not, write to the Free Software
18
 
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 
20
 
 
21
 
 
22
 
 
23
 
libdrizzleclientincludedir = ${includedir}/libdrizzleclient
24
 
dist_libdrizzleclientinclude_HEADERS =  \
25
 
                                        get_password.h \
26
 
                                        drizzle.h \
27
 
                                        drizzle_data.h \
28
 
                                        drizzle_field.h \
29
 
                                        drizzle_methods.h \
30
 
                                        drizzle_parameters.h \
31
 
                                        drizzle_res.h \
32
 
                                        drizzle_rows.h \
33
 
                                        libdrizzle.h \
34
 
                                        errmsg.h \
35
 
                                        net_serv.h \
36
 
                                        options.h \
37
 
                                        pack.h \
38
 
                                        password.h \
39
 
                                        vio.h
40
 
 
41
 
lib_LTLIBRARIES = libdrizzleclient.la
42
 
libdrizzleclient_la_SOURCES = client.c \
43
 
                        drizzle.c \
44
 
                        drizzle_data.c \
45
 
                        errmsg.c \
46
 
                        get_password.c \
47
 
                        libdrizzle.c \
48
 
                        libdrizzle_priv.c \
49
 
                        local_infile.c \
50
 
                        net_serv.c \
51
 
                        pack.c \
52
 
                        password.c \
53
 
                        vio.c \
54
 
                        viosocket.c
55
 
 
56
 
libdrizzleclient_la_LDFLAGS = -version-info @SHARED_LIB_VERSION@ @LD_VERSION_SCRIPT@
57
 
libdrizzleclient_la_LIBADD = $(LIBZ)
58
 
 
59
 
noinst_HEADERS =        libdrizzle_priv.h \
60
 
                        local_infile.h
61
 
 
62
 
EXTRA_DIST =            libdrizzleclient.ver
63
 
CLEANFILES =            $(target_libadd) $(SHLIBOBJS) \
64
 
                        $(target) $(BUILT_SOURCES)
65
 
 
 
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
 
24
target_defs =   -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
 
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.%