1
# Copyright (C) 2000-2006 MySQL AB
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; version 2 of the License.
7
# This program is distributed in the hope that it will be useful,
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
# GNU General Public License for more details.
12
# You should have received a copy of the GNU General Public License
13
# along with this program; if not, write to the Free Software
14
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
#called from the top level Makefile
18
MYSQLDATAdir = $(localstatedir)
19
MYSQLSHAREdir = $(pkgdatadir)
20
MYSQLBASEdir= $(prefix)
21
MYSQLLIBdir= $(pkglibdir)
22
pkgplugindir = $(pkglibdir)/plugin
23
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
24
-I$(srcdir) $(openssl_includes) \
27
libexec_PROGRAMS = mysqld
28
EXTRA_PROGRAMS = gen_lex_hash
29
bin_PROGRAMS = mysql_tzinfo_to_sql
31
DTRACEFLAGS = @DTRACEFLAGS@
32
DTRACEFILES = handler.o \
41
SUPPORTING_LIBS = $(top_builddir)/vio/libvio.a \
42
$(top_builddir)/mysys/libmysys.a \
43
$(top_builddir)/dbug/libdbug.a \
44
$(top_builddir)/strings/libmystrings.a
45
mysqld_DEPENDENCIES= @mysql_plugin_libs@ $(SUPPORTING_LIBS)
46
LDADD = $(SUPPORTING_LIBS) -lz -levent
47
mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
48
@pstack_libs@ $(libevent_libs) \
50
$(LDADD) $(CXXLDFLAGS) @LIBDL@ \
53
noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
54
item_strfunc.h item_timefunc.h \
55
item_create.h item_subselect.h item_row.h \
56
mysql_priv.h sql_bitmap.h \
57
sql_class.h sql_lex.h sql_list.h \
58
sql_map.h sql_string.h unireg.h \
59
sql_error.h field.h handler.h mysqld_suffix.h \
61
opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \
63
log.h sql_show.h rpl_rli.h rpl_mi.h \
64
sql_select.h structs.h table.h sql_udf.h hash_filo.h \
65
lex.h lex_symbol.h sql_crypt.h \
66
sql_repl.h slave.h rpl_filter.h \
67
log_event.h rpl_record.h \
68
stacktrace.h sql_sort.h set_var.h \
69
client_settings.h tzfile.h \
70
tztime.h my_decimal.h\
71
sql_array.h scheduler.h \
75
mysqld_SOURCES = sql_lex.cc sql_handler.cc \
76
item.cc item_sum.cc item_buff.cc item_func.cc \
77
item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \
78
thr_malloc.cc item_create.cc item_subselect.cc \
80
field.cc strfunc.cc key.cc sql_class.cc sql_list.cc \
81
net_serv.cc protocol.cc sql_state.c \
83
sql_string.cc sql_manager.cc sql_map.cc \
84
mysqld.cc password.c hash_filo.cc \
85
sql_connect.cc scheduler.cc sql_parse.cc \
86
set_var.cc sql_yacc.yy \
87
sql_base.cc table.cc sql_select.cc sql_insert.cc \
88
sql_error.cc sql_locale.cc \
89
sql_update.cc sql_delete.cc uniques.cc \
91
log.cc init.cc derror.cc \
93
log_event.cc rpl_record.cc \
94
discover.cc time.cc opt_range.cc opt_sum.cc \
95
records.cc filesort.cc handler.cc \
96
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
97
sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
99
slave.cc sql_repl.cc rpl_filter.cc rpl_tblmap.cc \
100
rpl_utility.cc rpl_rli.cc rpl_mi.cc \
102
sql_union.cc sql_derived.cc \
104
stacktrace.c repl_failsafe.h repl_failsafe.cc \
106
tztime.cc my_decimal.cc\
107
sql_plugin.cc sql_binlog.cc \
111
mysqld_SOURCES += probes.d
114
nodist_mysqld_SOURCES = mini_client_errors.c pack.c client.c my_time.c
116
gen_lex_hash_SOURCES = gen_lex_hash.cc
117
gen_lex_hash_LDFLAGS = @NOINST_LDFLAGS@
119
mysql_tzinfo_to_sql_SOURCES = tztime.cc
120
mysql_tzinfo_to_sql_CXXFLAGS= -DTZINFO2SQL
122
DEFS = -DMYSQL_SERVER \
123
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
124
-DDATADIR="\"$(MYSQLDATAdir)\"" \
125
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
126
-DPLUGINDIR="\"$(pkgplugindir)\"" \
129
BUILT_MAINT_SRC = sql_yacc.cc sql_yacc.h
130
BUILT_SOURCES = $(BUILT_MAINT_SRC) lex_hash.h link_sources
131
EXTRA_DIST = $(BUILT_MAINT_SRC) \
134
CLEANFILES = lex_hash.h sql_yacc.output link_sources
135
DISTCLEANFILES = $(EXTRA_PROGRAMS)
136
MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC)
137
AM_YFLAGS = -d --verbose
139
# These are listed in 'nodist_mysqld_SOURCES'
141
rm -f mini_client_errors.c
142
@LN_CP_F@ $(top_srcdir)/libmysql/errmsg.c mini_client_errors.c
144
@LN_CP_F@ $(top_srcdir)/sql-common/pack.c pack.c
146
@LN_CP_F@ $(top_srcdir)/sql-common/client.c client.c
148
@LN_CP_F@ $(top_srcdir)/sql-common/my_time.c my_time.c
149
echo timestamp > link_sources
151
# This generates lex_hash.h
152
# NOTE Built sources should depend on their sources not the tool
153
# this avoid the rebuild of the built files in a source dist
154
lex_hash.h: gen_lex_hash.cc lex.h
155
$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
156
./gen_lex_hash$(EXEEXT) > $@-t
160
$(DTRACE) $(DTRACEFLAGS) -h -s probes.d
161
mv probes.h probes.h.bak
162
sed "s/#include <unistd.h>//g" probes.h.bak > probes.h
167
.d.o : $(DTRACEFILES)
168
$(DTRACE) $(DTRACEFLAGS) -G -s $< $(DTRACEFILES)
170
# Don't update the files from bitkeeper