2010-04-26 18:23:20 +02:00
|
|
|
# Copyright (C) 2005-2006 MySQL AB, 2009 Sun Microsystems, Inc.
|
|
|
|
# All rights reserved.
|
2005-12-21 19:18:40 +01: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
|
|
|
#
|
2005-12-21 19:18:40 +01: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
|
|
|
#
|
2005-12-21 19:18:40 +01: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
|
2005-12-21 19:18:40 +01: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-04-29 18:33:34 +02:00
|
|
|
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
|
2005-12-21 19:18:40 +01:00
|
|
|
-I$(top_srcdir)/regex \
|
|
|
|
-I$(top_srcdir)/sql \
|
2010-04-26 18:23:20 +02:00
|
|
|
-I$(srcdir)
|
2005-12-21 19:18:40 +01:00
|
|
|
WRAPLIBS=
|
|
|
|
|
|
|
|
LDADD =
|
|
|
|
|
2006-04-13 22:49:29 +02:00
|
|
|
DEFS = @DEFS@
|
|
|
|
|
|
|
|
noinst_HEADERS = ha_example.h
|
|
|
|
|
|
|
|
EXTRA_LTLIBRARIES = ha_example.la
|
2007-12-19 14:24:43 +01:00
|
|
|
pkgplugin_LTLIBRARIES = @plugin_example_shared_target@
|
2009-11-02 21:05:42 +01:00
|
|
|
ha_example_la_LDFLAGS = -module -rpath $(pkgplugindir) -L$(top_builddir)/libservices -lmysqlservices
|
2010-07-09 13:37:51 +02:00
|
|
|
ha_example_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
|
2006-04-13 22:49:29 +02:00
|
|
|
ha_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
|
|
|
|
ha_example_la_SOURCES = ha_example.cc
|
|
|
|
|
|
|
|
|
|
|
|
EXTRA_LIBRARIES = libexample.a
|
|
|
|
noinst_LIBRARIES = @plugin_example_static_target@
|
2010-07-09 13:37:51 +02:00
|
|
|
libexample_a_CXXFLAGS = $(AM_CXXFLAGS)
|
2006-04-13 22:49:29 +02:00
|
|
|
libexample_a_CFLAGS = $(AM_CFLAGS)
|
|
|
|
libexample_a_SOURCES= ha_example.cc
|
|
|
|
|
2005-12-21 19:18:40 +01:00
|
|
|
|
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-04-26 18:23:20 +02:00
|
|
|
# The object for static and dynamic linking of example differ
|
|
|
|
# For static linkage of example to mysqld
|
|
|
|
# That's actually not needed as example is only dynamic loadable, but for completion
|
2008-12-20 11:01:41 +01:00
|
|
|
libexample_a_LIBADD = probes_mysql.o
|
2010-04-26 18:23:20 +02:00
|
|
|
libexample_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
|
|
|
|
# For example as shared library
|
|
|
|
ha_example_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_example_la-ha_example.lo
|
|
|
|
DTRACESHAREDFILES = ha_example_la-ha_example.o
|
2009-02-20 23:11:09 +01:00
|
|
|
DTRACEPROVIDER = probes_mysql.d
|
2010-04-26 18:23:20 +02:00
|
|
|
ha_example_la_DEPENDENCIES = probes_sh_mysql.o $(DTRACESHAREDDEPS) dtrace_providers
|
|
|
|
|
|
|
|
CLEANFILES = $(DTRACEPROVIDER) dtrace_files dtrace_providers $(DTRACESHAREDFILES)
|
|
|
|
DTRACEFILES = libexample_a-ha_example.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-04-26 18:23:20 +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-04-26 18:23:20 +02:00
|
|
|
|
2008-12-20 11:01:41 +01:00
|
|
|
endif
|