Makefile.am 7.14 KB
Newer Older
bk@work.mysql.com's avatar
bk@work.mysql.com committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

#called from the top level Makefile

MYSQLDATAdir =		$(localstatedir)
MYSQLSHAREdir =		$(pkgdatadir)
MYSQLBASEdir=		$(prefix)
22
MYSQLLIBdir=            $(pkglibdir)
23
INCLUDES =		@ZLIB_INCLUDES@ \
kent@mysql.com's avatar
kent@mysql.com committed
24
			-I$(top_builddir)/include -I$(top_srcdir)/include \
25
			-I$(top_srcdir)/regex -I$(srcdir) \
26
                        $(openssl_includes)
bk@work.mysql.com's avatar
bk@work.mysql.com committed
27 28 29 30
WRAPLIBS=		@WRAPLIBS@
SUBDIRS =		share
libexec_PROGRAMS =	mysqld
noinst_PROGRAMS =	gen_lex_hash
31
bin_PROGRAMS =		mysql_tzinfo_to_sql
32
gen_lex_hash_LDFLAGS =  @NOINST_LDFLAGS@
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
33
LDADD =			$(top_builddir)/vio/libvio.a \
34 35 36
			$(top_builddir)/mysys/libmysys.a \
			$(top_builddir)/dbug/libdbug.a \
			$(top_builddir)/regex/libregex.a \
37
			$(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
38
mysqld_DEPENDENCIES=	@mysql_plugin_libs@ $(LDADD)
39
mysqld_LDADD =		@MYSQLD_EXTRA_LDFLAGS@ \
40
			@pstack_libs@ \
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
41
			@mysql_plugin_libs@ \
42 43
			$(LDADD)  $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \
                        @yassl_libs@ @openssl_libs@
bk@work.mysql.com's avatar
bk@work.mysql.com committed
44 45
noinst_HEADERS =	item.h item_func.h item_sum.h item_cmpfunc.h \
			item_strfunc.h item_timefunc.h item_uniq.h \
46
			item_xmlfunc.h \
47
			item_create.h item_subselect.h item_row.h \
48
			mysql_priv.h item_geofunc.h sql_bitmap.h \
bk@work.mysql.com's avatar
bk@work.mysql.com committed
49
			procedure.h sql_class.h sql_lex.h sql_list.h \
50
			sql_manager.h sql_map.h sql_string.h unireg.h \
51
			sql_error.h field.h handler.h mysqld_suffix.h \
52
			ha_heap.h ha_myisam.h ha_myisammrg.h ha_partition.h \
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
53 54
			ha_innodb.h  ha_berkeley.h ha_federated.h \
			ha_ndbcluster.h ha_ndbcluster_binlog.h \
55
			ha_ndbcluster_tables.h \
56
			opt_range.h protocol.h rpl_tblmap.h \
57
			log.h sql_show.h rpl_rli.h \
58
			sql_select.h structs.h table.h sql_udf.h hash_filo.h \
59
			lex.h lex_symbol.h sql_acl.h sql_crypt.h  \
lars@mysql.com's avatar
lars@mysql.com committed
60
			log_event.h sql_repl.h slave.h rpl_filter.h \
tomas@poseidon.ndb.mysql.com's avatar
tomas@poseidon.ndb.mysql.com committed
61
			rpl_injector.h \
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
62
			stacktrace.h sql_sort.h sql_cache.h set_var.h \
63
			spatial.h gstream.h client_settings.h tzfile.h \
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
64
			tztime.h my_decimal.h\
65
			sp_head.h sp_pcontext.h sp_rcontext.h sp.h sp_cache.h \
66
			parse_file.h sql_view.h	sql_trigger.h \
67
			sql_array.h sql_cursor.h events.h events_priv.h \
68
			sql_plugin.h authors.h sql_partition.h event_timed.h \
69 70
			partition_info.h partition_element.h event_scheduler.h \
			contributors.h
71
mysqld_SOURCES =	sql_lex.cc sql_handler.cc sql_partition.cc \
bk@work.mysql.com's avatar
bk@work.mysql.com committed
72 73
			item.cc item_sum.cc item_buff.cc item_func.cc \
			item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \
74
			thr_malloc.cc item_create.cc item_subselect.cc \
75
			item_row.cc item_geofunc.cc item_xmlfunc.cc \
76
			field.cc strfunc.cc key.cc sql_class.cc sql_list.cc \
77 78
			net_serv.cc protocol.cc sql_state.c \
			lock.cc my_lock.c \
79
			sql_string.cc sql_manager.cc sql_map.cc \
bk@work.mysql.com's avatar
bk@work.mysql.com committed
80
			mysqld.cc password.c hash_filo.cc hostname.cc \
81
			set_var.cc sql_parse.cc sql_yacc.yy \
bk@work.mysql.com's avatar
bk@work.mysql.com committed
82
			sql_base.cc table.cc sql_select.cc sql_insert.cc \
83
			sql_prepare.cc sql_error.cc sql_locale.cc \
84
			sql_update.cc sql_delete.cc uniques.cc sql_do.cc \
bk@work.mysql.com's avatar
bk@work.mysql.com committed
85
			procedure.cc item_uniq.cc sql_test.cc \
86
			log.cc log_event.cc init.cc derror.cc sql_acl.cc \
87
			unireg.cc des_key_file.cc \
88
			discover.cc time.cc opt_range.cc opt_sum.cc \
bk@work.mysql.com's avatar
bk@work.mysql.com committed
89
		   	records.cc filesort.cc handler.cc \
90
			ha_heap.cc ha_myisam.cc ha_myisammrg.cc \
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
91 92 93
			ha_partition.cc ha_innodb.cc ha_berkeley.cc \
			ha_federated.cc \
                        ha_ndbcluster.cc ha_ndbcluster_binlog.cc \
94
			sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
bk@work.mysql.com's avatar
bk@work.mysql.com committed
95 96
			sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
			sql_udf.cc sql_analyse.cc sql_analyse.h sql_cache.cc \
97
			slave.cc sql_repl.cc rpl_filter.cc rpl_tblmap.cc \
tomas@poseidon.ndb.mysql.com's avatar
tomas@poseidon.ndb.mysql.com committed
98
			rpl_injector.cc \
lars@mysql.com's avatar
lars@mysql.com committed
99
                        sql_union.cc sql_derived.cc \
100
			client.c sql_client.cc mini_client_errors.c pack.c\
101
			stacktrace.c repl_failsafe.h repl_failsafe.cc \
bell@sanja.is.com.ua's avatar
VIEW  
bell@sanja.is.com.ua committed
102
			sql_olap.cc sql_view.cc \
103
			gstream.cc spatial.cc sql_help.cc sql_cursor.cc \
104
			tztime.cc my_time.c my_user.c my_decimal.cc\
105
			sp_head.cc sp_pcontext.cc  sp_rcontext.cc sp.cc \
106
			sp_cache.cc parse_file.cc sql_trigger.cc \
107
                        event_scheduler.cc events.cc event_timed.cc \
108
			sql_plugin.cc sql_binlog.cc \
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
109 110 111
			sql_builtin.cc sql_tablespace.cc partition_info.cc


bk@work.mysql.com's avatar
bk@work.mysql.com committed
112 113
gen_lex_hash_SOURCES =	gen_lex_hash.cc
gen_lex_hash_LDADD =	$(LDADD) $(CXXLDFLAGS)
114
mysql_tzinfo_to_sql_SOURCES =   mysql_tzinfo_to_sql.cc
115
mysql_tzinfo_to_sql_LDADD =  @MYSQLD_EXTRA_LDFLAGS@ $(LDADD) $(CXXLDFLAGS)
bk@work.mysql.com's avatar
bk@work.mysql.com committed
116 117 118 119 120

DEFS =			-DMYSQL_SERVER \
			-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
			-DDATADIR="\"$(MYSQLDATAdir)\"" \
			-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
121
			-DLIBDIR="\"$(MYSQLLIBdir)\"" \
bk@work.mysql.com's avatar
bk@work.mysql.com committed
122
			@DEFS@
kent@mysql.com's avatar
kent@mysql.com committed
123 124

BUILT_SOURCES =		sql_yacc.cc sql_yacc.h lex_hash.h
knielsen@mysql.com's avatar
knielsen@mysql.com committed
125
EXTRA_DIST =		udf_example.cc $(BUILT_SOURCES) \
126
			nt_servc.cc nt_servc.h message.mc CMakeLists.txt
127
CLEANFILES =        	lex_hash.h sql_yacc.cc sql_yacc.h
128
AM_YFLAGS =		-d
bk@work.mysql.com's avatar
bk@work.mysql.com committed
129

130 131
mysql_tzinfo_to_sql.cc:
	rm -f mysql_tzinfo_to_sql.cc
kent@mysql.com's avatar
kent@mysql.com committed
132
	@LN_CP_F@ $(srcdir)/tztime.cc mysql_tzinfo_to_sql.cc
133 134

link_sources: mysql_tzinfo_to_sql.cc
bk@work.mysql.com's avatar
bk@work.mysql.com committed
135
	rm -f mini_client_errors.c
kent@mysql.com's avatar
kent@mysql.com committed
136
	@LN_CP_F@ $(top_srcdir)/libmysql/errmsg.c mini_client_errors.c
hf@deer.mysql.r18.ru's avatar
SCRUM  
hf@deer.mysql.r18.ru committed
137
	rm -f pack.c
kent@mysql.com's avatar
kent@mysql.com committed
138
	@LN_CP_F@ $(top_srcdir)/sql-common/pack.c pack.c
hf@deer.(none)'s avatar
hf@deer.(none) committed
139
	rm -f client.c
kent@mysql.com's avatar
kent@mysql.com committed
140
	@LN_CP_F@ $(top_srcdir)/sql-common/client.c client.c
141
	rm -f my_time.c
kent@mysql.com's avatar
kent@mysql.com committed
142
	@LN_CP_F@ $(top_srcdir)/sql-common/my_time.c my_time.c
143 144
	rm -f my_user.c
	@LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c
bk@work.mysql.com's avatar
bk@work.mysql.com committed
145

146 147
mysql_tzinfo_to_sql.o:	$(mysql_tzinfo_to_sql_SOURCES)
			$(CXXCOMPILE) -c $(INCLUDES) -DTZINFO2SQL $<
148

bk@work.mysql.com's avatar
bk@work.mysql.com committed
149 150 151 152 153 154
# Try to get better dependencies for the grammar. Othervise really bad
# things like different grammars for different pars of MySQL can
# happen if you are unlucky.
sql_yacc.cc:	sql_yacc.yy
sql_yacc.h:	sql_yacc.yy

155
sql_yacc.o:	sql_yacc.cc sql_yacc.h $(HEADERS)
156
		@echo "Note: The following compile may take a long time."
bk@work.mysql.com's avatar
bk@work.mysql.com committed
157 158 159
		@echo "If it fails, re-run configure with --with-low-memory"
		$(CXXCOMPILE) $(LM_CFLAGS) -c $<

kent@mysql.com's avatar
kent@mysql.com committed
160
lex_hash.h:	gen_lex_hash$(EXEEXT)
161
		./gen_lex_hash$(EXEEXT) > $@
bk@work.mysql.com's avatar
bk@work.mysql.com committed
162

acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
163
# the following three should eventually be moved out of this directory
164
ha_berkeley.o:	ha_berkeley.cc ha_berkeley.h
165
		$(CXXCOMPILE) $(LM_CFLAGS) -c $<
166 167 168 169

ha_ndbcluster.o:ha_ndbcluster.cc ha_ndbcluster.h
		$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<

tomas@poseidon.ndb.mysql.com's avatar
tomas@poseidon.ndb.mysql.com committed
170 171 172
ha_ndbcluster_binlog.o:ha_ndbcluster_binlog.cc ha_ndbcluster_binlog.h
		$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<

173 174 175 176
#Until we can get rid of dependencies on ha_ndbcluster.h
handler.o:	handler.cc ha_ndbcluster.h
		$(CXXCOMPILE) @ndbcluster_includes@ $(CXXFLAGS) -c $<

177 178 179 180 181
# For testing of udf_example.so
noinst_LTLIBRARIES= udf_example.la
udf_example_la_SOURCES= udf_example.cc
udf_example_la_LDFLAGS= -module -rpath $(pkglibdir)

182

183 184
# Don't update the files from bitkeeper
%::SCCS/s.%