~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
28.1.20 by Monty Taylor
Replaced INCLUDES with AM_CPPFLAGS.
23
AM_CPPFLAGS =		-I$(top_builddir)/include -I$(top_srcdir)/include \
1 by brian
clean slate
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 \
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
44
			$(top_builddir)/strings/libmystringslt.la 
1 by brian
clean slate
45
mysqld_DEPENDENCIES=	@mysql_plugin_libs@ $(SUPPORTING_LIBS)
46
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.
47
mysqld_LDADD =		$(top_builddir)/sql-common/libsqlcommon.la \
48
			$(libevent_libs) \
1 by brian
clean slate
49
			@mysql_plugin_libs@ \
25 by Brian Aker
Clean up of configure.in
50
			$(LDADD)  $(CXXLDFLAGS) @LIBDL@
1 by brian
clean slate
51
52
noinst_HEADERS =	item.h item_func.h item_sum.h item_cmpfunc.h \
53
			item_strfunc.h item_timefunc.h \
54
			item_create.h item_subselect.h item_row.h \
55
			mysql_priv.h sql_bitmap.h \
56
			sql_class.h sql_lex.h sql_list.h \
57
			sql_map.h sql_string.h unireg.h \
58
			sql_error.h field.h handler.h mysqld_suffix.h \
59
			rpl_constants.h \
60
			opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \
61
			rpl_reporting.h \
62
			log.h sql_show.h rpl_rli.h rpl_mi.h \
63
			sql_select.h structs.h table.h sql_udf.h hash_filo.h \
64
			lex.h lex_symbol.h sql_crypt.h  \
65
			sql_repl.h slave.h rpl_filter.h \
66
			log_event.h rpl_record.h \
67
			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.
68
			tzfile.h \
1 by brian
clean slate
69
			tztime.h my_decimal.h\
70
			sql_array.h scheduler.h \
71
			sql_plugin.h \
72
			probes.h
73
74
mysqld_SOURCES =	sql_lex.cc sql_handler.cc \
75
			item.cc item_sum.cc item_buff.cc item_func.cc \
76
			item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \
77
			thr_malloc.cc item_create.cc item_subselect.cc \
78
			item_row.cc \
79
			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.
80
			protocol.cc sql_state.c \
1 by brian
clean slate
81
			lock.cc my_lock.c \
82
			sql_string.cc sql_manager.cc sql_map.cc \
30.1.2 by Monty Taylor
Somehow missed moving password.c. Duh.
83
			mysqld.cc hash_filo.cc \
1 by brian
clean slate
84
			sql_connect.cc scheduler.cc sql_parse.cc \
85
			set_var.cc sql_yacc.yy \
86
			sql_base.cc table.cc sql_select.cc sql_insert.cc \
87
			sql_error.cc sql_locale.cc \
88
			sql_update.cc sql_delete.cc uniques.cc \
89
			sql_test.cc \
90
			log.cc init.cc derror.cc \
91
			unireg.cc \
92
			log_event.cc rpl_record.cc \
93
			discover.cc time.cc opt_range.cc opt_sum.cc \
94
		   	records.cc filesort.cc handler.cc \
95
			sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
96
			sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
97
			sql_udf.cc \
98
			slave.cc sql_repl.cc rpl_filter.cc rpl_tblmap.cc \
99
			rpl_utility.cc rpl_rli.cc rpl_mi.cc \
100
			rpl_reporting.cc \
101
                        sql_union.cc sql_derived.cc \
102
			sql_client.cc \
103
			stacktrace.c repl_failsafe.h repl_failsafe.cc \
104
			sql_olap.cc \
105
			tztime.cc my_decimal.cc\
106
			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.
107
			sql_builtin.cc 
108
109
nodist_mysqld_SOURCES = client.c net_serv.c
1 by brian
clean slate
110
111
if HAVE_DTRACE
112
  mysqld_SOURCES += probes.d
113
endif
114
115
gen_lex_hash_SOURCES =	gen_lex_hash.cc
26 by Brian Aker
Removed dropped libs.
116
gen_lex_hash_LDFLAGS =  
1 by brian
clean slate
117
118
mysql_tzinfo_to_sql_SOURCES = tztime.cc
119
mysql_tzinfo_to_sql_CXXFLAGS= -DTZINFO2SQL
120
121
DEFS =			-DMYSQL_SERVER \
122
			-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
123
			-DDATADIR="\"$(MYSQLDATAdir)\"" \
124
			-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
125
			-DPLUGINDIR="\"$(pkgplugindir)\"" \
126
			@DEFS@
127
128
BUILT_MAINT_SRC =	sql_yacc.cc sql_yacc.h
129
BUILT_SOURCES =		$(BUILT_MAINT_SRC) lex_hash.h link_sources
130
EXTRA_DIST =		$(BUILT_MAINT_SRC) \
131
			message.mc \
132
			probes.d
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
133
CLEANFILES =        	lex_hash.h sql_yacc.output link_sources $(nodist_mysqld_SOURCES)
1 by brian
clean slate
134
DISTCLEANFILES =        $(EXTRA_PROGRAMS)
135
MAINTAINERCLEANFILES =  $(BUILT_MAINT_SRC)
136
AM_YFLAGS =		-d --verbose
137
138
# These are listed in 'nodist_mysqld_SOURCES'
139
link_sources:
140
	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.
141
	@LN_CP_F@ $(top_srcdir)/libmysql/client.c client.c
142
	rm -f net_serv.c
143
	@LN_CP_F@ $(top_srcdir)/libmysql/net_serv.c net_serv.c
1 by brian
clean slate
144
	echo timestamp > link_sources
145
28.1.7 by Monty Taylor
Put errmsg.c in sql-common since it can be built only once and used twice.
146
1 by brian
clean slate
147
# This generates lex_hash.h
148
# NOTE Built sources should depend on their sources not the tool
149
# 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.
150
lex_hash.h: $(builddir)/gen_lex_hash$(EXEEXT) $(srcdir)/lex.h
151
		$(builddir)/gen_lex_hash$(EXEEXT) > $@
1 by brian
clean slate
152
153
probes.h: probes.d
154
	$(DTRACE) $(DTRACEFLAGS) -h -s probes.d
155
	mv probes.h probes.h.bak
156
	sed "s/#include <unistd.h>//g" probes.h.bak > probes.h
157
	rm probes.h.bak
158
159
SUFFIXES : .d
160
161
.d.o : $(DTRACEFILES)
162
	$(DTRACE) $(DTRACEFLAGS) -G -s $< $(DTRACEFILES)