Skip to content

Commit

Permalink
Clean up linker dependencies.
Browse files Browse the repository at this point in the history
Some things were needlessly linked.  Others were missing link
dependencies, but just happened to work.
  • Loading branch information
rescrv committed Feb 14, 2012
1 parent 999ab53 commit e80a956
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 34 deletions.
40 changes: 9 additions & 31 deletions Makefile.am
Expand Up @@ -115,6 +115,9 @@ libhyperspacehashing_la_SOURCES = \
libhyperspacehashing_la_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
$(CPPFLAGS)
libhyperspacehashing_la_LIBADD = \
-lcityhash \
-le

##################################### Tests ####################################

Expand All @@ -134,8 +137,6 @@ hyperspacehashing_test_bithacks_SOURCES = \
hyperspacehashing/test/bithacks.cc
hyperspacehashing_test_bithacks_LDADD = \
libhyperspacehashing.la \
$(HYPERSPACEHASHING_LDADD) \
$(COVERAGE_LDADD) \
$(GTEST_LIBS)
hyperspacehashing_test_bithacks_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
Expand All @@ -145,7 +146,6 @@ hyperspacehashing_test_cfloat_SOURCES = \
hyperspacehashing/test/cfloat.cc
hyperspacehashing_test_cfloat_LDADD = \
libhyperspacehashing.la \
$(HYPERSPACEHASHING_LDADD) \
$(COVERAGE_LDADD)
hyperspacehashing_test_cfloat_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
Expand All @@ -156,7 +156,6 @@ hyperspacehashing_test_mask_SOURCES = \
hyperspacehashing/test/mask.cc
hyperspacehashing_test_mask_LDADD = \
libhyperspacehashing.la \
$(HYPERSPACEHASHING_LDADD) \
$(COVERAGE_LDADD) \
$(GTEST_LIBS)
hyperspacehashing_test_mask_CPPFLAGS = \
Expand All @@ -168,7 +167,6 @@ hyperspacehashing_test_prefix_SOURCES = \
hyperspacehashing/test/prefix.cc
hyperspacehashing_test_prefix_LDADD = \
libhyperspacehashing.la \
$(HYPERSPACEHASHING_LDADD) \
$(COVERAGE_LDADD) \
$(GTEST_LIBS)
hyperspacehashing_test_prefix_CPPFLAGS = \
Expand All @@ -179,7 +177,6 @@ hyperspacehashing_test_search_SOURCES = \
hyperspacehashing/test/search.cc
hyperspacehashing_test_search_LDADD = \
libhyperspacehashing.la \
$(HYPERSPACEHASHING_LDADD) \
$(COVERAGE_LDADD)
hyperspacehashing_test_search_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
Expand All @@ -195,7 +192,6 @@ hyperspacehashing_utils_cfloat_SOURCES = \
hyperspacehashing/utils/cfloat.cc
hyperspacehashing_utils_cfloat_LDADD = \
libhyperspacehashing.la \
$(HYPERSPACEHASHING_LDADD) \
$(COVERAGE_LDADD)

################################################################################
Expand Down Expand Up @@ -228,7 +224,7 @@ libhyperdisk_la_SOURCES = \
hyperdisk/snapshot.cc
libhyperdisk_la_LIBADD = \
libhyperspacehashing.la \
$(HYPERSPACEHASHING_LDADD) \
-lpthread
$(COVERAGE_LDADD)
libhyperdisk_la_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
Expand All @@ -249,7 +245,6 @@ hyperdisk_test_shard_SOURCES = \
hyperdisk_test_shard_LDADD = \
libhyperspacehashing.la \
libhyperdisk.la \
$(HYPERDISK_LDADD) \
$(COVERAGE_LDADD) \
$(GTEST_LIBS)
hyperdisk_test_shard_CPPFLAGS = \
Expand All @@ -268,7 +263,6 @@ hyperdisk_utils_shard_dumphashes_SOURCES = \
hyperdisk_utils_shard_dumphashes_LDADD = \
libhyperspacehashing.la \
libhyperdisk.la \
$(HYPERDISK_LDADD) \
$(COVERAGE_LDADD)
hyperdisk_utils_shard_dumphashes_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
Expand All @@ -279,7 +273,6 @@ hyperdisk_utils_shard_fsck_SOURCES = \
hyperdisk_utils_shard_fsck_LDADD = \
libhyperspacehashing.la \
libhyperdisk.la \
$(HYPERDISK_LDADD) \
$(COVERAGE_LDADD)
hyperdisk_utils_shard_fsck_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
Expand Down Expand Up @@ -341,8 +334,6 @@ libhyperdaemon_la_LIBADD = \
libhyperdex.la \
libhyperspacehashing.la \
libhyperdisk.la \
$(HYPERSPACEHASHING_LDADD) \
$(HYPERDISK_LDADD) \
$(COVERAGE_LDADD)
libhyperdaemon_la_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
Expand All @@ -369,7 +360,7 @@ libhyperclient_la_SOURCES = \
libhyperclient_la_LIBADD = \
libhyperspacehashing.la \
libhyperdex.la \
$(HYPERSPACEHASHING_LDADD) \
-le
$(COVERAGE_LDADD)
libhyperclient_la_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
Expand All @@ -396,7 +387,6 @@ libhyperclient_java_la_CXXFLAGS = \
libhyperclient_java_la_LIBADD = \
libhyperspacehashing.la \
libhyperclient.la \
$(HYPERCLIENT_LDADD) \
$(PYTHON_LDFLAGS) \
$(COVERAGE_LDADD)

Expand Down Expand Up @@ -441,7 +431,6 @@ hyperclient_python_hyperclient_la_CPPFLAGS = \
hyperclient_python_hyperclient_la_LIBADD = \
libhyperspacehashing.la \
libhyperclient.la \
$(HYPERCLIENT_LDADD) \
$(PYTHON_LDFLAGS) \
$(COVERAGE_LDADD)
hyperclient_python_hyperclient_la_LDFLAGS = \
Expand Down Expand Up @@ -483,10 +472,8 @@ endif
daemon_SOURCES = \
daemon.cc
daemon_LDADD = \
libhyperspacehashing.la \
libhyperdisk.la \
libhyperdaemon.la \
$(HYPERDISK_LDADD) \
$(COVERAGE_LDADD) \
-lglog -lrt
daemon_LDFLAGS = \
Expand All @@ -495,20 +482,16 @@ daemon_LDFLAGS = \
binary_test_SOURCES = \
binary-test.cc
binary_test_LDADD = \
libhyperspacehashing.la \
libhyperclient.la \
$(HYPERSPACEHASHING_LDADD) \
$(HYPERCLIENT_LDADD) \
libhyperclient.la
-lrt
binary_test_LDFLAGS = \
-no-install

count_test_SOURCES = \
count-test.cc
count_test_LDADD = \
libhyperspacehashing.la \
libhyperclient.la \
$(HYPERCLIENT_LDADD) \
-lrt
$(COVERAGE_LDADD)

replication_stress_test_SOURCES = \
Expand All @@ -518,21 +501,16 @@ replication_stress_test_CPPFLAGS = \
$(CPPFLAGS)
replication_stress_test_LDADD = \
libhyperspacehashing.la \
libhyperclient.la \
$(HYPERSPACEHASHING_LDADD) \
$(HYPERCLIENT_LDADD) \
libhyperclient.la
replication_stress_test_LDFLAGS = \
-no-install

trace_player_SOURCES = \
trace-player.cc
trace_player_LDADD = \
libhyperclient.la \
-lbsd \
$(HYPERSPACEHASHING_LDADD) \
$(HYPERCLIENT_LDADD) \
libhyperspacehashing.la \
libhyperclient.la
-lrt
trace_player_LDFLAGS = \
-no-install

Expand Down
3 changes: 0 additions & 3 deletions configure.ac
Expand Up @@ -152,9 +152,6 @@ if test x"${enable_logall}" = xyes; then
AC_DEFINE([HD_LOG_ALL_MESSAGES], [], [Log all network traffic at the INFO level])
fi

AC_SUBST([HYPERSPACEHASHING_LDADD], ["-lcityhash -le"])
AC_SUBST([HYPERDISK_LDADD], ["-lpthread ${HYPERSPACEHASHING_LDADD}"])
AC_SUBST([HYPERCLIENT_LDADD], ["${HYPERSPACEHASHING_LDADD} -lrt"])
AM_CONDITIONAL([ENABLE_JAVA_BINDINGS], [test x"${java_bindings}" = xyes])
AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS], [test x"${python_bindings}" = xyes])
AM_CONDITIONAL([ENABLE_YCSB_DRIVER], [test x"${enable_ycsb}" = xyes])
Expand Down

0 comments on commit e80a956

Please sign in to comment.