~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
584.4.6 by Monty Taylor
Moved stuff into item/
26
SUBDIRS = util field item serialize functions functions/str functions/time .
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
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
37
AM_CPPFLAGS = ${GLOBAL_CPPFLAGS} ${EVENT_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 \
590.2.13 by Monty Taylor
Reverted libuuid check code.
70
	$(Z_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 \
584.4.6 by Monty Taylor
Moved stuff into item/
74
		 $(top_builddir)/drizzled/item/libitem.la \
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
75
		 $(top_builddir)/drizzled/field/libfield.la \
316 by Brian Aker
First pass of new sql_db.cc work
76
		 $(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)
77
		 $(top_builddir)/drizzled/functions/libfunctions.la \
574.3.2 by Lee
initial changes to break out item_strfunc into functions/str
78
		 $(top_builddir)/drizzled/functions/str/libstrfunc.la \
574.3.12 by Lee
initial work for moving functions from item_timefunc to functions/time directory
79
		 $(top_builddir)/drizzled/functions/time/libtimefunc.la \
520.9.3 by mordred
zomg. Solaris actually builds all the way!!!
80
		 $(top_builddir)/drizzled/util/libutil.la \
187 by Brian Aker
Fixed tab issue
81
		 $(libevent_libs) \
82
		 @mysql_plugin_libs@ \
318 by Brian Aker
Modified sql_db to now use Google Proto buffers instead of MySQL type.
83
		 -lprotobuf \
187 by Brian Aker
Fixed tab issue
84
		 $(LDADD) \
85
		 $(CXXLDFLAGS) \
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
86
		 $(LIBDL_LIBS) $(EVENT_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.
87
drizzled_DEPENDENCIES = @mysql_plugin_libs@
187 by Brian Aker
Fixed tab issue
88
412 by Brian Aker
Removed non-portable call.
89
drizzled_LDFLAGS =
139.1.8 by Stewart Smith
UDFs are now normal Item_func objects. Simplifies handling them a lot.
90
539 by Monty Taylor
Sorted file lists for headers and sources.
91
noinst_HEADERS = \
584.1.15 by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes.
92
		alter_column.h \
93
		alter_drop.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
94
		authentication.h \
95
		base.h \
584.4.10 by Monty Taylor
Broke out cached_item.
96
		cached_item.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
97
		client_settings.h \
98
		common_includes.h \
584.4.7 by Monty Taylor
Removed a big bank of includes from item.h.
99
		comp_creator.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
100
		configvar.h \
101
		connect.h \
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
102
		cost_vect.h \
520.6.7 by Monty Taylor
Moved a bunch of crap out of common_includes.
103
		data_home.h \
575.4.6 by Monty Taylor
Removed my_getwd.
104
		db.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
105
		definitions.h \
584.4.1 by Monty Taylor
Split out DTCollation.
106
		dtcollation.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
107
		errmsg.h \
108
		error_injection.h \
109
		field.h \
110
		field_iterator.h \
111
		filesort_info.h \
584.1.15 by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes.
112
		foreign_key.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
113
		gettext.h \
114
		global.h \
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
115
		ha_trx_info.h \
116
		ha_statistics.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
117
		handler.h \
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
118
		handler_structs.h \
584.4.2 by Monty Taylor
Split out hybrid_type_traits.
119
		hybrid_type.h \
120
		hybrid_type_traits.h \
121
		hybrid_type_traits_decimal.h \
122
		hybrid_type_traits_integer.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
123
	       	item.h \
584.1.15 by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes.
124
		key.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
125
                key_map.h \
584.1.15 by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes.
126
		key_part_spec.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
127
		lex.h \
128
		lex_symbol.h \
129
		log_event.h \
130
		logging.h \
131
		log.h \
132
		my_decimal.h\
584.4.4 by Monty Taylor
Split out Name_resolution_context.
133
		name_resolution_context.h \
134
		name_resolution_context_state.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
135
		opt_range.h \
136
		order.h \
137
		parser.h \
138
		probes.h \
139
		protocol.h \
140
		qcache.h \
561.1.3 by Monty Taylor
Split some more things out of common_includes.h.
141
		query_id.h \
575.4.7 by Monty Taylor
More header cleanup.
142
		rename.h \
143
		replication/binlog.h \
575.4.6 by Monty Taylor
Removed my_getwd.
144
		replication/constants.h \
145
		replication/filter.h \
146
		replication/mi.h \
147
		replication/record.h \
575.4.7 by Monty Taylor
More header cleanup.
148
		replication/replication.h \
575.4.6 by Monty Taylor
Removed my_getwd.
149
		replication/reporting.h \
150
		replication/rli.h \
151
		replication/tblmap.h \
152
		replication/utility.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
153
		scheduler.h \
154
		scheduling.h \
155
		server_includes.h \
584.1.15 by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes.
156
		session.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
157
		set_var.h \
158
		show.h \
159
		sj_tmp_table.h \
160
		slave.h \
161
		sql_alloc.h \
162
		sql_array.h \
575.4.7 by Monty Taylor
More header cleanup.
163
		sql_base.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
164
		sql_bitmap.h \
165
		sql_error.h \
166
		sql_lex.h \
167
		sql_list.h \
584.1.15 by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes.
168
		sql_load.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
169
		sql_locale.h \
170
		sql_parse.h \
171
		sql_plugin.h \
172
		sql_select.h \
173
		sql_sort.h \
174
		sql_state.h \
175
		sql_string.h \
176
		sql_table.h \
177
		sql_udf.h \
178
		stacktrace.h \
179
		structs.h \
180
		table.h \
181
		table_list.h \
182
		table_map_iterator.h \
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
183
		tableop_hooks.h \
539 by Monty Taylor
Sorted file lists for headers and sources.
184
		tmp_table.h \
185
		tzfile.h \
584.1.13 by Monty Taylor
Split out a little more code. Removed table_list.h from common_includes.
186
		tztime.h \
187
		virtual_column_info.h
187 by Brian Aker
Fixed tab issue
188
319 by Brian Aker
Fix (yuck!) for OSX/Google bug.
189
drizzled_SOURCES = \
539 by Monty Taylor
Sorted file lists for headers and sources.
190
		authentication.cc \
584.4.10 by Monty Taylor
Broke out cached_item.
191
		cached_item.cc \
584.1.15 by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes.
192
		comp_creator.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
193
		configvar.cc \
575.4.6 by Monty Taylor
Removed my_getwd.
194
		db.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
195
		discover.cc \
196
		drizzled.cc \
584.4.1 by Monty Taylor
Split out DTCollation.
197
		dtcollation.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
198
		errmsg.cc \
549 by Monty Taylor
Took gettext.h out of header files.
199
		error.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
200
		field.cc \
201
		field_conv.cc \
202
		field_iterator.cc \
203
		filesort.cc \
584.1.13 by Monty Taylor
Split out a little more code. Removed table_list.h from common_includes.
204
		ha_trx_info.cc \
584.4.2 by Monty Taylor
Split out hybrid_type_traits.
205
		hybrid_type_traits.cc \
206
		hybrid_type_traits_decimal.cc \
207
		hybrid_type_traits_integer.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
208
		init.cc \
209
		item.cc \
210
		key.cc \
211
                key_map.cc \
212
		lock.cc \
213
		log.cc \
214
		log_event.cc \
215
		logging.cc \
216
		mf_iocache.cc \
217
		my_decimal.cc\
584.4.4 by Monty Taylor
Split out Name_resolution_context.
218
		name_resolution_context_state.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
219
		natural_join_column.cc \
220
		opt_range.cc \
221
		opt_sum.cc \
222
		parser.cc \
223
		protocol.cc \
224
		qcache.cc \
561.1.3 by Monty Taylor
Split some more things out of common_includes.h.
225
		query_id.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
226
		records.cc \
575.4.7 by Monty Taylor
More header cleanup.
227
		rename.cc \
575.4.6 by Monty Taylor
Removed my_getwd.
228
		replication/binlog.cc \
229
		replication/filter.cc \
230
		replication/mi.cc \
231
		replication/record.cc \
232
		replication/replication.cc \
233
		replication/reporting.cc \
234
		replication/rli.cc \
235
		replication/tblmap.cc \
236
		replication/utility.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
237
		scheduler.cc \
238
                scheduling.cc \
584.1.15 by Monty Taylor
The mega-patch from hell. Renamed sql_class to session (since that's what it is) and removed it and field and table from common_includes.
239
		session.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
240
		set_var.cc \
575.4.7 by Monty Taylor
More header cleanup.
241
		show.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
242
		sj_tmp_table.cc \
243
		slave.cc \
244
		sql_base.cc \
542 by Monty Taylor
Cleaned up the last commit.
245
		sql_builtin.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
246
		sql_client.cc \
247
		sql_connect.cc \
248
		sql_delete.cc \
249
		sql_derived.cc \
250
		sql_error.cc \
251
		sql_handler.cc \
252
		sql_insert.cc \
253
		sql_lex.cc \
254
		sql_list.cc \
255
		sql_load.cc \
256
		sql_locale.cc \
257
		sql_olap.cc \
258
		sql_parse.cc \
259
		sql_plugin.cc \
260
		sql_select.cc \
261
		sql_state.cc \
262
		sql_string.cc \
263
		sql_table.cc \
264
		sql_udf.cc \
265
		sql_union.cc \
266
		sql_update.cc \
267
		stacktrace.cc \
268
		strfunc.cc \
269
		table.cc \
270
                table_map_iterator.cc \
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
271
		tableop_hooks.cc \
539 by Monty Taylor
Sorted file lists for headers and sources.
272
		thr_malloc.cc \
273
		time.cc \
274
		tmp_table.cc \
275
		tztime.cc \
276
		uniques.cc \
520.4.31 by Monty Taylor
Removed server_id from common_includes.
277
		unireg.cc \
584.1.13 by Monty Taylor
Split out a little more code. Removed table_list.h from common_includes.
278
		virtual_column_info.cc \
520.4.31 by Monty Taylor
Removed server_id from common_includes.
279
		xid.cc
187 by Brian Aker
Fixed tab issue
280
575.1.5 by Monty Taylor
Moved stuff to handlerton.cc
281
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.
282
libyacc_la_SOURCES = sql_yacc.yy
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
283
AM_YFLAGS = -p DRIZZLE -d --verbose
539 by Monty Taylor
Sorted file lists for headers and sources.
284
# 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.
285
# figure out how to turn it off.
286
libyacc_la_CXXFLAGS = ${AM_CXXFLAGS} -Wno-unused-macros
287
1 by brian
clean slate
288
289
if HAVE_DTRACE
187 by Brian Aker
Fixed tab issue
290
drizzled_SOURCES += probes.d
1 by brian
clean slate
291
endif
292
590.2.3 by Monty Taylor
Fixed search for lib and added lib reference variables.
293
gen_lex_hash_SOURCES= gen_lex_hash.cc
187 by Brian Aker
Fixed tab issue
294
590.2.3 by Monty Taylor
Fixed search for lib and added lib reference variables.
295
gen_lex_hash_LDFLAGS= 
187 by Brian Aker
Fixed tab issue
296
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
297
DEFS =-DDRIZZLE_SERVER \
298
      -DDEFAULT_DRIZZLE_HOME="\"$(MYSQLBASEdir)\"" \
187 by Brian Aker
Fixed tab issue
299
      -DDATADIR="\"$(MYSQLDATAdir)\"" \
300
      -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
301
      -DPLUGINDIR="\"$(pkgplugindir)\"" \
202.3.8 by Monty Taylor
Actually turn gettext on...
302
      -DLOCALEDIR=\"$(localedir)\" \
187 by Brian Aker
Fixed tab issue
303
      @DEFS@
304
492.1.7 by Monty Taylor
Moved test() to its own file.
305
if GCC_PCH
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
306
PCHHEADERS = \
307
		definitions.h.gch \
308
		handlerton.h.gch  \
575.4.7 by Monty Taylor
More header cleanup.
309
		sql_base.h.gch \
310
		sql_parse.h.gch \
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
311
		sql_plugin.h.gch
492.1.7 by Monty Taylor
Moved test() to its own file.
312
else
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
313
PCHHEADERS = 
492.1.7 by Monty Taylor
Moved test() to its own file.
314
endif
315
187 by Brian Aker
Fixed tab issue
316
BUILT_MAINT_SRC = sql_yacc.cc \
317
		  sql_yacc.h
318
319
BUILT_SOURCES = $(BUILT_MAINT_SRC) \
212.5.36 by Monty Taylor
Moved drizzle_version.
320
		lex_hash.h \
492.1.7 by Monty Taylor
Moved test() to its own file.
321
		$(PCHHEADERS)
187 by Brian Aker
Fixed tab issue
322
323
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.
324
	     drizzledumpslow \
187 by Brian Aker
Fixed tab issue
325
	     message.mc \
326
	     probes.d
327
328
CLEANFILES = lex_hash.h \
329
	     sql_yacc.output \
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
330
	     $(PCHHEADERS) \
187 by Brian Aker
Fixed tab issue
331
	     $(nodist_drizzled_SOURCES)
332
333
DISTCLEANFILES = $(EXTRA_PROGRAMS) \
334
		 $(BUILT_MAINT_SRC)
335
336
MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC)
337
1 by brian
clean slate
338
# This generates lex_hash.h
339
# NOTE Built sources should depend on their sources not the tool
340
# this avoid the rebuild of the built files in a source dist
187 by Brian Aker
Fixed tab issue
341
lex_hash.h: gen_lex_hash$(EXEEXT) \
342
	$(srcdir)/lex.h
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
343
	$(top_builddir)/drizzled/gen_lex_hash$(EXEEXT) > $@
187 by Brian Aker
Fixed tab issue
344
345
probes.h: probes.d
346
	$(DTRACE) $(DTRACEFLAGS) -h -s probes.d
347
	mv probes.h probes.h.bak
348
	sed "s/#include <unistd.h>//g" probes.h.bak > probes.h
349
	rm probes.h.bak
350
492.1.7 by Monty Taylor
Moved test() to its own file.
351
if GCC_PCH
352
%.h.gch: %.h
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
353
	$(CXXCOMPILE) -include config.h -Wno-unused-macros -c $<
492.1.7 by Monty Taylor
Moved test() to its own file.
354
endif
355
187 by Brian Aker
Fixed tab issue
356
SUFFIXES = .d
357
358
.d.o : $(DTRACEFILES)
359
	$(DTRACE) $(DTRACEFLAGS) -G -s $< $(DTRACEFILES)