summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile30
-rw-r--r--src/busctl/Makefile5
-rw-r--r--src/grp-boot/Makefile28
-rw-r--r--src/grp-boot/bootctl/Makefile9
-rw-r--r--src/grp-boot/systemd-boot/Makefile108
-rwxr-xr-xsrc/grp-boot/systemd-boot/test-efi-create-disk.sh42
-rw-r--r--src/grp-coredump/Makefile28
-rw-r--r--src/grp-coredump/coredumpctl/Makefile7
-rw-r--r--src/grp-coredump/systemd-coredump/Makefile9
-rw-r--r--src/grp-machine/Makefile29
-rw-r--r--src/grp-machine/libmachine-core/Makefile8
-rw-r--r--src/grp-machine/nss-mymachines/Makefile9
-rw-r--r--src/libbasic/Makefile9
-rw-r--r--src/libcore/loopback-setup.c1
-rw-r--r--src/libfirewall/Makefile2
-rw-r--r--src/libshared/Makefile30
-rw-r--r--src/libsystemd/Makefile8
-rw-r--r--src/libsystemd/libsystemd-internal/Makefile17
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
-rw-r--r--src/libsystemd/libsystemd-internal/sd-netlink/local-addresses.c1
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.mk10
-rw-r--r--src/libsystemd/libsystemd-journal-internal/Makefile11
-rw-r--r--src/libudev/Makefile28
-rw-r--r--src/libudev/src/Makefile18
-rw-r--r--src/systemd-nspawn/Makefile14
l---------src/systemd-nspawn/local-addresses.c1
l---------src/systemd-nspawn/local-addresses.h1
l---------src/systemd-nspawn/loopback-setup.c1
l---------src/systemd-nspawn/loopback-setup.h1
l---------src/systemd-nspawn/mount-setup.c1
l---------src/systemd-nspawn/mount-setup.h1
-rw-r--r--src/systemd-nspawn/nspawn-expose-ports.c1
-rw-r--r--src/systemd-nspawn/nspawn-network.c1
-rw-r--r--src/systemd-nspawn/nspawn-register.c2
-rw-r--r--src/systemd-nspawn/nspawn.c1
46 files changed, 365 insertions, 119 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000000..9aa98640dd
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,30 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# 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 $(topsrcdir)/build-aux/Makefile.head.mk
+
+at.subdirs += busctl
+at.subdirs += grp-boot
+at.subdirs += systemd-nspawn
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/busctl/Makefile b/src/busctl/Makefile
index d09dd022a6..261486555d 100644
--- a/src/busctl/Makefile
+++ b/src/busctl/Makefile
@@ -32,7 +32,10 @@ busctl_SOURCES = \
src/libsystemd/sd-bus/busctl-introspect.h
busctl_LDADD = \
- libshared.la
+ $(topoutdir)/src/libshared/libshared.la
$(eval $(value automake2autothing))
+AM_CPPFLAGS += $(libshared.CPPFLAGS)
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-bus
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-boot/Makefile b/src/grp-boot/Makefile
new file mode 100644
index 0000000000..922d8a32d3
--- /dev/null
+++ b/src/grp-boot/Makefile
@@ -0,0 +1,28 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# 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 $(topsrcdir)/build-aux/Makefile.head.mk
+
+at.subdirs += bootctl systemd-boot
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-boot/bootctl/Makefile b/src/grp-boot/bootctl/Makefile
index cc886b6cc4..39a4af1442 100644
--- a/src/grp-boot/bootctl/Makefile
+++ b/src/grp-boot/bootctl/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
ifneq ($(ENABLE_EFI),)
@@ -38,7 +38,7 @@ bootctl_CFLAGS = \
$(BLKID_CFLAGS)
bootctl_LDADD = \
- libshared.la \
+ $(topoutdir)/src/libshared/libshared.la \
$(BLKID_LIBS)
bin_PROGRAMS += \
@@ -51,5 +51,10 @@ dist_zshcompletion_data += \
shell-completion/zsh/_bootctl
endif # HAVE_BLKID
endif # ENABLE_EFI
+
$(eval $(value automake2autothing))
+at.depdirs += $(topoutdir)/src/libshared
+AM_CPPFLAGS += $(libshared.CPPFLAGS)
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-boot/systemd-boot/Makefile b/src/grp-boot/systemd-boot/Makefile
index 8caa8cef84..a1e4b6088a 100644
--- a/src/grp-boot/systemd-boot/Makefile
+++ b/src/grp-boot/systemd-boot/Makefile
@@ -20,11 +20,12 @@
#
# 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
ifneq ($(ENABLE_EFI),)
ifneq ($(HAVE_GNUEFI),)
+# ------------------------------------------------------------------------------
efi_cppflags = \
$(EFI_CPPFLAGS) \
-I$(top_builddir) -include config.h \
@@ -81,17 +82,19 @@ EFI_FORMAT = -O binary
else
EFI_FORMAT = --target=efi-app-$(EFI_ARCH)
endif # ARCH_AARCH64
-endif # HAVE_GNUEFI
-endif # ENABLE_EFI
-# ------------------------------------------------------------------------------
-systemd_boot_headers = \
- src/boot/efi/util.h \
- src/boot/efi/console.h \
- src/boot/efi/graphics.h \
- src/boot/efi/pefile.h \
- src/boot/efi/disk.h
+$(outdir)/%.o: $(srcdir)/%.c
+ $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
+$(outdir)/%.so:
+ @if test $(words $^) = 0; then echo 'Cannot link EFI library with no dependencies: $@' >&2; exit 1; fi
+ $(AM_V_CCLD)$(LD) $(efi_ldflags) $^ -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name)
+ $(AM_V_at)! { nm -D -u $@ | grep ' U '; }
+
+# These next 2 are the same rule
+$(outdir)/%$(EFI_MACHINE_TYPE_NAME).efi : $(outdir)/%.so; $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
+$(outdir)/%$(EFI_MACHINE_TYPE_NAME).efi.stub: $(outdir)/%.so; $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
+# ------------------------------------------------------------------------------
systemd_boot_sources = \
src/boot/efi/util.c \
src/boot/efi/console.c \
@@ -100,42 +103,11 @@ systemd_boot_sources = \
src/boot/efi/disk.c \
src/boot/efi/boot.c
-EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
-
-systemd_boot_objects = $(addprefix $(top_builddir)/,$(systemd_boot_sources:.c=.o))
-systemd_boot_solib = $(top_builddir)/src/boot/efi/systemd_boot.so
systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi
-
-ifneq ($(ENABLE_EFI),)
-ifneq ($(HAVE_GNUEFI),)
-bootlib_DATA = $(systemd_boot)
-
-$(outdir)/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers))
- @$(MKDIR_P) $(top_builddir)/src/boot/efi/
- $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
-
-$(systemd_boot_solib): $(systemd_boot_objects)
- $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \
- -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
- nm -D -u $@ | grep ' U ' && exit 1 || :
-
-$(systemd_boot): $(systemd_boot_solib)
- $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
- -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
-endif # HAVE_GNUEFI
-endif # ENABLE_EFI
-
-CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
-
+std.out_files += $(systemd_boot)
+std.sys_files += $(bootlibdir)/$(systemd_boot)
+$(outdir)/systemd-boot.so: $(addprefix $(outdir)/,$(notdir $(systemd_boot_sources:.c=.o)))
# ------------------------------------------------------------------------------
-stub_headers = \
- src/boot/efi/util.h \
- src/boot/efi/pefile.h \
- src/boot/efi/disk.h \
- src/boot/efi/graphics.h \
- src/boot/efi/splash.h \
- src/boot/efi/linux.h
-
stub_sources = \
src/boot/efi/util.c \
src/boot/efi/pefile.c \
@@ -145,47 +117,19 @@ stub_sources = \
src/boot/efi/linux.c \
src/boot/efi/stub.c
-EXTRA_DIST += \
- $(stub_sources) \
- $(stub_headers) \
- test/splash.bmp
-
-stub_objects = $(addprefix $(top_builddir)/,$(stub_sources:.c=.o))
-stub_solib = $(top_builddir)/src/boot/efi/stub.so
stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub
-
-ifneq ($(ENABLE_EFI),)
-ifneq ($(HAVE_GNUEFI),)
-bootlib_DATA += $(stub)
-
-$(outdir)/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(stub_headers))
- @$(MKDIR_P) $(top_builddir)/src/boot/efi/
- $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
-
-$(stub_solib): $(stub_objects)
- $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
- -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
- nm -D -u $@ | grep ' U ' && exit 1 || :
-
-$(stub): $(stub_solib)
- $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
- -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
-endif # HAVE_GNUEFI
-endif # ENABLE_EFI
-
-CLEANFILES += $(stub_objects) $(stub_solib) $(stub)
-
-
+std.out_files += $(stub)
+std.sys_files += $(bootlibdir)/$(stub)
+$(outdir)/linux.so: $(addprefix $(outdir)/,$(notdir $(stub_sources:.c=.o)))
# ------------------------------------------------------------------------------
-CLEANFILES += test-efi-disk.img
-
-test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh
- $(AM_V_GEN)test/test-efi-create-disk.sh
+$(outdir)/test-efi-disk.img: $(outdir)/$(systemd_boot) $(outdir)/$(stub) $(srcdir)/test-efi-create-disk.sh
+ $(AM_V_GEN)$(@D)/test-efi-create-disk.sh
-test-efi: test-efi-disk.img
+test-efi: $(outdir)/test-efi-disk.img
$(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img
-EXTRA_DIST += test/test-efi-create-disk.sh
-
-$(eval $(value automake2autothing))
+std.clean_files += test-efi-disk.img
+# ------------------------------------------------------------------------------
+endif # HAVE_GNUEFI
+endif # ENABLE_EFI
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-boot/systemd-boot/test-efi-create-disk.sh b/src/grp-boot/systemd-boot/test-efi-create-disk.sh
new file mode 100755
index 0000000000..56dd09abd7
--- /dev/null
+++ b/src/grp-boot/systemd-boot/test-efi-create-disk.sh
@@ -0,0 +1,42 @@
+#!/bin/bash -e
+
+# create GPT table with EFI System Partition
+rm -f test-efi-disk.img
+dd if=/dev/null of=test-efi-disk.img bs=1M seek=512 count=1
+parted --script test-efi-disk.img "mklabel gpt" "mkpart ESP fat32 1MiB 511MiB" "set 1 boot on"
+
+# create FAT32 file system
+LOOP=$(losetup --show -f -P test-efi-disk.img)
+mkfs.vfat -F32 ${LOOP}p1
+mkdir -p mnt
+mount ${LOOP}p1 mnt
+
+mkdir -p mnt/EFI/{Boot,systemd}
+cp systemd-bootx64.efi mnt/EFI/Boot/bootx64.efi
+
+[ -e /boot/shellx64.efi ] && cp /boot/shellx64.efi mnt/
+
+mkdir mnt/EFI/Linux
+echo -n "foo=yes bar=no root=/dev/fakeroot debug rd.break=initqueue" > mnt/cmdline.txt
+objcopy \
+ --add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
+ --add-section .cmdline=mnt/cmdline.txt --change-section-vma .cmdline=0x30000 \
+ --add-section .splash=test/splash.bmp --change-section-vma .splash=0x40000 \
+ --add-section .linux=/boot/$(cat /etc/machine-id)/$(uname -r)/linux --change-section-vma .linux=0x2000000 \
+ --add-section .initrd=/boot/$(cat /etc/machine-id)/$(uname -r)/initrd --change-section-vma .initrd=0x3000000 \
+ linuxx64.efi.stub mnt/EFI/Linux/linux-test.efi
+
+# install entries
+mkdir -p mnt/loader/entries
+echo -e "timeout 3\n" > mnt/loader/loader.conf
+echo -e "title Test\nefi /test\n" > mnt/loader/entries/test.conf
+echo -e "title Test2\nlinux /test2\noptions option=yes word number=1000 more\n" > mnt/loader/entries/test2.conf
+echo -e "title Test3\nlinux /test3\n" > mnt/loader/entries/test3.conf
+echo -e "title Test4\nlinux /test4\n" > mnt/loader/entries/test4.conf
+echo -e "title Test5\nefi /test5\n" > mnt/loader/entries/test5.conf
+echo -e "title Test6\nlinux /test6\n" > mnt/loader/entries/test6.conf
+
+sync
+umount mnt
+rmdir mnt
+losetup -d $LOOP
diff --git a/src/grp-coredump/Makefile b/src/grp-coredump/Makefile
new file mode 100644
index 0000000000..2e604d7b86
--- /dev/null
+++ b/src/grp-coredump/Makefile
@@ -0,0 +1,28 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# 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 $(topsrcdir)/build-aux/Makefile.head.mk
+
+at.subdirs += coredumpctl systemd-coredump
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-coredump/coredumpctl/Makefile b/src/grp-coredump/coredumpctl/Makefile
index c300710492..ca992c9850 100644
--- a/src/grp-coredump/coredumpctl/Makefile
+++ b/src/grp-coredump/coredumpctl/Makefile
@@ -20,14 +20,14 @@
#
# 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
coredumpctl_SOURCES = \
src/coredump/coredumpctl.c
coredumpctl_LDADD = \
- libshared.la
+ $(topoutdir)/src/libshared/libshared.la
bin_PROGRAMS += \
coredumpctl
@@ -39,4 +39,7 @@ dist_zshcompletion_data += \
shell-completion/zsh/_coredumpctl
$(eval $(value automake2autothing))
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += $(libshared.CPPFLAGS)
+AM_CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-journal-internal
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-coredump/systemd-coredump/Makefile b/src/grp-coredump/systemd-coredump/Makefile
index 23f2747683..9d7d931a46 100644
--- a/src/grp-coredump/systemd-coredump/Makefile
+++ b/src/grp-coredump/systemd-coredump/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
ifneq ($(ENABLE_COREDUMP),)
@@ -30,7 +30,7 @@ systemd_coredump_SOURCES = \
src/coredump/coredump-vacuum.h
systemd_coredump_LDADD = \
- libshared.la
+ $(topoutdir)/src/libshared/libshared.la
ifneq ($(HAVE_ELFUTILS),)
systemd_coredump_SOURCES += \
@@ -79,4 +79,9 @@ EXTRA_DIST += \
units/systemd-coredump@.service.in
$(eval $(value automake2autothing))
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += $(libshared.CPPFLAGS)
+AM_CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-journal-internal
+AM_CPPFLAGS += -I$(topsrcdir)/src/journal
+AM_CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\"
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-machine/Makefile b/src/grp-machine/Makefile
new file mode 100644
index 0000000000..7412341233
--- /dev/null
+++ b/src/grp-machine/Makefile
@@ -0,0 +1,29 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# 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 $(topsrcdir)/build-aux/Makefile.head.mk
+
+at.subdirs += machinectl systemd-machined
+at.subdirs += nss-mymachines
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-machine/libmachine-core/Makefile b/src/grp-machine/libmachine-core/Makefile
index 7dc9d419b6..e7583cb4c9 100644
--- a/src/grp-machine/libmachine-core/Makefile
+++ b/src/grp-machine/libmachine-core/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
libmachine_core_la_SOURCES = \
@@ -33,7 +33,7 @@ libmachine_core_la_SOURCES = \
src/machine/image-dbus.h
libmachine_core_la_LIBADD = \
- libshared.la
+ $(topoutdir)/src/libshared/libshared.la
noinst_LTLIBRARIES += \
libmachine-core.la
@@ -48,4 +48,8 @@ tests += \
test-machine-tables
$(eval $(value automake2autothing))
+at.depdirs += $(topoutdir)/src/libsystemd/libsystemd-internal
+AM_CPPFLAGS += $(libshared.CPPFLAGS)
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-bus
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-machine/nss-mymachines/Makefile b/src/grp-machine/nss-mymachines/Makefile
index 2d0248a0a3..9e06a5e767 100644
--- a/src/grp-machine/nss-mymachines/Makefile
+++ b/src/grp-machine/nss-mymachines/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
@@ -35,13 +35,16 @@ libnss_mymachines_la_LDFLAGS = \
-avoid-version \
-shared \
-shrext .so.2 \
- -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
+ -Wl,--version-script=$(srcdir)/nss-mymachines.sym
libnss_mymachines_la_LIBADD = \
- libsystemd-internal.la
+ $(topoutdir)/src/libsystemd/libsystemd-internal/libsystemd-internal.la
lib_LTLIBRARIES += \
libnss_mymachines.la
$(eval $(value automake2autothing))
+at.depdirs += $(topoutdir)/src/libsystemd/libsystemd-internal
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-bus
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libbasic/Makefile b/src/libbasic/Makefile
index 744ccd6801..79ec1b26cc 100644
--- a/src/libbasic/Makefile
+++ b/src/libbasic/Makefile
@@ -265,8 +265,8 @@ $(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 }' <$< >$@
-$(outdir)/cap-list.txt:
- $(AM_V_GEN)$(CPP) $(ALL_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: $(srcdir)/missing.h
+ $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include linux/capability.h -include $< - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
$(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 "};"}' <$< >$@
@@ -278,4 +278,9 @@ $(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 <$< >$@
$(eval $(value automake2autothing))
+$(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
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libcore/loopback-setup.c b/src/libcore/loopback-setup.c
index d56bbfa6fc..1a8ec6166e 100644
--- a/src/libcore/loopback-setup.c
+++ b/src/libcore/loopback-setup.c
@@ -24,7 +24,6 @@
#include "loopback-setup.h"
#include "missing.h"
-#include "netlink-util.h"
static int start_loopback(sd_netlink *rtnl) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
diff --git a/src/libfirewall/Makefile b/src/libfirewall/Makefile
index 99a428fcd9..7ddfc7d288 100644
--- a/src/libfirewall/Makefile
+++ b/src/libfirewall/Makefile
@@ -40,4 +40,6 @@ libfirewall_la_LIBADD = \
endif # HAVE_LIBIPTC
$(eval $(value automake2autothing))
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libshared/Makefile b/src/libshared/Makefile
index 3c229062e8..6bc8725521 100644
--- a/src/libshared/Makefile
+++ b/src/libshared/Makefile
@@ -130,12 +130,36 @@ libshared_la_CFLAGS = \
$(SECCOMP_CFLAGS)
libshared_la_LIBADD = \
- libsystemd-internal.la \
- libsystemd-journal-internal.la \
- libudev-internal.la \
+ $(topoutdir)/src/libsystemd/libsystemd-internal/libsystemd-internal.la \
+ $(topoutdir)/src/libsystemd/libsystemd-journal-internal/libsystemd-journal-internal.la \
+ $(topoutdir)/src/libudev/src/libudev.la \
$(ACL_LIBS) \
$(LIBIDN_LIBS) \
$(SECCOMP_LIBS)
$(eval $(value automake2autothing))
+at.depdirs += $(topoutdir)/src/libsystemd/libsystemd-internal
+at.depdirs += $(topoutdir)/src/libsystemd/libsystemd-journal-internal
+at.depdirs += $(topoutdir)/src/libudev/src
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-journal-internal
+AM_CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-bus
+
+AM_CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\"
+AM_CPPFLAGS += -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\"
+AM_CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\"
+AM_CPPFLAGS += -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\"
+AM_CPPFLAGS += -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\"
+AM_CPPFLAGS += -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\"
+AM_CPPFLAGS += -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\"
+
+AM_CPPFLAGS += -DSYSTEMD_FSCK_PATH=\"$(rootlibexecdir)/systemd-fsck\"
+
+AM_CPPFLAGS += -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\"
+
+AM_CPPFLAGS += -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\"
+AM_CPPFLAGS += -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\"
+
+AM_CPPFLAGS += -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\"
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile
index 43d06ad24f..203db9f4aa 100644
--- a/src/libsystemd/Makefile
+++ b/src/libsystemd/Makefile
@@ -64,7 +64,7 @@ libsystemd_la_CFLAGS = \
libsystemd_la_LDFLAGS = \
$(AM_LDFLAGS) \
-version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
- -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
+ -Wl,--version-script=$(srcdir)/libsystemd.sym
libsystemd_la_LIBADD = \
$(libsystemd_internal_la_LIBADD) \
@@ -127,4 +127,10 @@ test_libsystemd_sym_LDADD = \
libsystemd.la
$(eval $(value automake2autothing))
+$(outdir)/libsystemd.la: $(srcdir)/libsystemd.sym
+$(outdir)/libsystemd.la: $(outdir)/libsystemd-internal/libsystemd-internal.la
+$(outdir)/libsystemd.la: $(outdir)/libsystemd-journal-internal/libsystemd-journal-internal.la
+at.subdirs += libsystemd-internal libsystemd-journal-internal
+systemd.sed_files += libsystemd.pc
+#at.subdirs += compat-libs
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/libsystemd-internal/Makefile b/src/libsystemd/libsystemd-internal/Makefile
index 086e904d0e..4bd6b8c355 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 = \
@@ -114,7 +114,7 @@ libsystemd_internal_la_SOURCES = \
src/libsystemd/sd-resolve/sd-resolve.c
libsystemd_internal_la_LIBADD = \
- libbasic.la \
+ $(topoutdir)/src/libbasic/libbasic.la \
-lresolv
noinst_LTLIBRARIES += \
@@ -256,5 +256,18 @@ test_resolve_SOURCES = \
test_resolve_LDADD = \
libshared.la
+automake_sources = $(patsubst src/libsystemd/%,$(outdir)/%,$(filter %.c,$($(automake_name)_SOURCES) $(nodist_$(automake_name)_SOURCES)))
$(eval $(value automake2autothing))
+_subdirs := $(notdir $(patsubst %/,%,$(dir $(call automake_sources,libsystemd-internal.la))))
+automake_sources = $(addprefix $(outdir)/,$(notdir $($(automake_name)_SOURCES) $(nodist_$(automake_name)_SOURCES)))
+
+at.subdirs += $(_subdirs)
+at.depdirs += $(topoutdir)/src/libbasic
+
+AM_CPPFLAGS += $(libsystemd.CPPFLAGS)
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += $(libshared.CPPFLAGS)
+AM_CPPFLAGS += -DLIBDIR=\"$(libdir)\"
+AM_CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+
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-netlink/local-addresses.c b/src/libsystemd/libsystemd-internal/sd-netlink/local-addresses.c
index e6feb859cd..fafc208eca 100644
--- a/src/libsystemd/libsystemd-internal/sd-netlink/local-addresses.c
+++ b/src/libsystemd/libsystemd-internal/sd-netlink/local-addresses.c
@@ -23,7 +23,6 @@
#include "alloc-util.h"
#include "local-addresses.h"
#include "macro.h"
-#include "netlink-util.h"
static int address_compare(const void *_a, const void *_b) {
const struct local_address *a = _a, *b = _b;
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..96b7145434
--- /dev/null
+++ b/src/libsystemd/libsystemd-internal/subdir.mk
@@ -0,0 +1,10 @@
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+AM_CPPFLAGS += $(libsystemd.CPPFLAGS)
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += $(libshared.CPPFLAGS)
+AM_CPPFLAGS += -DLIBDIR=\"$(libdir)\"
+AM_CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/libsystemd-journal-internal/Makefile b/src/libsystemd/libsystemd-journal-internal/Makefile
index dffb4176ee..6d0be9edff 100644
--- a/src/libsystemd/libsystemd-journal-internal/Makefile
+++ b/src/libsystemd/libsystemd-journal-internal/Makefile
@@ -20,15 +20,15 @@
#
# 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
-audit_list_includes = -include linux/audit.h -include missing.h
+audit_list_includes = -include linux/audit.h -include $(topsrcdir)/src/libbasic/missing.h
ifneq ($(HAVE_AUDIT),)
audit_list_includes += -include libaudit.h
endif # HAVE_AUDIT
-$(outdir)/audit_type-list.txt:
+$(outdir)/audit_type-list.txt: $(call at.path,$(topsrcdir)/src/libbasic/missing.h)
$(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@
$(outdir)/audit_type-to-name.h: $(outdir)/audit_type-list.txt
@@ -108,5 +108,10 @@ endif # HAVE_GCRYPT
noinst_LTLIBRARIES += \
libsystemd-journal-internal.la
+
$(eval $(value automake2autothing))
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += -DCATALOG_DATABASE=\"$(catalogstatedir)/database\"
+$(outdir)/audit-type.lo: $(outdir)/audit_type-to-name.h
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libudev/Makefile b/src/libudev/Makefile
new file mode 100644
index 0000000000..8d9fecb1fb
--- /dev/null
+++ b/src/libudev/Makefile
@@ -0,0 +1,28 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# 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 $(topsrcdir)/build-aux/Makefile.head.mk
+
+at.subdirs += src
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libudev/src/Makefile b/src/libudev/src/Makefile
index 1dd575021c..2c31d3efe0 100644
--- a/src/libudev/src/Makefile
+++ b/src/libudev/src/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
LIBUDEV_CURRENT=7
@@ -50,10 +50,10 @@ libudev_la_SOURCES =\
libudev_la_LDFLAGS = \
$(AM_LDFLAGS) \
-version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
- -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
+ -Wl,--version-script=$(srcdir)/libudev.sym
libudev_la_LIBADD = \
- libsystemd-internal.la
+ $(topoutdir)/src/libsystemd/libsystemd-internal/libsystemd-internal.la
pkgconfiglib_DATA += \
src/libudev/libudev.pc
@@ -61,9 +61,9 @@ pkgconfiglib_DATA += \
EXTRA_DIST += \
src/libudev/libudev.pc.in
-test-libudev-sym.c: \
- src/libudev/libudev.sym \
- src/udev/udev.h
+$(outdir)/test-libudev-sym.c: \
+ $(srcdir)/libudev.sym \
+ $(srcdir)/udev.h
$(generate-sym-test)
nodist_test_libudev_sym_SOURCES = \
@@ -75,4 +75,10 @@ test_libudev_sym_LDADD = \
libudev.la
$(eval $(value automake2autothing))
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += $(libsystemd.CPPFLAGS)
+AM_CPPFLAGS += $(libsystemd.CPPFLAGS)
+AM_CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-device
+AM_CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-hwdb
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/systemd-nspawn/Makefile b/src/systemd-nspawn/Makefile
index 5ec68fb205..2485936f37 100644
--- a/src/systemd-nspawn/Makefile
+++ b/src/systemd-nspawn/Makefile
@@ -58,13 +58,23 @@ systemd_nspawn_CFLAGS = \
$(SECCOMP_CFLAGS)
systemd_nspawn_LDADD = \
- libshared.la \
+ $(topoutdir)/src/libshared/libshared.la \
$(BLKID_LIBS)
ifneq ($(HAVE_LIBIPTC),)
systemd_nspawn_LDADD += \
- libfirewall.la
+ $(topoutdir)/src/libfirewall/libfirewall.la
endif # HAVE_LIBIPTC
+systemd_nspawn_SOURCES += local-addresses.c
+bin_PROGRAMS += systemd-nspawn
$(eval $(value automake2autothing))
+at.depdirs += $(topoutdir)/src/libshared $(if $(HAVE_LIBIPTC),$(topoutdir)/src/libfirewall)
+AM_CPPFLAGS += $(libshared.CPPFLAGS) $(if $(HAVE_LIBIPTC),$(libfirewall.CPPFLAGS))
+
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += $(libsystemd.CPPFLAGS)
+AM_CPPFLAGS += -I$(topsrcdir)/src/libsystemd/libsystemd-internal/sd-bus
+AM_CPPFLAGS += -I$(topsrcdir)/src/libudev/src
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/systemd-nspawn/local-addresses.c b/src/systemd-nspawn/local-addresses.c
new file mode 120000
index 0000000000..c9636cacab
--- /dev/null
+++ b/src/systemd-nspawn/local-addresses.c
@@ -0,0 +1 @@
+../libsystemd/libsystemd-internal/sd-netlink/local-addresses.c \ No newline at end of file
diff --git a/src/systemd-nspawn/local-addresses.h b/src/systemd-nspawn/local-addresses.h
new file mode 120000
index 0000000000..7d801fe75c
--- /dev/null
+++ b/src/systemd-nspawn/local-addresses.h
@@ -0,0 +1 @@
+../libsystemd/libsystemd-internal/sd-netlink/local-addresses.h \ No newline at end of file
diff --git a/src/systemd-nspawn/loopback-setup.c b/src/systemd-nspawn/loopback-setup.c
new file mode 120000
index 0000000000..1078ace0bf
--- /dev/null
+++ b/src/systemd-nspawn/loopback-setup.c
@@ -0,0 +1 @@
+../libcore/loopback-setup.c \ No newline at end of file
diff --git a/src/systemd-nspawn/loopback-setup.h b/src/systemd-nspawn/loopback-setup.h
new file mode 120000
index 0000000000..18fc7663a2
--- /dev/null
+++ b/src/systemd-nspawn/loopback-setup.h
@@ -0,0 +1 @@
+../libcore/loopback-setup.h \ No newline at end of file
diff --git a/src/systemd-nspawn/mount-setup.c b/src/systemd-nspawn/mount-setup.c
new file mode 120000
index 0000000000..a4ab487157
--- /dev/null
+++ b/src/systemd-nspawn/mount-setup.c
@@ -0,0 +1 @@
+../libcore/mount-setup.c \ No newline at end of file
diff --git a/src/systemd-nspawn/mount-setup.h b/src/systemd-nspawn/mount-setup.h
new file mode 120000
index 0000000000..1f984851f8
--- /dev/null
+++ b/src/systemd-nspawn/mount-setup.h
@@ -0,0 +1 @@
+../libcore/mount-setup.h \ No newline at end of file
diff --git a/src/systemd-nspawn/nspawn-expose-ports.c b/src/systemd-nspawn/nspawn-expose-ports.c
index 8122a14f7b..71eb88873c 100644
--- a/src/systemd-nspawn/nspawn-expose-ports.c
+++ b/src/systemd-nspawn/nspawn-expose-ports.c
@@ -24,7 +24,6 @@
#include "firewall-util.h"
#include "in-addr-util.h"
#include "local-addresses.h"
-#include "netlink-util.h"
#include "nspawn-expose-ports.h"
#include "parse-util.h"
#include "socket-util.h"
diff --git a/src/systemd-nspawn/nspawn-network.c b/src/systemd-nspawn/nspawn-network.c
index d03fd001a7..58d6035ddb 100644
--- a/src/systemd-nspawn/nspawn-network.c
+++ b/src/systemd-nspawn/nspawn-network.c
@@ -26,7 +26,6 @@
#include "alloc-util.h"
#include "ether-addr-util.h"
-#include "netlink-util.h"
#include "nspawn-network.h"
#include "siphash24.h"
#include "string-util.h"
diff --git a/src/systemd-nspawn/nspawn-register.c b/src/systemd-nspawn/nspawn-register.c
index 3b0d778f43..de1433a5e2 100644
--- a/src/systemd-nspawn/nspawn-register.c
+++ b/src/systemd-nspawn/nspawn-register.c
@@ -19,7 +19,7 @@
#include <systemd/sd-bus.h>
-#include "bus-error.h"
+#include "bus-error.h" /* for bus_error_message */
#include "bus-util.h"
#include "nspawn-register.h"
#include "stat-util.h"
diff --git a/src/systemd-nspawn/nspawn.c b/src/systemd-nspawn/nspawn.c
index add66be183..1de527b57b 100644
--- a/src/systemd-nspawn/nspawn.c
+++ b/src/systemd-nspawn/nspawn.c
@@ -69,7 +69,6 @@
#include "missing.h"
#include "mkdir.h"
#include "mount-util.h"
-#include "netlink-util.h"
#include "nspawn-cgroup.h"
#include "nspawn-expose-ports.h"
#include "nspawn-mount.h"