diff options
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/Makefile.am | 72 | ||||
-rw-r--r-- | libmysqld/examples/Makefile.am | 2 |
2 files changed, 52 insertions, 22 deletions
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 5ec9cdfe5bf..62418c0d669 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -20,12 +20,14 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) +MYSQLLIBdir= $(libdir) DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ - -DSHAREDIR="\"$(MYSQLSHAREdir)\"" -INCLUDES= @bdb_includes@ \ + -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \ + -DLIBDIR="\"$(MYSQLLIBdir)\"" +INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \ -I$(top_srcdir)/regex \ @@ -37,17 +39,16 @@ SUBDIRS = . examples libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ my_time.c -sqlexamplessources = ha_example.cc ha_tina.cc noinst_HEADERS = embedded_priv.h emb_qcache.h sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ - ha_innodb.cc ha_berkeley.cc ha_heap.cc ha_federated.cc \ - ha_myisam.cc ha_myisammrg.cc handler.cc sql_handler.cc \ + ha_heap.cc ha_myisam.cc ha_myisammrg.cc handler.cc sql_handler.cc \ hostname.cc init.cc password.c \ item.cc item_buff.cc item_cmpfunc.cc item_create.cc \ item_func.cc item_strfunc.cc item_sum.cc item_timefunc.cc \ item_geofunc.cc item_uniq.cc item_subselect.cc item_row.cc\ + item_xmlfunc.cc \ key.cc lock.cc log.cc log_event.cc sql_state.c \ protocol.cc net_serv.cc opt_range.cc \ opt_sum.cc procedure.cc records.cc sql_acl.cc \ @@ -63,25 +64,53 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ spatial.cc gstream.cc sql_help.cc tztime.cc sql_cursor.cc \ sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ - ha_blackhole.cc ha_archive.cc my_user.c - -libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources) + event_executor.cc event.cc event_timed.cc \ + rpl_filter.cc sql_partition.cc handlerton.cc sql_plugin.cc \ + sql_tablespace.cc \ + rpl_injector.cc my_user.c + +libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) +EXTRA_libmysqld_a_SOURCES = ha_innodb.cc ha_berkeley.cc ha_archive.cc \ + ha_blackhole.cc ha_federated.cc ha_ndbcluster.cc \ + ha_ndbcluster_binlog.cc \ + ha_partition.cc +libmysqld_a_DEPENDENCIES= @mysql_se_objs@ libmysqld_a_SOURCES= +sqlstoragesources = $(EXTRA_libmysqld_a_SOURCES) + # automake misses these sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy # The following libraries should be included in libmysqld.a INC_LIB= $(top_builddir)/regex/libregex.a \ - $(top_builddir)/myisam/libmyisam.a \ - $(top_builddir)/myisammrg/libmyisammrg.a \ - $(top_builddir)/heap/libheap.a \ - @innodb_libs@ @bdb_libs_with_path@ \ + $(top_builddir)/storage/myisam/libmyisam.a \ + $(top_builddir)/storage/myisammrg/libmyisammrg.a \ + $(top_builddir)/storage/archive/libarchive.a \ + $(top_builddir)/storage/heap/libheap.a \ $(top_builddir)/mysys/libmysys.a \ $(top_builddir)/strings/libmystrings.a \ $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/vio/libvio.a - + $(top_builddir)/vio/libvio.a \ + @mysql_se_libs@ \ + @yassl_libs_with_path@ + + +# Storage engine specific compilation options + +ha_berkeley.o: ha_berkeley.cc + $(CXXCOMPILE) @bdb_includes@ $(LM_CFLAGS) -c $< + +ha_ndbcluster.o:ha_ndbcluster.cc + $(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $< + +ha_ndbcluster_binlog.o: ha_ndbcluster_binlog.cc + $(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $< + +# Until we can remove dependency on ha_ndbcluster.h +handler.o: handler.cc + $(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $< + # # To make it easy for the end user to use the embedded library we @@ -93,7 +122,7 @@ INC_LIB= $(top_builddir)/regex/libregex.a \ # need to add the same file twice to the library, so 'sort -u' save us # some time and spares unnecessary work. -libmysqld.a: libmysqld_int.a $(INC_LIB) +libmysqld.a: libmysqld_int.a $(INC_LIB) $(libmysqld_a_DEPENDENCIES) if DARWIN_MWCC mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` else @@ -102,10 +131,11 @@ else then \ $(libmysqld_a_AR) libmysqld.a libmysqld_int.a $(INC_LIB) ; \ else \ - for arc in ./libmysqld_int.a $(INC_LIB); do \ + (for arc in ./libmysqld_int.a $(INC_LIB); do \ arpath=`echo $$arc|sed 's|[^/]*$$||'`; \ - $(AR) t $$arc|sed "s|^|$$arpath|"; \ - done | sort -u | xargs $(AR) cq libmysqld.a ; \ + $(AR) t $$arc|xargs -n 1 find $$arpath -name; \ + $(AR) t $$arc|xargs -n 1 find `dirname $$arpath` -path \*/`basename $$arpath`/\* -name; \ + done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \ $(RANLIB) libmysqld.a ; \ fi endif @@ -129,16 +159,16 @@ link_sources: rm -f $$f; \ @LN_CP_F@ $(top_srcdir)/libmysql/$$f $$f; \ done; \ - for f in $(sqlexamplessources); do \ + for f in $(sqlstoragesources); do \ rm -f $$f; \ - @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \ + @LN_CP_F@ `find $(srcdir)/../sql -name $$f` $$f; \ done; \ rm -f client_settings.h; \ @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h clean-local: - rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlexamplessources) | sed "s;\.lo;.c;g"` \ + rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) | sed "s;\.lo;.c;g"` \ $(top_srcdir)/linked_libmysqld_sources; \ rm -f client_settings.h diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am index 414cf63b003..7ee8adfef80 100644 --- a/libmysqld/examples/Makefile.am +++ b/libmysqld/examples/Makefile.am @@ -36,7 +36,7 @@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir) \ -I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \ $(openssl_includes) $(yassl_includes) LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ $(yassl_libs) -LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @LIBDL@ $(CXXLDFLAGS) +LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @LIBDL@ $(CXXLDFLAGS) mysqltest_embedded_LINK = $(CXXLINK) mysqltest_embedded_SOURCES = mysqltest.c |