~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
# Copyright (C) 2000-2006 MySQL AB
2
# 
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.
6
# 
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.
11
# 
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
15
16
#called from the top level Makefile
17
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) \
25
			$(libevent_includes)
26
SUBDIRS =		share
27
libexec_PROGRAMS =	mysqld
28
EXTRA_PROGRAMS =	gen_lex_hash
29
bin_PROGRAMS =		mysql_tzinfo_to_sql
30
DTRACE =                @DTRACE@
31
DTRACEFLAGS =           @DTRACEFLAGS@
32
DTRACEFILES =           handler.o \
33
			filesort.o \
34
			sql_insert.o \
35
			sql_delete.o \
36
			sql_select.o \
37
			sql_update.o
38
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
39
noinst_LTLIBRARIES = 
1 by brian
clean slate
40
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
41
SUPPORTING_LIBS =	$(top_builddir)/vio/libviolt.la \
28.1.3 by Monty Taylor
Fixed patch application so that the silly thing compiles. :)
42
			$(top_builddir)/mysys/libmysyslt.la \
28.1.2 by Monty Taylor
First stab at back porting libtool convenience lib patch from telco-6.2
43
			$(top_builddir)/dbug/libdbuglt.la \
44
			$(top_builddir)/strings/libmystringsextra.la \
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
45
			$(top_builddir)/strings/libmystringslt.la 
1 by brian
clean slate
46
mysqld_DEPENDENCIES=	@mysql_plugin_libs@ $(SUPPORTING_LIBS)
47
LDADD = $(SUPPORTING_LIBS) -lz -levent
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
48
mysqld_LDADD =		$(top_builddir)/sql-common/libsqlcommon.la \
49
			$(libevent_libs) \
1 by brian
clean slate
50
			@mysql_plugin_libs@ \
25 by Brian Aker
Clean up of configure.in
51
			$(LDADD)  $(CXXLDFLAGS) @LIBDL@
1 by brian
clean slate
52
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 \
60
			rpl_constants.h \
61
			opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \
62
			rpl_reporting.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 \
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
69
			tzfile.h \
1 by brian
clean slate
70
			tztime.h my_decimal.h\
71
			sql_array.h scheduler.h \
72
			sql_plugin.h \
73
			probes.h
74
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 \
79
			item_row.cc \
80
			field.cc strfunc.cc key.cc sql_class.cc sql_list.cc \
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
81
			protocol.cc sql_state.c \
1 by brian
clean slate
82
			lock.cc my_lock.c \
83
			sql_string.cc sql_manager.cc sql_map.cc \
30.1.2 by Monty Taylor
Somehow missed moving password.c. Duh.
84
			mysqld.cc hash_filo.cc \
1 by brian
clean slate
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 \
90
			sql_test.cc \
91
			log.cc init.cc derror.cc \
92
			unireg.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 \
98
			sql_udf.cc \
99
			slave.cc sql_repl.cc rpl_filter.cc rpl_tblmap.cc \
100
			rpl_utility.cc rpl_rli.cc rpl_mi.cc \
101
			rpl_reporting.cc \
102
                        sql_union.cc sql_derived.cc \
103
			sql_client.cc \
104
			stacktrace.c repl_failsafe.h repl_failsafe.cc \
105
			sql_olap.cc \
106
			tztime.cc my_decimal.cc\
107
			sql_plugin.cc sql_binlog.cc \
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
108
			sql_builtin.cc 
109
110
nodist_mysqld_SOURCES = client.c net_serv.c
1 by brian
clean slate
111
112
if HAVE_DTRACE
113
  mysqld_SOURCES += probes.d
114
endif
115
116
gen_lex_hash_SOURCES =	gen_lex_hash.cc
26 by Brian Aker
Removed dropped libs.
117
gen_lex_hash_LDFLAGS =  
1 by brian
clean slate
118
119
mysql_tzinfo_to_sql_SOURCES = tztime.cc
120
mysql_tzinfo_to_sql_CXXFLAGS= -DTZINFO2SQL
121
122
DEFS =			-DMYSQL_SERVER \
123
			-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
124
			-DDATADIR="\"$(MYSQLDATAdir)\"" \
125
			-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
126
			-DPLUGINDIR="\"$(pkgplugindir)\"" \
127
			@DEFS@
128
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) \
132
			message.mc \
133
			probes.d
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
134
CLEANFILES =        	lex_hash.h sql_yacc.output link_sources $(nodist_mysqld_SOURCES)
1 by brian
clean slate
135
DISTCLEANFILES =        $(EXTRA_PROGRAMS)
136
MAINTAINERCLEANFILES =  $(BUILT_MAINT_SRC)
137
AM_YFLAGS =		-d --verbose
138
139
# These are listed in 'nodist_mysqld_SOURCES'
140
link_sources:
141
	rm -f client.c
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
142
	@LN_CP_F@ $(top_srcdir)/libmysql/client.c client.c
143
	rm -f net_serv.c
144
	@LN_CP_F@ $(top_srcdir)/libmysql/net_serv.c net_serv.c
1 by brian
clean slate
145
	echo timestamp > link_sources
146
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
147
1 by brian
clean slate
148
# This generates lex_hash.h
149
# NOTE Built sources should depend on their sources not the tool
150
# this avoid the rebuild of the built files in a source dist
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
151
lex_hash.h: $(builddir)/gen_lex_hash$(EXEEXT) $(srcdir)/lex.h
152
		$(builddir)/gen_lex_hash$(EXEEXT) > $@
1 by brian
clean slate
153
154
probes.h: probes.d
155
	$(DTRACE) $(DTRACEFLAGS) -h -s probes.d
156
	mv probes.h probes.h.bak
157
	sed "s/#include <unistd.h>//g" probes.h.bak > probes.h
158
	rm probes.h.bak
159
160
SUFFIXES : .d
161
162
.d.o : $(DTRACEFILES)
163
	$(DTRACE) $(DTRACEFLAGS) -G -s $< $(DTRACEFILES)