summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-05-15 10:39:08 +0200
committerThomas Haller <thaller@redhat.com>2019-05-22 20:04:08 +0200
commit1a24f3ae8dc4a0e5775c850fe1449962f6eb22de (patch)
tree7b017b5dc3bc342735174f857b99ae7727a6b6bf /Makefile.am
parentd8eb9e7515e84ad47512005ecbd0222124190c32 (diff)
downloadNetworkManager-1a24f3ae8dc4a0e5775c850fe1449962f6eb22de.tar.gz
build: don't statically link static libraries with other static libraries (1)
When we link static libraries together, there must be no duplicate symbols. Since we have a lot of static/intermediate libraries, getting this right is complicated and sometimes leads to ugly solutions. As a new rule: don't let static libraries link with other static libraries. Only binaries and libnm/libnm.la should explicitly link with all the static libraries that they require. There are exceptions: "src/libNetworkManager.la" and "libnm/liblibnm.la". These are static, internal libraries, but they are basically *everything* that ends up in "src/NetworkManager" and "libnm/libnm.la", respecitively. Hence, these static libraries also link against other static libraries. Another exception to this rule is "src/libNetworkManagerTest.la", for similar reasons.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am5
1 files changed, 1 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index d683bdb9cb..5d3902c06f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -283,10 +283,6 @@ else
shared_libnacd_la_SOURCES += shared/n-acd/src/n-acd-bpf-fallback.c
endif
-shared_libnacd_la_LIBADD = \
- shared/libcrbtree.la \
- $(NULL)
-
###############################################################################
noinst_LTLIBRARIES += shared/nm-std-aux/libnm-std-aux.la
@@ -2148,6 +2144,7 @@ src_libNetworkManager_la_LIBADD = \
src/libnm-systemd-core.la \
shared/systemd/libnm-systemd-shared.la \
shared/libnacd.la \
+ shared/libcrbtree.la \
$(GLIB_LIBS) \
$(LIBUDEV_LIBS) \
$(SYSTEMD_LOGIN_LIBS) \