summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/journal/Makefile95
-rw-r--r--src/libbasic/Makefile70
-rw-r--r--src/libfirewall/Makefile12
-rw-r--r--src/libshared/Makefile12
-rw-r--r--src/libsystemd/Makefile220
-rw-r--r--src/libsystemd/libsystemd-internal/Makefile226
l---------src/libsystemd/libsystemd-internal/sd-bus/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-daemon/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-device/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-event/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-hwdb/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-id128/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-login/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-netlink/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-network/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-path/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-resolve/Makefile1
l---------src/libsystemd/libsystemd-internal/sd-utf8/Makefile1
-rw-r--r--src/libsystemd/libsystemd-internal/subdir.mk7
-rw-r--r--src/libsystemd/libsystemd-journal-internal/Makefile95
-rw-r--r--src/systemd-nspawn/.gitignore4
-rw-r--r--src/systemd-nspawn/Makefile39
-rw-r--r--src/systemd-nspawn/nspawn-expose-ports.c2
-rw-r--r--src/systemd-nspawn/nspawn-network.c2
-rw-r--r--src/udev/udev.h2
25 files changed, 418 insertions, 380 deletions
diff --git a/src/journal/Makefile b/src/journal/Makefile
index 83a987f559..1334a155d3 100644
--- a/src/journal/Makefile
+++ b/src/journal/Makefile
@@ -262,4 +262,99 @@ tests += \
test-compress-benchmark
endif
+rootlibexec_PROGRAMS += \
+ systemd-journald
+
+rootbin_PROGRAMS += \
+ journalctl
+
+bin_PROGRAMS += \
+ systemd-cat
+
+dist_systemunit_DATA += \
+ units/systemd-journald.socket \
+ units/systemd-journald-dev-log.socket \
+ units/systemd-journald-audit.socket
+
+nodist_systemunit_DATA += \
+ units/systemd-journald.service \
+ units/systemd-journal-flush.service \
+ units/systemd-journal-catalog-update.service
+
+dist_pkgsysconf_DATA += \
+ src/journal/journald.conf
+
+dist_catalog_DATA = \
+ catalog/systemd.be.catalog \
+ catalog/systemd.be@latin.catalog \
+ catalog/systemd.fr.catalog \
+ catalog/systemd.it.catalog \
+ catalog/systemd.pl.catalog \
+ catalog/systemd.pt_BR.catalog \
+ catalog/systemd.ru.catalog \
+ catalog/systemd.zh_CN.catalog \
+ catalog/systemd.zh_TW.catalog \
+ catalog/systemd.catalog
+
+SOCKETS_TARGET_WANTS += \
+ systemd-journald.socket \
+ systemd-journald-dev-log.socket \
+ systemd-journald-audit.socket
+
+SYSINIT_TARGET_WANTS += \
+ systemd-journald.service \
+ systemd-journal-flush.service \
+ systemd-journal-catalog-update.service
+
+EXTRA_DIST += \
+ units/systemd-journald.service.in \
+ units/systemd-journal-flush.service.in \
+ units/systemd-journal-catalog-update.service.in
+
+gperf_gperf_sources += \
+ src/journal/journald-gperf.gperf
+
+# ------------------------------------------------------------------------------
+ifneq ($(HAVE_MICROHTTPD),)
+gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
+
+rootlibexec_PROGRAMS += \
+ systemd-journal-gatewayd
+
+systemd_journal_gatewayd_SOURCES = \
+ src/journal-remote/journal-gatewayd.c \
+ src/journal-remote/microhttpd-util.h \
+ src/journal-remote/microhttpd-util.c
+
+systemd_journal_gatewayd_LDADD = \
+ libshared.la \
+ $(MICROHTTPD_LIBS)
+
+ifneq ($(HAVE_GNUTLS),)
+systemd_journal_gatewayd_LDADD += \
+ $(GNUTLS_LIBS)
+endif
+
+systemd_journal_gatewayd_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(MICROHTTPD_CFLAGS)
+
+systemd_journal_gatewayd_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
+
+dist_systemunit_DATA += \
+ units/systemd-journal-gatewayd.socket
+
+nodist_systemunit_DATA += \
+ units/systemd-journal-gatewayd.service
+
+dist_gatewayddocumentroot_DATA = \
+ src/journal-remote/browse.html
+
+endif
+
+EXTRA_DIST += \
+ units/systemd-journal-gatewayd.service.in
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libbasic/Makefile b/src/libbasic/Makefile
index f82161b856..278b061cb2 100644
--- a/src/libbasic/Makefile
+++ b/src/libbasic/Makefile
@@ -219,73 +219,55 @@ libbasic_la_SOURCES = \
src/basic/formats-util.h \
src/basic/nss-util.h
-nodist_libbasic_la_SOURCES = \
- src/basic/errno-from-name.h \
- src/basic/errno-to-name.h \
- src/basic/af-from-name.h \
- src/basic/af-to-name.h \
- src/basic/arphrd-from-name.h \
- src/basic/arphrd-to-name.h \
- src/basic/cap-from-name.h \
- src/basic/cap-to-name.h
+std.out_files = libbasic.la
+CFLAGS += -pthread
+CPPFLAGS += $(libsystemd.CPPFLAGS) $(libselinux.CPPFLAGS) $(libcap.CPPFLAGS)
+$(outdir)/libbasic.la: \
+ $(patsubst src/basic/%.c,$(outdir)/%.lo,$(filter %.c,$(libbasic_la_SOURCES))) \
+ $(libselinux.DEPENDS) $(libcap.DEPENDS) -lrt -lm
-libbasic_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(SELINUX_CFLAGS) \
- $(CAP_CFLAGS) \
- -pthread
+std.gen_files += *-to-name.h *-from-name.h *-from-name.gperf *-list.txt
-libbasic_la_LIBADD = \
- $(SELINUX_LIBS) \
- $(CAP_LIBS) \
- -lrt \
- -lm
+$(outdir)/af-list.lo: $(outdir)/af-from-name.h $(outdir)/af-to-name.h
+$(outdir)/arphrd-list.lo: $(outdir)/arphrd-from-name.h $(outdir)/arphrd-to-name.h
+$(outdir)/cap-list.lo: $(outdir)/cap-from-name.h $(outdir)/cap-to-name.h
+$(outdir)/errno-list.lo: $(outdir)/errno-from-name.h $(outdir)/errno-to-name.h
-src/basic/errno-list.txt:
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
+$(outdir)/errno-list.txt:
+ $(AM_V_GEN)$(CPP) $(CFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
-src/basic/errno-to-name.h: src/basic/errno-list.txt
- $(AM_V_at)$(MKDIR_P) $(dir $@)
+$(outdir)/errno-to-name.h: $(outdir)/errno-list.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
-src/basic/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; }' >$@
+$(outdir)/af-list.txt:
+ $(AM_V_GEN)$(CPP) $(CFLAGS) $(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/basic/af-to-name.h: src/basic/af-list.txt
- $(AM_V_at)$(MKDIR_P) $(dir $@)
+$(outdir)/af-to-name.h: $(outdir)/af-list.txt
$(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 "};"}' <$< >$@
-src/basic/arphrd-list.txt:
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
+$(outdir)/arphrd-list.txt:
+ $(AM_V_GEN)$(CPP) $(CFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
-src/basic/arphrd-to-name.h: src/basic/arphrd-list.txt
+$(outdir)/arphrd-to-name.h: $(outdir)/arphrd-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
-src/basic/arphrd-from-name.gperf: src/basic/arphrd-list.txt
- $(AM_V_at)$(MKDIR_P) $(dir $@)
+$(outdir)/arphrd-from-name.gperf: $(outdir)/arphrd-list.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
-src/basic/cap-list.txt:
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
+$(outdir)/cap-list.txt:
+ $(AM_V_GEN)$(CPP) $(CFLAGS) $(CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
-src/basic/cap-to-name.h: src/basic/cap-list.txt
- $(AM_V_at)$(MKDIR_P) $(dir $@)
+$(outdir)/cap-to-name.h: $(outdir)/cap-list.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
-src/basic/cap-from-name.gperf: src/basic/cap-list.txt
- $(AM_V_at)$(MKDIR_P) $(dir $@)
+$(outdir)/cap-from-name.gperf: $(outdir)/cap-list.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
-src/basic/cap-from-name.h: src/basic/cap-from-name.gperf
- $(AM_V_at)$(MKDIR_P) $(dir $@)
+$(outdir)/cap-from-name.h: $(outdir)/cap-from-name.gperf
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libfirewall/Makefile b/src/libfirewall/Makefile
index 875d03a879..aeeb191c33 100644
--- a/src/libfirewall/Makefile
+++ b/src/libfirewall/Makefile
@@ -27,16 +27,10 @@ ifneq ($(HAVE_LIBIPTC),)
noinst_LTLIBRARIES += \
libfirewall.la
-libfirewall_la_SOURCES = \
- src/shared/firewall-util.h \
- src/shared/firewall-util.c
+std.out_files = libfirewall.la
+CPPFLAGS += $(libbasic.CPPFLAGS) $(libiptc.CPPFLAGS)
+$(outdir)/libfirewall.la: $(outdir)/firewall-util.lo $(libiptc.DEPENDS)
-libfirewall_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(LIBIPTC_CFLAGS)
-
-libfirewall_la_LIBADD = \
- $(LIBIPTC_LIBS)
endif
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libshared/Makefile b/src/libshared/Makefile
index d0141969b3..3c260f5ae6 100644
--- a/src/libshared/Makefile
+++ b/src/libshared/Makefile
@@ -137,4 +137,16 @@ libshared_la_LIBADD = \
$(LIBIDN_LIBS) \
$(SECCOMP_LIBS)
+std.out_files += libshared.la
+CPPFLAGS += -I$(topsrcdir)/src/libsystemd/include
+CPPFLAGS += -I$(topoutdir)/src/libsystemd/include
+CPPFLAGS += -I$(topsrcdir)/src/libbasic
+CPPFLAGS += -I$(topoutdir)/src/libbasic
+CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\"
+CPPFLAGS += -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
+$(outdir)/libshared.la: \
+ $(patsubst src/shared/%.c,$(outdir)/%.lo,$(filter %.c,$(libshared_la_SOURCES)))
+
+$(call amtarget2dir,src/shared,libshared.la)
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile
index 588d937999..50de17357f 100644
--- a/src/libsystemd/Makefile
+++ b/src/libsystemd/Makefile
@@ -45,6 +45,226 @@ LIBSYSTEMD_JOURNAL_CURRENT=11
LIBSYSTEMD_JOURNAL_REVISION=5
LIBSYSTEMD_JOURNAL_AGE=11
+EXTRA_DIST += \
+ src/libsystemd/libsystemd.pc.in \
+ src/libsystemd/sd-bus/DIFFERENCES \
+ src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
+
+libsystemd_la_SOURCES = \
+ $(libsystemd_internal_la_SOURCES) \
+ $(libsystemd_journal_internal_la_SOURCES)
+
+nodist_libsystemd_la_SOURCES = \
+ $(nodist_libsystemd_internal_la_SOURCES)
+
+libsystemd_la_CFLAGS = \
+ $(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
+
+libsystemd_la_LIBADD = \
+ $(libsystemd_internal_la_LIBADD) \
+ $(libsystemd_journal_internal_la_LIBADD)
+
+libsystemd-install-hook:
+ libname=libsystemd.so && $(move-to-rootlibdir)
+
+libsystemd-uninstall-hook:
+ rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
+
+INSTALL_EXEC_HOOKS += libsystemd-install-hook
+UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
+
+pkgconfiglib_DATA += \
+ src/libsystemd/libsystemd.pc
+
+pkginclude_HEADERS += \
+ src/systemd/sd-bus.h \
+ src/systemd/sd-bus-protocol.h \
+ src/systemd/sd-bus-vtable.h \
+ src/systemd/sd-event.h \
+ src/systemd/sd-login.h \
+ src/systemd/sd-id128.h \
+ src/systemd/sd-daemon.h
+
+lib_LTLIBRARIES += \
+ libsystemd.la
+
+# ------------------------------------------------------------------------------
+
+tests += \
+ test-bus-marshal \
+ test-bus-signature \
+ test-bus-benchmark \
+ test-bus-chat \
+ test-bus-cleanup \
+ test-bus-server \
+ test-bus-match \
+ test-bus-proxy \
+ test-bus-kernel \
+ test-bus-kernel-bloom \
+ test-bus-zero-copy \
+ test-bus-introspect \
+ test-bus-objects \
+ test-bus-error \
+ test-bus-creds \
+ test-bus-gvariant \
+ test-event \
+ test-netlink \
+ test-local-addresses \
+ test-resolve
+
+bin_PROGRAMS += \
+ busctl
+
+test_bus_marshal_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-marshal.c
+
+test_bus_marshal_LDADD = \
+ libshared.la \
+ $(GLIB_LIBS) \
+ $(DBUS_LIBS)
+
+test_bus_marshal_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(GLIB_CFLAGS) \
+ $(DBUS_CFLAGS)
+
+test_bus_signature_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-signature.c
+
+test_bus_signature_LDADD = \
+ libshared.la
+
+test_bus_chat_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-chat.c
+
+test_bus_chat_LDADD = \
+ libshared.la
+
+test_bus_cleanup_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-cleanup.c
+
+test_bus_cleanup_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+
+test_bus_cleanup_LDADD = \
+ libshared.la
+
+test_bus_server_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-server.c
+
+test_bus_server_LDADD = \
+ libshared.la
+
+test_bus_objects_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-objects.c
+
+test_bus_objects_LDADD = \
+ libshared.la
+
+test_bus_error_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-error.c
+
+test_bus_error_LDADD = \
+ libshared.la
+
+test_bus_gvariant_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-gvariant.c
+
+test_bus_gvariant_LDADD = \
+ libshared.la \
+ $(GLIB_LIBS)
+
+test_bus_gvariant_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(GLIB_CFLAGS)
+
+test_bus_creds_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-creds.c
+
+test_bus_creds_LDADD = \
+ libshared.la
+
+test_bus_match_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-match.c
+
+test_bus_match_LDADD = \
+ libshared.la
+
+test_bus_proxy_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-proxy.c
+
+test_bus_proxy_LDADD = \
+ libshared.la
+
+test_bus_kernel_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-kernel.c
+
+test_bus_kernel_LDADD = \
+ libshared.la
+
+test_bus_kernel_bloom_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-kernel-bloom.c
+
+test_bus_kernel_bloom_LDADD = \
+ libshared.la
+
+test_bus_benchmark_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-benchmark.c
+
+test_bus_benchmark_LDADD = \
+ libshared.la
+
+test_bus_zero_copy_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-zero-copy.c
+
+test_bus_zero_copy_LDADD = \
+ libshared.la
+
+test_bus_introspect_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-introspect.c
+
+test_bus_introspect_LDADD = \
+ libshared.la
+
+test_event_SOURCES = \
+ src/libsystemd/sd-event/test-event.c
+
+test_event_LDADD = \
+ libshared.la
+
+test_netlink_SOURCES = \
+ src/libsystemd/sd-netlink/test-netlink.c
+
+test_netlink_LDADD = \
+ libshared.la
+
+test_local_addresses_SOURCES = \
+ src/libsystemd/sd-netlink/test-local-addresses.c
+
+test_local_addresses_LDADD = \
+ libshared.la
+
+test_resolve_SOURCES = \
+ src/libsystemd/sd-resolve/test-resolve.c
+
+test_resolve_LDADD = \
+ libshared.la
+
+busctl_SOURCES = \
+ src/libsystemd/sd-bus/busctl.c \
+ src/libsystemd/sd-bus/busctl-introspect.c \
+ src/libsystemd/sd-bus/busctl-introspect.h
+
+busctl_LDADD = \
+ libshared.la
+
test-libsystemd-sym.c: \
$(top_builddir)/src/libsystemd/libsystemd.sym \
src/systemd/sd-journal.h \
diff --git a/src/libsystemd/libsystemd-internal/Makefile b/src/libsystemd/libsystemd-internal/Makefile
index f34820d5d6..c85835a94d 100644
--- a/src/libsystemd/libsystemd-internal/Makefile
+++ b/src/libsystemd/libsystemd-internal/Makefile
@@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
libsystemd_internal_la_SOURCES = \
@@ -120,222 +120,12 @@ libsystemd_internal_la_LIBADD = \
noinst_LTLIBRARIES += \
libsystemd-internal.la
-EXTRA_DIST += \
- src/libsystemd/libsystemd.pc.in \
- src/libsystemd/sd-bus/DIFFERENCES \
- src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
-
-libsystemd_la_SOURCES = \
- $(libsystemd_internal_la_SOURCES) \
- $(libsystemd_journal_internal_la_SOURCES)
-
-nodist_libsystemd_la_SOURCES = \
- $(nodist_libsystemd_internal_la_SOURCES)
-
-libsystemd_la_CFLAGS = \
- $(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
-
-libsystemd_la_LIBADD = \
- $(libsystemd_internal_la_LIBADD) \
- $(libsystemd_journal_internal_la_LIBADD)
-
-libsystemd-install-hook:
- libname=libsystemd.so && $(move-to-rootlibdir)
-
-libsystemd-uninstall-hook:
- rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
-
-INSTALL_EXEC_HOOKS += libsystemd-install-hook
-UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
-
-pkgconfiglib_DATA += \
- src/libsystemd/libsystemd.pc
-
-pkginclude_HEADERS += \
- src/systemd/sd-bus.h \
- src/systemd/sd-bus-protocol.h \
- src/systemd/sd-bus-vtable.h \
- src/systemd/sd-event.h \
- src/systemd/sd-login.h \
- src/systemd/sd-id128.h \
- src/systemd/sd-daemon.h
-
-lib_LTLIBRARIES += \
- libsystemd.la
-
-tests += \
- test-bus-marshal \
- test-bus-signature \
- test-bus-benchmark \
- test-bus-chat \
- test-bus-cleanup \
- test-bus-server \
- test-bus-match \
- test-bus-proxy \
- test-bus-kernel \
- test-bus-kernel-bloom \
- test-bus-zero-copy \
- test-bus-introspect \
- test-bus-objects \
- test-bus-error \
- test-bus-creds \
- test-bus-gvariant \
- test-event \
- test-netlink \
- test-local-addresses \
- test-resolve
-
-bin_PROGRAMS += \
- busctl
-
-test_bus_marshal_SOURCES = \
- src/libsystemd/sd-bus/test-bus-marshal.c
-
-test_bus_marshal_LDADD = \
- libshared.la \
- $(GLIB_LIBS) \
- $(DBUS_LIBS)
-
-test_bus_marshal_CFLAGS = \
- $(AM_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(DBUS_CFLAGS)
-
-test_bus_signature_SOURCES = \
- src/libsystemd/sd-bus/test-bus-signature.c
-
-test_bus_signature_LDADD = \
- libshared.la
-
-test_bus_chat_SOURCES = \
- src/libsystemd/sd-bus/test-bus-chat.c
-
-test_bus_chat_LDADD = \
- libshared.la
-
-test_bus_cleanup_SOURCES = \
- src/libsystemd/sd-bus/test-bus-cleanup.c
-
-test_bus_cleanup_CFLAGS = \
- $(AM_CFLAGS) \
- $(SECCOMP_CFLAGS)
-
-test_bus_cleanup_LDADD = \
- libshared.la
-
-test_bus_server_SOURCES = \
- src/libsystemd/sd-bus/test-bus-server.c
-
-test_bus_server_LDADD = \
- libshared.la
-
-test_bus_objects_SOURCES = \
- src/libsystemd/sd-bus/test-bus-objects.c
-
-test_bus_objects_LDADD = \
- libshared.la
-
-test_bus_error_SOURCES = \
- src/libsystemd/sd-bus/test-bus-error.c
-
-test_bus_error_LDADD = \
- libshared.la
-
-test_bus_gvariant_SOURCES = \
- src/libsystemd/sd-bus/test-bus-gvariant.c
-
-test_bus_gvariant_LDADD = \
- libshared.la \
- $(GLIB_LIBS)
-
-test_bus_gvariant_CFLAGS = \
- $(AM_CFLAGS) \
- $(GLIB_CFLAGS)
-
-test_bus_creds_SOURCES = \
- src/libsystemd/sd-bus/test-bus-creds.c
-
-test_bus_creds_LDADD = \
- libshared.la
-
-test_bus_match_SOURCES = \
- src/libsystemd/sd-bus/test-bus-match.c
-
-test_bus_match_LDADD = \
- libshared.la
-
-test_bus_proxy_SOURCES = \
- src/libsystemd/sd-bus/test-bus-proxy.c
-
-test_bus_proxy_LDADD = \
- libshared.la
-
-test_bus_kernel_SOURCES = \
- src/libsystemd/sd-bus/test-bus-kernel.c
-
-test_bus_kernel_LDADD = \
- libshared.la
-
-test_bus_kernel_bloom_SOURCES = \
- src/libsystemd/sd-bus/test-bus-kernel-bloom.c
-
-test_bus_kernel_bloom_LDADD = \
- libshared.la
-
-test_bus_benchmark_SOURCES = \
- src/libsystemd/sd-bus/test-bus-benchmark.c
-
-test_bus_benchmark_LDADD = \
- libshared.la
-
-test_bus_zero_copy_SOURCES = \
- src/libsystemd/sd-bus/test-bus-zero-copy.c
-
-test_bus_zero_copy_LDADD = \
- libshared.la
-
-test_bus_introspect_SOURCES = \
- src/libsystemd/sd-bus/test-bus-introspect.c
-
-test_bus_introspect_LDADD = \
- libshared.la
-
-test_event_SOURCES = \
- src/libsystemd/sd-event/test-event.c
-
-test_event_LDADD = \
- libshared.la
-
-test_netlink_SOURCES = \
- src/libsystemd/sd-netlink/test-netlink.c
-
-test_netlink_LDADD = \
- libshared.la
-
-test_local_addresses_SOURCES = \
- src/libsystemd/sd-netlink/test-local-addresses.c
-
-test_local_addresses_LDADD = \
- libshared.la
-
-test_resolve_SOURCES = \
- src/libsystemd/sd-resolve/test-resolve.c
-
-test_resolve_LDADD = \
- libshared.la
-
-busctl_SOURCES = \
- src/libsystemd/sd-bus/busctl.c \
- src/libsystemd/sd-bus/busctl-introspect.c \
- src/libsystemd/sd-bus/busctl-introspect.h
-
-busctl_LDADD = \
- libshared.la
+std.out_files += libsystemd-internal.la
+CPPFLAGS += $(libsystemd.CPPFLAGS) $(libbasic.CPPFLAGS) $(libshared.CPPFLAGS)
+CPPFLAGS += -DLIBDIR=\"$(libdir)\" -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+am.subdirs += $(dir $(patsubst src/libsystemd/%.c,$(outdir)/%.lo,$(filter %.c,$(libsystemd_internal_la_SOURCES))))
+$(outdir)/libsystemd-internal.la: \
+ $(patsubst src/libsystemd/%.c,$(outdir)/%.lo,$(filter %.c,$(libsystemd_internal_la_SOURCES))) \
+ $(libbasic.DEPENDS) -lresolv
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/libsystemd-internal/sd-bus/Makefile b/src/libsystemd/libsystemd-internal/sd-bus/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-bus/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-daemon/Makefile b/src/libsystemd/libsystemd-internal/sd-daemon/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-daemon/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-device/Makefile b/src/libsystemd/libsystemd-internal/sd-device/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-device/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-event/Makefile b/src/libsystemd/libsystemd-internal/sd-event/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-event/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-hwdb/Makefile b/src/libsystemd/libsystemd-internal/sd-hwdb/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-hwdb/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-id128/Makefile b/src/libsystemd/libsystemd-internal/sd-id128/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-id128/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-login/Makefile b/src/libsystemd/libsystemd-internal/sd-login/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-login/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-netlink/Makefile b/src/libsystemd/libsystemd-internal/sd-netlink/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-netlink/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-network/Makefile b/src/libsystemd/libsystemd-internal/sd-network/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-network/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-path/Makefile b/src/libsystemd/libsystemd-internal/sd-path/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-path/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-resolve/Makefile b/src/libsystemd/libsystemd-internal/sd-resolve/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-resolve/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/sd-utf8/Makefile b/src/libsystemd/libsystemd-internal/sd-utf8/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/sd-utf8/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/libsystemd-internal/subdir.mk b/src/libsystemd/libsystemd-internal/subdir.mk
new file mode 100644
index 0000000000..69eb85a4d7
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/subdir.mk
@@ -0,0 +1,7 @@
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/automake.head.mk
+
+#CPPFLAGS += $(libsystemd.CPPFLAGS) $(libbasic.CPPFLAGS) $(libshared.CPPFLAGS)
+#CPPFLAGS += -DLIBDIR=\"$(libdir)\" -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+
+include $(topsrcdir)/automake.tail.mk
diff --git a/src/libsystemd/libsystemd-journal-internal/Makefile b/src/libsystemd/libsystemd-journal-internal/Makefile
index 4dc432f19f..306d6db7f3 100644
--- a/src/libsystemd/libsystemd-journal-internal/Makefile
+++ b/src/libsystemd/libsystemd-journal-internal/Makefile
@@ -95,99 +95,4 @@ endif
noinst_LTLIBRARIES += \
libsystemd-journal-internal.la
-rootlibexec_PROGRAMS += \
- systemd-journald
-
-rootbin_PROGRAMS += \
- journalctl
-
-bin_PROGRAMS += \
- systemd-cat
-
-dist_systemunit_DATA += \
- units/systemd-journald.socket \
- units/systemd-journald-dev-log.socket \
- units/systemd-journald-audit.socket
-
-nodist_systemunit_DATA += \
- units/systemd-journald.service \
- units/systemd-journal-flush.service \
- units/systemd-journal-catalog-update.service
-
-dist_pkgsysconf_DATA += \
- src/journal/journald.conf
-
-dist_catalog_DATA = \
- catalog/systemd.be.catalog \
- catalog/systemd.be@latin.catalog \
- catalog/systemd.fr.catalog \
- catalog/systemd.it.catalog \
- catalog/systemd.pl.catalog \
- catalog/systemd.pt_BR.catalog \
- catalog/systemd.ru.catalog \
- catalog/systemd.zh_CN.catalog \
- catalog/systemd.zh_TW.catalog \
- catalog/systemd.catalog
-
-SOCKETS_TARGET_WANTS += \
- systemd-journald.socket \
- systemd-journald-dev-log.socket \
- systemd-journald-audit.socket
-
-SYSINIT_TARGET_WANTS += \
- systemd-journald.service \
- systemd-journal-flush.service \
- systemd-journal-catalog-update.service
-
-EXTRA_DIST += \
- units/systemd-journald.service.in \
- units/systemd-journal-flush.service.in \
- units/systemd-journal-catalog-update.service.in
-
-gperf_gperf_sources += \
- src/journal/journald-gperf.gperf
-
-# ------------------------------------------------------------------------------
-ifneq ($(HAVE_MICROHTTPD),)
-gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
-
-rootlibexec_PROGRAMS += \
- systemd-journal-gatewayd
-
-systemd_journal_gatewayd_SOURCES = \
- src/journal-remote/journal-gatewayd.c \
- src/journal-remote/microhttpd-util.h \
- src/journal-remote/microhttpd-util.c
-
-systemd_journal_gatewayd_LDADD = \
- libshared.la \
- $(MICROHTTPD_LIBS)
-
-ifneq ($(HAVE_GNUTLS),)
-systemd_journal_gatewayd_LDADD += \
- $(GNUTLS_LIBS)
-endif
-
-systemd_journal_gatewayd_CFLAGS = \
- $(AM_CFLAGS) \
- $(MICROHTTPD_CFLAGS)
-
-systemd_journal_gatewayd_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
-
-dist_systemunit_DATA += \
- units/systemd-journal-gatewayd.socket
-
-nodist_systemunit_DATA += \
- units/systemd-journal-gatewayd.service
-
-dist_gatewayddocumentroot_DATA = \
- src/journal-remote/browse.html
-
-endif
-
-EXTRA_DIST += \
- units/systemd-journal-gatewayd.service.in
-
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/systemd-nspawn/.gitignore b/src/systemd-nspawn/.gitignore
index 85c81fff24..b1ba4fd9af 100644
--- a/src/systemd-nspawn/.gitignore
+++ b/src/systemd-nspawn/.gitignore
@@ -1 +1,5 @@
/nspawn-gperf.c
+/loopback-setup.c
+/loopback-setup.h
+/mount-setup.c
+/mount-setup.h
diff --git a/src/systemd-nspawn/Makefile b/src/systemd-nspawn/Makefile
index 742d8ad82e..12b002c868 100644
--- a/src/systemd-nspawn/Makefile
+++ b/src/systemd-nspawn/Makefile
@@ -52,18 +52,35 @@ nodist_systemd_nspawn_SOURCES = \
gperf_gperf_sources += \
src/nspawn/nspawn-gperf.gperf
-systemd_nspawn_CFLAGS = \
- $(AM_CFLAGS) \
- $(BLKID_CFLAGS) \
- $(SECCOMP_CFLAGS)
-
-systemd_nspawn_LDADD = \
- libshared.la \
- $(BLKID_LIBS)
-
+std.out_files = systemd-nspawn
+CPPFLAGS += $(libbasic.CPPFLAGS) $(libshared.CPPFLAGS) $(libsystemd.CPPFLAGS) $(libudev.CPPFLAGS) $(libblkid.CPPFLAGS)
+CPPFLAGS += -I$(topsrcdir)/src/libsystemd/src/sd-netlink -I$(topsrcdir)/src/libsystemd/src/sd-bus -I$(topsrcdir)/src/udev -I$(topsrcdir)/src/libudev/src
+CPPFLAGS += $(libblkid.CPPFLAGS) $(libseccomp.CPPFLAGS)
+ifneq ($(HAVE_LIBIPTC),)
+CPPFLAGS += $(libfirewall.CPPFLAGS)
+endif
+$(outdir)/systemd-nspawn: \
+ $(outdir)/nspawn.o \
+ $(outdir)/nspawn-settings.o \
+ $(outdir)/nspawn-mount.o \
+ $(outdir)/nspawn-network.o \
+ $(outdir)/nspawn-expose-ports.o \
+ $(outdir)/nspawn-cgroup.o \
+ $(outdir)/nspawn-register.o \
+ $(outdir)/nspawn-setuid.o \
+ $(outdir)/nspawn-stub-pid1.o \
+ $(outdir)/mount-setup.o \
+ $(outdir)/loopback-setup.o \
+ $(libshared.DEPENDS) $(libblkid.DEPENDS)
ifneq ($(HAVE_LIBIPTC),)
-systemd_nspawn_LDADD += \
- libfirewall.la
+$(outdir)/systemd-nspawn: $(libfirewall.DEPENDS)
endif
+$(outdir)/mount-setup.c: $(topsrcdir)/src/libcore/mount-setup.c; $(CP) $< $@
+$(outdir)/mount-setup.h: $(topsrcdir)/src/libcore/mount-setup.h; $(CP) $< $@
+$(outdir)/loopback-setup.c: $(topsrcdir)/src/libcore/loopback-setup.c; $(CP) $< $@
+$(outdir)/loopback-setup.h: $(topsrcdir)/src/libcore/loopback-setup.h; $(CP) $< $@
+
+$(outdir)/nspawn.o: $(outdir)/loopback-setup.h
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/systemd-nspawn/nspawn-expose-ports.c b/src/systemd-nspawn/nspawn-expose-ports.c
index 8122a14f7b..d82e495fa8 100644
--- a/src/systemd-nspawn/nspawn-expose-ports.c
+++ b/src/systemd-nspawn/nspawn-expose-ports.c
@@ -21,7 +21,7 @@
#include "alloc-util.h"
#include "fd-util.h"
-#include "firewall-util.h"
+#include <firewall-util.h>
#include "in-addr-util.h"
#include "local-addresses.h"
#include "netlink-util.h"
diff --git a/src/systemd-nspawn/nspawn-network.c b/src/systemd-nspawn/nspawn-network.c
index d03fd001a7..769f865195 100644
--- a/src/systemd-nspawn/nspawn-network.c
+++ b/src/systemd-nspawn/nspawn-network.c
@@ -20,7 +20,7 @@
#include <linux/veth.h>
#include <net/if.h>
-#include "libudev.h"
+#include <libudev.h>
#include <systemd/sd-id128.h>
#include <systemd/sd-netlink.h>
diff --git a/src/udev/udev.h b/src/udev/udev.h
index 91dfc950b4..3aace1532f 100644
--- a/src/udev/udev.h
+++ b/src/udev/udev.h
@@ -21,7 +21,7 @@
#include <sys/param.h>
#include <sys/types.h>
-#include "libudev.h"
+#include <libudev.h>
#include <systemd/sd-netlink.h>
#include "label.h"