chiark / gitweb /
timedatectl: clear ADJ_MAXERROR to make sure we keep STA_SYNC set
[elogind.git] / Makefile.am
index 8a897cd..f0cfe46 100644 (file)
@@ -39,28 +39,28 @@ LIBUDEV_CURRENT=5
 LIBUDEV_REVISION=0
 LIBUDEV_AGE=4
 
-LIBGUDEV_CURRENT=1
-LIBGUDEV_REVISION=3
-LIBGUDEV_AGE=1
+LIBGUDEV_CURRENT=2
+LIBGUDEV_REVISION=0
+LIBGUDEV_AGE=2
 
 LIBSYSTEMD_LOGIN_CURRENT=9
-LIBSYSTEMD_LOGIN_REVISION=1
+LIBSYSTEMD_LOGIN_REVISION=3
 LIBSYSTEMD_LOGIN_AGE=9
 
 LIBSYSTEMD_DAEMON_CURRENT=0
-LIBSYSTEMD_DAEMON_REVISION=10
+LIBSYSTEMD_DAEMON_REVISION=12
 LIBSYSTEMD_DAEMON_AGE=0
 
 LIBSYSTEMD_ID128_CURRENT=0
-LIBSYSTEMD_ID128_REVISION=26
+LIBSYSTEMD_ID128_REVISION=28
 LIBSYSTEMD_ID128_AGE=0
 
 LIBSYSTEMD_JOURNAL_CURRENT=11
-LIBSYSTEMD_JOURNAL_REVISION=3
+LIBSYSTEMD_JOURNAL_REVISION=5
 LIBSYSTEMD_JOURNAL_AGE=11
 
 LIBSYSTEMD_CURRENT=0
-LIBSYSTEMD_REVISION=0
+LIBSYSTEMD_REVISION=2
 LIBSYSTEMD_AGE=0
 
 # Dirs of external packages
@@ -87,7 +87,7 @@ userunitdir=$(prefix)/lib/systemd/user
 userpresetdir=$(prefix)/lib/systemd/user-preset
 tmpfilesdir=$(prefix)/lib/tmpfiles.d
 sysctldir=$(prefix)/lib/sysctl.d
-networkdir=$(prefix)/lib/systemd/network
+networkdir=$(rootprefix)/lib/systemd/network
 pkgincludedir=$(includedir)/systemd
 systemgeneratordir=$(rootlibexecdir)/system-generators
 usergeneratordir=$(prefix)/lib/systemd/user-generators
@@ -145,6 +145,10 @@ TESTS =
 endif
 udevlibexec_PROGRAMS =
 
+.PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
+       $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
+       $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
+
 AM_CPPFLAGS = \
        -include $(top_builddir)/config.h \
        -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
@@ -182,6 +186,7 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/network \
        -I $(top_srcdir)/src/login \
        -I $(top_srcdir)/src/journal \
+       -I $(top_srcdir)/src/timedate \
        -I $(top_srcdir)/src/systemd \
        -I $(top_builddir)/src/core \
        -I $(top_srcdir)/src/core \
@@ -189,7 +194,10 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/udev \
        -I $(top_srcdir)/src/udev/net \
        -I $(top_builddir)/src/udev \
-       -I $(top_srcdir)/src/libsystemd \
+       -I $(top_srcdir)/src/libsystemd/sd-bus \
+       -I $(top_srcdir)/src/libsystemd/sd-event \
+       -I $(top_srcdir)/src/libsystemd/sd-rtnl \
+       -I $(top_srcdir)/src/libsystemd-network \
        $(OUR_CPPFLAGS)
 
 AM_CFLAGS = $(OUR_CFLAGS)
@@ -200,8 +208,8 @@ define move-to-rootlibdir
        if test "$(libdir)" != "$(rootlibdir)"; then \
                $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
                so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
-               so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
-               $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
+               rm -f $(DESTDIR)$(libdir)/$$libname && \
+               $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
                mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
        fi
 endef
@@ -225,7 +233,6 @@ USER_BUSNAMES_TARGET_WANTS =
 
 SYSTEM_UNIT_ALIASES =
 USER_UNIT_ALIASES =
-
 GENERAL_ALIASES =
 
 install-target-wants-hook:
@@ -261,9 +268,9 @@ install-aliases-hook:
        set -- $(SYSTEM_UNIT_ALIASES) && \
                dir=$(systemunitdir) && $(install-aliases)
        set -- $(USER_UNIT_ALIASES) && \
-               dir=$(userunitdir) && $(install-aliases)
+               dir=$(userunitdir) && $(install-relative-aliases)
        set -- $(GENERAL_ALIASES) && \
-               dir= && $(install-aliases)
+               dir= && $(install-relative-aliases)
 
 define install-aliases
        while [ -n "$$1" ]; do \
@@ -274,6 +281,15 @@ define install-aliases
        done
 endef
 
+define install-relative-aliases
+       while [ -n "$$1" ]; do \
+               $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
+               rm -f $(DESTDIR)$$dir/$$2 && \
+               $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
+               shift 2 || exit $$?; \
+       done
+endef
+
 INSTALL_EXEC_HOOKS += \
        install-target-wants-hook \
        install-directories-hook \
@@ -296,6 +312,10 @@ AM_V_LN = $(AM_V_LN_$(V))
 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
 AM_V_LN_0 = @echo "  LN      " $@;
 
+AM_V_RM = $(AM_V_RM_$(V))
+AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
+AM_V_RM_0 = @echo "  RM      " $@;
+
 # ------------------------------------------------------------------------------
 rootbin_PROGRAMS = \
        systemctl \
@@ -342,9 +362,16 @@ systemgenerator_PROGRAMS = \
        systemd-system-update-generator
 
 dist_bashcompletion_DATA = \
+       shell-completion/bash/busctl \
        shell-completion/bash/journalctl \
        shell-completion/bash/systemctl \
        shell-completion/bash/systemd-analyze \
+       shell-completion/bash/systemd-cat \
+       shell-completion/bash/systemd-cgls \
+       shell-completion/bash/systemd-cgtop \
+       shell-completion/bash/systemd-delta \
+       shell-completion/bash/systemd-detect-virt \
+       shell-completion/bash/systemd-nspawn \
        shell-completion/bash/systemd-run \
        shell-completion/bash/udevadm \
        shell-completion/bash/kernel-install
@@ -494,9 +521,6 @@ EXTRA_DIST += \
        units/systemd-fsck@.service.in \
        units/systemd-fsck-root.service.in \
        units/user@.service.in \
-       units/systemd-udevd.service \
-       units/systemd-udev-trigger.service \
-       units/systemd-udev-settle.service \
        units/debug-shell.service.in \
        units/systemd-hibernate.service.in \
        units/systemd-hybrid-sleep.service.in \
@@ -545,7 +569,10 @@ dist_doc_DATA = \
        LICENSE.LGPL2.1 \
        LICENSE.GPL2 \
        LICENSE.MIT \
-       DISTRO_PORTING
+       DISTRO_PORTING \
+       src/libsystemd/sd-bus/PORTING-DBUS1 \
+       src/libsystemd/sd-bus/DIFFERENCES \
+       src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
 
 @INTLTOOL_POLICY_RULE@
 
@@ -556,7 +583,7 @@ MANPAGES_ALIAS =
 
 include Makefile-man.am
 
-.PHONY: man
+.PHONY: man update-man-list
 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
 
 XML_FILES = \
@@ -604,16 +631,16 @@ XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
 
-update-man-list: make-man-rules.py $(XML_GLOB)
+update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
        $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
        $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
        @echo "Makefile-man.am has been regenerated"
 
-man/systemd.index.xml: make-man-index.py $(NON_INDEX_XML_FILES)
+man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
 
-man/systemd.directives.xml: make-directive-index.py $(SOURCE_XML_FILES)
+man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
 
@@ -635,9 +662,10 @@ EXTRA_DIST += \
        $(HTML_FILES) \
        $(HTML_ALIAS) \
        $(man_MANS) \
-       make-man-index.py \
-       make-directive-index.py \
-       xml_helper.py
+       tools/make-man-index.py \
+       tools/make-directive-index.py \
+       tools/make-man-rules.py \
+       tools/xml_helper.py
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -646,8 +674,6 @@ noinst_LTLIBRARIES += \
 libsystemd_shared_la_SOURCES = \
        src/shared/linux/auto_dev-ioctl.h \
        src/shared/linux/fanotify.h \
-       src/shared/linux/seccomp.h \
-       src/shared/linux/seccomp-bpf.h \
        src/shared/ioprio.h \
        src/shared/missing.h \
        src/shared/initreq.h \
@@ -666,6 +692,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/util.h \
        src/shared/virt.c \
        src/shared/virt.h \
+       src/shared/architecture.c \
+       src/shared/architecture.h \
        src/shared/efivars.c \
        src/shared/efivars.h \
        src/shared/path-util.c \
@@ -755,18 +783,33 @@ libsystemd_shared_la_SOURCES = \
        src/shared/net-util.h \
        src/shared/errno-list.c \
        src/shared/errno-list.h \
-       src/shared/syscall-list.c \
-       src/shared/syscall-list.h \
+       src/shared/af-list.c \
+       src/shared/af-list.h \
        src/shared/audit.c \
        src/shared/audit.h \
        src/shared/xml.c \
-       src/shared/xml.h
+       src/shared/xml.h \
+       src/shared/condition-util.c \
+       src/shared/condition-util.h \
+       src/shared/bus-label.c \
+       src/shared/bus-label.h \
+       src/shared/gpt.h \
+       src/shared/generator.h \
+       src/shared/generator.c \
+       src/shared/clean-ipc.h \
+       src/shared/clean-ipc.c \
+       src/shared/login-shared.c \
+       src/shared/login-shared.h
 
 nodist_libsystemd_shared_la_SOURCES = \
        src/shared/errno-from-name.h \
        src/shared/errno-to-name.h \
-       src/shared/syscall-from-name.h \
-       src/shared/syscall-to-name.h
+       src/shared/af-from-name.h \
+       src/shared/af-to-name.h
+
+libsystemd_shared_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -808,6 +851,24 @@ libsystemd_label_la_LIBADD = \
        $(SELINUX_LIBS)
 
 # ------------------------------------------------------------------------------
+
+if HAVE_SECCOMP
+noinst_LTLIBRARIES += \
+       libsystemd-seccomp.la
+
+libsystemd_seccomp_la_SOURCES = \
+       src/shared/seccomp-util.h \
+       src/shared/seccomp-util.c
+
+libsystemd_seccomp_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
+libsystemd_seccomp_la_LIBADD = \
+       $(SECCOMP_LIBS)
+endif
+
+# ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
        libsystemd-logs.la
 
@@ -936,8 +997,6 @@ libsystemd_core_la_SOURCES = \
        src/core/dbus-kill.h \
        src/core/dbus-cgroup.c \
        src/core/dbus-cgroup.h \
-       src/core/dbus-client-track.c \
-       src/core/dbus-client-track.h \
        src/core/cgroup.c \
        src/core/cgroup.h \
        src/core/selinux-access.c \
@@ -973,7 +1032,9 @@ libsystemd_core_la_SOURCES = \
        src/core/audit-fd.c \
        src/core/audit-fd.h \
        src/core/async.c \
-       src/core/async.h
+       src/core/async.h \
+       src/core/show-status.c \
+       src/core/show-status.h
 
 if HAVE_KMOD
 libsystemd_core_la_SOURCES += \
@@ -990,15 +1051,16 @@ libsystemd_core_la_CFLAGS = \
        $(LIBWRAP_CFLAGS) \
        $(PAM_CFLAGS) \
        $(AUDIT_CFLAGS) \
+       $(CAP_CFLAGS) \
        $(KMOD_CFLAGS) \
+       $(APPARMOR_CFLAGS) \
+       $(SECCOMP_CFLAGS) \
        -pthread
 
 libsystemd_core_la_LIBADD = \
        libsystemd-capability.la \
        libsystemd-units.la \
        libsystemd-label.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libudev-internal.la \
        libsystemd-shared.la \
        libsystemd-internal.la \
@@ -1006,7 +1068,14 @@ libsystemd_core_la_LIBADD = \
        $(PAM_LIBS) \
        $(AUDIT_LIBS) \
        $(CAP_LIBS) \
-       $(KMOD_LIBS)
+       $(KMOD_LIBS) \
+       $(APPARMOR_LIBS) \
+       $(SECCOMP_LIBS)
+
+if HAVE_SECCOMP
+libsystemd_core_la_LIBADD += \
+       libsystemd-seccomp.la
+endif
 
 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
        $(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -1019,32 +1088,16 @@ CLEANFILES += \
        src/core/load-fragment-gperf.gperf \
        src/core/load-fragment-gperf.c \
        src/core/load-fragment-gperf-nulstr.c \
-       src/shared/syscall-list.txt \
-       src/shared/syscall-from-name.gperf \
        src/shared/errno-list.txt \
-       src/shared/errno-from-name.gperf
+       src/shared/errno-from-name.gperf \
+       src/shared/af-list.txt \
+       src/shared/af-from-name.gperf
 
 BUILT_SOURCES += \
-       src/shared/syscall-from-name.h \
-       src/shared/syscall-to-name.h \
        src/shared/errno-from-name.h \
-       src/shared/errno-to-name.h
-
-src/shared/syscall-list.txt:
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9(]/ { sub(/__NR_/, "", $$2); if ($$2 !~ /SYSCALL_BASE/) print $$2; }' > $@
-
-src/shared/syscall-from-name.gperf: src/shared/syscall-list.txt
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
-
-src/shared/syscall-from-name.h: src/shared/syscall-from-name.gperf
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
-
-src/shared/syscall-to-name.h: src/shared/syscall-list.txt
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+       src/shared/errno-to-name.h \
+       src/shared/af-from-name.h \
+       src/shared/af-to-name.h
 
 src/shared/errno-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
@@ -1062,10 +1115,30 @@ src/shared/errno-to-name.h: src/shared/errno-list.txt
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
 
+src/shared/af-list.txt:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - < /dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }'  > $@
+
+src/shared/af-from-name.gperf: src/shared/af-list.txt
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct af_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
+
+src/shared/af-from-name.h: src/shared/af-from-name.gperf
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_af -H hash_af_name -p -C < $< > $@
+
+src/shared/af-to-name.h: src/shared/af-list.txt
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+
 # ------------------------------------------------------------------------------
 systemd_SOURCES = \
        src/core/main.c
 
+systemd_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 systemd_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1107,7 +1180,8 @@ manual_tests += \
        test-cgroup \
        test-install \
        test-watchdog \
-       test-log
+       test-log \
+       test-ipcrm
 
 tests += \
        test-job-type \
@@ -1121,6 +1195,7 @@ tests += \
        test-utf8 \
        test-ellipsize \
        test-util \
+       test-tmpfiles \
        test-namespace \
        test-date \
        test-sleep \
@@ -1137,7 +1212,8 @@ tests += \
        test-list \
        test-tables \
        test-device-nodes \
-       test-xml
+       test-xml \
+       test-architecture
 
 EXTRA_DIST += \
        test/sched_idle_bad.service \
@@ -1161,6 +1237,10 @@ test_device_nodes_LDADD = \
 test_engine_SOURCES = \
        src/test/test-engine.c
 
+test_engine_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_engine_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1168,6 +1248,10 @@ test_engine_LDADD = \
 test_job_type_SOURCES = \
        src/test/test-job-type.c
 
+test_job_type_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_job_type_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1175,6 +1259,10 @@ test_job_type_LDADD = \
 test_ns_SOURCES = \
        src/test/test-ns.c
 
+test_ns_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_ns_LDADD = \
        libsystemd-core.la
 
@@ -1204,6 +1292,10 @@ endif
 test_unit_name_SOURCES = \
        src/test/test-unit-name.c
 
+test_unit_name_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_unit_name_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1211,6 +1303,10 @@ test_unit_name_LDADD = \
 test_unit_file_SOURCES = \
        src/test/test-unit-file.c
 
+test_unit_file_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_unit_file_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1227,6 +1323,12 @@ test_util_SOURCES = \
 test_util_LDADD = \
        libsystemd-core.la
 
+test_tmpfiles_SOURCES = \
+       src/test/test-tmpfiles.c
+
+test_tmpfiles_LDADD = \
+       libsystemd-shared.la
+
 test_namespace_SOURCES = \
        src/test/test-namespace.c
 
@@ -1255,6 +1357,10 @@ test_tables_SOURCES = \
        src/test/test-tables.c \
        src/shared/test-tables.h
 
+test_tables_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_tables_LDADD = \
        libsystemd-logs.la \
        libsystemd-journal-internal.la \
@@ -1279,12 +1385,25 @@ test_time_SOURCES = \
 test_time_LDADD = \
        libsystemd-core.la
 
+test_architecture_SOURCES = \
+       src/test/test-architecture.c
+
+test_architecture_LDADD = \
+       libsystemd-shared.la
+
 test_log_SOURCES = \
        src/test/test-log.c
 
 test_log_LDADD = \
        libsystemd-core.la
 
+test_ipcrm_SOURCES = \
+       src/test/test-ipcrm.c
+
+test_ipcrm_LDADD = \
+       libsystemd-shared.la \
+       -lrt
+
 test_ellipsize_SOURCES = \
        src/test/test-ellipsize.c
 
@@ -1325,7 +1444,7 @@ test_daemon_SOURCES = \
        src/test/test-daemon.c
 
 test_daemon_LDADD = \
-       libsystemd-daemon-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_cgroup_SOURCES = \
@@ -1333,7 +1452,8 @@ test_cgroup_SOURCES = \
 
 test_cgroup_LDADD = \
        libsystemd-label.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-internal.la
 
 test_cgroup_mask_SOURCES = \
        src/test/test-cgroup-mask.c
@@ -1342,6 +1462,10 @@ test_cgroup_mask_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -DTEST_DIR=\"$(abs_top_srcdir)/test\"
 
+test_cgroup_mask_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_cgroup_mask_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
@@ -1351,7 +1475,7 @@ test_cgroup_util_SOURCES = \
 
 test_cgroup_util_LDADD = \
        libsystemd-label.la \
-       libsystemd-daemon-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_env_replace_SOURCES = \
@@ -1371,7 +1495,7 @@ test_strv_SOURCES = \
 
 test_strv_LDADD = \
        libsystemd-units.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_path_util_SOURCES = \
@@ -1392,8 +1516,8 @@ test_install_SOURCES = \
 test_install_LDADD = \
        libsystemd-units.la \
        libsystemd-label.la \
-       libsystemd-id128-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-internal.la
 
 test_watchdog_SOURCES = \
        src/test/test-watchdog.c
@@ -1408,13 +1532,17 @@ test_sched_prio_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -DTEST_DIR=\"$(abs_top_srcdir)/test\"
 
+test_sched_prio_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
+
 test_sched_prio_LDADD = \
        libsystemd-core.la \
        $(RT_LIBS)
 
 # ------------------------------------------------------------------------------
 ## .PHONY so it always rebuilds it
-.PHONY: coverage lcov-run lcov-report
+.PHONY: coverage lcov-run lcov-report coverage-sync
 
 # run lcov from scratch, always
 coverage:
@@ -1456,8 +1584,6 @@ systemd_analyze_SOURCES = \
 
 systemd_analyze_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1466,8 +1592,6 @@ systemd_initctl_SOURCES = \
 
 systemd_initctl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1480,8 +1604,6 @@ systemd_update_utmp_CFLAGS = \
 
 systemd_update_utmp_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        $(AUDIT_LIBS)
 
@@ -1491,7 +1613,7 @@ systemd_shutdownd_SOURCES = \
 
 systemd_shutdownd_LDADD = \
        libsystemd-label.la \
-       libsystemd-daemon-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 dist_doc_DATA += \
@@ -1556,7 +1678,7 @@ systemd_tmpfiles_LDADD = \
        libsystemd-units.la \
        libsystemd-label.la \
        libsystemd-capability.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 rootbin_PROGRAMS += \
@@ -1609,7 +1731,7 @@ systemd_machine_id_setup_SOURCES = \
 
 systemd_machine_id_setup_LDADD = \
        libsystemd-label.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1632,8 +1754,6 @@ systemd_fsck_SOURCES = \
 
 systemd_fsck_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libudev-internal.la \
        libsystemd-shared.la
 
@@ -1712,12 +1832,14 @@ bootctl_SOURCES = \
 
 bootctl_LDADD = \
        libsystemd-shared.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la
+       libsystemd-internal.la
 
 bin_PROGRAMS += \
        bootctl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/bootctl
+
 dist_zshcompletion_DATA += \
        shell-completion/zsh/_bootctl
 
@@ -1729,11 +1851,12 @@ systemgenerator_PROGRAMS +=  \
        systemd-gpt-auto-generator
 
 systemd_gpt_auto_generator_SOURCES = \
-       src/gpt-auto-generator/gpt-auto-generator.c
+       src/gpt-auto-generator/gpt-auto-generator.c \
+       src/shared/blkid-util.h
 
 systemd_gpt_auto_generator_LDADD = \
        libsystemd-label.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libudev-internal.la \
        libsystemd-shared.la \
        $(BLKID_LIBS)
@@ -1757,7 +1880,9 @@ systemd_dbus1_generator_LDADD = \
        libsystemd-internal.la
 
 dbus1-generator-install-hook:
-       $(AM_V_LN)$(LN_S) -f $(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+       $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
+       $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+       $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
 
 dbus1-generator-uninstall-hook:
        rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
@@ -1790,8 +1915,6 @@ systemd_cgroups_agent_SOURCES = \
 
 systemd_cgroups_agent_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1802,17 +1925,8 @@ systemctl_LDADD = \
        libsystemd-units.la \
        libsystemd-label.la \
        libsystemd-internal.la \
-       libsystemd-logs.la
-
-if ENABLE_LOGIND
-systemctl_LDADD += \
-       libsystemd-login-internal.la
-endif
-
-systemctl_LDADD += \
+       libsystemd-logs.la \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1821,7 +1935,7 @@ systemd_notify_SOURCES = \
        src/readahead/sd-readahead.c
 
 systemd_notify_LDADD = \
-       libsystemd-daemon-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1861,13 +1975,24 @@ systemd_nspawn_SOURCES = \
        src/core/loopback-setup.c \
        src/core/loopback-setup.h
 
+systemd_nspawn_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS) \
+       $(BLKID_CFLAGS)
+
 systemd_nspawn_LDADD = \
        libsystemd-label.la \
        libsystemd-capability.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+       libudev-internal.la \
+       libsystemd-shared.la \
+       $(BLKID_LIBS)
+
+if HAVE_SECCOMP
+systemd_nspawn_LDADD += \
+       libsystemd-seccomp.la \
+       $(SECCOMP_LIBS)
+endif
 
 # ------------------------------------------------------------------------------
 systemd_run_SOURCES = \
@@ -1877,8 +2002,6 @@ systemd_run_LDADD = \
        libsystemd-label.la \
        libsystemd-capability.la \
        libsystemd-internal.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1887,12 +2010,12 @@ systemd_bus_proxyd_SOURCES = \
 
 systemd_bus_proxyd_LDADD = \
        libsystemd-internal.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 bus-proxyd-install-hook:
-       $(AM_V_LN)$(LN_S) -f ../lib/systemd/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
+       $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
+       $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
+       $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
 
 bus-proxyd-uninstall-hook:
        rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
@@ -1924,169 +2047,163 @@ systemd_tty_ask_password_agent_LDADD = \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
-libsystemd_daemon_la_SOURCES = \
-       src/libsystemd-daemon/libsystemd-daemon.sym \
-       src/libsystemd-daemon/sd-daemon.c
-
-libsystemd_daemon_internal_la_SOURCES = \
-       $(libsystemd_daemon_la_SOURCES)
+libsystemd_internal_la_SOURCES = \
+       src/systemd/sd-bus.h \
+       src/systemd/sd-bus-protocol.h \
+       src/systemd/sd-bus-vtable.h \
+       src/systemd/sd-memfd.h \
+       src/systemd/sd-utf8.h \
+       src/systemd/sd-event.h \
+       src/systemd/sd-rtnl.h \
+       src/systemd/sd-resolve.h \
+       src/systemd/sd-login.h \
+       src/systemd/sd-id128.h \
+       src/systemd/sd-daemon.h \
+       src/libsystemd/sd-bus/sd-bus.c \
+       src/libsystemd/sd-bus/bus-control.c \
+       src/libsystemd/sd-bus/bus-control.h \
+       src/libsystemd/sd-bus/bus-error.c \
+       src/libsystemd/sd-bus/bus-error.h \
+       src/libsystemd/sd-bus/bus-internal.c \
+       src/libsystemd/sd-bus/bus-internal.h \
+       src/libsystemd/sd-bus/bus-socket.c \
+       src/libsystemd/sd-bus/bus-socket.h \
+       src/libsystemd/sd-bus/bus-kernel.c \
+       src/libsystemd/sd-bus/bus-kernel.h \
+       src/libsystemd/sd-bus/bus-container.c \
+       src/libsystemd/sd-bus/bus-container.h \
+       src/libsystemd/sd-bus/bus-message.c \
+       src/libsystemd/sd-bus/bus-message.h \
+       src/libsystemd/sd-bus/bus-creds.c \
+       src/libsystemd/sd-bus/bus-creds.h \
+       src/libsystemd/sd-bus/bus-signature.c \
+       src/libsystemd/sd-bus/bus-signature.h \
+       src/libsystemd/sd-bus/bus-type.c \
+       src/libsystemd/sd-bus/bus-type.h \
+       src/libsystemd/sd-bus/bus-match.c \
+       src/libsystemd/sd-bus/bus-match.h \
+       src/libsystemd/sd-bus/bus-bloom.c \
+       src/libsystemd/sd-bus/bus-bloom.h \
+       src/libsystemd/sd-bus/bus-introspect.c \
+       src/libsystemd/sd-bus/bus-introspect.h \
+       src/libsystemd/sd-bus/bus-objects.c \
+       src/libsystemd/sd-bus/bus-objects.h \
+       src/libsystemd/sd-bus/bus-gvariant.c \
+       src/libsystemd/sd-bus/bus-gvariant.h \
+       src/libsystemd/sd-bus/bus-convenience.c \
+       src/libsystemd/sd-bus/bus-track.c \
+       src/libsystemd/sd-bus/bus-track.h \
+       src/libsystemd/sd-bus/bus-util.c \
+       src/libsystemd/sd-bus/bus-util.h \
+       src/libsystemd/sd-bus/bus-protocol.h \
+       src/libsystemd/sd-bus/kdbus.h \
+       src/libsystemd/sd-bus/sd-memfd.c \
+       src/libsystemd/sd-utf8/sd-utf8.c \
+       src/libsystemd/sd-event/sd-event.c \
+       src/libsystemd/sd-event/event-util.h \
+       src/libsystemd/sd-rtnl/sd-rtnl.c \
+       src/libsystemd/sd-rtnl/rtnl-internal.h \
+       src/libsystemd/sd-rtnl/rtnl-message.c \
+       src/libsystemd/sd-rtnl/rtnl-util.h \
+       src/libsystemd/sd-rtnl/rtnl-util.c \
+       src/libsystemd/sd-resolve/sd-resolve.c \
+       src/libsystemd/sd-resolve/resolve-util.h \
+       src/libsystemd/sd-id128/sd-id128.c \
+       src/libsystemd/sd-daemon/sd-daemon.c \
+       src/libsystemd/sd-login/sd-login.c
 
-libsystemd_daemon_internal_la_CPPFLAGS = \
-       $(AM_CPPFLAGS) \
-       -DSD_DAEMON_DISABLE_MQ
+nodist_libsystemd_internal_la_SOURCES = \
+       src/libsystemd/libsystemd.sym \
+       src/libsystemd/sd-bus/bus-error-mapping.c
 
-libsystemd_daemon_la_CFLAGS = \
+libsystemd_internal_la_CFLAGS = \
        $(AM_CFLAGS) \
-       -fvisibility=hidden \
-       -DSD_EXPORT_SYMBOLS
-
-libsystemd_daemon_la_LDFLAGS = \
-       $(AM_LDFLAGS) \
-       -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
-       -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
+       -pthread
 
-libsystemd_daemon_la_LIBADD =  \
+libsystemd_internal_la_LIBADD = \
        $(RT_LIBS)
 
-pkginclude_HEADERS += \
-       src/systemd/sd-daemon.h
-
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
-libsystemd-daemon-install-hook:
-       libname=libsystemd-daemon.so && $(move-to-rootlibdir)
-
-libsystemd-daemon-uninstall-hook:
-       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
+noinst_LTLIBRARIES += \
+       libsystemd-internal.la
 
-INSTALL_EXEC_HOOKS += libsystemd-daemon-install-hook
-UNINSTALL_EXEC_HOOKS += libsystemd-daemon-uninstall-hook
+libsystemd_dump_la_SOURCES = \
+       src/libsystemd/sd-bus/bus-dump.c \
+       src/libsystemd/sd-bus/bus-dump.h
 
-lib_LTLIBRARIES += \
-       libsystemd-daemon.la
+libsystemd_dump_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(CAP_CFLAGS)
 
 noinst_LTLIBRARIES += \
-       libsystemd-daemon-internal.la
-
-pkgconfiglib_DATA += \
-       src/libsystemd-daemon/libsystemd-daemon.pc
+       libsystemd-dump.la
 
 EXTRA_DIST += \
-       src/libsystemd-daemon/libsystemd-daemon.pc.in
+       src/libsystemd/libsystemd.sym.m4 \
+       src/libsystemd/libsystemd.pc.in \
+       src/libsystemd/sd-bus/bus-error-mapping.gperf \
+       src/libsystemd/sd-bus/DIFFERENCES \
+       src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
 
-# ------------------------------------------------------------------------------
-libsystemd_la_SOURCES = \
+CLEANFILES += \
        src/libsystemd/libsystemd.sym \
-       src/systemd/sd-bus.h \
-       src/systemd/sd-bus-protocol.h \
-       src/systemd/sd-bus-vtable.h \
-       src/systemd/sd-memfd.h \
-       src/systemd/sd-utf8.h \
-       src/systemd/sd-event.h \
-       src/systemd/sd-rtnl.h \
-       src/systemd/sd-resolve.h \
-       src/libsystemd/sd-bus.c \
-       src/libsystemd/bus-control.c \
-       src/libsystemd/bus-control.h \
-       src/libsystemd/bus-error.c \
-       src/libsystemd/bus-error.h \
-       src/libsystemd/bus-internal.c \
-       src/libsystemd/bus-internal.h \
-       src/libsystemd/bus-socket.c \
-       src/libsystemd/bus-socket.h \
-       src/libsystemd/bus-kernel.c \
-       src/libsystemd/bus-kernel.h \
-       src/libsystemd/bus-container.c \
-       src/libsystemd/bus-container.h \
-       src/libsystemd/bus-message.c \
-       src/libsystemd/bus-message.h \
-       src/libsystemd/bus-creds.c \
-       src/libsystemd/bus-creds.h \
-       src/libsystemd/bus-signature.c \
-       src/libsystemd/bus-signature.h \
-       src/libsystemd/bus-type.c \
-       src/libsystemd/bus-type.h \
-       src/libsystemd/bus-match.c \
-       src/libsystemd/bus-match.h \
-       src/libsystemd/bus-bloom.c \
-       src/libsystemd/bus-bloom.h \
-       src/libsystemd/bus-introspect.c \
-       src/libsystemd/bus-introspect.h \
-       src/libsystemd/bus-objects.c \
-       src/libsystemd/bus-objects.h \
-       src/libsystemd/bus-gvariant.c \
-       src/libsystemd/bus-gvariant.h \
-       src/libsystemd/bus-convenience.c \
-       src/libsystemd/kdbus.h \
-       src/libsystemd/sd-memfd.c \
-       src/libsystemd/bus-util.c \
-       src/libsystemd/bus-util.h \
-       src/libsystemd/sd-utf8.c \
-       src/libsystemd/sd-event.c \
-       src/libsystemd/event-util.h \
-       src/libsystemd/bus-protocol.h \
-       src/libsystemd/sd-rtnl.c \
-       src/libsystemd/rtnl-internal.h \
-       src/libsystemd/rtnl-message.c \
-       src/libsystemd/rtnl-util.h \
-       src/libsystemd/rtnl-util.c \
-       src/libsystemd/sd-resolve.c \
-       src/libsystemd/resolve-util.h
+       src/libsystemd/sd-bus/bus-error-mapping.c
 
-nodist_libsystemd_la_SOURCES = \
-       src/libsystemd/bus-error-mapping.c
+BUILT_SOURCES += \
+       src/libsystemd/libsystemd.sym
 
-libsystemd_la_LIBADD = \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+libsystemd_la_SOURCES = \
+       $(libsystemd_internal_la_SOURCES) \
+       $(libsystemd_journal_internal_la_SOURCES)
+
+nodist_libsystemd_la_SOURCES = \
+       $(nodist_libsystemd_internal_la_SOURCES)
 
 libsystemd_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       -pthread \
-       -lresolv
+       $(libsystemd_internal_la_CFLAGS) \
+       $(libsystemd_journal_internal_la_CFLAGS)
 
 libsystemd_la_LDFLAGS = \
        $(AM_LDFLAGS) \
        -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
-       -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
-
-pkgconfiglib_DATA += \
-       src/libsystemd/libsystemd.pc
+       -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
 
-EXTRA_DIST += \
-       src/libsystemd/bus-error-mapping.gperf \
-       src/libsystemd/libsystemd.pc.in \
-       src/libsystemd/DIFFERENCES \
-       src/libsystemd/GVARIANT-SERIALIZATION
-
-CLEANFILES += \
-       src/libsystemd/bus-error-mapping.c
-
-lib_LTLIBRARIES += \
-       libsystemd.la
+libsystemd_la_LIBADD = \
+       libsystemd-shared.la \
+       $(libsystemd_journal_internal_la_LIBADD) \
+       $(RT_LIBS) \
+       -lresolv
 
-libsystemd_internal_la_SOURCES = \
-       $(libsystemd_la_SOURCES)
+libsystemd-install-hook:
+       libname=libsystemd.so && $(move-to-rootlibdir)
 
-nodist_libsystemd_internal_la_SOURCES = \
-       $(nodist_libsystemd_la_SOURCES)
+libsystemd-uninstall-hook:
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
 
-libsystemd_internal_la_CFLAGS = \
-       $(libsystemd_la_CFLAGS)
+INSTALL_EXEC_HOOKS += libsystemd-install-hook
+UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
 
-noinst_LTLIBRARIES += \
-       libsystemd-internal.la
+pkgconfiglib_DATA += \
+       src/libsystemd/libsystemd.pc
 
-libsystemd_dump_la_SOURCES = \
-       src/libsystemd/bus-dump.c \
-       src/libsystemd/bus-dump.h
+pkginclude_HEADERS += \
+       src/systemd/sd-login.h \
+       src/systemd/sd-id128.h \
+       src/systemd/sd-daemon.h
 
-libsystemd_dump_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(CAP_CFLAGS)
+if ENABLE_KDBUS
+pkginclude_HEADERS += \
+       src/systemd/sd-bus.h \
+       src/systemd/sd-bus-protocol.h \
+       src/systemd/sd-bus-vtable.h \
+       src/systemd/sd-memfd.h \
+       src/systemd/sd-utf8.h \
+       src/systemd/sd-event.h \
+       src/systemd/sd-rtnl.h \
+       src/systemd/sd-resolve.h
+endif
 
-noinst_LTLIBRARIES += \
-       libsystemd-dump.la
+lib_LTLIBRARIES += \
+       libsystemd.la
 
 tests += \
        test-bus-marshal \
@@ -2113,12 +2230,10 @@ bin_PROGRAMS += \
        busctl
 
 test_bus_marshal_SOURCES = \
-       src/libsystemd/test-bus-marshal.c
+       src/libsystemd/sd-bus/test-bus-marshal.c
 
 test_bus_marshal_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
        libsystemd-capability.la \
@@ -2133,14 +2248,14 @@ test_bus_marshal_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_signature_SOURCES = \
-       src/libsystemd/test-bus-signature.c
+       src/libsystemd/sd-bus/test-bus-signature.c
 
 test_bus_signature_LDADD = \
        libsystemd-shared.la \
        libsystemd-internal.la
 
 test_bus_chat_SOURCES = \
-       src/libsystemd/test-bus-chat.c
+       src/libsystemd/sd-bus/test-bus-chat.c
 
 test_bus_chat_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2148,21 +2263,21 @@ test_bus_chat_CFLAGS = \
 
 test_bus_chat_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_cleanup_SOURCES = \
-       src/libsystemd/test-bus-cleanup.c
+       src/libsystemd/sd-bus/test-bus-cleanup.c
+
+test_bus_cleanup_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
 
 test_bus_cleanup_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_server_SOURCES = \
-       src/libsystemd/test-bus-server.c
+       src/libsystemd/sd-bus/test-bus-server.c
 
 test_bus_server_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2170,12 +2285,10 @@ test_bus_server_CFLAGS = \
 
 test_bus_server_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_objects_SOURCES = \
-       src/libsystemd/test-bus-objects.c
+       src/libsystemd/sd-bus/test-bus-objects.c
 
 test_bus_objects_CFLAGS = \
        $(AM_CFLAGS) \
@@ -2184,29 +2297,23 @@ test_bus_objects_CFLAGS = \
 
 test_bus_objects_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
        libsystemd-capability.la \
        $(CAP_LIBS)
 
 test_bus_error_SOURCES = \
-       src/libsystemd/test-bus-error.c
+       src/libsystemd/sd-bus/test-bus-error.c
 
 test_bus_error_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_gvariant_SOURCES = \
-       src/libsystemd/test-bus-gvariant.c
+       src/libsystemd/sd-bus/test-bus-gvariant.c
 
 test_bus_gvariant_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
        libsystemd-capability.la \
@@ -2219,32 +2326,26 @@ test_bus_gvariant_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_creds_SOURCES = \
-       src/libsystemd/test-bus-creds.c
+       src/libsystemd/sd-bus/test-bus-creds.c
 
 test_bus_creds_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
        libsystemd-capability.la
 
 test_bus_match_SOURCES = \
-       src/libsystemd/test-bus-match.c
+       src/libsystemd/sd-bus/test-bus-match.c
 
 test_bus_match_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_kernel_SOURCES = \
-       src/libsystemd/test-bus-kernel.c
+       src/libsystemd/sd-bus/test-bus-kernel.c
 
 test_bus_kernel_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
        libsystemd-capability.la \
@@ -2255,37 +2356,31 @@ test_bus_kernel_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_kernel_bloom_SOURCES = \
-       src/libsystemd/test-bus-kernel-bloom.c
+       src/libsystemd/sd-bus/test-bus-kernel-bloom.c
 
 test_bus_kernel_bloom_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_kernel_benchmark_SOURCES = \
-       src/libsystemd/test-bus-kernel-benchmark.c
+       src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
 
 test_bus_kernel_benchmark_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_bus_memfd_SOURCES = \
-       src/libsystemd/test-bus-memfd.c
+       src/libsystemd/sd-bus/test-bus-memfd.c
 
 test_bus_memfd_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
 
 test_bus_zero_copy_SOURCES = \
-       src/libsystemd/test-bus-zero-copy.c
+       src/libsystemd/sd-bus/test-bus-zero-copy.c
 
 test_bus_zero_copy_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
        libsystemd-capability.la \
@@ -2296,49 +2391,44 @@ test_bus_zero_copy_CFLAGS = \
        $(CAP_CFLAGS)
 
 test_bus_introspect_SOURCES = \
-       src/libsystemd/test-bus-introspect.c
+       src/libsystemd/sd-bus/test-bus-introspect.c
 
 test_bus_introspect_LDADD = \
-       libsystemd-shared.la \
-       libsystemd-internal.la
+       libsystemd-internal.la \
+       libsystemd-shared.la
 
 test_event_SOURCES = \
-       src/libsystemd/test-event.c
+       src/libsystemd/sd-event/test-event.c
 
 test_event_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 test_rtnl_SOURCES = \
-       src/libsystemd/test-rtnl.c
+       src/libsystemd/sd-rtnl/test-rtnl.c
 
 test_rtnl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 test_resolve_SOURCES = \
        src/systemd/sd-resolve.h \
-       src/libsystemd/test-resolve.c
+       src/libsystemd/sd-resolve/test-resolve.c
 
 test_resolve_LDADD = \
        libsystemd-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       -lresolv
 
 test_resolve_CFLAGS = \
        $(AM_CFLAGS) \
        -pthread
 
 busctl_SOURCES = \
-       src/libsystemd/busctl.c
+       src/libsystemd/sd-bus/busctl.c
 
 busctl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        libsystemd-dump.la \
        libsystemd-capability.la \
@@ -2350,41 +2440,53 @@ busctl_CFLAGS = \
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
-       libsystemd-dhcp.la
+       libsystemd-network.la
 
-libsystemd_dhcp_la_SOURCES = \
+libsystemd_network_la_SOURCES = \
+       src/systemd/sd-network.h \
        src/systemd/sd-dhcp-client.h \
-       src/libsystemd-dhcp/sd-dhcp-client.c \
-       src/libsystemd-dhcp/dhcp-network.c \
-       src/libsystemd-dhcp/dhcp-option.c \
-       src/libsystemd-dhcp/dhcp-internal.h \
-       src/libsystemd-dhcp/dhcp-protocol.h
-
-libsystemd_dhcp_la_LIBADD = \
+       src/systemd/sd-dhcp-lease.h \
+       src/systemd/sd-ipv4ll.h \
+       src/network/sd-network.c \
+       src/network/network-util.h \
+       src/libsystemd-network/sd-dhcp-client.c \
+       src/libsystemd-network/dhcp-network.c \
+       src/libsystemd-network/dhcp-option.c \
+       src/libsystemd-network/dhcp-packet.c \
+       src/libsystemd-network/dhcp-internal.h \
+       src/libsystemd-network/dhcp-protocol.h \
+       src/libsystemd-network/dhcp-lease-internal.h \
+       src/libsystemd-network/sd-dhcp-lease.c \
+       src/libsystemd-network/sd-ipv4ll.c \
+       src/libsystemd-network/ipv4ll-network.c \
+       src/libsystemd-network/ipv4ll-packet.c \
+       src/libsystemd-network/ipv4ll-internal.h
+
+libsystemd_network_la_LIBADD = \
+       libsystemd-label.la \
        libsystemd-internal.la \
        libsystemd-shared.la
 
 test_dhcp_option_SOURCES = \
-       src/libsystemd-dhcp/dhcp-protocol.h \
-       src/libsystemd-dhcp/dhcp-internal.h \
-       src/libsystemd-dhcp/test-dhcp-option.c
+       src/libsystemd-network/dhcp-protocol.h \
+       src/libsystemd-network/dhcp-internal.h \
+       src/libsystemd-network/test-dhcp-option.c
 
 test_dhcp_option_LDADD = \
-       libsystemd-dhcp.la \
+       libsystemd-network.la \
        libsystemd-internal.la \
        libsystemd-shared.la
 
 test_dhcp_client_SOURCES = \
        src/systemd/sd-dhcp-client.h \
-       src/libsystemd-dhcp/dhcp-protocol.h \
-       src/libsystemd-dhcp/dhcp-internal.h \
-       src/libsystemd-dhcp/test-dhcp-client.c
+       src/libsystemd-network/dhcp-protocol.h \
+       src/libsystemd-network/dhcp-internal.h \
+       src/libsystemd-network/test-dhcp-client.c
 
 test_dhcp_client_LDADD = \
-       libsystemd-dhcp.la \
+       libsystemd-network.la \
+       libsystemd-label.la \
        libsystemd-internal.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 tests += \
@@ -2430,8 +2532,7 @@ libudev_la_LDFLAGS = \
        -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
 
 libudev_la_LIBADD = \
-       libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 pkgconfiglib_DATA += \
@@ -2482,10 +2583,10 @@ INSTALL_DIRS += \
        $(sysconfdir)/udev/hwdb.d
 
 dist_network_DATA = \
-       network/99-default.link
+       network/99-default.link \
+       network/80-container-host0.network
 
 dist_udevrules_DATA += \
-       rules/99-systemd.rules \
        rules/42-usb-hid-pm.rules \
        rules/50-udev-default.rules \
        rules/60-drm.rules \
@@ -2502,6 +2603,9 @@ dist_udevrules_DATA += \
        rules/80-net-setup-link.rules \
        rules/95-udev-late.rules
 
+nodist_udevrules_DATA += \
+       rules/99-systemd.rules
+
 dist_udevhwdb_DATA = \
        hwdb/20-pci-vendor-model.hwdb \
        hwdb/20-pci-classes.hwdb \
@@ -2512,6 +2616,7 @@ dist_udevhwdb_DATA = \
        hwdb/20-bluetooth-vendor-product.hwdb \
        hwdb/20-acpi-vendor.hwdb \
        hwdb/20-OUI.hwdb \
+       hwdb/20-net-ifname.hwdb \
        hwdb/60-keyboard.hwdb
 
 udevconfdir = $(sysconfdir)/udev
@@ -2614,9 +2719,7 @@ libudev_core_la_CFLAGS = \
 libudev_core_la_LIBADD = \
        libudev-internal.la \
        libsystemd-label.la \
-       libsystemd-daemon-internal.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la \
        $(BLKID_LIBS) \
        $(KMOD_LIBS)
@@ -2650,10 +2753,8 @@ if HAVE_ACL
 libudev_core_la_SOURCES += \
        src/udev/udev-builtin-uaccess.c \
        src/login/logind-acl.c \
-       src/login/sd-login.c \
-       src/systemd/sd-login.h \
-       src/login/login-shared.c \
-       src/login/login-shared.h
+       src/libsystemd/sd-login/sd-login.c \
+       src/systemd/sd-login.h
 
 libudev_core_la_LIBADD += \
        libsystemd-acl.la
@@ -2988,62 +3089,16 @@ udevlibexec_PROGRAMS += \
        mtd_probe
 
 # ------------------------------------------------------------------------------
-libsystemd_id128_la_SOURCES = \
-       src/libsystemd-id128/libsystemd-id128.sym \
-       src/libsystemd-id128/sd-id128.c
-
-libsystemd_id128_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       -fvisibility=hidden
-
-libsystemd_id128_la_LDFLAGS = \
-       $(AM_LDFLAGS) \
-       -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
-       -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
-
-libsystemd_id128_la_LIBADD = \
-       libsystemd-daemon-internal.la \
-       libsystemd-shared.la
-
-libsystemd_id128_internal_la_SOURCES = \
-       $(libsystemd_id128_la_SOURCES)
-
 test_id128_SOURCES = \
        src/test/test-id128.c
 
 test_id128_LDADD = \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 tests += \
        test-id128
 
-pkginclude_HEADERS += \
-       src/systemd/sd-id128.h
-
-lib_LTLIBRARIES += \
-       libsystemd-id128.la
-
-noinst_LTLIBRARIES += \
-       libsystemd-id128-internal.la
-
-pkgconfiglib_DATA += \
-       src/libsystemd-id128/libsystemd-id128.pc
-
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
-libsystemd-id128-install-hook:
-       libname=libsystemd-id128.so && $(move-to-rootlibdir)
-
-libsystemd-id128-uninstall-hook:
-       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
-
-INSTALL_EXEC_HOOKS += libsystemd-id128-install-hook
-UNINSTALL_EXEC_HOOKS += libsystemd-id128-uninstall-hook
-
-EXTRA_DIST += \
-       src/libsystemd-id128/libsystemd-id128.pc.in
-
 # ------------------------------------------------------------------------------
 
 rootlibexec_PROGRAMS += \
@@ -3054,7 +3109,7 @@ systemd_activate_SOURCES = \
 
 systemd_activate_LDADD = \
        libsystemd-label.la \
-       libsystemd-daemon-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -3073,6 +3128,38 @@ systemd_cat_SOURCES = \
 systemd_cat_LDADD = \
        libsystemd-journal-core.la
 
+if HAVE_MICROHTTPD
+rootlibexec_PROGRAMS += \
+       systemd-journal-remote
+
+systemd_journal_remote_SOURCES = \
+       src/journal/journal-remote-parse.h \
+       src/journal/journal-remote-parse.c \
+       src/journal/journal-remote-write.h \
+       src/journal/journal-remote-write.c \
+       src/journal/journal-remote.c
+
+systemd_journal_remote_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-journal-core.la
+
+systemd_journal_remote_SOURCES += \
+       src/journal/microhttpd-util.h \
+       src/journal/microhttpd-util.c
+
+systemd_journal_remote_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(MICROHTTPD_CFLAGS)
+
+systemd_journal_remote_LDADD += \
+       $(MICROHTTPD_LIBS)
+
+if HAVE_GNUTLS
+systemd_journal_remote_LDADD += \
+       $(GNUTLS_LIBS)
+endif
+endif
+
 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
 journalctl_CFLAGS = \
        $(AM_CFLAGS)
@@ -3082,7 +3169,7 @@ journalctl_SOURCES = \
 
 journalctl_LDADD = \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-logs.la \
        libsystemd-shared.la
 
@@ -3179,68 +3266,6 @@ test_catalog_CPPFLAGS = \
 test_catalog_LDADD = \
        libsystemd-journal-core.la
 
-libsystemd_journal_la_SOURCES = \
-       src/journal/libsystemd-journal.sym \
-       src/journal/sd-journal.c \
-       src/systemd/sd-journal.h \
-       src/systemd/_sd-common.h \
-       src/journal/journal-file.c \
-       src/journal/journal-file.h \
-       src/journal/journal-vacuum.c \
-       src/journal/journal-vacuum.h \
-       src/journal/journal-verify.c \
-       src/journal/journal-verify.h \
-       src/journal/lookup3.c \
-       src/journal/lookup3.h \
-       src/journal/journal-send.c \
-       src/journal/journal-def.h \
-       src/journal/compress.h \
-       src/journal/catalog.c \
-       src/journal/catalog.h \
-       src/journal/mmap-cache.c \
-       src/journal/mmap-cache.h
-
-libsystemd_journal_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       -fvisibility=hidden
-
-libsystemd_journal_la_LDFLAGS = \
-       $(AM_LDFLAGS) \
-       -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
-       -Wl,--version-script=$(top_srcdir)/src/journal/libsystemd-journal.sym
-
-libsystemd_journal_la_LIBADD = \
-       libsystemd-label.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-shared.la
-
-libsystemd_journal_internal_la_SOURCES = \
-       $(libsystemd_journal_la_SOURCES)
-
-# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
-libsystemd_journal_internal_la_CFLAGS = \
-       $(AM_CFLAGS)
-
-libsystemd_journal_internal_la_LIBADD =
-
-if HAVE_XZ
-libsystemd_journal_la_SOURCES += \
-       src/journal/compress.c
-
-libsystemd_journal_la_CFLAGS += \
-       $(XZ_CFLAGS)
-
-libsystemd_journal_la_LIBADD += \
-       $(XZ_LIBS)
-
-libsystemd_journal_internal_la_CFLAGS += \
-       $(XZ_CFLAGS)
-
-libsystemd_journal_internal_la_LIBADD += \
-       $(XZ_LIBS)
-endif
-
 libsystemd_journal_core_la_SOURCES = \
        src/journal/journald-kmsg.c \
        src/journal/journald-kmsg.h \
@@ -3252,6 +3277,8 @@ libsystemd_journal_core_la_SOURCES = \
        src/journal/journald-server.h \
        src/journal/journald-console.c \
        src/journal/journald-console.h \
+       src/journal/journald-wall.c \
+       src/journal/journald-wall.h \
        src/journal/journald-native.c \
        src/journal/journald-native.h \
        src/journal/journald-rate-limit.c \
@@ -3266,15 +3293,9 @@ libsystemd_journal_core_la_LIBADD = \
        libudev-internal.la \
        libsystemd-capability.la \
        libsystemd-label.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
-if ENABLE_LOGIND
-libsystemd_journal_core_la_LIBADD += \
-       libsystemd-login-internal.la
-endif
-
 if HAVE_ACL
 libsystemd_journal_core_la_LIBADD += \
        libsystemd-acl.la
@@ -3283,47 +3304,20 @@ endif
 noinst_LTLIBRARIES += \
        libsystemd-journal-core.la
 
-if HAVE_GCRYPT
-libsystemd_journal_la_SOURCES += \
-       src/journal/journal-authenticate.c \
-       src/journal/journal-authenticate.h \
-       src/journal/fsprg.c \
-       src/journal/fsprg.h
-
-libsystemd_journal_la_CFLAGS += \
-       $(GCRYPT_CFLAGS) \
-       -Wno-pointer-arith
-
-libsystemd_journal_la_LIBADD += \
-       $(GCRYPT_LIBS)
-
-libsystemd_journal_internal_la_CFLAGS += \
-       $(GCRYPT_CFLAGS) \
-       -Wno-pointer-arith
-
-libsystemd_journal_internal_la_LIBADD += \
-       $(GCRYPT_LIBS)
-endif
-
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if
-# needed. Also, grant read access to new journal files to members of
-# "adm" and "wheel".
-libsystemd-journal-install-hook:
-       libname=libsystemd-journal.so && $(move-to-rootlibdir)
+journal-install-hook:
        -$(MKDIR_P) $(DESTDIR)/var/log/journal
        -chown 0:0 $(DESTDIR)/var/log/journal
        -chmod 755 $(DESTDIR)/var/log/journal
        -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
        -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
 
-libsystemd-journal-uninstall-hook:
-       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
+journal-uninstall-hook:
+       -rmdir $(DESTDIR)/var/log/journal/
 
-INSTALL_EXEC_HOOKS += libsystemd-journal-install-hook
-UNINSTALL_EXEC_HOOKS += libsystemd-journal-uninstall-hook
+INSTALL_EXEC_HOOKS += journal-install-hook
+UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
 
 # ------------------------------------------------------------------------------
-
 # Update catalog on installation. Do not bother if installing
 # in DESTDIR, since this is likely for packaging purposes.
 catalog-update-hook:
@@ -3359,8 +3353,58 @@ pkginclude_HEADERS += \
        src/systemd/sd-messages.h \
        src/systemd/_sd-common.h
 
-lib_LTLIBRARIES += \
-       libsystemd-journal.la
+libsystemd_journal_internal_la_SOURCES = \
+       src/journal/sd-journal.c \
+       src/systemd/sd-journal.h \
+       src/systemd/_sd-common.h \
+       src/journal/journal-file.c \
+       src/journal/journal-file.h \
+       src/journal/journal-vacuum.c \
+       src/journal/journal-vacuum.h \
+       src/journal/journal-verify.c \
+       src/journal/journal-verify.h \
+       src/journal/lookup3.c \
+       src/journal/lookup3.h \
+       src/journal/journal-send.c \
+       src/journal/journal-def.h \
+       src/journal/compress.h \
+       src/journal/catalog.c \
+       src/journal/catalog.h \
+       src/journal/mmap-cache.c \
+       src/journal/mmap-cache.h
+
+# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
+libsystemd_journal_internal_la_CFLAGS =
+       $(AM_CFLAGS)
+
+libsystemd_journal_internal_la_LIBADD =
+
+if HAVE_XZ
+libsystemd_journal_internal_la_SOURCES += \
+       src/journal/compress.c
+
+libsystemd_journal_internal_la_CFLAGS += \
+       $(XZ_CFLAGS)
+
+libsystemd_journal_internal_la_LIBADD += \
+       $(XZ_LIBS)
+endif
+
+if HAVE_GCRYPT
+libsystemd_journal_internal_la_SOURCES += \
+       src/journal/journal-authenticate.c \
+       src/journal/journal-authenticate.h \
+       src/journal/fsprg.c \
+       src/journal/fsprg.h
+
+libsystemd_journal_internal_la_LIBADD += \
+       $(GCRYPT_LIBS)
+
+# fsprg.c is a drop-in file using void pointer arithmetic
+libsystemd_journal_internal_la_CFLAGS += \
+       $(GCRYPT_CFLAGS) \
+       -Wno-pointer-arith
+endif
 
 noinst_LTLIBRARIES += \
        libsystemd-journal-internal.la
@@ -3384,9 +3428,6 @@ nodist_systemunit_DATA += \
 dist_pkgsysconf_DATA += \
        src/journal/journald.conf
 
-pkgconfiglib_DATA += \
-       src/journal/libsystemd-journal.pc
-
 dist_catalog_DATA = \
        catalog/systemd.fr.catalog \
        catalog/systemd.ru.catalog \
@@ -3400,7 +3441,6 @@ SYSINIT_TARGET_WANTS += \
        systemd-journal-flush.service
 
 EXTRA_DIST += \
-       src/journal/libsystemd-journal.pc.in \
        units/systemd-journald.service.in \
        units/systemd-journal-flush.service.in \
        src/journal/journald-gperf.gperf
@@ -3423,12 +3463,15 @@ systemd_journal_gatewayd_SOURCES = \
 systemd_journal_gatewayd_LDADD = \
        libsystemd-logs.la \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-internal.la \
        libsystemd-shared.la \
        $(MICROHTTPD_LIBS)
 
+if HAVE_GNUTLS
+systemd_journal_gatewayd_LDADD += \
+       $(GNUTLS_LIBS)
+endif
+
 systemd_journal_gatewayd_CFLAGS = \
        $(AM_CFLAGS) \
        $(MICROHTTPD_CFLAGS)
@@ -3460,8 +3503,6 @@ systemd_socket_proxyd_LDADD = \
        libsystemd-logs.la \
        libsystemd-internal.la \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -3472,12 +3513,8 @@ systemd_coredump_SOURCES = \
 systemd_coredump_LDADD = \
        libsystemd-journal-internal.la \
        libsystemd-label.la \
-       libsystemd-shared.la
-
-if ENABLE_LOGIND
-systemd_coredump_LDADD += \
-       libsystemd-login-internal.la
-endif
+       libsystemd-shared.la \
+       libsystemd-internal.la
 
 rootlibexec_PROGRAMS += \
        systemd-coredump
@@ -3487,7 +3524,7 @@ systemd_coredumpctl_SOURCES = \
 
 systemd_coredumpctl_LDADD = \
        libsystemd-journal-internal.la \
-       libsystemd-id128-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 bin_PROGRAMS += \
@@ -3572,7 +3609,7 @@ systemd_readahead_SOURCES = \
        src/readahead/readahead-common.h
 
 systemd_readahead_LDADD = \
-       libsystemd-daemon-internal.la \
+       libsystemd-internal.la \
        libudev-internal.la \
        libsystemd-shared.la
 
@@ -3748,8 +3785,6 @@ systemd_hostnamed_SOURCES = \
 systemd_hostnamed_LDADD = \
        libsystemd-label.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 rootlibexec_PROGRAMS += \
@@ -3781,8 +3816,6 @@ hostnamectl_SOURCES = \
 
 hostnamectl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 bin_PROGRAMS += \
@@ -3809,8 +3842,6 @@ systemd_bus_driverd_SOURCES = \
 
 systemd_bus_driverd_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 rootlibexec_PROGRAMS += \
@@ -3847,8 +3878,6 @@ systemd_localed_SOURCES = \
 systemd_localed_LDADD = \
        libsystemd-label.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 nodist_systemunit_DATA += \
@@ -3882,15 +3911,13 @@ dist_noinst_SCRIPT = \
        src/locale/generate-kbd-model-map
 
 update-kbd-model-map: src/locale/generate-kbd-model-map
-       $PYTHON $< > src/locale/kbd-model-map
+       $PYTHON $< >src/locale/kbd-model-map
 
 localectl_SOURCES = \
        src/locale/localectl.c
 
 localectl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 bin_PROGRAMS += \
@@ -3904,6 +3931,8 @@ dist_zshcompletion_DATA += \
 
 endif
 
+.PHONY: update-kbd-model-map
+
 polkitpolicy_in_files += \
        src/locale/org.freedesktop.locale1.policy.in
 
@@ -3912,15 +3941,24 @@ EXTRA_DIST += \
 
 # ------------------------------------------------------------------------------
 if ENABLE_TIMEDATED
+libsystemd_timedated_core_la_SOURCES = \
+       src/timedate/timedate-sntp.c \
+       src/timedate/timedate-sntp.h
+
+libsystemd_timedated_core_la_LIBADD = \
+       libsystemd-label.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       -lm
+
+noinst_LTLIBRARIES += \
+       libsystemd-timedated-core.la
+
 systemd_timedated_SOURCES = \
        src/timedate/timedated.c
 
 systemd_timedated_LDADD = \
-       libsystemd-label.la \
-       libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+       libsystemd-timedated-core.la
 
 rootlibexec_PROGRAMS += \
        systemd-timedated
@@ -3955,8 +3993,6 @@ timedatectl_SOURCES = \
 
 timedatectl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 bin_PROGRAMS += \
@@ -3967,6 +4003,15 @@ dist_bashcompletion_DATA += \
 
 dist_zshcompletion_DATA += \
        shell-completion/zsh/_timedatectl
+
+test_timedate_sntp_SOURCES = \
+       src/timedate/test-timedate-sntp.c
+
+test_timedate_sntp_LDADD = \
+       libsystemd-timedated-core.la
+
+manual_tests += \
+       test-timedate-sntp
 endif
 
 polkitpolicy_in_files += \
@@ -4014,9 +4059,7 @@ libsystemd_machine_core_la_SOURCES = \
 
 libsystemd_machine_core_la_LIBADD = \
        libsystemd-label.la \
-       libsystemd-daemon-internal.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
        libudev-internal.la \
        libsystemd-shared.la
 
@@ -4028,13 +4071,14 @@ machinectl_SOURCES = \
 
 machinectl_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 rootbin_PROGRAMS += \
        machinectl
 
+dist_bashcompletion_DATA += \
+       shell-completion/bash/machinectl
+
 test_machine_tables_SOURCES = \
        src/machine/test-machine-tables.c
 
@@ -4058,7 +4102,8 @@ dist_dbuspolicy_DATA += \
        src/machine/org.freedesktop.machine1.conf
 
 dist_zshcompletion_DATA += \
-       shell-completion/zsh/_machinectl
+       shell-completion/zsh/_machinectl \
+       shell-completion/zsh/_sd_machines
 
 SYSTEM_UNIT_ALIASES += \
        systemd-machined.service dbus-org.freedesktop.machine1.service
@@ -4077,62 +4122,67 @@ rootlibexec_PROGRAMS += \
        systemd-networkd
 
 systemd_networkd_SOURCES = \
+       src/network/networkd.c
+
+systemd_networkd_LDADD = \
+       libsystemd-networkd-core.la
+
+noinst_LTLIBRARIES += \
+       libsystemd-networkd-core.la
+
+libsystemd_networkd_core_la_SOURCES = \
        src/network/networkd.h \
-       src/network/networkd.c \
        src/network/networkd-link.c \
-       src/network/networkd-bridge.c \
+       src/network/networkd-netdev.c \
        src/network/networkd-network.c \
        src/network/networkd-address.c \
        src/network/networkd-route.c \
        src/network/networkd-manager.c
 
-nodist_systemd_networkd_SOURCES = \
-       src/network/networkd-gperf.c
+nodist_libsystemd_networkd_core_la_SOURCES = \
+       src/network/networkd-network-gperf.c \
+       src/network/networkd-netdev-gperf.c
 
-systemd_networkd_LDADD = \
+libsystemd_networkd_core_la_LIBADD = \
        libudev-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-internal.la \
-       libsystemd-dhcp.la \
-       libsystemd-id128-internal.la \
+       libsystemd-network.la \
        libsystemd-label.la \
        libsystemd-shared.la
 
 nodist_systemunit_DATA += \
        units/systemd-networkd.service
 
-MULTI_USER_TARGET_WANTS += \
-       systemd-networkd.service
+GENERAL_ALIASES += \
+       $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service
+
+rootlibexec_PROGRAMS += \
+       systemd-networkd-wait-online
+
+systemd_networkd_wait_online_SOURCES = \
+       src/network/networkd-wait-online.c
+
+systemd_networkd_wait_online_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-network.la
 
 test_network_SOURCES = \
-       src/network/test-network.c \
-       src/network/networkd.h \
-       src/network/networkd-link.c \
-       src/network/networkd-bridge.c \
-       src/network/networkd-network.c \
-       src/network/networkd-address.c \
-       src/network/networkd-route.c \
-       src/network/networkd-manager.c \
-       src/network/networkd-gperf.c
+       src/network/test-network.c
 
 test_network_LDADD = \
-       libudev-internal.la \
-       libsystemd-internal.la \
-       libsystemd-dhcp.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-label.la \
-       libsystemd-shared.la
+       libsystemd-networkd-core.la
 
 tests += \
        test-network
 
 EXTRA_DIST += \
-       src/network/networkd-gperf.gperf \
+       src/network/networkd-network-gperf.gperf \
+       src/network/networkd-netdev-gperf.gperf \
        units/systemd-networkd.service.in
 
 CLEANFILES += \
-       src/network/networkd-gperf.c
+       src/network/networkd-network-gperf.c \
+       src/network/networkd-netdev-gperf.c
 endif
 
 # ------------------------------------------------------------------------------
@@ -4169,15 +4219,11 @@ libsystemd_logind_core_la_SOURCES = \
        src/login/logind-session-dbus.c \
        src/login/logind-seat-dbus.c \
        src/login/logind-user-dbus.c \
-       src/login/logind-acl.h \
-       src/login/login-shared.c \
-       src/login/login-shared.h
+       src/login/logind-acl.h
 
 libsystemd_logind_core_la_LIBADD = \
        libsystemd-label.la \
        libsystemd-capability.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-internal.la \
        libudev-internal.la \
        libsystemd-shared.la
@@ -4210,9 +4256,7 @@ loginctl_SOURCES = \
 loginctl_LDADD = \
        libsystemd-internal.la \
        libudev-internal.la \
-       libsystemd-shared.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la
+       libsystemd-shared.la
 
 rootbin_PROGRAMS += \
        loginctl
@@ -4229,25 +4273,23 @@ systemd_inhibit_SOURCES = \
 
 systemd_inhibit_LDADD = \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la
 
 rootbin_PROGRAMS += \
        systemd-inhibit
 
 test_login_SOURCES = \
-       src/login/test-login.c
+       src/libsystemd/sd-login/test-login.c
 
 test_login_LDADD = \
-       libsystemd-login-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_login_shared_SOURCES = \
        src/login/test-login-shared.c
 
 test_login_shared_LDADD = \
-       libsystemd-login-internal.la \
+       libsystemd-internal.la \
        libsystemd-shared.la
 
 test_inhibit_SOURCES = \
@@ -4255,8 +4297,6 @@ test_inhibit_SOURCES = \
 
 test_inhibit_LDADD = \
        libsystemd-internal.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-id128-internal.la \
        libsystemd-shared.la
 
 test_login_tables_SOURCES = \
@@ -4273,29 +4313,6 @@ tests += \
        test-login-tables \
        test-login-shared
 
-libsystemd_login_la_SOURCES = \
-       src/login/libsystemd-login.sym \
-       src/login/sd-login.c \
-       src/systemd/sd-login.h \
-       src/login/login-shared.c \
-       src/login/login-shared.h
-
-libsystemd_login_la_CFLAGS = \
-       $(AM_CFLAGS) \
-       -fvisibility=hidden
-
-libsystemd_login_la_LDFLAGS = \
-       $(AM_LDFLAGS) \
-       -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
-       -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym
-
-libsystemd_login_la_LIBADD = \
-       libsystemd-daemon-internal.la \
-       libsystemd-shared.la
-
-libsystemd_login_internal_la_SOURCES = \
-       $(libsystemd_login_la_SOURCES)
-
 if HAVE_PAM
 pam_systemd_la_SOURCES = \
        src/login/pam-module.c
@@ -4316,8 +4333,6 @@ pam_systemd_la_LDFLAGS = \
 pam_systemd_la_LIBADD = \
        libsystemd-capability.la \
        libsystemd-internal.la \
-       libsystemd-id128-internal.la \
-       libsystemd-daemon-internal.la \
        libsystemd-shared.la \
        $(PAM_LIBS)
 
@@ -4328,16 +4343,6 @@ dist_pamconf_DATA = \
        src/login/systemd-user
 endif
 
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
-libsystemd-login-install-hook:
-       libname=libsystemd-login.so && $(move-to-rootlibdir)
-
-libsystemd-login-uninstall-hook:
-       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
-
-INSTALL_EXEC_HOOKS += libsystemd-login-install-hook
-UNINSTALL_EXEC_HOOKS += libsystemd-login-uninstall-hook
-
 nodist_systemunit_DATA += \
        units/systemd-logind.service \
        units/systemd-user-sessions.service
@@ -4355,18 +4360,6 @@ dist_dbuspolicy_DATA += \
 dist_pkgsysconf_DATA += \
        src/login/logind.conf
 
-pkginclude_HEADERS += \
-       src/systemd/sd-login.h
-
-lib_LTLIBRARIES += \
-       libsystemd-login.la
-
-noinst_LTLIBRARIES += \
-       libsystemd-login-internal.la
-
-pkgconfiglib_DATA += \
-       src/login/libsystemd-login.pc
-
 polkitpolicy_files += \
        src/login/org.freedesktop.login1.policy
 
@@ -4416,7 +4409,6 @@ polkitpolicy_in_files += \
 
 EXTRA_DIST += \
        src/login/logind-gperf.gperf \
-       src/login/libsystemd-login.pc.in \
        src/login/71-seat.rules.in \
        src/login/73-seat-late.rules.in \
        units/systemd-logind.service.in \
@@ -4447,7 +4439,7 @@ _journal_la_LDFLAGS = \
 
 _journal_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
-       libsystemd-journal.la
+       libsystemd.la
 
 id128_la_SOURCES = \
        src/python-systemd/id128.c \
@@ -4469,7 +4461,8 @@ id128_la_LDFLAGS = \
 
 id128_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
-       libsystemd-id128.la
+       libsystemd-shared.la \
+       libsystemd.la
 
 _daemon_la_SOURCES = \
        src/python-systemd/_daemon.c \
@@ -4490,7 +4483,8 @@ _daemon_la_LDFLAGS = \
 
 _daemon_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
-       libsystemd-daemon.la
+       libsystemd-shared.la \
+       libsystemd.la
 
 _reader_la_SOURCES = \
        src/python-systemd/_reader.c \
@@ -4510,10 +4504,8 @@ _reader_la_LDFLAGS = \
 
 _reader_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
-       libsystemd-journal.la \
-       libsystemd-id128.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd.la
 
 login_la_SOURCES = \
        src/python-systemd/login.c \
@@ -4533,10 +4525,8 @@ login_la_LDFLAGS = \
 
 login_la_LIBADD = \
        $(PYTHON_DEVEL_LIBS) \
-       libsystemd-journal.la \
-       libsystemd-login.la \
-       libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd.la
 
 dist_pkgpyexec_PYTHON = \
        src/python-systemd/journal.py \
@@ -4570,6 +4560,8 @@ endif
 
 CLEAN_LOCAL_HOOKS += clean-sphinx
 
+.PHONY: python-shell destdir-sphinx clean-sphinx clean-python
+
 clean-sphinx:
        -rm -rf docs/html/python-systemd/
 
@@ -4579,6 +4571,125 @@ clean-python:
        -rm -f _daemon.la id128.la _journal.la login.la _reader.la
 
 # ------------------------------------------------------------------------------
+if ENABLE_COMPAT_LIBS
+EXTRA_DIST += \
+       src/compat-libs/linkwarning.h
+
+libsystemd-%.c: src/compat-libs/libsystemd-%.sym
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
+
+BUILT_SOURCES += \
+       libsystemd-journal.c \
+       libsystemd-login.c \
+       libsystemd-id128.c \
+       libsystemd-daemon.c
+
+libsystemd_journal_la_SOURCES = \
+       libsystemd-journal.c \
+       src/compat-libs/libsystemd-journal.sym
+
+libsystemd_journal_la_CPPFLAGS = \
+       $(AM_CFLAGS) \
+       -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
+
+libsystemd_journal_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
+       -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
+
+libsystemd_journal_la_LIBADD = \
+       libsystemd-journal-internal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+libsystemd_login_la_SOURCES = \
+       libsystemd-login.c \
+       src/compat-libs/libsystemd-login.sym
+
+libsystemd_login_la_CPPFLAGS = \
+       $(AM_CFLAGS) \
+       -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
+
+libsystemd_login_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
+       -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
+
+libsystemd_login_la_LIBADD = \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+libsystemd_id128_la_SOURCES = \
+       libsystemd-id128.c \
+       src/compat-libs/libsystemd-id128.sym
+
+libsystemd_id128_la_CPPFLAGS = \
+       $(AM_CFLAGS) \
+       -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
+
+libsystemd_id128_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
+       -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
+
+libsystemd_id128_la_LIBADD = \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+libsystemd_daemon_la_SOURCES = \
+       libsystemd-daemon.c \
+       src/compat-libs/libsystemd-daemon.sym
+
+libsystemd_daemon_la_CPPFLAGS = \
+       $(AM_CFLAGS) \
+       -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
+
+libsystemd_daemon_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
+       -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
+
+libsystemd_daemon_la_LIBADD = \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+lib_LTLIBRARIES += \
+       libsystemd-journal.la \
+       libsystemd-login.la \
+       libsystemd-id128.la \
+       libsystemd-daemon.la
+
+pkgconfiglib_DATA += \
+       src/compat-libs/libsystemd-journal.pc \
+       src/compat-libs/libsystemd-login.pc \
+       src/compat-libs/libsystemd-id128.pc \
+       src/compat-libs/libsystemd-daemon.pc
+
+# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
+compat-lib-install-hook:
+       libname=libsystemd-login.so && $(move-to-rootlibdir)
+       libname=libsystemd-journal.so && $(move-to-rootlibdir)
+       libname=libsystemd-id128.so && $(move-to-rootlibdir)
+       libname=libsystemd-daemon.so && $(move-to-rootlibdir)
+
+compat-lib-uninstall-hook:
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
+       rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
+
+INSTALL_EXEC_HOOKS += compat-lib-install-hook
+UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
+endif
+
+EXTRA_DIST += \
+       src/compat-libs/libsystemd-journal.pc.in \
+       src/compat-libs/libsystemd-login.pc.in \
+       src/compat-libs/libsystemd-id128.pc.in \
+       src/compat-libs/libsystemd-daemon.pc.in
+
+# ------------------------------------------------------------------------------
 substitutions = \
        '|rootlibexecdir=$(rootlibexecdir)|' \
        '|rootbindir=$(rootbindir)|' \
@@ -4691,10 +4802,10 @@ CLEANFILES += \
 
 # ------------------------------------------------------------------------------
 if ENABLE_MANPAGES
-man/custom-entities.ent:
+man/custom-entities.ent: configure.ac
        $(AM_V_GEN)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
-        echo '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">,$(substitutions))))') \
+        printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
         > $@ # '
 
 DISTCLEANFILES += \
@@ -4702,6 +4813,7 @@ DISTCLEANFILES += \
 
 XSLTPROC_FLAGS = \
        --nonet \
+       --xinclude \
        --stringparam man.output.quietly 1 \
        --stringparam funcsynopsis.style ansi \
        --stringparam man.authors.section.enabled 0 \
@@ -4830,7 +4942,7 @@ GENERAL_ALIASES += \
        $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
        $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
        $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
-       ../system-services/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
+       $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
 
 if HAVE_SYSV_COMPAT
 INSTALL_DIRS += \
@@ -4886,7 +4998,8 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
        --with-rootprefix=$$dc_install_base \
        --disable-split-usr \
-       --enable-kdbus
+       --enable-kdbus \
+       --enable-compat-libs
 
 if HAVE_SYSV_COMPAT
 DISTCHECK_CONFIGURE_FLAGS += \
@@ -4903,6 +5016,7 @@ DISTCHECK_CONFIGURE_FLAGS += \
        --enable-gtk-doc
 endif
 
+.PHONY: hwdb-update
 hwdb-update:
        ( cd $(top_srcdir)/hwdb && \
        wget -N http://www.linux-usb.org/usb.ids \
@@ -4911,16 +5025,19 @@ hwdb-update:
                http://standards.ieee.org/develop/regauth/iab/iab.txt && \
        ./ids-update.pl )
 
+.PHONY: kdbus-update
 kdbus-update:
        ( cd $(top_srcdir)/src/libsystemd/ && \
        wget -N https://d-bus.googlecode.com/git/kdbus.h )
 
-upload: all distcheck
+.PHONY: upload
+upload: all check dist
        cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
        scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
        scp man/*.html tango:public/systemd-man/
 
 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
+.PHONY: doc-sync
 doc-sync: all destdir-sphinx
        gtkdoc-rebase --html-dir=docs/libudev/html --online
        rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
@@ -4929,9 +5046,11 @@ doc-sync: all destdir-sphinx
        rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
        rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
 
+.PHONY: git-tag
 git-tag:
-       git tag "v$(VERSION)" -m "systemd $(VERSION)"
+       git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
 
+.PHONY: install-tree
 install-tree: all
        rm -rf $(abs_srcdir)/install-tree
        $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
@@ -4939,6 +5058,7 @@ install-tree: all
 
 # Let's run all tests of the test suite, but under valgrind. Let's
 # exclude the one perl script we have in there
+.PHONY: valgrind-tests
 valgrind-tests: $(TESTS)
        $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
                if file $$f | grep -q shell; then \
@@ -4954,6 +5074,7 @@ exported-%: %
 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
        $(AM_V_GEN)cat $^ > $@
 
+.PHONY: check-api-docs
 check-api-docs: exported man
        $(AM_V_GEN)for symbol in `cat exported` ; do \
                if test -f $(builddir)/man/$$symbol.html ; then \
@@ -4975,11 +5096,19 @@ CLEANFILES += \
        defined \
        undefined
 
+.PHONY: check-api-unused
 check-api-unused: defined undefined exported
        ( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
 
-# Stupid test that everything purported to be exported really is
+.PHONY: check-includes
+check-includes: $(top_srcdir)/tools/check-includes.pl
+       $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
+               | xargs $(top_srcdir)/tools/check-includes.pl
+
+EXTRA_DIST += \
+       $(top_srcdir)/tools/check-includes.pl
 
+# Stupid test that everything purported to be exported really is
 define generate-sym-test
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_at)printf '#include <stdio.h>\n' > $@
@@ -4992,41 +5121,58 @@ define generate-sym-test
 endef
 
 test-libsystemd-sym.c: \
-       src/libsystemd/libsystemd.sym \
-       src/systemd/sd-bus.h \
-       src/systemd/sd-utf8.h
+               $(top_builddir)/src/libsystemd/libsystemd.sym \
+               src/systemd/sd-journal.h \
+               src/systemd/sd-daemon.h \
+               src/systemd/sd-login.h \
+               src/systemd/sd-bus.h \
+               src/systemd/sd-utf8.h
        $(generate-sym-test)
 
+test-libudev-sym.c: \
+               src/libudev/libudev.sym \
+               src/udev/udev.h
+       $(generate-sym-test)
+
+test_libsystemd_sym_SOURCES = \
+       test-libsystemd-sym.c
+test_libsystemd_sym_LDADD = \
+       libsystemd.la
+
+test_libudev_sym_SOURCES = \
+       test-libudev-sym.c
+test_libudev_sym_LDADD = \
+       libudev.la
+
+BUILT_SOURCES += \
+       $(test_libsystemd_sym_SOURCES) \
+       $(test_libudev_sym_SOURCES)
+
+tests += \
+       test-libsystemd-sym \
+       test-libudev-sym
+
+if ENABLE_COMPAT_LIBS
 test-libsystemd-daemon-sym.c: \
-       src/libsystemd-daemon/libsystemd-daemon.sym \
-       src/systemd/sd-daemon.h
+               src/compat-libs/libsystemd-daemon.sym \
+               src/systemd/sd-daemon.h
        $(generate-sym-test)
 
 test-libsystemd-id128-sym.c: \
-       src/libsystemd-id128/libsystemd-id128.sym \
-       src/systemd/sd-id128.h
+               src/compat-libs/libsystemd-id128.sym \
+               src/systemd/sd-id128.h
        $(generate-sym-test)
 
 test-libsystemd-journal-sym.c: \
-       src/journal/libsystemd-journal.sym \
-       src/systemd/sd-journal.h
+               src/compat-libs/libsystemd-journal.sym \
+               src/systemd/sd-journal.h
        $(generate-sym-test)
 
 test-libsystemd-login-sym.c: \
-       src/login/libsystemd-login.sym \
-       src/systemd/sd-login.h
+               src/compat-libs/libsystemd-login.sym \
+               src/systemd/sd-login.h
        $(generate-sym-test)
 
-test-libudev-sym.c: \
-       src/libudev/libudev.sym \
-       src/udev/udev.h
-       $(generate-sym-test)
-
-test_libsystemd_sym_SOURCES = \
-       test-libsystemd-sym.c
-test_libsystemd_sym_LDADD = \
-       libsystemd.la
-
 test_libsystemd_daemon_sym_SOURCES = \
        test-libsystemd-daemon-sym.c
 test_libsystemd_daemon_sym_LDADD = \
@@ -5047,30 +5193,26 @@ test_libsystemd_login_sym_SOURCES = \
 test_libsystemd_login_sym_LDADD = \
        libsystemd-login.la
 
-test_libudev_sym_SOURCES = \
-       test-libudev-sym.c
-test_libudev_sym_LDADD = \
-       libudev.la
-
 BUILT_SOURCES += \
-       $(test_libsystemd_sym_SOURCES) \
-       $(test_libsystemd_daemon_sym_SOURCES) \
-       $(test_libsystemd_id128_sym_SOURCES) \
        $(test_libsystemd_journal_sym_SOURCES) \
        $(test_libsystemd_login_sym_SOURCES) \
-       $(test_libudev_sym_SOURCES)
+       $(test_libsystemd_id128_sym_SOURCES) \
+       $(test_libsystemd_daemon_sym_SOURCES)
 
 tests += \
-       test-libsystemd-sym \
-       test-libsystemd-daemon-sym \
-       test-libsystemd-id128-sym \
        test-libsystemd-journal-sym \
        test-libsystemd-login-sym \
-       test-libudev-sym
+       test-libsystemd-id128-sym \
+       test-libsystemd-daemon-sym
+endif
 
+.PHONY: cppcheck
 cppcheck:
        cppcheck --enable=all -q $(top_srcdir)
 
 # Used to extract compile flags for YCM.
 print-%:
        @echo $($*)
+
+git-contrib:
+       @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u