Makefile.am 2.95 KB
Newer Older
1 2
# Copyright (C) 2005-2006 MySQL AB
#
3 4
# 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
5
# the Free Software Foundation; version 2 of the License.
6
#
7 8 9 10
# 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.
11
#
12 13
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
14
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
15

acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
16
#called from the top level Makefile
17

acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
18 19 20 21
MYSQLDATAdir =          $(localstatedir)
MYSQLSHAREdir =         $(pkgdatadir)
MYSQLBASEdir=           $(prefix)
MYSQLLIBdir=            $(pkglibdir)
22
pkgplugindir =		$(pkglibdir)/plugin
23
INCLUDES =              -I$(top_srcdir)/include -I$(top_builddir)/include \
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
24 25 26 27 28 29 30 31 32 33
			-I$(top_srcdir)/regex \
			-I$(top_srcdir)/sql \
                        -I$(srcdir) @ZLIB_INCLUDES@
WRAPLIBS=

LDADD =

DEFS =                  @DEFS@

noinst_HEADERS =	ha_archive.h azlib.h
34
noinst_PROGRAMS	=	archive_test archive_reader
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
35 36

EXTRA_LTLIBRARIES =	ha_archive.la
37 38
pkgplugin_LTLIBRARIES =	@plugin_archive_shared_target@
ha_archive_la_LDFLAGS =	-module -rpath $(pkgplugindir)
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52
ha_archive_la_CXXFLAGS=	$(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_archive_la_CFLAGS =	$(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_archive_la_SOURCES =	ha_archive.cc azio.c


EXTRA_LIBRARIES =	libarchive.a
noinst_LIBRARIES =	@plugin_archive_static_target@
libarchive_a_CXXFLAGS =	$(AM_CFLAGS)
libarchive_a_CFLAGS =	$(AM_CFLAGS)
libarchive_a_SOURCES =	ha_archive.cc azio.c


archive_test_SOURCES =	archive_test.c azio.c
archive_test_CFLAGS =	$(AM_CFLAGS)
53 54 55
archive_test_LDADD =	$(top_builddir)/mysys/libmysys.a \
			$(top_builddir)/dbug/libdbug.a \
			$(top_builddir)/strings/libmystrings.a \
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
56
			@ZLIB_LIBS@
57
archive_test_LDFLAGS = @NOINST_LDFLAGS@
acurtis@xiphis.org's avatar
acurtis@xiphis.org committed
58

59 60 61 62 63 64 65 66
archive_reader_SOURCES = archive_reader.c azio.c
archive_reader_CFLAGS =	$(AM_CFLAGS)
archive_reader_LDADD =	$(top_builddir)/mysys/libmysys.a \
			$(top_builddir)/dbug/libdbug.a \
			$(top_builddir)/strings/libmystrings.a \
			@ZLIB_LIBS@
archive_reader_LDFLAGS = @NOINST_LDFLAGS@

67

68
EXTRA_DIST =		CMakeLists.txt plug.in
69 70 71 72 73 74

if HAVE_DTRACE_DASH_G
libarchive_a_LIBADD = probes_mysql.o
libarchive_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = libarchive_a-ha_archive.o
75
DTRACEPROVIDER = probes_mysql.d
76 77 78

dtrace_files:
	echo $(DTRACEFILES) > $@
79
dtrace_providers: probes_mysql.d
80
	echo $(DTRACEPROVIDER) > $@
81
probes_mysql.d:
82
	-$(RM) -f probes_mysql.d
83
	$(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d
84 85
	echo timestamp > dtrace_sources

86
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
87
	$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
88 89
endif

90 91
# Don't update the files from bitkeeper
%::SCCS/s.%