~drizzle-trunk/drizzle/development

492.1.7 by Monty Taylor
Moved test() to its own file.
1
#  Copyright (C) 2008 Sun Microsystems
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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
1 by brian
clean slate
15
187 by Brian Aker
Fixed tab issue
16
MYSQLDATAdir =$(localstatedir)
17
18
MYSQLSHAREdir =$(pkgdatadir)
19
20
MYSQLBASEdir=$(prefix)
21
22
MYSQLLIBdir=            $(pkglibdir)
23
24
pkgplugindir =$(pkglibdir)/plugin
25
574.3.2 by Lee
initial changes to break out item_strfunc into functions/str
26
SUBDIRS = util field serialize functions functions/str .
187 by Brian Aker
Fixed tab issue
27
236.1.37 by Monty Taylor
Moved drizzled to sbin from libexec. (why, god, why?)
28
sbin_PROGRAMS =drizzled
187 by Brian Aker
Fixed tab issue
29
30
EXTRA_PROGRAMS =gen_lex_hash
31
32
bin_PROGRAMS =
33
202.1.6 by Monty Taylor
Added Makefile.am to server/field and build as libtool noinst lib.
34
bin_SCRIPTS = 	drizzledumpslow \
35
		drizzled_safe 
187 by Brian Aker
Fixed tab issue
36
573.1.1 by mozo at mozo
Fix build and indents
37
AM_CPPFLAGS = ${GLOBAL_CPPFLAGS} ${LIBEVENT_CPPFLAGS} ${PROTOBUF_CPPFLAGS}
236.1.14 by Monty Taylor
Merged build changes from Antony.
38
187 by Brian Aker
Fixed tab issue
39
DTRACE = @DTRACE@
40
41
DTRACEFLAGS = @DTRACEFLAGS@
42
43
DTRACEFILES = handler.o \
44
	      filesort.o \
539 by Monty Taylor
Sorted file lists for headers and sources.
45
	      sql_delete.o \
187 by Brian Aker
Fixed tab issue
46
	      sql_insert.o \
47
	      sql_select.o \
48
	      sql_update.o
49
236.1.38 by Monty Taylor
Fixed header install problem. The now install to the right places.
50
drizzledincludedir = ${includedir}/drizzled
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
51
dist_drizzledinclude_HEADERS =	common.h \
540 by Monty Taylor
Moved drizzle_com to drizzled/drizzle_common. Started splitting it up.
52
				error.h \
53
				korr.h \
520.4.30 by Monty Taylor
Moved LEX_STRING into drizzled/lex_string.h.
54
				lex_string.h \
236.1.38 by Monty Taylor
Fixed header install problem. The now install to the right places.
55
				plugin.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
56
				plugin_authentication.h \
57
				plugin_configvar.h \
58
				plugin_errmsg.h \
383.6.1 by Mark Atwood
add pluggable logging
59
				plugin_logging.h \
499.2.9 by Mark Atwood
fix mistakes
60
				plugin_qcache.h \
520.3.1 by Mark Atwood
add definitions of plugins for parser and for scheduling
61
				plugin_parser.h \
520.4.31 by Monty Taylor
Removed server_id from common_includes.
62
			 	plugin_scheduling.h \
63
				xid.h
212.5.10 by Monty Taylor
Moved drizzle/plugin*h to drizzled
64
511.2.5 by Monty Taylor
Moved sql_yacc.yy to it's own conv lib so we could give it its own CXXFLAGS.
65
noinst_LTLIBRARIES = libhandler.la libyacc.la
187 by Brian Aker
Fixed tab issue
66
383.1.48 by Monty Taylor
Got rid of libsqlcommon and some surious defines.
67
LDADD = $(top_builddir)/libdrizzle/libdrizzle.la \
264.1.3 by Monty Taylor
Removed libmysyslt.la, made mysys a noinst_ and made everything use it. It's
68
	$(top_builddir)/mysys/libmysys.la \
266.4.3 by Monty Taylor
Removed mystringslt conv lib and replaced it with a noinst lib.
69
	$(top_builddir)/mystrings/libmystrings.la \
264.1.4 by Monty Taylor
Added LIBINTL to libs needed.
70
	$(ZLIB_LIBS) $(LIBINTL)
187 by Brian Aker
Fixed tab issue
71
511.2.5 by Monty Taylor
Moved sql_yacc.yy to it's own conv lib so we could give it its own CXXFLAGS.
72
drizzled_LDADD = libhandler.la libyacc.la \
187 by Brian Aker
Fixed tab issue
73
		 $(top_builddir)/libdrizzle/libdrizzle.la \
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
74
		 $(top_builddir)/drizzled/field/libfield.la \
316 by Brian Aker
First pass of new sql_db.cc work
75
		 $(top_builddir)/drizzled/serialize/libserialize.la \
489.1.8 by Monty Taylor
Split out Item_int_func and Item_func from Item_func. (don't think too hard about the second one)
76
		 $(top_builddir)/drizzled/functions/libfunctions.la \
574.3.2 by Lee
initial changes to break out item_strfunc into functions/str
77
		 $(top_builddir)/drizzled/functions/str/libstrfunc.la \
520.9.3 by mordred
zomg. Solaris actually builds all the way!!!
78
		 $(top_builddir)/drizzled/util/libutil.la \
187 by Brian Aker
Fixed tab issue
79
		 $(libevent_libs) \
80
		 @mysql_plugin_libs@ \
318 by Brian Aker
Modified sql_db to now use Google Proto buffers instead of MySQL type.
81
		 -lprotobuf \
187 by Brian Aker
Fixed tab issue
82
		 $(LDADD) \
83
		 $(CXXLDFLAGS) \
573.1.1 by mozo at mozo
Fix build and indents
84
		 $(LIBDL_LIBS) $(LIBEVENT_LIBS) $(PROTOBUF_LIBS)
520.4.7 by Monty Taylor
Added deps to drizzled/Makefile.am so that if plugins are rebuilt, it causes a rebuild of the server.
85
drizzled_DEPENDENCIES = @mysql_plugin_libs@
187 by Brian Aker
Fixed tab issue
86
412 by Brian Aker
Removed non-portable call.
87
drizzled_LDFLAGS =
139.1.8 by Stewart Smith
UDFs are now normal Item_func objects. Simplifies handling them a lot.
88
539 by Monty Taylor
Sorted file lists for headers and sources.
89
noinst_HEADERS = \
90
		authentication.h \
91
		base.h \
92
		client_settings.h \
93
		common_includes.h \
94
		configvar.h \
95
		connect.h \
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
96
		cost_vect.h \
520.6.7 by Monty Taylor
Moved a bunch of crap out of common_includes.
97
		data_home.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
98
		definitions.h \
99
		errmsg.h \
100
		error_injection.h \
101
		field.h \
102
		field_iterator.h \
103
		filesort_info.h \
104
		gettext.h \
105
		global.h \
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
106
		ha_trx_info.h \
107
		ha_statistics.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
108
		handler.h \
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
109
		handler_structs.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
110
		item_cmpfunc.h \
111
		item_create.h \
112
		item_func.h \
113
	       	item.h \
114
		item_row.h \
115
		item_strfunc.h \
116
		item_subselect.h \
117
		item_sum.h \
118
		item_timefunc.h \
119
                key_map.h \
120
		lex.h \
121
		lex_symbol.h \
122
		log_event.h \
123
		logging.h \
124
		log.h \
125
		my_decimal.h\
126
		opt_range.h \
127
		order.h \
128
		parser.h \
129
		probes.h \
130
		protocol.h \
131
		qcache.h \
561.1.3 by Monty Taylor
Split some more things out of common_includes.h.
132
		query_id.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
133
		rpl_constants.h \
134
		rpl_filter.h \
135
		rpl_mi.h \
136
		rpl_record.h \
137
		rpl_reporting.h \
138
		rpl_rli.h \
139
		rpl_tblmap.h \
140
		rpl_utility.h \
141
		scheduler.h \
142
		scheduling.h \
143
		server_includes.h \
144
		set_var.h \
145
		show.h \
146
		sj_tmp_table.h \
147
		slave.h \
148
		sql_alloc.h \
149
		sql_array.h \
150
		sql_bitmap.h \
151
		sql_class.h \
152
		sql_error.h \
153
		sql_lex.h \
154
		sql_list.h \
155
		sql_locale.h \
156
		sql_parse.h \
157
		sql_plugin.h \
158
		sql_repl.h \
159
		sql_select.h \
160
		sql_show.h \
161
		sql_sort.h \
162
		sql_state.h \
163
		sql_string.h \
164
		sql_table.h \
165
		sql_udf.h \
166
		stacktrace.h \
167
		structs.h \
168
		table.h \
169
		table_list.h \
170
		table_map_iterator.h \
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
171
		tableop_hooks.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
172
		tmp_table.h \
173
		tzfile.h \
174
		tztime.h
187 by Brian Aker
Fixed tab issue
175
319 by Brian Aker
Fix (yuck!) for OSX/Google bug.
176
drizzled_SOURCES = \
539 by Monty Taylor
Sorted file lists for headers and sources.
177
		authentication.cc \
178
		configvar.cc \
179
		discover.cc \
180
		drizzled.cc \
181
		errmsg.cc \
549 by Monty Taylor
Took gettext.h out of header files.
182
		error.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
183
		field.cc \
184
		field_conv.cc \
185
		field_iterator.cc \
186
		filesort.cc \
187
		init.cc \
188
		item_buff.cc \
189
		item.cc \
190
		item_cmpfunc.cc \
191
		item_create.cc \
192
		item_func.cc \
193
		item_row.cc \
194
		item_strfunc.cc \
195
		item_subselect.cc \
196
		item_sum.cc \
197
		item_timefunc.cc \
198
		key.cc \
199
                key_map.cc \
200
		lock.cc \
201
		log.cc \
202
		log_event.cc \
203
		logging.cc \
204
		mf_iocache.cc \
205
		my_decimal.cc\
206
		natural_join_column.cc \
207
		opt_range.cc \
208
		opt_sum.cc \
209
		parser.cc \
210
		protocol.cc \
211
		qcache.cc \
561.1.3 by Monty Taylor
Split some more things out of common_includes.h.
212
		query_id.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
213
		records.cc \
214
		rpl_filter.cc \
215
		rpl_mi.cc \
216
		rpl_record.cc \
217
		rpl_reporting.cc \
218
		rpl_rli.cc \
219
		rpl_tblmap.cc \
220
		rpl_utility.cc \
221
		scheduler.cc \
222
                scheduling.cc \
223
		set_var.cc \
224
		sj_tmp_table.cc \
225
		slave.cc \
226
		sql_base.cc \
227
		sql_binlog.cc \
542 by Monty Taylor
Cleaned up the last commit.
228
		sql_builtin.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
229
		sql_class.cc \
230
		sql_client.cc \
231
		sql_connect.cc \
232
		sql_db.cc \
233
		sql_delete.cc \
234
		sql_derived.cc \
235
		sql_error.cc \
236
		sql_handler.cc \
237
		sql_insert.cc \
238
		sql_lex.cc \
239
		sql_list.cc \
240
		sql_load.cc \
241
		sql_locale.cc \
242
		sql_olap.cc \
243
		sql_parse.cc \
244
		sql_plugin.cc \
245
		sql_rename.cc \
246
		sql_repl.cc \
247
		sql_select.cc \
248
		sql_show.cc \
249
		sql_state.cc \
250
		sql_string.cc \
251
		sql_table.cc \
252
		sql_udf.cc \
253
		sql_union.cc \
254
		sql_update.cc \
255
		stacktrace.cc \
256
		strfunc.cc \
257
		table.cc \
258
                table_map_iterator.cc \
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
259
		tableop_hooks.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
260
		thr_malloc.cc \
261
		time.cc \
262
		tmp_table.cc \
263
		tztime.cc \
264
		uniques.cc \
520.4.31 by Monty Taylor
Removed server_id from common_includes.
265
		unireg.cc \
266
		xid.cc
187 by Brian Aker
Fixed tab issue
267
575.1.5 by Monty Taylor
Moved stuff to handlerton.cc
268
libhandler_la_SOURCES = handler.cc handlerton.cc
511.2.5 by Monty Taylor
Moved sql_yacc.yy to it's own conv lib so we could give it its own CXXFLAGS.
269
libyacc_la_SOURCES = sql_yacc.yy
539 by Monty Taylor
Sorted file lists for headers and sources.
270
# Code output from YACC contains GOBS of unused macros, and I can't
511.2.5 by Monty Taylor
Moved sql_yacc.yy to it's own conv lib so we could give it its own CXXFLAGS.
271
# figure out how to turn it off.
272
libyacc_la_CXXFLAGS = ${AM_CXXFLAGS} -Wno-unused-macros
273
1 by brian
clean slate
274
275
if HAVE_DTRACE
187 by Brian Aker
Fixed tab issue
276
drizzled_SOURCES += probes.d
1 by brian
clean slate
277
endif
278
187 by Brian Aker
Fixed tab issue
279
gen_lex_hash_SOURCES =gen_lex_hash.cc
280
281
gen_lex_hash_LDFLAGS =  
282
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
283
DEFS =-DDRIZZLE_SERVER \
284
      -DDEFAULT_DRIZZLE_HOME="\"$(MYSQLBASEdir)\"" \
187 by Brian Aker
Fixed tab issue
285
      -DDATADIR="\"$(MYSQLDATAdir)\"" \
286
      -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
287
      -DPLUGINDIR="\"$(pkgplugindir)\"" \
202.3.8 by Monty Taylor
Actually turn gettext on...
288
      -DLOCALEDIR=\"$(localedir)\" \
187 by Brian Aker
Fixed tab issue
289
      @DEFS@
290
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
291
#		server_includes.h.gch
492.1.7 by Monty Taylor
Moved test() to its own file.
292
if GCC_PCH
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
293
PCHHEADERS = \
294
		definitions.h.gch \
295
		handlerton.h.gch  \
296
		sql_plugin.h.gch
492.1.7 by Monty Taylor
Moved test() to its own file.
297
else
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
298
PCHHEADERS = 
492.1.7 by Monty Taylor
Moved test() to its own file.
299
endif
300
187 by Brian Aker
Fixed tab issue
301
BUILT_MAINT_SRC = sql_yacc.cc \
302
		  sql_yacc.h
303
304
BUILT_SOURCES = $(BUILT_MAINT_SRC) \
212.5.36 by Monty Taylor
Moved drizzle_version.
305
		lex_hash.h \
492.1.7 by Monty Taylor
Moved test() to its own file.
306
		$(PCHHEADERS)
187 by Brian Aker
Fixed tab issue
307
308
EXTRA_DIST = $(BUILT_MAINT_SRC) \
312.1.14 by Monty Taylor
Fixed bug#257694 - added various files to EXTRA_DIST and noinst_HEADERS to make make distcheck (and with-it out-of-tree builds) work.
309
	     drizzledumpslow \
187 by Brian Aker
Fixed tab issue
310
	     message.mc \
311
	     probes.d
312
313
CLEANFILES = lex_hash.h \
314
	     sql_yacc.output \
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
315
	     $(PCHHEADERS) \
187 by Brian Aker
Fixed tab issue
316
	     $(nodist_drizzled_SOURCES)
317
318
DISTCLEANFILES = $(EXTRA_PROGRAMS) \
319
		 $(BUILT_MAINT_SRC)
320
321
MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC)
322
323
AM_YFLAGS = -d --verbose
1 by brian
clean slate
324
212.5.36 by Monty Taylor
Moved drizzle_version.
325
1 by brian
clean slate
326
# This generates lex_hash.h
327
# NOTE Built sources should depend on their sources not the tool
328
# this avoid the rebuild of the built files in a source dist
187 by Brian Aker
Fixed tab issue
329
lex_hash.h: gen_lex_hash$(EXEEXT) \
330
	$(srcdir)/lex.h
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
331
	$(top_builddir)/drizzled/gen_lex_hash$(EXEEXT) > $@
187 by Brian Aker
Fixed tab issue
332
333
probes.h: probes.d
334
	$(DTRACE) $(DTRACEFLAGS) -h -s probes.d
335
	mv probes.h probes.h.bak
336
	sed "s/#include <unistd.h>//g" probes.h.bak > probes.h
337
	rm probes.h.bak
338
492.1.7 by Monty Taylor
Moved test() to its own file.
339
if GCC_PCH
340
%.h.gch: %.h
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
341
	$(CXXCOMPILE) -include config.h -Wno-unused-macros -c $<
492.1.7 by Monty Taylor
Moved test() to its own file.
342
endif
343
187 by Brian Aker
Fixed tab issue
344
SUFFIXES = .d
345
346
.d.o : $(DTRACEFILES)
347
	$(DTRACE) $(DTRACEFLAGS) -G -s $< $(DTRACEFILES)