2010-05-05 09:35:38 +02:00
|
|
|
# Copyright (C) 2005-2006 MySQL AB, 2009 Sun Microsystems, Inc.
|
|
|
|
# All rights reserved.
|
2006-08-19 06:19:19 +02:00
|
|
|
# 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
|
2006-12-27 02:23:51 +01:00
|
|
|
# the Free Software Foundation; version 2 of the License.
|
2006-12-31 02:29:11 +01:00
|
|
|
#
|
2006-08-19 06:19:19 +02:00
|
|
|
# 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.
|
2006-12-31 02:29:11 +01:00
|
|
|
#
|
2006-08-19 06:19:19 +02:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
2006-12-31 02:29:11 +01:00
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2006-08-19 06:19:19 +02:00
|
|
|
|
|
|
|
#called from the top level Makefile
|
|
|
|
|
|
|
|
MYSQLDATAdir = $(localstatedir)
|
|
|
|
MYSQLSHAREdir = $(pkgdatadir)
|
|
|
|
MYSQLBASEdir= $(prefix)
|
|
|
|
MYSQLLIBdir= $(pkglibdir)
|
2008-01-02 14:00:46 +01:00
|
|
|
pkgplugindir = $(pkglibdir)/plugin
|
2006-08-19 06:19:19 +02:00
|
|
|
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
|
|
|
|
-I$(top_srcdir)/regex \
|
|
|
|
-I$(top_srcdir)/sql \
|
2010-05-05 09:35:38 +02:00
|
|
|
-I$(srcdir)
|
|
|
|
|
2006-08-19 06:19:19 +02:00
|
|
|
WRAPLIBS=
|
|
|
|
|
|
|
|
LDADD =
|
|
|
|
|
|
|
|
DEFS = @DEFS@
|
|
|
|
|
|
|
|
noinst_HEADERS = ha_federated.h
|
|
|
|
|
|
|
|
EXTRA_LTLIBRARIES = ha_federated.la
|
2007-12-19 14:24:43 +01:00
|
|
|
pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@
|
|
|
|
ha_federated_la_LDFLAGS = -module -rpath $(pkgplugindir)
|
2006-08-19 06:19:19 +02:00
|
|
|
ha_federated_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
|
|
|
|
ha_federated_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
|
|
|
|
ha_federated_la_SOURCES = ha_federated.cc
|
|
|
|
|
|
|
|
|
|
|
|
EXTRA_LIBRARIES = libfederated.a
|
|
|
|
noinst_LIBRARIES = @plugin_federated_static_target@
|
|
|
|
libfederated_a_CXXFLAGS = $(AM_CFLAGS)
|
|
|
|
libfederated_a_CFLAGS = $(AM_CFLAGS)
|
|
|
|
libfederated_a_SOURCES= ha_federated.cc
|
|
|
|
|
|
|
|
|
2006-09-19 04:31:08 +02:00
|
|
|
EXTRA_DIST = CMakeLists.txt plug.in
|
2008-12-20 11:01:41 +01:00
|
|
|
|
|
|
|
if HAVE_DTRACE_DASH_G
|
2010-05-05 09:35:38 +02:00
|
|
|
# The object for static and dynamic linking of federated differ
|
|
|
|
# For static linkage of federated to mysqld
|
|
|
|
|
2008-12-20 11:01:41 +01:00
|
|
|
libfederated_a_LIBADD = probes_mysql.o
|
|
|
|
libfederated_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
|
2010-05-05 09:35:38 +02:00
|
|
|
# For federated as shared library
|
|
|
|
ha_federated_la_LIBADD = probes_sh_mysql.o
|
|
|
|
# Hack: We "depend" on ".libs/" but have no rule for it,
|
|
|
|
# but it is created as a byproduct of the ".lo"
|
|
|
|
DTRACESHAREDDEPS = ha_federated_la-ha_federated.lo
|
|
|
|
DTRACESHAREDFILES = ha_federated_la-ha_federated.o
|
2009-02-20 23:11:09 +01:00
|
|
|
DTRACEPROVIDER = probes_mysql.d
|
2010-05-05 09:35:38 +02:00
|
|
|
ha_federated_la_DEPENDENCIES = probes_sh_mysql.o $(DTRACESHAREDDEPS) dtrace_providers
|
|
|
|
|
|
|
|
CLEANFILES = $(DTRACEPROVIDER) dtrace_files dtrace_providers $(DTRACESHAREDFILES)
|
|
|
|
DTRACEFILES = libfederated_a-ha_federated.o
|
2008-12-20 11:01:41 +01:00
|
|
|
|
|
|
|
dtrace_files:
|
|
|
|
echo $(DTRACEFILES) > $@
|
2009-02-21 21:32:46 +01:00
|
|
|
dtrace_providers: probes_mysql.d
|
2008-12-20 11:01:41 +01:00
|
|
|
echo $(DTRACEPROVIDER) > $@
|
2009-02-21 21:32:46 +01:00
|
|
|
probes_mysql.d:
|
2009-02-20 23:11:09 +01:00
|
|
|
-$(RM) -f probes_mysql.d
|
2009-03-18 11:04:15 +01:00
|
|
|
$(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d
|
2009-02-20 23:11:09 +01:00
|
|
|
echo timestamp > dtrace_sources
|
|
|
|
|
2010-05-05 09:35:38 +02:00
|
|
|
probes_sh_mysql.o: $(DTRACEPROVIDER) $(DTRACESHAREDDEPS)
|
|
|
|
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACESHAREDFILES) -o $@
|
|
|
|
$(CP) $(DTRACESHAREDFILES) .libs
|
2009-02-21 21:32:46 +01:00
|
|
|
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
|
2009-02-20 00:56:25 +01:00
|
|
|
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
|
2010-05-05 09:35:38 +02:00
|
|
|
|
2008-12-20 11:01:41 +01:00
|
|
|
endif
|