summaryrefslogtreecommitdiff
path: root/build_posix
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-07-15 17:39:37 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-07-15 17:39:37 +1000
commit4f79426e316b924a67a3e059854ef6c8a6b166ef (patch)
tree5fdb246a53c906971b7f4872acea6a042f55100c /build_posix
parentd703222b503a836ff8bc917676c9ad102e3f06a3 (diff)
downloadmongo-4f79426e316b924a67a3e059854ef6c8a6b166ef.tar.gz
Fix static linking of libraries with builtin extensions.
Diffstat (limited to 'build_posix')
-rw-r--r--build_posix/Make.base18
-rwxr-xr-xbuild_posix/makemake7
2 files changed, 20 insertions, 5 deletions
diff --git a/build_posix/Make.base b/build_posix/Make.base
index c2d0a39511f..af367e82c69 100644
--- a/build_posix/Make.base
+++ b/build_posix/Make.base
@@ -6,6 +6,15 @@ ACLOCAL_AMFLAGS = -I build_posix/aclocal
lib_LTLIBRARIES = libwiredtiger.la
LDADD = $(lib_LTLIBRARIES)
+# The LevelDB libraries prefer to include all of the objects in a single
+# library. Create a convenience library for them.
+if LEVELDB
+noinst_LTLIBRARIES = libwiredtiger_static.la
+endif
+
+# BEGIN SOURCES, maintained by makemake and dist/filelist
+# END SOURCES
+
bin_PROGRAMS = wt
wt_SOURCES =\
src/utilities/util_backup.c \
@@ -57,9 +66,6 @@ $(srcdir)/docs/index.html:
$(srcdir)/docs/man/man1/wt.1: $(srcdir)/docs/index.html
$(srcdir)/docs/man/man3/wiredtiger.3: $(srcdir)/docs/index.html
-clean-local:
- rm -rf WT_TEST
-
libwiredtiger_la_LIBADD =
if HAVE_BUILTIN_EXTENSION_SNAPPY
libwiredtiger_la_LIBADD += ext/compressors/snappy/libwiredtiger_snappy.la
@@ -67,3 +73,9 @@ endif
if HAVE_BUILTIN_EXTENSION_ZLIB
libwiredtiger_la_LIBADD += ext/compressors/zlib/libwiredtiger_zlib.la
endif
+
+libwiredtiger_static_la_LIBADD=$(libwiredtiger_la_LIBADD)
+libwiredtiger_static_la_SOURCES=$(libwiredtiger_la_SOURCES)
+
+clean-local:
+ rm -rf WT_TEST
diff --git a/build_posix/makemake b/build_posix/makemake
index 6623519f7e7..80a0807011a 100755
--- a/build_posix/makemake
+++ b/build_posix/makemake
@@ -20,8 +20,8 @@ END_CONDITIONAL
fi
done)
-# Write the rest of Make.base
-sed -n '/END SUBDIRS/,$p' Make.base
+# Write the rest of Make.base, up to SOURCES
+sed -n '/END SUBDIRS/,/BEGIN SOURCES/p' Make.base
echo
echo "libwiredtiger_la_LDFLAGS = -release @VERSION@"
@@ -29,4 +29,7 @@ echo "libwiredtiger_la_SOURCES=\\"
sed -e '/^[a-z]/! d' \
-e 's/.*/ & \\/' \
-e '$s/ \\$//' < ../dist/filelist
+
+# Write the rest of Make.base
+sed -n '/END SOURCES/,$p' Make.base
) > ../Makefile.am