]> git.ipfire.org Git - thirdparty/systemd.git/blame - Makefile.am
tests: add hwdb parsing test
[thirdparty/systemd.git] / Makefile.am
CommitLineData
6ee667ae 1# -*- Mode: makefile; indent-tabs-mode: t -*-
643a14a5 2#
47be870b
LP
3# This file is part of systemd.
4#
3e214785
KS
5# Copyright 2010-2012 Lennart Poettering
6# Copyright 2010-2012 Kay Sievers
91e8651b 7# Copyright 2013 Zbigniew Jędrzejewski-Szmek
912b54ad 8# Copyright 2013 David Strauss
47be870b
LP
9#
10# systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
11# under the terms of the GNU Lesser General Public License as published by
12# the Free Software Foundation; either version 2.1 of the License, or
47be870b
LP
13# (at your option) any later version.
14#
15# systemd is distributed in the hope that it will be useful, but
16# WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2 18# Lesser General Public License for more details.
47be870b 19#
5430f7f2 20# You should have received a copy of the GNU Lesser General Public License
47be870b
LP
21# along with systemd; If not, see <http://www.gnu.org/licenses/>.
22
3e214785
KS
23ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24AM_MAKEFLAGS = --no-print-directory
b5a223bf 25AUTOMAKE_OPTIONS = color-tests parallel-tests
47be870b 26
f44541bc
MS
27GCC_COLORS ?= 'ooh, shiny!'
28export GCC_COLORS
29
3e214785
KS
30SUBDIRS = . po
31
96bd03d5
ZJS
32# remove targets if the command fails
33.DELETE_ON_ERROR:
34
652e7375
ZJS
35# keep intermediate files
36.SECONDARY:
37
c2654883 38# Keep the test-suite.log
e7c431d3 39.PRECIOUS: $(TEST_SUITE_LOG) Makefile
c2654883 40
d5a169aa 41LIBUDEV_CURRENT=7
38b383d9 42LIBUDEV_REVISION=5
d5a169aa 43LIBUDEV_AGE=6
3e214785 44
515958c9 45LIBSYSTEMD_CURRENT=17
23d08d1b 46LIBSYSTEMD_REVISION=0
515958c9 47LIBSYSTEMD_AGE=17
42a04ee6 48
8c4a3079 49# Dirs of external packages
d122948d
LP
50dbuspolicydir=@dbuspolicydir@
51dbussessionservicedir=@dbussessionservicedir@
52dbussystemservicedir=@dbussystemservicedir@
8c6db833 53pamlibdir=@pamlibdir@
5c390a4a 54pamconfdir=@pamconfdir@
3bd31503 55pkgconfigdatadir=$(datadir)/pkgconfig
02f130cb 56pkgconfiglibdir=$(libdir)/pkgconfig
490aed58 57polkitpolicydir=$(datadir)/polkit-1/actions
e8c0de91
MP
58polkitrulesdir=$(datadir)/polkit-1/rules.d
59polkitpkladir=$(localstatedir)/lib/polkit-1/localauthority/10-vendor.d
db059f1b 60bashcompletiondir=@bashcompletiondir@
4f87c47b 61zshcompletiondir=@zshcompletiondir@
460c589a 62rpmmacrosdir=$(prefix)/lib/rpm/macros.d
0ce8860a 63sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
dee4c244 64sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
0ce8860a 65varlogdir=$(localstatedir)/log
4ec24515
ZJS
66systemdstatedir=$(localstatedir)/lib/systemd
67catalogstatedir=$(systemdstatedir)/catalog
1401ec2d 68xinitrcdir=$(sysconfdir)/X11/xinit/xinitrc.d
036643a2 69
8c4a3079 70# Our own, non-special dirs
d1ab0ca0 71pkgsysconfdir=$(sysconfdir)/systemd
32d0463d 72userunitdir=$(prefix)/lib/systemd/user
a1d41e17 73userpresetdir=$(prefix)/lib/systemd/user-preset
772f8371 74tmpfilesdir=$(prefix)/lib/tmpfiles.d
1b992147 75sysusersdir=$(prefix)/lib/sysusers.d
f5e04665 76sysctldir=$(prefix)/lib/sysctl.d
d4e85aac
LP
77binfmtdir=$(prefix)/lib/binfmt.d
78modulesloaddir=$(prefix)/lib/modules-load.d
74fae424 79networkdir=$(rootprefix)/lib/systemd/network
74b91131 80pkgincludedir=$(includedir)/systemd
8ece4cab 81systemgeneratordir=$(rootlibexecdir)/system-generators
d267e69d 82usergeneratordir=$(prefix)/lib/systemd/user-generators
8ece4cab 83systemshutdowndir=$(rootlibexecdir)/system-shutdown
6edd7d0a 84systemsleepdir=$(rootlibexecdir)/system-sleep
8ece4cab 85systemunitdir=$(rootprefix)/lib/systemd/system
a1d41e17 86systempresetdir=$(rootprefix)/lib/systemd/system-preset
3e214785 87udevlibexecdir=$(rootprefix)/lib/udev
d4205751
LP
88udevhomedir=$(udevlibexecdir)
89udevrulesdir=$(udevlibexecdir)/rules.d
90udevhwdbdir=$(udevlibexecdir)/hwdb.d
91catalogdir=$(prefix)/lib/systemd/catalog
8f51399e 92kernelinstalldir = $(prefix)/lib/kernel/install.d
0a5d1ed9
MAP
93factory_etcdir = $(datadir)/factory/etc
94factory_pamdir = $(datadir)/factory/etc/pam.d
e7dd673d 95bootlibdir = $(prefix)/lib/systemd/boot/efi
8c4a3079
LP
96
97# And these are the special ones for /
b8079ae1
KS
98rootprefix=@rootprefix@
99rootbindir=$(rootprefix)/bin
100rootlibexecdir=$(rootprefix)/lib/systemd
70fcff31 101
2a018e83 102EXTRA_DIST =
3e214785 103BUILT_SOURCES =
2a018e83
KS
104INSTALL_EXEC_HOOKS =
105UNINSTALL_EXEC_HOOKS =
106INSTALL_DATA_HOOKS =
4ec24515 107UNINSTALL_DATA_HOOKS =
3e214785 108DISTCLEAN_LOCAL_HOOKS =
9b281072 109CLEAN_LOCAL_HOOKS =
48d437bb 110pkginclude_HEADERS =
04a9d3a0 111noinst_LTLIBRARIES =
0237edf7 112lib_LTLIBRARIES =
cc8b113e 113rootlibexec_LTLIBRARIES =
3e214785 114include_HEADERS =
87cfe600 115noinst_DATA =
3bd31503 116pkgconfigdata_DATA =
0237edf7 117pkgconfiglib_DATA =
46ba8aae 118polkitpolicy_in_in_files =
2a018e83 119polkitpolicy_in_files =
299031ca 120polkitpolicy_files =
e8c0de91
MP
121polkitrules_files =
122polkitpkla_files =
131a4dcf 123dist_udevrules_DATA =
3e214785 124nodist_udevrules_DATA =
90ccc3fc 125dist_pkgsysconf_DATA =
ad95fd1d 126nodist_pkgsysconf_DATA =
90ccc3fc 127dist_dbuspolicy_DATA =
90ccc3fc 128dist_dbussystemservice_DATA =
36e46fe9 129dist_systemunit_DATA_busnames =
ae5b2a86 130dist_sysusers_DATA =
6cbf079f 131check_PROGRAMS =
9b80f05f 132check_DATA =
b30bf55d 133dist_rootlibexec_DATA =
cee22bd3
HGB
134tests=
135manual_tests =
72521ab9
MP
136TEST_EXTENSIONS = .py
137PY_LOG_COMPILER = $(PYTHON)
5414b34c 138DISABLE_HARD_ERRORS = yes
cee22bd3 139if ENABLE_TESTS
c1ab8191 140noinst_PROGRAMS = $(manual_tests) $(tests) $(unsafe_tests)
cee22bd3 141TESTS = $(tests)
c1ab8191
ZJS
142if ENABLE_UNSAFE_TESTS
143TESTS += \
144 $(unsafe_tests)
145endif
cee22bd3
HGB
146else
147noinst_PROGRAMS =
148TESTS =
149endif
cabffaf8
ZJS
150AM_TESTS_ENVIRONMENT = \
151 export SYSTEMD_KBD_MODEL_MAP=$(abs_top_srcdir)/src/locale/kbd-model-map; \
152 export SYSTEMD_LANGUAGE_FALLBACK_MAP=$(abs_top_srcdir)/src/locale/language-fallback-map;
153
17163897
ZJS
154if ENABLE_BASH_COMPLETION
155dist_bashcompletion_DATA = $(dist_bashcompletion_data)
156nodist_bashcompletion_DATA = $(nodist_bashcompletion_data)
157endif
158if ENABLE_ZSH_COMPLETION
159dist_zshcompletion_DATA = $(dist_zshcompletion_data)
160nodist_zshcompletion_DATA = $(nodist_zshcompletion_data)
161endif
f13b388f 162udevlibexec_PROGRAMS =
f757855e 163gperf_gperf_sources =
af0a10bf 164rootlib_LTLIBRARIES =
2a018e83 165
9e4ded30
ZJS
166in_files = $(filter %.in,$(EXTRA_DIST))
167in_in_files = $(filter %.in.in, $(in_files))
168m4_files = $(filter %.m4,$(EXTRA_DIST) $(in_files:.m4.in=.m4))
169
170CLEANFILES = $(BUILT_SOURCES) \
3bd31503 171 $(pkgconfigdata_DATA) \
9e4ded30 172 $(pkgconfiglib_DATA) \
17163897
ZJS
173 $(nodist_bashcompletion_data) \
174 $(nodist_zshcompletion_data) \
9e4ded30
ZJS
175 $(in_files:.in=) $(in_in_files:.in.in=) \
176 $(m4_files:.m4=)
177
9f700755
ZJS
178.PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
179 $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
180 $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
181
47be870b 182AM_CPPFLAGS = \
d3f09cf3 183 -include $(top_builddir)/config.h \
19adb8a3 184 -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
036643a2 185 -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
70fcff31 186 -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
0571e011 187 -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
061978fa 188 -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
af2d49f7
LP
189 -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
190 -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
ad95fd1d 191 -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
844ec79b 192 -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
91901329 193 -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
05d02d8d 194 -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
77eb82f9 195 -DSYSTEMD_FSCK_PATH=\"$(rootlibexecdir)/systemd-fsck\" \
b1b2a107 196 -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
6edd7d0a 197 -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
2cb1a60d 198 -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
501fc174 199 -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
5b754353 200 -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
b8079ae1 201 -DROOTPREFIX=\"$(rootprefix)\" \
952d97ed 202 -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
ef5bfcf6 203 -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
e23a0ce8 204 -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
5a1e9937 205 -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
af2d49f7 206 -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
83cc030f 207 -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
ddcbc873 208 -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
baa5ad26 209 -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
4e829d21 210 -DSYSTEMD_LANGUAGE_FALLBACK_MAP=\"$(pkgdatadir)/language-fallback-map\" \
8e8eb8fb 211 -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
f33d3ec1 212 -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
83374163 213 -DQUOTACHECK=\"$(QUOTACHECK)\" \
78013564 214 -DKEXEC=\"$(KEXEC)\" \
f00929ad
DJL
215 -DMOUNT_PATH=\"$(MOUNT_PATH)\" \
216 -DUMOUNT_PATH=\"$(UMOUNT_PATH)\" \
9a00f57a
LP
217 -DLIBDIR=\"$(libdir)\" \
218 -DROOTLIBDIR=\"$(rootlibdir)\" \
a804d849 219 -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
0d8c31ff 220 -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
e5e83e83 221 -I $(top_srcdir)/src \
a095315b
KS
222 -I $(top_builddir)/src/basic \
223 -I $(top_srcdir)/src/basic \
d7832d2c 224 -I $(top_srcdir)/src/shared \
a095315b 225 -I $(top_builddir)/src/shared \
f579559b 226 -I $(top_srcdir)/src/network \
4897d1dc 227 -I $(top_srcdir)/src/locale \
86aa7ba4 228 -I $(top_srcdir)/src/login \
3bdf9c1d 229 -I $(top_srcdir)/src/journal \
4733607e 230 -I $(top_builddir)/src/journal \
bcdbbd7e 231 -I $(top_srcdir)/src/timedate \
687ed123 232 -I $(top_srcdir)/src/timesync \
f757855e 233 -I $(top_srcdir)/src/nspawn \
ffcf82d2 234 -I $(top_srcdir)/src/resolve \
7263f724 235 -I $(top_builddir)/src/resolve \
3e214785 236 -I $(top_srcdir)/src/systemd \
95769b32 237 -I $(top_builddir)/src/core \
b30e2f4c 238 -I $(top_srcdir)/src/core \
0b87a077 239 -I $(top_srcdir)/src/libudev \
5a45a936 240 -I $(top_srcdir)/src/udev \
af6f0d42 241 -I $(top_srcdir)/src/udev/net \
9d7d42bc 242 -I $(top_builddir)/src/udev \
607553f9
TG
243 -I $(top_srcdir)/src/libsystemd/sd-bus \
244 -I $(top_srcdir)/src/libsystemd/sd-event \
a095315b 245 -I $(top_srcdir)/src/libsystemd/sd-login \
1c4baffc 246 -I $(top_srcdir)/src/libsystemd/sd-netlink \
91d3efed 247 -I $(top_srcdir)/src/libsystemd/sd-network \
23fbe14f 248 -I $(top_srcdir)/src/libsystemd/sd-hwdb \
57fa1d09 249 -I $(top_srcdir)/src/libsystemd/sd-device \
910fd145 250 -I $(top_srcdir)/src/libsystemd/sd-id128 \
fe8db0c5 251 -I $(top_srcdir)/src/libsystemd-network \
5a45a936 252 $(OUR_CPPFLAGS)
47be870b 253
3984d657 254AM_CFLAGS = $(OUR_CFLAGS)
5a45a936 255AM_LDFLAGS = $(OUR_LDFLAGS)
eb2e280f 256
24fdc230 257# ------------------------------------------------------------------------------
6ff39241
ZJS
258INSTALL_DIRS =
259
6ff39241
ZJS
260SHUTDOWN_TARGET_WANTS =
261LOCAL_FS_TARGET_WANTS =
262MULTI_USER_TARGET_WANTS =
d5d8429a
LP
263GRAPHICAL_TARGET_WANTS =
264RESCUE_TARGET_WANTS =
6ff39241 265SYSINIT_TARGET_WANTS =
6ff39241 266SOCKETS_TARGET_WANTS =
cde360cd 267BUSNAMES_TARGET_WANTS =
e3d84721 268TIMERS_TARGET_WANTS =
54142c6a 269USER_SOCKETS_TARGET_WANTS =
2355af60 270USER_DEFAULT_TARGET_WANTS =
54142c6a 271USER_BUSNAMES_TARGET_WANTS =
6ff39241 272
91e8651b
ZJS
273SYSTEM_UNIT_ALIASES =
274USER_UNIT_ALIASES =
91e8651b
ZJS
275GENERAL_ALIASES =
276
6ff39241 277install-target-wants-hook:
54142c6a
KS
278 what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
279 what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
280 what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
d5d8429a
LP
281 what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && dir=$(systemunitdir) && $(add-wants)
282 what="$(RESCUE_TARGET_WANTS)" && wants=rescue.target && dir=$(systemunitdir) && $(add-wants)
54142c6a
KS
283 what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
284 what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
54142c6a
KS
285 what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
286 what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
287 what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
2355af60 288 what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
36e46fe9
MB
289
290install-busnames-target-wants-hook:
291 what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
54142c6a 292 what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
6ff39241
ZJS
293
294define add-wants
245d345f 295 [ -z "$$what" ] || ( \
54142c6a 296 dir=$(DESTDIR)$$dir/$$wants.wants && \
245d345f
ZJS
297 $(MKDIR_P) -m 0755 $$dir && \
298 cd $$dir && \
6ff39241 299 rm -f $$what && \
ac2b34e1 300 for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
6ff39241
ZJS
301endef
302
303install-directories-hook:
304 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
305
91e8651b
ZJS
306install-aliases-hook:
307 set -- $(SYSTEM_UNIT_ALIASES) && \
308 dir=$(systemunitdir) && $(install-aliases)
309 set -- $(USER_UNIT_ALIASES) && \
e2438b7a 310 dir=$(userunitdir) && $(install-relative-aliases)
91e8651b 311 set -- $(GENERAL_ALIASES) && \
e2438b7a 312 dir= && $(install-relative-aliases)
91e8651b
ZJS
313
314define install-aliases
91e8651b 315 while [ -n "$$1" ]; do \
0b95a21b 316 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
91e8651b 317 rm -f $(DESTDIR)$$dir/$$2 && \
ac2b34e1 318 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
91e8651b
ZJS
319 shift 2 || exit $$?; \
320 done
321endef
322
e2438b7a
LP
323define install-relative-aliases
324 while [ -n "$$1" ]; do \
325 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
326 rm -f $(DESTDIR)$$dir/$$2 && \
327 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
328 shift 2 || exit $$?; \
329 done
330endef
331
a1259e0a
LP
332install-touch-usr-hook:
333 touch -c $(DESTDIR)/$(prefix)
334
6ff39241
ZJS
335INSTALL_EXEC_HOOKS += \
336 install-target-wants-hook \
91e8651b 337 install-directories-hook \
a1259e0a
LP
338 install-aliases-hook \
339 install-touch-usr-hook
6ff39241 340
36e46fe9
MB
341INSTALL_EXEC_HOOKS += \
342 install-busnames-target-wants-hook
36e46fe9 343
ebea41b8 344# ------------------------------------------------------------------------------
ebea41b8
ZJS
345AM_V_M4 = $(AM_V_M4_$(V))
346AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
347AM_V_M4_0 = @echo " M4 " $@;
348
5b40782c
ZJS
349AM_V_XSLT = $(AM_V_XSLT_$(V))
350AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
351AM_V_XSLT_0 = @echo " XSLT " $@;
352
c8503a3e
ZJS
353AM_V_GPERF = $(AM_V_GPERF_$(V))
354AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
355AM_V_GPERF_0 = @echo " GPERF " $@;
356
87cfe600
ZJS
357AM_V_LN = $(AM_V_LN_$(V))
358AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
359AM_V_LN_0 = @echo " LN " $@;
360
5e11d962
LP
361AM_V_RM = $(AM_V_RM_$(V))
362AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
363AM_V_RM_0 = @echo " RM " $@;
364
d7832d2c 365# ------------------------------------------------------------------------------
8c4a3079 366rootbin_PROGRAMS = \
4a2a8b5a 367 systemctl \
490aed58 368 systemd-notify \
ec863ba6 369 systemd-ask-password \
74ce487d 370 systemd-tty-ask-password-agent \
2945a452
MB
371 systemd-machine-id-setup \
372 systemd-escape
a9b5b032 373
8c4a3079 374bin_PROGRAMS = \
a8f11321 375 systemd-cgls \
8f2d43a0 376 systemd-cgtop \
2c4ff634 377 systemd-nspawn \
27b5482c 378 systemd-detect-virt \
f948423b 379 systemd-delta \
c2756a68 380 systemd-analyze \
9a00f57a 381 systemd-run \
450442cf 382 systemd-mount \
b58d8571 383 systemd-stdio-bridge \
1d3bc017 384 systemd-path
88213476 385
8f51399e 386dist_bin_SCRIPTS = \
81516adc
HH
387 src/kernel-install/kernel-install
388
8f51399e
HH
389dist_kernelinstall_SCRIPTS = \
390 src/kernel-install/50-depmod.install \
391 src/kernel-install/90-loaderentry.install
fcc43d01 392
8c4a3079 393rootlibexec_PROGRAMS = \
e0d25329 394 systemd \
0b7964b8 395 systemd-cgroups-agent \
4927fcae 396 systemd-initctl \
b1b2a107 397 systemd-shutdown \
2b93b027 398 systemd-remount-fs \
22be093f 399 systemd-reply-password \
3d20ed6d 400 systemd-fsck \
8e1bd70d 401 systemd-ac-power \
6edd7d0a 402 systemd-sysctl \
96c374d0 403 systemd-sleep \
8ea48dfc 404 systemd-socket-proxyd \
83e7d885 405 systemd-update-done
47be870b 406
37161c51
ERB
407if HAVE_UTMP
408rootlibexec_PROGRAMS += \
409 systemd-update-utmp
410endif
411
2a796654 412systemgenerator_PROGRAMS = \
6b1dc2bd 413 systemd-getty-generator \
d360705f 414 systemd-fstab-generator \
326bb68c 415 systemd-system-update-generator \
4df5c00b 416 systemd-debug-generator
2a796654 417
17163897 418dist_bashcompletion_data = \
51f6888b 419 shell-completion/bash/busctl \
d611dadc 420 shell-completion/bash/journalctl \
83cb95b5 421 shell-completion/bash/systemd-analyze \
20701701 422 shell-completion/bash/systemd-cat \
abdab4f6 423 shell-completion/bash/systemd-cgls \
d9256bac 424 shell-completion/bash/systemd-cgtop \
0bc8e31b 425 shell-completion/bash/systemd-delta \
3bfe58cb 426 shell-completion/bash/systemd-detect-virt \
0d6883b6 427 shell-completion/bash/systemd-nspawn \
ceb28409 428 shell-completion/bash/systemd-path \
64eed40c 429 shell-completion/bash/systemd-run \
819da595
KS
430 shell-completion/bash/udevadm \
431 shell-completion/bash/kernel-install
42bb3074 432
17163897 433nodist_bashcompletion_data = \
c0a67aef
ZJS
434 shell-completion/bash/systemctl
435
17163897 436dist_zshcompletion_data = \
2c8849ad 437 shell-completion/zsh/_busctl \
7e83c0e0 438 shell-completion/zsh/_journalctl \
a06225fc 439 shell-completion/zsh/_udevadm \
7eb942c4 440 shell-completion/zsh/_kernel-install \
30fd4d1e 441 shell-completion/zsh/_systemd-nspawn \
7abfbe79 442 shell-completion/zsh/_systemd-analyze \
d74ab852 443 shell-completion/zsh/_systemd-run \
3e7f60ab 444 shell-completion/zsh/_sd_hosts_or_user_at_host \
2c12a402
ZJS
445 shell-completion/zsh/_sd_outputmodes \
446 shell-completion/zsh/_sd_unit_files \
298b9e23 447 shell-completion/zsh/_systemd-delta \
4f87c47b
WG
448 shell-completion/zsh/_systemd
449
17163897 450nodist_zshcompletion_data = \
c0a67aef
ZJS
451 shell-completion/zsh/_systemctl
452
453EXTRA_DIST += \
454 shell-completion/bash/systemctl.in \
455 shell-completion/zsh/_systemctl.in
456
6351163b
UTL
457dist_sysctl_DATA = \
458 sysctl.d/50-default.conf
cca4aeee 459
d1ab0ca0 460dist_systemunit_DATA = \
db25d1d7
LP
461 units/graphical.target \
462 units/multi-user.target \
f057408c 463 units/emergency.target \
de47ca9b 464 units/sysinit.target \
f92a18f5 465 units/basic.target \
5e6afdd3
LP
466 units/getty.target \
467 units/halt.target \
85ed27f6 468 units/kexec.target \
287419c1 469 units/exit.target \
70449379 470 units/local-fs.target \
baa5ad26 471 units/local-fs-pre.target \
9e5f0f92 472 units/initrd.target \
700e07ff 473 units/initrd-fs.target \
7163e1ca 474 units/initrd-root-device.target \
9e5f0f92 475 units/initrd-root-fs.target \
5552b1c1 476 units/remote-fs.target \
baa5ad26 477 units/remote-fs-pre.target \
70449379 478 units/network.target \
a4a878d0 479 units/network-pre.target \
0c17fbce 480 units/network-online.target \
70449379 481 units/nss-lookup.target \
082694b7 482 units/nss-user-lookup.target \
5e6afdd3
LP
483 units/poweroff.target \
484 units/reboot.target \
5e6afdd3 485 units/rescue.target \
f0b02ca2 486 units/rpcbind.target \
4466194c 487 units/time-sync.target \
70449379 488 units/shutdown.target \
9aac953a 489 units/final.target \
4e67ddd6 490 units/umount.target \
70449379 491 units/sigpwr.target \
6edd7d0a 492 units/sleep.target \
70449379 493 units/sockets.target \
e3d84721
LP
494 units/timers.target \
495 units/paths.target \
6edd7d0a 496 units/suspend.target \
70449379 497 units/swap.target \
f2561e85
LP
498 units/slices.target \
499 units/system.slice \
70fcff31 500 units/systemd-initctl.socket \
52f319b2 501 units/syslog.socket \
670802d4 502 units/dev-hugepages.mount \
670802d4 503 units/dev-mqueue.mount \
d6bca18e 504 units/sys-kernel-config.mount \
670802d4 505 units/sys-kernel-debug.mount \
7ef5875d 506 units/sys-fs-fuse-connections.mount \
623ac9d2 507 units/tmp.mount \
113b3fc1 508 units/var-lib-machines.mount \
da78e1b4 509 units/printer.target \
88dfa293 510 units/sound.target \
ceda54d9 511 units/bluetooth.target \
b15124f1 512 units/smartcard.target \
e0e1580a 513 units/systemd-ask-password-wall.path \
6699c857 514 units/systemd-ask-password-console.path \
51dfddc2
CG
515 units/systemd-udevd-control.socket \
516 units/systemd-udevd-kernel.socket \
cf843477 517 units/system-update.target \
699b7227
PDS
518 units/initrd-switch-root.target \
519 units/machines.target
70fcff31 520
36e46fe9
MB
521dist_systemunit_DATA += \
522 $(dist_systemunit_DATA_busnames)
36e46fe9
MB
523
524dist_systemunit_DATA_busnames += \
525 units/busnames.target
526
6f6083dc 527nodist_systemunit_DATA = \
5e6afdd3 528 units/getty@.service \
93a45c56 529 units/serial-getty@.service \
337eebb9 530 units/console-getty.service \
04d39279 531 units/container-getty@.service \
dfac97b2 532 units/systemd-initctl.service \
2b93b027 533 units/systemd-remount-fs.service \
306a7fd8 534 units/systemd-ask-password-wall.service \
8cf3a8a9 535 units/systemd-ask-password-console.service \
8e1bd70d 536 units/systemd-sysctl.service \
9cf25786 537 units/emergency.service \
d42d27ea 538 units/rescue.service \
3e214785 539 units/user@.service \
0e0320e0
LP
540 units/systemd-suspend.service \
541 units/systemd-halt.service \
542 units/systemd-poweroff.service \
543 units/systemd-reboot.service \
544 units/systemd-kexec.service \
287419c1 545 units/systemd-exit.service \
0e0320e0
LP
546 units/systemd-fsck@.service \
547 units/systemd-fsck-root.service \
a1405db6 548 units/systemd-machine-id-commit.service \
51dfddc2 549 units/systemd-udevd.service \
f13b388f 550 units/systemd-udev-trigger.service \
ed061a8d 551 units/systemd-udev-settle.service \
65eb4378 552 units/systemd-hwdb-update.service \
7b40ce55
MB
553 units/debug-shell.service \
554 units/initrd-parse-etc.service \
555 units/initrd-cleanup.service \
556 units/initrd-udevadm-cleanup-db.service \
05947bef 557 units/initrd-switch-root.service \
8ea48dfc 558 units/systemd-nspawn@.service \
83e7d885 559 units/systemd-update-done.service
d1ab0ca0 560
37161c51
ERB
561if HAVE_UTMP
562nodist_systemunit_DATA += \
563 units/systemd-update-utmp.service \
564 units/systemd-update-utmp-runlevel.service
565endif
566
af2d49f7 567dist_userunit_DATA = \
fccd44ec 568 units/user/basic.target \
af2d49f7 569 units/user/default.target \
c92fcc4f 570 units/user/exit.target \
98d2d468 571 units/user/graphical-session.target \
de78fa9b
ZJS
572 units/user/graphical-session-pre.target \
573 units/user/bluetooth.target \
574 units/user/busnames.target \
575 units/user/paths.target \
576 units/user/printer.target \
577 units/user/shutdown.target \
578 units/user/smartcard.target \
579 units/user/sockets.target \
580 units/user/sound.target \
581 units/user/timers.target
0d26c910 582
af2d49f7 583nodist_userunit_DATA = \
0e0320e0 584 units/user/systemd-exit.service
fb1bd35a 585
1713703c
LP
586dist_systempreset_DATA = \
587 system-preset/90-systemd.preset
588
2a018e83 589EXTRA_DIST += \
5e6afdd3 590 units/getty@.service.m4 \
93a45c56 591 units/serial-getty@.service.m4 \
337eebb9 592 units/console-getty.service.m4.in \
04d39279 593 units/container-getty@.service.m4.in \
9c080427 594 units/rescue.service.in \
70fcff31 595 units/systemd-initctl.service.in \
2b93b027 596 units/systemd-remount-fs.service.in \
3f92e4b4 597 units/systemd-update-utmp.service.in \
cd6d0a45 598 units/systemd-update-utmp-runlevel.service.in \
306a7fd8 599 units/systemd-ask-password-wall.service.in \
8cf3a8a9 600 units/systemd-ask-password-console.service.in \
8e1bd70d 601 units/systemd-sysctl.service.in \
9cf25786 602 units/emergency.service.in \
0e0320e0
LP
603 units/systemd-halt.service.in \
604 units/systemd-poweroff.service.in \
605 units/systemd-reboot.service.in \
606 units/systemd-kexec.service.in \
287419c1 607 units/systemd-exit.service.in \
0e0320e0 608 units/user/systemd-exit.service.in \
93a1d735
LP
609 units/systemd-fsck@.service.in \
610 units/systemd-fsck-root.service.in \
a1405db6 611 units/systemd-machine-id-commit.service.in \
dd5ae4c3 612 units/user@.service.m4.in \
d1f9edaf 613 units/debug-shell.service.in \
0e0320e0 614 units/systemd-suspend.service.in \
b51fc639 615 units/quotaon.service.in \
7b40ce55
MB
616 units/initrd-parse-etc.service.in \
617 units/initrd-cleanup.service.in \
618 units/initrd-udevadm-cleanup-db.service.in \
619 units/initrd-switch-root.service.in \
8ea48dfc 620 units/systemd-nspawn@.service.in \
5dfcb8d2
SW
621 units/systemd-update-done.service.in \
622 units/tmp.mount.m4
e24067c3 623
b1c4ca25
LP
624if HAVE_SYSV_COMPAT
625nodist_systemunit_DATA += \
626 units/rc-local.service \
627 units/halt-local.service
1de4d79b 628
15673083 629systemgenerator_PROGRAMS += \
95ed3294 630 systemd-sysv-generator \
15673083 631 systemd-rc-local-generator
6fdae8a6
DM
632endif
633
52edb228 634EXTRA_DIST += \
0f0467e6 635 src/systemctl/systemd-sysv-install.SKELETON \
52edb228
ZJS
636 units/rc-local.service.in \
637 units/halt-local.service.in
638
0064dcc0 639GENERAL_ALIASES += \
0064dcc0
ZJS
640 $(systemunitdir)/machines.target $(pkgsysconfdir)/system/multi-user.target.wants/machines.target
641
240a3a85
LP
642dist_doc_DATA = \
643 README \
3e214785 644 NEWS \
2c8849ad 645 CODING_STYLE \
5430f7f2 646 LICENSE.LGPL2.1 \
f33d3ec1 647 LICENSE.GPL2 \
88ce2902
ZJS
648 DISTRO_PORTING \
649 src/libsystemd/sd-bus/PORTING-DBUS1 \
650 src/libsystemd/sd-bus/DIFFERENCES \
318b0fd7
DJL
651 src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
652
653EXTRA_DIST += \
6f068aef 654 README.md \
2c8849ad
KS
655 autogen.sh \
656 .dir-locals.el \
db787e79 657 .editorconfig \
2c8849ad
KS
658 .vimrc \
659 .ycm_extra_conf.py \
660 .travis.yml \
661 .mailmap
240a3a85 662
1c7dde3e 663@INTLTOOL_POLICY_RULE@
7640a5de 664
235450b0 665# ------------------------------------------------------------------------------
823eb4e6
ZJS
666
667MANPAGES =
668MANPAGES_ALIAS =
669
670include Makefile-man.am
235450b0 671
9f700755 672.PHONY: man update-man-list
330fe879
ZJS
673man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
674
235450b0
KS
675XML_FILES = \
676 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
86b45477
ZJS
677HTML_FILES = \
678 ${XML_FILES:.xml=.html}
87cfe600
ZJS
679HTML_ALIAS = \
680 ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
235450b0
KS
681
682if ENABLE_MANPAGES
683man_MANS = \
684 $(MANPAGES) \
685 $(MANPAGES_ALIAS)
686
87cfe600
ZJS
687noinst_DATA += \
688 $(HTML_FILES) \
ab6f56de
ZJS
689 $(HTML_ALIAS) \
690 docs/html/man
691endif
24fb2ddc
LP
692
693CLEANFILES += \
86b45477 694 $(man_MANS) \
87cfe600 695 $(HTML_FILES) \
ab6f56de
ZJS
696 $(HTML_ALIAS) \
697 docs/html/man
87cfe600
ZJS
698
699docs/html/man:
700 $(AM_V_at)$(MKDIR_P) $(dir $@)
701 $(AM_V_LN)$(LN_S) -f ../../man $@
9c4fa6ed 702
87cfe600
ZJS
703man/index.html: man/systemd.index.html
704 $(AM_V_LN)$(LN_S) -f systemd.index.html $@
705
ab6f56de 706if HAVE_PYTHON
42007a09
ZJS
707noinst_DATA += \
708 man/index.html
ab6f56de 709endif
42007a09
ZJS
710
711CLEANFILES += \
9b281072 712 man/index.html
42007a09 713
e4f42f9d 714XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml)
ccc9a4f9 715NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
4584eaea 716SOURCE_XML_FILES = ${patsubst %,$(top_srcdir)/%,$(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))}
56ba3c78 717
e4f42f9d
ZJS
718# This target should only be run manually. It recreates Makefile-man.am
719# file in the source directory based on all man/*.xml files. Run it after
720# adding, removing, or changing the conditional in a man page.
100582b8
MS
721update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB) man/custom-entities.ent
722 $(AM_V_GEN)$(PYTHON) $< $(XML_GLOB) > $(top_srcdir)/Makefile-man.tmp
56ba3c78
ZJS
723 $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
724 @echo "Makefile-man.am has been regenerated"
725
3c3e5f42 726man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
f6b6728d 727 $(AM_V_at)$(MKDIR_P) $(dir $@)
1a13e31d 728 $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
f6b6728d 729
747ca69b 730man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py man/custom-entities.ent $(SOURCE_XML_FILES)
d9cfd694 731 $(AM_V_at)$(MKDIR_P) $(dir $@)
747ca69b 732 $(AM_V_GEN)$(PYTHON) $< $@ $(SOURCE_XML_FILES)
d9cfd694 733
86b45477
ZJS
734CLEANFILES += \
735 man/systemd.index.xml \
736 man/systemd.directives.xml
737
235450b0 738EXTRA_DIST += \
2c8849ad 739 $(filter-out man/systemd.directives.xml man/systemd.index.xml,$(XML_FILES)) \
3c3e5f42 740 tools/make-man-index.py \
7118d2f7 741 tools/make-man-rules.py \
3c3e5f42 742 tools/make-directive-index.py \
e37f6d61 743 tools/xml_helper.py \
5aaf8768 744 man/glib-event-glue.c
235450b0
KS
745
746# ------------------------------------------------------------------------------
04a9d3a0 747noinst_LTLIBRARIES += \
a095315b
KS
748 libbasic.la
749
750libbasic_la_SOURCES = \
751 src/basic/missing.h \
2f368e4a 752 src/basic/missing_syscall.h \
8869a0b4 753 src/basic/raw-clone.h \
430f0182
LP
754 src/basic/capability-util.c \
755 src/basic/capability-util.h \
a095315b
KS
756 src/basic/conf-files.c \
757 src/basic/conf-files.h \
15a5e950 758 src/basic/stdio-util.h \
a095315b
KS
759 src/basic/hostname-util.h \
760 src/basic/hostname-util.c \
761 src/basic/unit-name.c \
762 src/basic/unit-name.h \
763 src/basic/ioprio.h \
764 src/basic/securebits.h \
765 src/basic/special.h \
766 src/basic/list.h \
767 src/basic/unaligned.h \
768 src/basic/macro.h \
769 src/basic/def.h \
770 src/basic/sparse-endian.h \
771 src/basic/refcnt.h \
772 src/basic/util.c \
773 src/basic/util.h \
c004493c
LP
774 src/basic/io-util.c \
775 src/basic/io-util.h \
07630cea
LP
776 src/basic/string-util.c \
777 src/basic/string-util.h \
3ffd4af2
LP
778 src/basic/fd-util.c \
779 src/basic/fd-util.h \
6bedfcbb
LP
780 src/basic/parse-util.c \
781 src/basic/parse-util.h \
b1d4f8e1
LP
782 src/basic/user-util.c \
783 src/basic/user-util.h \
78f22b97
LP
784 src/basic/rlimit-util.c \
785 src/basic/rlimit-util.h \
a0956174
LP
786 src/basic/dirent-util.c \
787 src/basic/dirent-util.h \
89a5a90c
LP
788 src/basic/xattr-util.c \
789 src/basic/xattr-util.h \
c8b3094d
LP
790 src/basic/chattr-util.c \
791 src/basic/chattr-util.h \
4e731273
LP
792 src/basic/proc-cmdline.c \
793 src/basic/proc-cmdline.h \
f4f15635
LP
794 src/basic/fs-util.c \
795 src/basic/fs-util.h \
7ccbd1ae
LP
796 src/basic/syslog-util.c \
797 src/basic/syslog-util.h \
8fcde012
LP
798 src/basic/stat-util.c \
799 src/basic/stat-util.h \
4349cd7c
LP
800 src/basic/mount-util.c \
801 src/basic/mount-util.h \
e4e73a63
LP
802 src/basic/hexdecoct.c \
803 src/basic/hexdecoct.h \
7d50b32a
LP
804 src/basic/glob-util.h \
805 src/basic/glob-util.c \
84ac7bea
LP
806 src/basic/extract-word.c \
807 src/basic/extract-word.h \
4f5dd394
LP
808 src/basic/escape.c \
809 src/basic/escape.h \
618234a5
LP
810 src/basic/cpu-set-util.c \
811 src/basic/cpu-set-util.h \
a095315b
KS
812 src/basic/lockfile-util.c \
813 src/basic/lockfile-util.h \
814 src/basic/path-util.c \
815 src/basic/path-util.h \
816 src/basic/time-util.c \
817 src/basic/time-util.h \
818 src/basic/locale-util.c \
819 src/basic/locale-util.h \
affb60b1 820 src/basic/umask-util.h \
a095315b
KS
821 src/basic/signal-util.c \
822 src/basic/signal-util.h \
8b43440b
LP
823 src/basic/string-table.c \
824 src/basic/string-table.h \
a095315b
KS
825 src/basic/mempool.c \
826 src/basic/mempool.h \
827 src/basic/hashmap.c \
828 src/basic/hashmap.h \
758dd67e
LP
829 src/basic/hash-funcs.c \
830 src/basic/hash-funcs.h \
a095315b
KS
831 src/basic/siphash24.c \
832 src/basic/siphash24.h \
833 src/basic/set.h \
834 src/basic/ordered-set.h \
00616955 835 src/basic/ordered-set.c \
5ffa42cb
TG
836 src/basic/bitmap.c \
837 src/basic/bitmap.h \
a095315b
KS
838 src/basic/prioq.c \
839 src/basic/prioq.h \
49cf4170
LP
840 src/basic/web-util.c \
841 src/basic/web-util.h \
a095315b
KS
842 src/basic/strv.c \
843 src/basic/strv.h \
844 src/basic/env-util.c \
845 src/basic/env-util.h \
846 src/basic/strbuf.c \
847 src/basic/strbuf.h \
848 src/basic/strxcpyx.c \
849 src/basic/strxcpyx.h \
850 src/basic/log.c \
851 src/basic/log.h \
852 src/basic/bus-label.c \
853 src/basic/bus-label.h \
854 src/basic/ratelimit.h \
855 src/basic/ratelimit.c \
856 src/basic/exit-status.c \
857 src/basic/exit-status.h \
858 src/basic/virt.c \
859 src/basic/virt.h \
0f9ae7d7
LP
860 src/basic/architecture.c \
861 src/basic/architecture.h \
a095315b
KS
862 src/basic/smack-util.c \
863 src/basic/smack-util.h \
864 src/basic/device-nodes.c \
865 src/basic/device-nodes.h \
866 src/basic/utf8.c \
867 src/basic/utf8.h \
868 src/basic/gunicode.c \
869 src/basic/gunicode.h \
870 src/basic/socket-util.c \
871 src/basic/socket-util.h \
872 src/basic/in-addr-util.c \
873 src/basic/in-addr-util.h \
874 src/basic/ether-addr-util.h \
81a56d6f 875 src/basic/ether-addr-util.c \
a095315b
KS
876 src/basic/replace-var.c \
877 src/basic/replace-var.h \
878 src/basic/clock-util.c \
879 src/basic/clock-util.h \
880 src/basic/calendarspec.c \
881 src/basic/calendarspec.h \
882 src/basic/fileio.c \
883 src/basic/fileio.h \
884 src/basic/MurmurHash2.c \
885 src/basic/MurmurHash2.h \
886 src/basic/mkdir.c \
887 src/basic/mkdir.h \
888 src/basic/cgroup-util.c \
889 src/basic/cgroup-util.h \
890 src/basic/errno-list.c \
891 src/basic/errno-list.h \
892 src/basic/af-list.c \
893 src/basic/af-list.h \
894 src/basic/arphrd-list.c \
895 src/basic/arphrd-list.h \
896 src/basic/terminal-util.c \
897 src/basic/terminal-util.h \
898 src/basic/login-util.h \
899 src/basic/login-util.c \
900 src/basic/cap-list.c \
901 src/basic/cap-list.h \
430f0182
LP
902 src/basic/audit-util.c \
903 src/basic/audit-util.h \
a095315b
KS
904 src/basic/xml.c \
905 src/basic/xml.h \
a095315b
KS
906 src/basic/barrier.c \
907 src/basic/barrier.h \
908 src/basic/async.c \
909 src/basic/async.h \
910 src/basic/memfd-util.c \
911 src/basic/memfd-util.h \
912 src/basic/process-util.c \
913 src/basic/process-util.h \
914 src/basic/random-util.c \
915 src/basic/random-util.h \
916 src/basic/verbs.c \
917 src/basic/verbs.h \
918 src/basic/sigbus.c \
919 src/basic/sigbus.h \
920 src/basic/build.h \
921 src/basic/socket-label.c \
922 src/basic/label.c \
923 src/basic/label.h \
924 src/basic/btrfs-util.c \
925 src/basic/btrfs-util.h \
926 src/basic/btrfs-ctree.h \
927 src/basic/selinux-util.c \
928 src/basic/selinux-util.h \
929 src/basic/mkdir-label.c \
930 src/basic/fileio-label.c \
931 src/basic/fileio-label.h \
932 src/basic/rm-rf.c \
933 src/basic/rm-rf.h \
934 src/basic/copy.c \
f00022dd 935 src/basic/copy.h \
b5efdb8a
LP
936 src/basic/alloc-util.h \
937 src/basic/alloc-util.c \
f97b34a6 938 src/basic/format-util.h \
6b25959d 939 src/basic/nss-util.h
a095315b
KS
940
941nodist_libbasic_la_SOURCES = \
942 src/basic/errno-from-name.h \
943 src/basic/errno-to-name.h \
944 src/basic/af-from-name.h \
945 src/basic/af-to-name.h \
946 src/basic/arphrd-from-name.h \
947 src/basic/arphrd-to-name.h \
948 src/basic/cap-from-name.h \
949 src/basic/cap-to-name.h
950
951libbasic_la_CFLAGS = \
952 $(AM_CFLAGS) \
953 $(SELINUX_CFLAGS) \
954 $(CAP_CFLAGS) \
955 -pthread
956
957libbasic_la_LIBADD = \
958 $(SELINUX_LIBS) \
959 $(CAP_LIBS) \
8c8302a6 960 -lrt \
a095315b
KS
961 -lm
962
963# -----------------------------------------------------------------------------
964noinst_LTLIBRARIES += \
965 libshared.la
139be57d 966
a095315b
KS
967libshared_la_SOURCES = \
968 src/shared/output-mode.h \
766cd081 969 src/shared/output-mode.c \
a095315b
KS
970 src/shared/gpt.h \
971 src/shared/udev-util.h \
c0a0872d 972 src/shared/linux/auto_dev-ioctl.h \
baabc577 973 src/shared/initreq.h \
4ad7f276
NO
974 src/shared/dns-domain.c \
975 src/shared/dns-domain.h \
2e3d0692
LP
976 src/shared/efivars.c \
977 src/shared/efivars.h \
d15d0333
ZJS
978 src/shared/fstab-util.c \
979 src/shared/fstab-util.h \
19adb8a3
ZJS
980 src/shared/sleep-config.c \
981 src/shared/sleep-config.h \
d7832d2c
KS
982 src/shared/conf-parser.c \
983 src/shared/conf-parser.h \
9f36aa68 984 src/shared/pager.c \
771f19c0 985 src/shared/pager.h \
f33d3ec1 986 src/shared/spawn-polkit-agent.c \
bbc98d32 987 src/shared/spawn-polkit-agent.h \
d682b3a7
LP
988 src/shared/apparmor-util.c \
989 src/shared/apparmor-util.h \
990 src/shared/ima-util.c \
4ba93280
LP
991 src/shared/ima-util.h \
992 src/shared/ptyfwd.c \
be32eb9b 993 src/shared/ptyfwd.h \
3577de7a 994 src/shared/base-filesystem.c \
c9fdc26e 995 src/shared/base-filesystem.h \
8530dc44
LP
996 src/shared/uid-range.c \
997 src/shared/uid-range.h \
a095315b
KS
998 src/shared/install.c \
999 src/shared/install.h \
1000 src/shared/install-printf.c \
1001 src/shared/install-printf.h \
1002 src/shared/path-lookup.c \
1003 src/shared/path-lookup.h \
1004 src/shared/specifier.c \
1005 src/shared/specifier.h \
88f642c0 1006 src/shared/dev-setup.c \
29686440
ZJS
1007 src/shared/dev-setup.h \
1008 src/shared/dropin.c \
1009 src/shared/dropin.h \
657bf5a1
KS
1010 src/shared/condition.c \
1011 src/shared/condition.h \
a095315b
KS
1012 src/shared/clean-ipc.c \
1013 src/shared/clean-ipc.h \
29686440 1014 src/shared/generator.h \
1325ec42 1015 src/shared/generator.c \
a095315b
KS
1016 src/shared/acpi-fpdt.h \
1017 src/shared/acpi-fpdt.c \
1018 src/shared/boot-timestamps.h \
1019 src/shared/boot-timestamps.c \
1020 src/shared/cgroup-show.c \
1021 src/shared/cgroup-show.h \
1022 src/shared/utmp-wtmp.h \
1023 src/shared/watchdog.c \
1024 src/shared/watchdog.h \
1025 src/shared/spawn-ask-password-agent.c \
1026 src/shared/spawn-ask-password-agent.h \
1027 src/shared/ask-password-api.c \
1028 src/shared/ask-password-api.h \
1029 src/shared/switch-root.h \
1030 src/shared/switch-root.c \
1031 src/shared/import-util.c \
1032 src/shared/import-util.h \
1033 src/shared/sysctl-util.c \
1034 src/shared/sysctl-util.h \
1035 src/shared/bus-util.c \
1036 src/shared/bus-util.h \
1037 src/shared/logs-show.c \
1038 src/shared/logs-show.h \
1039 src/shared/machine-image.c \
1040 src/shared/machine-image.h \
1041 src/shared/machine-pool.c \
af49ca27
LP
1042 src/shared/machine-pool.h \
1043 src/shared/resolve-util.c \
d2120590 1044 src/shared/resolve-util.h \
291d565a
LP
1045 src/shared/bus-unit-util.c \
1046 src/shared/bus-unit-util.h \
267fabd2
LP
1047 src/shared/vlan-util.h \
1048 src/shared/vlan-util.c \
d2120590 1049 src/shared/tests.h \
4b7abb5b
LP
1050 src/shared/tests.c \
1051 src/shared/fdset.c \
add00535
LP
1052 src/shared/fdset.h \
1053 src/shared/nsflags.h \
1054 src/shared/nsflags.c
42fcc4d2
KS
1055
1056if HAVE_UTMP
a095315b 1057libshared_la_SOURCES += \
42fcc4d2
KS
1058 src/shared/utmp-wtmp.c
1059endif
49e942b2 1060
a095315b
KS
1061if HAVE_SECCOMP
1062libshared_la_SOURCES += \
1063 src/shared/seccomp-util.h \
1064 src/shared/seccomp-util.c
1065endif
1066
1067if HAVE_ACL
1068libshared_la_SOURCES += \
1069 src/shared/acl-util.c \
1070 src/shared/acl-util.h
1071endif
1072
1073libshared_la_CFLAGS = \
4927fcae 1074 $(AM_CFLAGS) \
a095315b 1075 $(ACL_CFLAGS) \
8c8302a6
KS
1076 $(LIBIDN_CFLAGS) \
1077 $(SECCOMP_CFLAGS)
4927fcae 1078
a095315b
KS
1079libshared_la_LIBADD = \
1080 libsystemd-internal.la \
cc8b113e 1081 libbasic.la \
a095315b 1082 libsystemd-journal-internal.la \
9afc1aac 1083 libudev-internal.la \
a095315b 1084 $(ACL_LIBS) \
4ad7f276 1085 $(LIBIDN_LIBS) \
8c8302a6 1086 $(SECCOMP_LIBS)
d7832d2c 1087
cc8b113e
FS
1088rootlibexec_LTLIBRARIES += \
1089 libsystemd-shared.la
1090
1091libsystemd_shared_la_SOURCES = \
1092 $(libbasic_la_SOURCES) \
1093 $(libshared_la_SOURCES) \
1094 $(libsystemd_internal_la_SOURCES) \
1095 $(libsystemd_journal_internal_la_SOURCES) \
1096 $(libudev_internal_la_SOURCES)
1097
1098libsystemd_shared_la_CFLAGS = \
1099 $(AM_CFLAGS) \
1100 $(libbasic_la_CFLAGS) \
1101 $(libshared_la_CFLAGS) \
1102 $(libsystemd_internal_la_CFLAGS) \
1103 $(libsystemd_journal_internal_la_CFLAGS) \
1104 $(libudev_internal_la_CFLAGS) \
1105 $(ACL_CFLAGS) \
1106 $(LIBIDN_CFLAGS) \
1107 $(SECCOMP_CFLAGS) \
1108 -fvisibility=default
1109
1110# We can't use libshared_la_LIBADD here because it would
1111# pull in libsystemd*-internal.la
1112libsystemd_shared_la_LIBADD = \
1113 $(libbasic_la_LIBADD) \
1114 $(libsystemd_internal_la_LIBADD) \
1115 $(libsystemd_journal_internal_la_LIBADD) \
1116 $(libudev_internal_la_LIBADD) \
1117 $(ACL_LIBS) \
1118 $(LIBIDN_LIBS) \
1119 $(SECCOMP_LIBS)
1120
1121libsystemd_shared_la_LDFLAGS = \
1122 $(AM_LDFLAGS) \
1123 -release $(PACKAGE_VERSION)
1124
1125
12e34d9d 1126# -----------------------------------------------------------------------------
76917807
LP
1127if HAVE_LIBIPTC
1128noinst_LTLIBRARIES += \
a095315b 1129 libfirewall.la
76917807 1130
a095315b 1131libfirewall_la_SOURCES = \
12c2884c
DM
1132 src/shared/firewall-util.h \
1133 src/shared/firewall-util.c
76917807 1134
a095315b 1135libfirewall_la_CFLAGS = \
76917807
LP
1136 $(AM_CFLAGS) \
1137 $(LIBIPTC_CFLAGS)
1138
a095315b 1139libfirewall_la_LIBADD = \
76917807
LP
1140 $(LIBIPTC_LIBS)
1141endif
1142
1143# -----------------------------------------------------------------------------
12e34d9d
UTL
1144if ENABLE_LDCONFIG
1145dist_systemunit_DATA += \
1146 units/ldconfig.service
1147
1148SYSINIT_TARGET_WANTS += \
1149 ldconfig.service
1150endif
1151
d7832d2c 1152# ------------------------------------------------------------------------------
04a9d3a0 1153noinst_LTLIBRARIES += \
a095315b 1154 libcore.la
04a9d3a0 1155
a095315b 1156libcore_la_SOURCES = \
b30e2f4c
KS
1157 src/core/unit.c \
1158 src/core/unit.h \
41f9172f
LP
1159 src/core/unit-printf.c \
1160 src/core/unit-printf.h \
b30e2f4c
KS
1161 src/core/job.c \
1162 src/core/job.h \
1163 src/core/manager.c \
1164 src/core/manager.h \
75778e21
MS
1165 src/core/transaction.c \
1166 src/core/transaction.h \
b30e2f4c
KS
1167 src/core/load-fragment.c \
1168 src/core/load-fragment.h \
1169 src/core/service.c \
1170 src/core/service.h \
e821075a
LP
1171 src/core/socket.c \
1172 src/core/socket.h \
1173 src/core/busname.c \
1174 src/core/busname.h \
3c70e3bb
LP
1175 src/core/bus-policy.c \
1176 src/core/bus-policy.h \
b30e2f4c
KS
1177 src/core/target.c \
1178 src/core/target.h \
e821075a
LP
1179 src/core/device.c \
1180 src/core/device.h \
1181 src/core/mount.c \
1182 src/core/mount.h \
1183 src/core/automount.c \
1184 src/core/automount.h \
1185 src/core/swap.c \
1186 src/core/swap.h \
b30e2f4c
KS
1187 src/core/timer.c \
1188 src/core/timer.h \
1189 src/core/path.c \
1190 src/core/path.h \
a016b922
LP
1191 src/core/slice.c \
1192 src/core/slice.h \
6c12b52e
LP
1193 src/core/scope.c \
1194 src/core/scope.h \
b30e2f4c
KS
1195 src/core/load-dropin.c \
1196 src/core/load-dropin.h \
1197 src/core/execute.c \
1198 src/core/execute.h \
29206d46
LP
1199 src/core/dynamic-user.c \
1200 src/core/dynamic-user.h \
4819ff03
LP
1201 src/core/kill.c \
1202 src/core/kill.h \
b30e2f4c
KS
1203 src/core/dbus.c \
1204 src/core/dbus.h \
1205 src/core/dbus-manager.c \
1206 src/core/dbus-manager.h \
1207 src/core/dbus-unit.c \
1208 src/core/dbus-unit.h \
1209 src/core/dbus-job.c \
1210 src/core/dbus-job.h \
1211 src/core/dbus-service.c \
1212 src/core/dbus-service.h \
1213 src/core/dbus-socket.c \
1214 src/core/dbus-socket.h \
e821075a
LP
1215 src/core/dbus-busname.c \
1216 src/core/dbus-busname.h \
b30e2f4c
KS
1217 src/core/dbus-target.c \
1218 src/core/dbus-target.h \
e821075a
LP
1219 src/core/dbus-device.c \
1220 src/core/dbus-device.h \
b30e2f4c
KS
1221 src/core/dbus-mount.c \
1222 src/core/dbus-mount.h \
1223 src/core/dbus-automount.c \
1224 src/core/dbus-automount.h \
1225 src/core/dbus-swap.c \
1226 src/core/dbus-swap.h \
e821075a
LP
1227 src/core/dbus-timer.c \
1228 src/core/dbus-timer.h \
b30e2f4c
KS
1229 src/core/dbus-path.c \
1230 src/core/dbus-path.h \
a016b922
LP
1231 src/core/dbus-slice.c \
1232 src/core/dbus-slice.h \
6c12b52e
LP
1233 src/core/dbus-scope.c \
1234 src/core/dbus-scope.h \
4ad49000
LP
1235 src/core/dbus-execute.c \
1236 src/core/dbus-execute.h \
1237 src/core/dbus-kill.c \
1238 src/core/dbus-kill.h \
1239 src/core/dbus-cgroup.c \
1240 src/core/dbus-cgroup.h \
b30e2f4c
KS
1241 src/core/cgroup.c \
1242 src/core/cgroup.h \
e2417e41
DW
1243 src/core/selinux-access.c \
1244 src/core/selinux-access.h \
b30e2f4c
KS
1245 src/core/selinux-setup.c \
1246 src/core/selinux-setup.h \
ffbd2c4d
NC
1247 src/core/smack-setup.c \
1248 src/core/smack-setup.h \
b30e2f4c
KS
1249 src/core/ima-setup.c \
1250 src/core/ima-setup.h \
b30e2f4c
KS
1251 src/core/locale-setup.h \
1252 src/core/locale-setup.c \
4d896139
LP
1253 src/core/hostname-setup.c \
1254 src/core/hostname-setup.h \
08e1fb68
LP
1255 src/core/machine-id-setup.c \
1256 src/core/machine-id-setup.h \
1257 src/core/mount-setup.c \
1258 src/core/mount-setup.h \
f84f9974
LP
1259 src/core/kmod-setup.c \
1260 src/core/kmod-setup.h \
08e1fb68
LP
1261 src/core/loopback-setup.h \
1262 src/core/loopback-setup.c \
b30e2f4c
KS
1263 src/core/namespace.c \
1264 src/core/namespace.h \
bd3fa1d2 1265 src/core/killall.h \
8351ceae 1266 src/core/killall.c \
c1165f82 1267 src/core/audit-fd.c \
c65eb836 1268 src/core/audit-fd.h \
4d7213b2 1269 src/core/show-status.c \
2928b0a8 1270 src/core/show-status.h \
87a47f99
LN
1271 src/core/emergency-action.c \
1272 src/core/emergency-action.h
47be870b 1273
a095315b 1274nodist_libcore_la_SOURCES = \
90ccc3fc 1275 src/core/load-fragment-gperf.c \
baabc577 1276 src/core/load-fragment-gperf-nulstr.c
6e5c0444 1277
a095315b 1278libcore_la_CFLAGS = \
139be57d 1279 $(AM_CFLAGS) \
4927fcae 1280 $(PAM_CFLAGS) \
4536f716 1281 $(AUDIT_CFLAGS) \
c65eb836 1282 $(KMOD_CFLAGS) \
eef65bf3 1283 $(APPARMOR_CFLAGS) \
e1ada21e
CR
1284 $(MOUNT_CFLAGS) \
1285 $(SECCOMP_CFLAGS)
139be57d 1286
a095315b 1287libcore_la_LIBADD = \
cc8b113e 1288 libsystemd-shared.la \
7a58bfa4 1289 $(PAM_LIBS) \
85f19d82 1290 $(AUDIT_LIBS) \
e9642be2 1291 $(KMOD_LIBS) \
eef65bf3 1292 $(APPARMOR_LIBS) \
8d3ae2bd 1293 $(MOUNT_LIBS)
e9642be2 1294
90ccc3fc 1295src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
bd923ff2
ZJS
1296 $(AM_V_at)$(MKDIR_P) $(dir $@)
1297 $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
90ccc3fc 1298
9e4ded30 1299gperf_gperf_m4_sources = \
90ccc3fc
KS
1300 src/core/load-fragment-gperf.gperf.m4
1301
9e4ded30 1302gperf_txt_sources = \
a095315b
KS
1303 src/basic/errno-list.txt \
1304 src/basic/af-list.txt \
1305 src/basic/arphrd-list.txt \
1306 src/basic/cap-list.txt
8351ceae 1307
cc9f61b8 1308BUILT_SOURCES += \
9e4ded30
ZJS
1309 $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf.c) \
1310 $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf-nulstr.c) \
1311 $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
1312 $(gperf_txt_sources:-list.txt=-from-name.h) \
1d3f8fa7 1313 $(filter-out %keyboard-keys-to-name.h,$(gperf_txt_sources:-list.txt=-to-name.h))
9e4ded30
ZJS
1314
1315CLEANFILES += \
1316 $(gperf_txt_sources:-list.txt=-from-name.gperf)
1317DISTCLEANFILES = \
1318 $(gperf_txt_sources)
1319
1320EXTRA_DIST += \
1321 $(gperf_gperf_m4_sources) \
ee3c31bf 1322 $(gperf_gperf_sources)
9e4ded30
ZJS
1323
1324CLEANFILES += \
1325 $(gperf_txt_sources)
cc9f61b8 1326
7263f724 1327%-from-name.gperf: %-list.txt
26511062 1328 $(AM_V_at)$(MKDIR_P) $(dir $@)
7263f724 1329 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
780896a4 1330
7263f724 1331%-from-name.h: %-from-name.gperf
26511062 1332 $(AM_V_at)$(MKDIR_P) $(dir $@)
7263f724 1333 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
780896a4 1334
780896a4 1335
a095315b 1336src/basic/errno-list.txt:
780896a4 1337 $(AM_V_at)$(MKDIR_P) $(dir $@)
ee8c4568 1338 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
90ccc3fc 1339
a095315b 1340src/basic/errno-to-name.h: src/basic/errno-list.txt
26511062 1341 $(AM_V_at)$(MKDIR_P) $(dir $@)
fd00a088 1342 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
4298d0b5 1343
4298d0b5 1344
a095315b 1345src/basic/af-list.txt:
4298d0b5 1346 $(AM_V_at)$(MKDIR_P) $(dir $@)
ee8c4568 1347 $(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; }' >$@
4298d0b5 1348
a095315b 1349src/basic/af-to-name.h: src/basic/af-list.txt
26511062 1350 $(AM_V_at)$(MKDIR_P) $(dir $@)
fd00a088 1351 $(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 "};"}' <$< >$@
4298d0b5 1352
2822da4f 1353
a095315b 1354src/basic/arphrd-list.txt:
ee8c4568
LP
1355 $(AM_V_at)$(MKDIR_P) $(dir $@)
1356 $(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_//' >$@
1357
a095315b 1358src/basic/arphrd-to-name.h: src/basic/arphrd-list.txt
26511062 1359 $(AM_V_at)$(MKDIR_P) $(dir $@)
ee8c4568
LP
1360 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1361
a095315b 1362src/basic/arphrd-from-name.gperf: src/basic/arphrd-list.txt
26511062 1363 $(AM_V_at)$(MKDIR_P) $(dir $@)
ee8c4568
LP
1364 $(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 }' <$< >$@
1365
7263f724 1366
a095315b 1367src/basic/cap-list.txt:
2822da4f
LP
1368 $(AM_V_at)$(MKDIR_P) $(dir $@)
1369 $(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 >$@
1370
a095315b 1371src/basic/cap-to-name.h: src/basic/cap-list.txt
26511062 1372 $(AM_V_at)$(MKDIR_P) $(dir $@)
34a3e4ec 1373 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
2822da4f 1374
a095315b 1375src/basic/cap-from-name.gperf: src/basic/cap-list.txt
26511062 1376 $(AM_V_at)$(MKDIR_P) $(dir $@)
2822da4f
LP
1377 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1378
a095315b 1379src/basic/cap-from-name.h: src/basic/cap-from-name.gperf
26511062 1380 $(AM_V_at)$(MKDIR_P) $(dir $@)
2822da4f
LP
1381 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
1382
07ba233e 1383audit_list_includes = -include linux/audit.h -include missing.h
4733607e
ZJS
1384if HAVE_AUDIT
1385audit_list_includes += -include libaudit.h
1386endif
1387
1388src/journal/audit_type-list.txt:
1389 $(AM_V_at)$(MKDIR_P) $(dir $@)
07ba233e 1390 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(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 >$@
4733607e
ZJS
1391
1392src/journal/audit_type-to-name.h: src/journal/audit_type-list.txt
26511062 1393 $(AM_V_at)$(MKDIR_P) $(dir $@)
4733607e
ZJS
1394 $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf " case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@
1395
2822da4f 1396
7263f724
ZJS
1397src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1398 $(AM_V_at)$(MKDIR_P) $(dir $@)
1399 $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1400
1401src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
26511062 1402 $(AM_V_at)$(MKDIR_P) $(dir $@)
4733607e 1403 $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@
7263f724
ZJS
1404
1405src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
26511062 1406 $(AM_V_at)$(MKDIR_P) $(dir $@)
7263f724
ZJS
1407 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
1408
d7832d2c 1409# ------------------------------------------------------------------------------
47be870b 1410systemd_SOURCES = \
78a825f2 1411 src/core/main.c
47be870b 1412
e1ada21e
CR
1413systemd_CFLAGS = \
1414 $(AM_CFLAGS) \
d379d442
KZ
1415 $(SECCOMP_CFLAGS) \
1416 $(MOUNT_CFLAGS)
e1ada21e 1417
47be870b 1418systemd_LDADD = \
8c8302a6 1419 libcore.la
47be870b 1420
90ccc3fc
KS
1421dist_pkgsysconf_DATA += \
1422 src/core/system.conf \
1423 src/core/user.conf
1424
1425dist_dbuspolicy_DATA += \
1426 src/core/org.freedesktop.systemd1.conf
1427
1428dist_dbussystemservice_DATA += \
1429 src/core/org.freedesktop.systemd1.service
1430
46ba8aae 1431polkitpolicy_in_in_files += \
90ccc3fc
KS
1432 src/core/org.freedesktop.systemd1.policy.in.in
1433
3bd31503 1434pkgconfigdata_DATA += \
90ccc3fc
KS
1435 src/core/systemd.pc
1436
590f18a2
LP
1437nodist_rpmmacros_DATA = \
1438 src/core/macros.systemd
1439
56815242
ZJS
1440BUILT_SOURCES += \
1441 src/core/triggers.systemd
1442
90ccc3fc 1443EXTRA_DIST += \
590f18a2 1444 src/core/systemd.pc.in \
873e4133
ZJS
1445 src/core/macros.systemd.in \
1446 src/core/triggers.systemd.in
90ccc3fc 1447
d7832d2c 1448# ------------------------------------------------------------------------------
8b835fcc 1449
cee22bd3 1450manual_tests += \
6cbf079f 1451 test-ns \
6cbf079f 1452 test-cgroup \
6cbf079f 1453 test-install \
7b713b81
TG
1454 test-btrfs \
1455 test-acd \
8a1baa3a
ZJS
1456 test-ipv4ll-manual \
1457 test-ask-password-api
8d09b6de 1458
c1ab8191
ZJS
1459unsafe_tests = \
1460 test-hostname \
1461 test-ipcrm
1462
8d09b6de
KS
1463if HAVE_LIBIPTC
1464manual_tests += \
12c2884c 1465 test-firewall-util
8d09b6de 1466endif
1dd5aa56
ZJS
1467
1468if HAVE_KMOD
1469manual_tests += \
1c4baffc 1470 test-netlink-manual
1dd5aa56 1471endif
6cbf079f 1472
cee22bd3 1473tests += \
134953c9
ZJS
1474 test-daemon \
1475 test-log \
f26b57d1 1476 test-loopback \
0d8c31ff 1477 test-engine \
134953c9 1478 test-watchdog \
8328d8c6 1479 test-cgroup-mask \
e0eaab7c 1480 test-job-type \
93515cae 1481 test-env-util \
97b5f608 1482 test-strbuf \
95ea1b90 1483 test-strv \
bc999297 1484 test-path \
76877b46 1485 test-path-util \
c62c294f 1486 test-strxcpyx \
a245d90a 1487 test-siphash24 \
b5b46d59 1488 test-unit-name \
cfbc22ab 1489 test-unit-file \
02a36bc9 1490 test-utf8 \
35d811f5 1491 test-ellipsize \
539ad707 1492 test-util \
7ba365a9 1493 test-cpu-set-util \
13471436 1494 test-hexdecoct \
45e0b1f6 1495 test-escape \
b66de1f9 1496 test-alloc-util \
d376cbb7 1497 test-proc-cmdline \
ac933e8e 1498 test-io-util \
6a4f4a0f 1499 test-glob-util \
ac229ed8 1500 test-xattr-util \
c270684a 1501 test-fs-util \
cd351070 1502 test-web-util \
f4c13ad7 1503 test-stat-util \
0999c8ad 1504 test-fd-util \
9fe4ea21 1505 test-string-util \
23a3c916 1506 test-extract-word \
bb269eed 1507 test-parse-util \
d0260817 1508 test-user-util \
8fb49443 1509 test-hostname-util \
0b452006 1510 test-process-util \
288a74cc 1511 test-terminal-util \
4f1a33dd 1512 test-path-lookup \
279da1e3 1513 test-barrier \
65b3903f 1514 test-tmpfiles \
d8c9d3a4 1515 test-namespace \
6524990f 1516 test-date \
6e6fb527 1517 test-sleep \
bb112710 1518 test-replace-var \
36697dc0 1519 test-sched-prio \
e8bc0ea2 1520 test-calendarspec \
96cde13a 1521 test-strip-tab-ansi \
30bdd695 1522 test-cgroup-util \
d15d0333 1523 test-fstab-util \
f73141d7 1524 test-prioq \
cb0dac05 1525 test-fileio \
9341a4a1 1526 test-time \
6369641d 1527 test-clock \
3b18ae68 1528 test-hashmap \
647f6824 1529 test-set \
5ffa42cb 1530 test-bitmap \
a8b409db 1531 test-list \
f089257d 1532 test-unaligned \
8f6ce71f 1533 test-tables \
08bcebf3 1534 test-device-nodes \
099524d7 1535 test-xml \
c182135d 1536 test-architecture \
106ecd76 1537 test-socket-util \
09e00c52 1538 test-fdset \
6160e473 1539 test-conf-files \
0763adbe 1540 test-conf-parser \
e6b5c5d0 1541 test-capability \
e80cde5e 1542 test-async \
b08f2be6 1543 test-ratelimit \
134e56dc 1544 test-condition \
20725d92 1545 test-uid-range \
641d1f99 1546 test-locale-util \
281e05b6 1547 test-execute \
2822da4f 1548 test-copy \
fa6ac760 1549 test-cap-list \
d2f0e78f 1550 test-sigbus \
4ad7f276 1551 test-verbs \
da8ba721
DM
1552 test-af-list \
1553 test-arphrd-list \
0ec0deaa 1554 test-dns-domain \
fe39daf2 1555 test-install-root \
0c5eb056 1556 test-rlimit-util \
ada94e69 1557 test-signal-util \
fed527aa
ZJS
1558 test-selinux \
1559 test-sizeof
bb112710 1560
5bb5b236
ZJS
1561if HAVE_ACL
1562tests += \
1563 test-acl-util
1564endif
1565
f6281133
LP
1566if HAVE_SECCOMP
1567tests += \
1568 test-seccomp
1569endif
1570
bb112710 1571EXTRA_DIST += \
f22bbd11
KS
1572 test/a.service \
1573 test/basic.target \
1574 test/b.service \
1575 test/c.service \
1576 test/daughter.service \
1577 test/d.service \
5c404f1a 1578 test/end.service \
f22bbd11
KS
1579 test/e.service \
1580 test/f.service \
1581 test/grandchild.service \
1582 test/g.service \
1583 test/hello-after-sleep.target \
1584 test/hello.service \
1585 test/h.service \
1586 test/parent-deep.slice \
1587 test/parent.slice \
bb112710
HHPF
1588 test/sched_idle_bad.service \
1589 test/sched_idle_ok.service \
1590 test/sched_rr_bad.service \
21acf11d 1591 test/sched_rr_change.service \
f22bbd11
KS
1592 test/sched_rr_ok.service \
1593 test/shutdown.target \
1594 test/sleep.service \
1595 test/sockets.target \
21acf11d 1596 test/son.service \
f22bbd11
KS
1597 test/sysinit.target \
1598 test/testsuite.target \
1599 test/timers.target \
20725d92 1600 test/unstoppable.service \
aa8e00da
RC
1601 test/test-path/paths.target \
1602 test/test-path/basic.target \
1603 test/test-path/sysinit.target \
1604 test/test-path/path-changed.service \
1605 test/test-path/path-directorynotempty.service \
1606 test/test-path/path-existsglob.service \
1607 test/test-path/path-exists.service \
1608 test/test-path/path-makedirectory.service \
1609 test/test-path/path-modified.service \
1610 test/test-path/path-mycustomunit.service \
1611 test/test-path/path-service.service \
1612 test/test-path/path-changed.path \
1613 test/test-path/path-directorynotempty.path \
1614 test/test-path/path-existsglob.path \
1615 test/test-path/path-exists.path \
1616 test/test-path/path-makedirectory.path \
1617 test/test-path/path-modified.path \
1618 test/test-path/path-unit.path \
ac400816
RC
1619 test/test-execute/exec-environment-empty.service \
1620 test/test-execute/exec-environment-multiple.service \
1621 test/test-execute/exec-environment.service \
4c80d201
FB
1622 test/test-execute/exec-passenvironment-absent.service \
1623 test/test-execute/exec-passenvironment-empty.service \
1624 test/test-execute/exec-passenvironment-repeated.service \
1625 test/test-execute/exec-passenvironment.service \
ac400816 1626 test/test-execute/exec-group.service \
50f130c2 1627 test/test-execute/exec-group-nfsnobody.service \
86b838ea 1628 test/test-execute/exec-supplementarygroups.service \
bf9ace96
DH
1629 test/test-execute/exec-supplementarygroups-single-group.service \
1630 test/test-execute/exec-supplementarygroups-single-group-user.service \
50ca7a35
DH
1631 test/test-execute/exec-supplementarygroups-multiple-groups-default-group-user.service \
1632 test/test-execute/exec-supplementarygroups-multiple-groups-withgid.service \
1633 test/test-execute/exec-supplementarygroups-multiple-groups-withuid.service \
2b9ac11e
DH
1634 test/test-execute/exec-dynamicuser-fixeduser.service \
1635 test/test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service \
5c67067f 1636 test/test-execute/exec-dynamicuser-supplementarygroups.service \
ac400816
RC
1637 test/test-execute/exec-ignoresigpipe-no.service \
1638 test/test-execute/exec-ignoresigpipe-yes.service \
1639 test/test-execute/exec-personality-x86-64.service \
1640 test/test-execute/exec-personality-x86.service \
1641 test/test-execute/exec-personality-s390.service \
12591863
JS
1642 test/test-execute/exec-personality-ppc64.service \
1643 test/test-execute/exec-personality-ppc64le.service \
1644 test/test-execute/exec-personality-aarch64.service \
ac400816
RC
1645 test/test-execute/exec-privatedevices-no.service \
1646 test/test-execute/exec-privatedevices-yes.service \
615a1f4b
DH
1647 test/test-execute/exec-privatedevices-no-capability-mknod.service \
1648 test/test-execute/exec-privatedevices-yes-capability-mknod.service \
3ae33295
DH
1649 test/test-execute/exec-protectkernelmodules-no-capabilities.service \
1650 test/test-execute/exec-protectkernelmodules-yes-capabilities.service \
4982dbcc 1651 test/test-execute/exec-protectkernelmodules-yes-mount-propagation.service \
ac400816
RC
1652 test/test-execute/exec-privatetmp-no.service \
1653 test/test-execute/exec-privatetmp-yes.service \
f78b36f0 1654 test/test-execute/exec-readonlypaths.service \
cdfbd1fb
DH
1655 test/test-execute/exec-readonlypaths-mount-propagation.service \
1656 test/test-execute/exec-readwritepaths-mount-propagation.service \
1657 test/test-execute/exec-inaccessiblepaths-mount-propagation.service \
dcf7860e 1658 test/test-execute/exec-spec-interpolation.service \
ac400816
RC
1659 test/test-execute/exec-systemcallerrornumber.service \
1660 test/test-execute/exec-systemcallfilter-failing2.service \
1661 test/test-execute/exec-systemcallfilter-failing.service \
1662 test/test-execute/exec-systemcallfilter-not-failing2.service \
1663 test/test-execute/exec-systemcallfilter-not-failing.service \
19c0b0b9 1664 test/test-execute/exec-systemcallfilter-system-user.service \
50f130c2 1665 test/test-execute/exec-systemcallfilter-system-user-nfsnobody.service \
ac400816 1666 test/test-execute/exec-user.service \
50f130c2 1667 test/test-execute/exec-user-nfsnobody.service \
ac400816
RC
1668 test/test-execute/exec-workingdirectory.service \
1669 test/test-execute/exec-umask-0177.service \
1670 test/test-execute/exec-umask-default.service \
1671 test/test-execute/exec-privatenetwork-yes.service \
1672 test/test-execute/exec-environmentfile.service \
1673 test/test-execute/exec-oomscoreadjust-positive.service \
1674 test/test-execute/exec-oomscoreadjust-negative.service \
1675 test/test-execute/exec-ioschedulingclass-best-effort.service \
1676 test/test-execute/exec-ioschedulingclass-idle.service \
1677 test/test-execute/exec-ioschedulingclass-none.service \
1678 test/test-execute/exec-ioschedulingclass-realtime.service \
1679 test/test-execute/exec-capabilityboundingset-invert.service \
1680 test/test-execute/exec-capabilityboundingset-merge.service \
1681 test/test-execute/exec-capabilityboundingset-reset.service \
1682 test/test-execute/exec-capabilityboundingset-simple.service \
bd3bc546 1683 test/test-execute/exec-capabilityambientset.service \
50f130c2 1684 test/test-execute/exec-capabilityambientset-nfsnobody.service \
bd3bc546 1685 test/test-execute/exec-capabilityambientset-merge.service \
50f130c2 1686 test/test-execute/exec-capabilityambientset-merge-nfsnobody.service \
5a7c1eae
EV
1687 test/test-execute/exec-runtimedirectory.service \
1688 test/test-execute/exec-runtimedirectory-mode.service \
1689 test/test-execute/exec-runtimedirectory-owner.service \
50f130c2 1690 test/test-execute/exec-runtimedirectory-owner-nfsnobody.service \
97e60383
DH
1691 test/test-execute/exec-restrict-namespaces-no.service \
1692 test/test-execute/exec-restrict-namespaces-yes.service \
1693 test/test-execute/exec-restrict-namespaces-mnt.service \
1694 test/test-execute/exec-restrict-namespaces-mnt-blacklist.service \
20725d92
DM
1695 test/bus-policy/hello.conf \
1696 test/bus-policy/methods.conf \
1697 test/bus-policy/ownerships.conf \
3a9cca11 1698 test/bus-policy/signals.conf \
55e18900
LP
1699 test/bus-policy/check-own-rules.conf \
1700 test/bus-policy/many-rules.conf \
1701 test/bus-policy/test.conf
20725d92 1702
e0eaab7c 1703
143bfdaf
HHPF
1704EXTRA_DIST += \
1705 src/test/test-helper.h
1706
8f6ce71f
DR
1707test_device_nodes_SOURCES = \
1708 src/test/test-device-nodes.c
1709
8f6ce71f 1710test_device_nodes_LDADD = \
cc8b113e 1711 libsystemd-shared.la
8f6ce71f 1712
47be870b 1713test_engine_SOURCES = \
379079ba 1714 src/test/test-engine.c
47be870b 1715
41fd4c4c
KS
1716test_engine_CFLAGS = \
1717 $(AM_CFLAGS) \
d379d442
KZ
1718 $(SECCOMP_CFLAGS) \
1719 $(MOUNT_CFLAGS)
41fd4c4c 1720
235450b0 1721test_engine_LDADD = \
8c8302a6 1722 libcore.la
47be870b
LP
1723
1724test_job_type_SOURCES = \
379079ba 1725 src/test/test-job-type.c
47be870b 1726
41fd4c4c
KS
1727test_job_type_CFLAGS = \
1728 $(AM_CFLAGS) \
d379d442
KZ
1729 $(SECCOMP_CFLAGS) \
1730 $(MOUNT_CFLAGS)
41fd4c4c 1731
235450b0 1732test_job_type_LDADD = \
8c8302a6 1733 libcore.la
47be870b 1734
15ae422b 1735test_ns_SOURCES = \
379079ba 1736 src/test/test-ns.c
15ae422b 1737
41fd4c4c
KS
1738test_ns_CFLAGS = \
1739 $(AM_CFLAGS) \
1740 $(SECCOMP_CFLAGS)
1741
235450b0 1742test_ns_LDADD = \
a095315b 1743 libcore.la
15ae422b 1744
af5bc85d 1745test_loopback_SOURCES = \
379079ba 1746 src/test/test-loopback.c
af5bc85d 1747
139be57d 1748test_loopback_LDADD = \
a095315b 1749 libcore.la
139be57d 1750
e5907703 1751test_hostname_SOURCES = \
379079ba 1752 src/test/test-hostname.c
e5907703
LP
1753
1754test_hostname_LDADD = \
a095315b 1755 libcore.la
e5907703 1756
4ad7f276
NO
1757test_dns_domain_SOURCES = \
1758 src/test/test-dns-domain.c
1759
1760test_dns_domain_LDADD = \
1761 libsystemd-network.la \
cc8b113e 1762 libsystemd-shared.la
4ad7f276 1763
c7472ce0 1764
b872e9a0 1765if ENABLE_EFI
a4bfedec
ZJS
1766tests += \
1767 test-boot-timestamps
b872e9a0 1768
a4bfedec 1769test_boot_timestamps_SOURCES = \
c51d84dc 1770 src/test/test-boot-timestamps.c
2e3d0692 1771
a4bfedec 1772test_boot_timestamps_LDADD = \
cc8b113e 1773 libsystemd-shared.la
b872e9a0 1774endif
2e3d0692 1775
b0193f1c
LP
1776test_unit_name_SOURCES = \
1777 src/test/test-unit-name.c
1778
41fd4c4c
KS
1779test_unit_name_CFLAGS = \
1780 $(AM_CFLAGS) \
d379d442
KZ
1781 $(SECCOMP_CFLAGS) \
1782 $(MOUNT_CFLAGS)
41fd4c4c 1783
b0193f1c 1784test_unit_name_LDADD = \
8c8302a6 1785 libcore.la
b0193f1c 1786
b5b46d59
LP
1787test_unit_file_SOURCES = \
1788 src/test/test-unit-file.c
1789
41fd4c4c
KS
1790test_unit_file_CFLAGS = \
1791 $(AM_CFLAGS) \
d379d442
KZ
1792 $(SECCOMP_CFLAGS) \
1793 $(MOUNT_CFLAGS)
41fd4c4c 1794
b5b46d59 1795test_unit_file_LDADD = \
8c8302a6 1796 libcore.la
b5b46d59 1797
02a36bc9
DR
1798test_utf8_SOURCES = \
1799 src/test/test-utf8.c
1800
02a36bc9 1801test_utf8_LDADD = \
cc8b113e 1802 libsystemd-shared.la
02a36bc9 1803
6160e473
RC
1804test_capability_SOURCES = \
1805 src/test/test-capability.c
1806
cc8b113e
FS
1807test_capability_CFLAGS = \
1808 $(AM_CFLAGS) \
1809 $(CAP_CFLAGS)
1810
6160e473 1811test_capability_LDADD = \
cc8b113e
FS
1812 libsystemd-shared.la \
1813 $(CAP_LIBS)
6160e473 1814
e6b5c5d0
RC
1815test_async_SOURCES = \
1816 src/test/test-async.c
1817
1818test_async_LDADD = \
cc8b113e 1819 libsystemd-shared.la
e6b5c5d0 1820
2b89a960
RC
1821test_locale_util_SOURCES = \
1822 src/test/test-locale-util.c
1823
1824test_locale_util_LDADD = \
cc8b113e 1825 libsystemd-shared.la
2b89a960 1826
641d1f99
RC
1827test_copy_SOURCES = \
1828 src/test/test-copy.c
1829
cc8b113e 1830# Link statically to ensure file is large
641d1f99 1831test_copy_LDADD = \
a095315b 1832 libshared.la
641d1f99 1833
fa6ac760
LP
1834test_sigbus_SOURCES = \
1835 src/test/test-sigbus.c
1836
1837test_sigbus_LDADD = \
cc8b113e 1838 libsystemd-shared.la
fa6ac760 1839
134e56dc
LP
1840test_condition_SOURCES = \
1841 src/test/test-condition.c
b08f2be6 1842
134e56dc 1843test_condition_LDADD = \
cc8b113e 1844 libsystemd-shared.la
b08f2be6 1845
106ecd76
RC
1846test_fdset_SOURCES = \
1847 src/test/test-fdset.c
1848
1849test_fdset_LDADD = \
cc8b113e 1850 libsystemd-shared.la
106ecd76 1851
d15d0333
ZJS
1852test_fstab_util_SOURCES = \
1853 src/test/test-fstab-util.c
1854
1855test_fstab_util_LDADD = \
cc8b113e 1856 libsystemd-shared.la
d15d0333 1857
e80cde5e
RC
1858test_ratelimit_SOURCES = \
1859 src/test/test-ratelimit.c
1860
1861test_ratelimit_LDADD = \
cc8b113e 1862 libsystemd-shared.la
e80cde5e 1863
539ad707
TA
1864test_util_SOURCES = \
1865 src/test/test-util.c
1866
539ad707 1867test_util_LDADD = \
cc8b113e 1868 libsystemd-shared.la
539ad707 1869
13471436
RC
1870test_hexdecoct_SOURCES = \
1871 src/test/test-hexdecoct.c
1872
1873test_hexdecoct_LDADD = \
cc8b113e 1874 libsystemd-shared.la
13471436 1875
b66de1f9
RC
1876test_alloc_util_SOURCES = \
1877 src/test/test-alloc-util.c
1878
1879test_alloc_util_LDADD = \
cc8b113e 1880 libsystemd-shared.la
b66de1f9 1881
ac229ed8
RC
1882test_xattr_util_SOURCES = \
1883 src/test/test-xattr-util.c
1884
1885test_xattr_util_LDADD = \
cc8b113e 1886 libsystemd-shared.la
ac229ed8 1887
ac933e8e
RC
1888test_io_util_SOURCES = \
1889 src/test/test-io-util.c
1890
1891test_io_util_LDADD = \
cc8b113e 1892 libsystemd-shared.la
ac933e8e 1893
6a4f4a0f
RC
1894test_glob_util_SOURCES = \
1895 src/test/test-glob-util.c
1896
1897test_glob_util_LDADD = \
cc8b113e 1898 libsystemd-shared.la
6a4f4a0f 1899
c270684a
RC
1900test_fs_util_SOURCES = \
1901 src/test/test-fs-util.c
1902
1903test_fs_util_LDADD = \
cc8b113e 1904 libsystemd-shared.la
c270684a 1905
d376cbb7
RC
1906test_proc_cmdline_SOURCES = \
1907 src/test/test-proc-cmdline.c
1908
1909test_proc_cmdline_LDADD = \
cc8b113e 1910 libsystemd-shared.la
d376cbb7 1911
0999c8ad
RC
1912test_fd_util_SOURCES = \
1913 src/test/test-fd-util.c
1914
1915test_fd_util_LDADD = \
cc8b113e 1916 libsystemd-shared.la
0999c8ad 1917
cd351070
RC
1918test_web_util_SOURCES = \
1919 src/test/test-web-util.c
1920
1921test_web_util_LDADD = \
cc8b113e 1922 libsystemd-shared.la
cd351070 1923
7ba365a9
RC
1924test_cpu_set_util_SOURCES = \
1925 src/test/test-cpu-set-util.c
1926
1927test_cpu_set_util_LDADD = \
cc8b113e 1928 libsystemd-shared.la
7ba365a9 1929
f4c13ad7
RC
1930test_stat_util_SOURCES = \
1931 src/test/test-stat-util.c
1932
1933test_stat_util_LDADD = \
cc8b113e 1934 libsystemd-shared.la
f4c13ad7 1935
45e0b1f6
RC
1936test_escape_SOURCES = \
1937 src/test/test-escape.c
1938
1939test_escape_LDADD = \
cc8b113e 1940 libsystemd-shared.la
45e0b1f6 1941
9fe4ea21
LP
1942test_string_util_SOURCES = \
1943 src/test/test-string-util.c
1944
1945test_string_util_LDADD = \
cc8b113e 1946 libsystemd-shared.la
9fe4ea21 1947
23a3c916
FB
1948test_extract_word_SOURCES = \
1949 src/test/test-extract-word.c
1950
1951test_extract_word_LDADD = \
cc8b113e 1952 libsystemd-shared.la
23a3c916 1953
bb269eed
FB
1954test_parse_util_SOURCES = \
1955 src/test/test-parse-util.c
1956
1957test_parse_util_LDADD = \
cc8b113e 1958 libsystemd-shared.la
bb269eed 1959
d0260817
LP
1960test_user_util_SOURCES = \
1961 src/test/test-user-util.c
1962
1963test_user_util_LDADD = \
cc8b113e 1964 libsystemd-shared.la
d0260817 1965
8fb49443
ZJS
1966test_hostname_util_SOURCES = \
1967 src/test/test-hostname-util.c
1968
1969test_hostname_util_LDADD = \
cc8b113e 1970 libsystemd-shared.la
8fb49443 1971
0b452006
RC
1972test_process_util_SOURCES = \
1973 src/test/test-process-util.c
1974
1975test_process_util_LDADD = \
cc8b113e 1976 libsystemd-shared.la
0b452006 1977
288a74cc
RC
1978test_terminal_util_SOURCES = \
1979 src/test/test-terminal-util.c
1980
1981test_terminal_util_LDADD = \
cc8b113e 1982 libsystemd-shared.la
288a74cc 1983
4f1a33dd
ZJS
1984test_path_lookup_SOURCES = \
1985 src/test/test-path-lookup.c
1986
1987test_path_lookup_LDADD = \
cc8b113e 1988 libsystemd-shared.la
4f1a33dd 1989
8530dc44
LP
1990test_uid_range_SOURCES = \
1991 src/test/test-uid-range.c
1992
1993test_uid_range_LDADD = \
cc8b113e 1994 libsystemd-shared.la
8530dc44 1995
2822da4f
LP
1996test_cap_list_SOURCES = \
1997 src/test/test-cap-list.c
1998
cc8b113e
FS
1999test_cap_list_CFLAGS = \
2000 $(AM_CFLAGS) \
2001 $(CAP_CFLAGS)
2002
2822da4f 2003test_cap_list_LDADD = \
cc8b113e
FS
2004 libsystemd-shared.la \
2005 $(CAP_LIBS)
2822da4f 2006
c182135d
RC
2007test_socket_util_SOURCES = \
2008 src/test/test-socket-util.c
2009
2010test_socket_util_LDADD = \
cc8b113e 2011 libsystemd-shared.la
c182135d 2012
279da1e3
DH
2013test_barrier_SOURCES = \
2014 src/test/test-barrier.c
2015
2016test_barrier_LDADD = \
cc8b113e 2017 libsystemd-shared.la
279da1e3 2018
65b3903f
ZJS
2019test_tmpfiles_SOURCES = \
2020 src/test/test-tmpfiles.c
2021
2022test_tmpfiles_LDADD = \
cc8b113e 2023 libsystemd-shared.la
65b3903f 2024
d8c9d3a4
ZJS
2025test_namespace_SOURCES = \
2026 src/test/test-namespace.c
2027
d2f0e78f
DR
2028test_verbs_SOURCES = \
2029 src/test/test-verbs.c
2030
2031test_verbs_LDADD = \
cc8b113e 2032 libsystemd-shared.la
d2f0e78f 2033
0ec0deaa
LP
2034test_install_root_SOURCES = \
2035 src/test/test-install-root.c
2036
2037test_install_root_LDADD = \
cc8b113e 2038 libsystemd-shared.la
0ec0deaa 2039
5bb5b236
ZJS
2040test_acl_util_SOURCES = \
2041 src/test/test-acl-util.c
2042
2043test_acl_util_LDADD = \
cc8b113e 2044 libsystemd-shared.la
5bb5b236 2045
f6281133
LP
2046test_seccomp_SOURCES = \
2047 src/test/test-seccomp.c
2048
2049test_seccomp_LDADD = \
e2df6e90
MP
2050 libsystemd-shared.la \
2051 $(SECCOMP_LIBS)
f6281133 2052
d8c9d3a4 2053test_namespace_LDADD = \
a095315b 2054 libcore.la
d8c9d3a4 2055
fe39daf2
EV
2056test_rlimit_util_SOURCES = \
2057 src/test/test-rlimit-util.c
2058
2059test_rlimit_util_LDADD = \
cc8b113e 2060 libsystemd-shared.la
fe39daf2 2061
8a1baa3a
ZJS
2062test_ask_password_api_SOURCES = \
2063 src/test/test-ask-password-api.c
2064
2065test_ask_password_api_LDADD = \
cc8b113e 2066 libsystemd-shared.la
8a1baa3a 2067
0c5eb056
LP
2068test_signal_util_SOURCES = \
2069 src/test/test-signal-util.c
2070
2071test_signal_util_LDADD = \
cc8b113e 2072 libsystemd-shared.la
0c5eb056 2073
ada94e69
ZJS
2074test_selinux_SOURCES = \
2075 src/test/test-selinux.c
2076
2077test_selinux_LDADD = \
cc8b113e 2078 libsystemd-shared.la
ada94e69 2079
fed527aa
ZJS
2080test_sizeof_SOURCES = \
2081 src/test/test-sizeof.c
2082
2083test_sizeof_LDADD = \
cc8b113e 2084 libsystemd-shared.la
fed527aa 2085
32a4456c
MS
2086BUILT_SOURCES += \
2087 src/test/test-hashmap-ordered.c
2088
2089src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
2090 $(AM_V_at)$(MKDIR_P) $(dir $@)
2091 $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
2092 { if (!match($$0, "^#include")) \
2093 gsub(/hashmap/, "ordered_hashmap"); \
2094 gsub(/HASHMAP/, "ORDERED_HASHMAP"); \
2095 gsub(/Hashmap/, "OrderedHashmap"); \
2096 print }' <$< >$@
2097
2098nodist_test_hashmap_SOURCES = \
2099 src/test/test-hashmap-ordered.c
2100
9341a4a1 2101test_hashmap_SOURCES = \
32a4456c
MS
2102 src/test/test-hashmap.c \
2103 src/test/test-hashmap-plain.c
9341a4a1 2104
9341a4a1 2105test_hashmap_LDADD = \
cc8b113e 2106 libsystemd-shared.la
9341a4a1 2107
647f6824
ZJS
2108test_set_SOURCES = \
2109 src/test/test-set.c
2110
2111test_set_LDADD = \
cc8b113e 2112 libsystemd-shared.la
647f6824 2113
5ffa42cb
TG
2114test_bitmap_SOURCES = \
2115 src/test/test-bitmap.c
2116
2117test_bitmap_LDADD = \
cc8b113e 2118 libsystemd-shared.la
5ffa42cb 2119
08bcebf3
LP
2120test_xml_SOURCES = \
2121 src/test/test-xml.c
2122
2123test_xml_LDADD = \
cc8b113e 2124 libsystemd-shared.la
08bcebf3 2125
3b18ae68
JJ
2126test_list_SOURCES = \
2127 src/test/test-list.c
2128
ad02805f 2129test_list_LDADD = \
cc8b113e 2130 libsystemd-shared.la
ad02805f 2131
f089257d 2132test_unaligned_LDADD = \
cc8b113e 2133 libsystemd-shared.la
f089257d
TG
2134
2135test_unaligned_SOURCES = \
2136 src/test/test-unaligned.c
2137
a8b409db
ZJS
2138test_tables_SOURCES = \
2139 src/test/test-tables.c \
86bbe5bf 2140 src/shared/test-tables.h \
86bbe5bf
ZJS
2141 src/journal/journald-server.c \
2142 src/journal/journald-server.h
a8b409db 2143
02041526 2144test_tables_CPPFLAGS = \
798c486f 2145 $(AM_CPPFLAGS)
02041526 2146
41fd4c4c
KS
2147test_tables_CFLAGS = \
2148 $(AM_CFLAGS) \
d379d442
KZ
2149 $(SECCOMP_CFLAGS) \
2150 $(MOUNT_CFLAGS)
41fd4c4c 2151
a8b409db 2152test_tables_LDADD = \
a095315b
KS
2153 libjournal-core.la \
2154 libcore.la \
8c8302a6 2155 libudev-core.la
a8b409db 2156
30bdd695
LP
2157test_prioq_SOURCES = \
2158 src/test/test-prioq.c
2159
30bdd695 2160test_prioq_LDADD = \
cc8b113e 2161 libsystemd-shared.la
30bdd695 2162
f73141d7
LP
2163test_fileio_SOURCES = \
2164 src/test/test-fileio.c
2165
f73141d7 2166test_fileio_LDADD = \
cc8b113e 2167 libsystemd-shared.la
f73141d7 2168
cb0dac05
LP
2169test_time_SOURCES = \
2170 src/test/test-time.c
2171
cb0dac05 2172test_time_LDADD = \
cc8b113e 2173 libsystemd-shared.la
cb0dac05 2174
6369641d
MP
2175test_clock_SOURCES = \
2176 src/test/test-clock.c
2177
2178test_clock_LDADD = \
cc8b113e 2179 libsystemd-shared.la
6369641d 2180
099524d7
LP
2181test_architecture_SOURCES = \
2182 src/test/test-architecture.c
2183
2184test_architecture_LDADD = \
cc8b113e 2185 libsystemd-shared.la
099524d7 2186
877d54e9
LP
2187test_log_SOURCES = \
2188 src/test/test-log.c
2189
2190test_log_LDADD = \
cc8b113e 2191 libsystemd-shared.la
877d54e9 2192
66cdd0f2
LP
2193test_ipcrm_SOURCES = \
2194 src/test/test-ipcrm.c
2195
2196test_ipcrm_LDADD = \
cc8b113e 2197 libsystemd-shared.la
66cdd0f2 2198
d7c7c334
LP
2199test_btrfs_SOURCES = \
2200 src/test/test-btrfs.c
2201
2202test_btrfs_LDADD = \
cc8b113e 2203 libsystemd-shared.la
d7c7c334 2204
8d09b6de 2205if HAVE_LIBIPTC
12c2884c
DM
2206test_firewall_util_SOURCES = \
2207 src/test/test-firewall-util.c
76917807 2208
12c2884c 2209test_firewall_util_CFLAGS = \
76917807
LP
2210 $(AM_CFLAGS) \
2211 $(LIBIPTC_CFLAGS)
2212
12c2884c 2213test_firewall_util_LDADD = \
a095315b 2214 libfirewall.la \
cc8b113e 2215 libsystemd-shared.la \
76917807 2216 $(LIBIPTC_LIBS)
8d09b6de 2217endif
76917807 2218
1c4baffc
TG
2219test_netlink_manual_SOURCES = \
2220 src/test/test-netlink-manual.c
9a6704a8 2221
1c4baffc 2222test_netlink_manual_CFLAGS = \
7c4e5e4d
ŁS
2223 $(AM_CFLAGS) \
2224 $(KMOD_CFLAGS)
2225
1c4baffc 2226test_netlink_manual_LDADD = \
cc8b113e 2227 libsystemd-shared.la \
7c4e5e4d 2228 $(KMOD_LIBS)
9a6704a8 2229
35d811f5
SL
2230test_ellipsize_SOURCES = \
2231 src/test/test-ellipsize.c
2232
2233test_ellipsize_LDADD = \
cc8b113e 2234 libsystemd-shared.la
35d811f5 2235
cfbc22ab
LP
2236test_date_SOURCES = \
2237 src/test/test-date.c
2238
2239test_date_LDADD = \
cc8b113e 2240 libsystemd-shared.la
cfbc22ab 2241
6524990f
LP
2242test_sleep_SOURCES = \
2243 src/test/test-sleep.c
2244
2245test_sleep_LDADD = \
a095315b 2246 libcore.la
6524990f 2247
6e6fb527
LP
2248test_replace_var_SOURCES = \
2249 src/test/test-replace-var.c
2250
2251test_replace_var_LDADD = \
cc8b113e 2252 libsystemd-shared.la
6e6fb527 2253
36697dc0
LP
2254test_calendarspec_SOURCES = \
2255 src/test/test-calendarspec.c
2256
2257test_calendarspec_LDADD = \
cc8b113e 2258 libsystemd-shared.la
36697dc0 2259
e8bc0ea2
LP
2260test_strip_tab_ansi_SOURCES = \
2261 src/test/test-strip-tab-ansi.c
2262
2263test_strip_tab_ansi_LDADD = \
cc8b113e 2264 libsystemd-shared.la
e8bc0ea2 2265
8c47c732 2266test_daemon_SOURCES = \
379079ba 2267 src/test/test-daemon.c
af5bc85d 2268
139be57d 2269test_daemon_LDADD = \
cc8b113e 2270 libsystemd-shared.la
139be57d 2271
8c6db833 2272test_cgroup_SOURCES = \
379079ba 2273 src/test/test-cgroup.c
8c6db833 2274
8c6db833 2275test_cgroup_LDADD = \
cc8b113e 2276 libsystemd-shared.la
8c6db833 2277
6414b7c9
DS
2278test_cgroup_mask_SOURCES = \
2279 src/test/test-cgroup-mask.c
2280
96115cdf 2281test_cgroup_mask_CPPFLAGS = \
d379d442
KZ
2282 $(AM_CPPFLAGS) \
2283 $(MOUNT_CFLAGS)
6414b7c9 2284
41fd4c4c
KS
2285test_cgroup_mask_CFLAGS = \
2286 $(AM_CFLAGS) \
2287 $(SECCOMP_CFLAGS)
2288
6414b7c9 2289test_cgroup_mask_LDADD = \
8c8302a6 2290 libcore.la
6414b7c9 2291
96cde13a
ZJS
2292test_cgroup_util_SOURCES = \
2293 src/test/test-cgroup-util.c
2294
2295test_cgroup_util_LDADD = \
cc8b113e 2296 libsystemd-shared.la
96cde13a 2297
93515cae
ZJS
2298test_env_util_SOURCES = \
2299 src/test/test-env-util.c
c24eb49e 2300
93515cae 2301test_env_util_LDADD = \
cc8b113e 2302 libsystemd-shared.la
c24eb49e 2303
97b5f608
TA
2304test_strbuf_SOURCES = \
2305 src/test/test-strbuf.c
2306
2307test_strbuf_LDADD = \
cc8b113e 2308 libsystemd-shared.la
97b5f608 2309
f90cf44c 2310test_strv_SOURCES = \
379079ba 2311 src/test/test-strv.c
f90cf44c 2312
f90cf44c 2313test_strv_LDADD = \
cc8b113e 2314 libsystemd-shared.la
f90cf44c 2315
76877b46
ZJS
2316test_path_util_SOURCES = \
2317 src/test/test-path-util.c
2318
2319test_path_util_LDADD = \
cc8b113e 2320 libsystemd-shared.la
76877b46 2321
bc999297
RC
2322test_path_SOURCES = \
2323 src/test/test-path.c
2324
2325test_path_CFLAGS = \
d379d442
KZ
2326 $(AM_CFLAGS) \
2327 $(MOUNT_CFLAGS)
bc999297
RC
2328
2329test_path_LDADD = \
a095315b 2330 libcore.la
bc999297 2331
281e05b6
RC
2332test_execute_SOURCES = \
2333 src/test/test-execute.c
2334
2335test_execute_CFLAGS = \
d379d442
KZ
2336 $(AM_CFLAGS) \
2337 $(MOUNT_CFLAGS)
281e05b6
RC
2338
2339test_execute_LDADD = \
a095315b 2340 libcore.la
281e05b6 2341
a245d90a
TG
2342test_siphash24_SOURCES = \
2343 src/test/test-siphash24.c
2344
2345test_siphash24_LDADD = \
cc8b113e 2346 libsystemd-shared.la
a245d90a 2347
c62c294f
TA
2348test_strxcpyx_SOURCES = \
2349 src/test/test-strxcpyx.c
2350
2351test_strxcpyx_LDADD = \
cc8b113e 2352 libsystemd-shared.la
c62c294f 2353
83096483 2354test_install_SOURCES = \
379079ba 2355 src/test/test-install.c
83096483 2356
83096483 2357test_install_LDADD = \
cc8b113e 2358 libsystemd-shared.la
83096483 2359
e96d6be7 2360test_watchdog_SOURCES = \
379079ba 2361 src/test/test-watchdog.c
e96d6be7
LP
2362
2363test_watchdog_LDADD = \
cc8b113e 2364 libsystemd-shared.la
e96d6be7 2365
bb112710
HHPF
2366test_sched_prio_SOURCES = \
2367 src/test/test-sched-prio.c
2368
96115cdf 2369test_sched_prio_CPPFLAGS = \
d379d442
KZ
2370 $(AM_CPPFLAGS) \
2371 $(MOUNT_CFLAGS)
bb112710 2372
41fd4c4c
KS
2373test_sched_prio_CFLAGS = \
2374 $(AM_CFLAGS) \
2375 $(SECCOMP_CFLAGS)
2376
bb112710 2377test_sched_prio_LDADD = \
8c8302a6 2378 libcore.la
bb112710 2379
09e00c52
MM
2380test_conf_files_SOURCES = \
2381 src/test/test-conf-files.c
2382
2383test_conf_files_LDADD = \
cc8b113e 2384 libsystemd-shared.la
09e00c52 2385
0763adbe
RC
2386test_conf_parser_SOURCES = \
2387 src/test/test-conf-parser.c
2388
2389test_conf_parser_LDADD = \
cc8b113e 2390 libsystemd-shared.la
0763adbe 2391
da8ba721
DM
2392test_af_list_SOURCES = \
2393 src/test/test-af-list.c
2394
2395test_af_list_LDADD = \
cc8b113e 2396 libsystemd-shared.la
da8ba721
DM
2397
2398test_arphrd_list_SOURCES = \
2399 src/test/test-arphrd-list.c
2400
2401test_arphrd_list_LDADD = \
cc8b113e 2402 libsystemd-shared.la
da8ba721 2403
d7832d2c 2404# ------------------------------------------------------------------------------
6aea6d10 2405## .PHONY so it always rebuilds it
9f700755 2406.PHONY: coverage lcov-run lcov-report coverage-sync
6aea6d10
TA
2407
2408# run lcov from scratch, always
5549f483 2409coverage: all
6aea6d10
TA
2410 $(MAKE) lcov-run
2411 $(MAKE) lcov-report
2412
2413coverage_dir = coverage
2414coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
2415
2416if ENABLE_COVERAGE
2417# reset run coverage tests
2418lcov-run:
2419 @rm -rf $(coverage_dir)
2420 lcov $(coverage_opts) --zerocounters
2421 -$(MAKE) check
2422
2423# generate report based on current coverage data
2424lcov-report:
2425 $(MKDIR_P) $(coverage_dir)
2426 lcov $(coverage_opts) --compat-libtool --capture --no-external \
2427 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
5445c7a0
RC
2428 lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
2429 genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
6aea6d10
TA
2430 @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
2431
2432# lcov doesn't work properly with vpath builds, make sure that bad
2433# output is not uploaded by mistake.
2434coverage-sync: coverage
2435 test "$(builddir)" = "$(srcdir)"
2436 rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
2437
2438else
2439lcov-run lcov-report:
2440 echo "Need to reconfigure with --enable-coverage"
2441endif
2442
2443# ------------------------------------------------------------------------------
b0770377 2444systemd_analyze_SOURCES = \
1d3bc017
ZJS
2445 src/analyze/analyze.c \
2446 src/analyze/analyze-verify.c \
2447 src/analyze/analyze-verify.h
2448
144b1b4b 2449systemd_analyze_CFLAGS = \
1d3bc017 2450 $(AM_CFLAGS) \
d379d442
KZ
2451 $(SECCOMP_CFLAGS) \
2452 $(MOUNT_CFLAGS)
b0770377 2453
b0770377 2454systemd_analyze_LDADD = \
8c8302a6 2455 libcore.la
b0770377
KS
2456
2457# ------------------------------------------------------------------------------
7e8f489a 2458systemd_initctl_SOURCES = \
dce818b3 2459 src/initctl/initctl.c
7e8f489a 2460
7e8f489a 2461systemd_initctl_LDADD = \
cc8b113e 2462 libsystemd-shared.la
7e8f489a 2463
d7832d2c 2464# ------------------------------------------------------------------------------
7e8f489a 2465systemd_update_utmp_SOURCES = \
dce818b3 2466 src/update-utmp/update-utmp.c
7e8f489a
KS
2467
2468systemd_update_utmp_CFLAGS = \
2469 $(AM_CFLAGS) \
7e8f489a
KS
2470 $(AUDIT_CFLAGS)
2471
2472systemd_update_utmp_LDADD = \
cc8b113e 2473 libsystemd-shared.la \
7e8f489a
KS
2474 $(AUDIT_LIBS)
2475
8ea48dfc
LP
2476# ------------------------------------------------------------------------------
2477systemd_update_done_SOURCES = \
2478 src/update-done/update-done.c
2479
2480systemd_update_done_LDADD = \
cc8b113e 2481 libsystemd-shared.la
8ea48dfc 2482
04ebb595 2483# ------------------------------------------------------------------------------
48d437bb 2484systemd_shutdown_SOURCES = \
146de817
LP
2485 src/core/umount.c \
2486 src/core/umount.h \
08e1fb68
LP
2487 src/core/shutdown.c \
2488 src/core/mount-setup.c \
bd3fa1d2
LP
2489 src/core/mount-setup.h \
2490 src/core/killall.h \
2491 src/core/killall.c
d4a66a7f 2492
48d437bb 2493systemd_shutdown_LDADD = \
cc8b113e 2494 libsystemd-shared.la
d4a66a7f 2495
d7832d2c 2496# ------------------------------------------------------------------------------
aa590241 2497if HAVE_KMOD
48d437bb 2498systemd_modules_load_SOURCES = \
dce818b3 2499 src/modules-load/modules-load.c
d4a66a7f 2500
83684a35 2501systemd_modules_load_CFLAGS = \
235450b0 2502 $(AM_CFLAGS) \
83684a35
TG
2503 $(KMOD_CFLAGS)
2504
48d437bb 2505systemd_modules_load_LDADD = \
cc8b113e 2506 libsystemd-shared.la \
83684a35 2507 $(KMOD_LIBS)
aa590241
KS
2508
2509rootlibexec_PROGRAMS += \
2510 systemd-modules-load
2511
2512nodist_systemunit_DATA += \
2513 units/systemd-modules-load.service
a3bd8447 2514
aa590241
KS
2515SYSINIT_TARGET_WANTS += \
2516 systemd-modules-load.service
2517
edeb68c5
TG
2518if ENABLE_TMPFILES
2519nodist_systemunit_DATA += \
2520 units/kmod-static-nodes.service
2521
2522SYSINIT_TARGET_WANTS += \
2523 kmod-static-nodes.service
2524endif
e3043162 2525endif
d4a66a7f 2526
aa590241 2527EXTRA_DIST += \
5590bbe5
KS
2528 units/systemd-modules-load.service.in \
2529 units/kmod-static-nodes.service.in
aa590241 2530
d7832d2c 2531# ------------------------------------------------------------------------------
6351163b 2532if ENABLE_TMPFILES
48d437bb 2533systemd_tmpfiles_SOURCES = \
189b2384 2534 src/tmpfiles/tmpfiles.c
d4a66a7f 2535
cc8b113e
FS
2536systemd_tmpfiles_CFLAGS = \
2537 $(AM_CFLAGS) \
2538 $(ACL_CFLAGS)
2539
48d437bb 2540systemd_tmpfiles_LDADD = \
cc8b113e
FS
2541 libsystemd-shared.la \
2542 $(ACL_LIBS)
f8eeeaf9 2543
5b46fc6c
TG
2544rootbin_PROGRAMS += \
2545 systemd-tmpfiles
2546
2547dist_systemunit_DATA += \
2548 units/systemd-tmpfiles-clean.timer
2549
2550nodist_systemunit_DATA += \
2551 units/systemd-tmpfiles-setup-dev.service \
2552 units/systemd-tmpfiles-setup.service \
2553 units/systemd-tmpfiles-clean.service
2554
aeb50ff0 2555nodist_tmpfiles_DATA = \
ae5b2a86 2556 tmpfiles.d/systemd.conf \
aeb50ff0
TG
2557 tmpfiles.d/etc.conf
2558
5b46fc6c 2559dist_tmpfiles_DATA = \
c4708f13 2560 tmpfiles.d/systemd-nologin.conf \
5b46fc6c 2561 tmpfiles.d/tmp.conf \
9339db71 2562 tmpfiles.d/x11.conf \
fed2b07e 2563 tmpfiles.d/var.conf \
770b5ce4 2564 tmpfiles.d/home.conf \
2c8849ad
KS
2565 tmpfiles.d/systemd-nspawn.conf \
2566 tmpfiles.d/journal-nocow.conf
5b46fc6c
TG
2567
2568if HAVE_SYSV_COMPAT
2569dist_tmpfiles_DATA += \
2570 tmpfiles.d/legacy.conf
6351163b 2571endif
d4a66a7f 2572
5b46fc6c
TG
2573SYSINIT_TARGET_WANTS += \
2574 systemd-tmpfiles-setup-dev.service \
2575 systemd-tmpfiles-setup.service
2576
17163897 2577dist_zshcompletion_data += \
1272ff85
WG
2578 shell-completion/zsh/_systemd-tmpfiles
2579
5b46fc6c
TG
2580TIMERS_TARGET_WANTS += \
2581 systemd-tmpfiles-clean.timer
2582
2583INSTALL_DIRS += \
2584 $(tmpfilesdir) \
2585 $(sysconfdir)/tmpfiles.d
2586endif
2587
2588EXTRA_DIST += \
ae5b2a86 2589 tmpfiles.d/systemd.conf.m4 \
aeb50ff0 2590 tmpfiles.d/etc.conf.m4 \
5b46fc6c
TG
2591 units/systemd-tmpfiles-setup-dev.service.in \
2592 units/systemd-tmpfiles-setup.service.in \
2593 units/systemd-tmpfiles-clean.service.in
2594
1b992147
LP
2595# ------------------------------------------------------------------------------
2596if ENABLE_SYSUSERS
2597systemd_sysusers_SOURCES = \
2598 src/sysusers/sysusers.c
2599
2600systemd_sysusers_LDADD = \
cc8b113e 2601 libsystemd-shared.la
1b992147 2602
b532bdea 2603rootbin_PROGRAMS += \
1b992147
LP
2604 systemd-sysusers
2605
ecde7065
LP
2606nodist_systemunit_DATA += \
2607 units/systemd-sysusers.service
2608
2609SYSINIT_TARGET_WANTS += \
2610 systemd-sysusers.service
2611
94655a16 2612nodist_sysusers_DATA = \
ae5b2a86 2613 sysusers.d/systemd.conf \
94655a16
LP
2614 sysusers.d/basic.conf
2615
e400d4b3
EV
2616if HAVE_REMOTE
2617nodist_sysusers_DATA += \
2618 sysusers.d/systemd-remote.conf
2619endif
2620
e37f6d61
MP
2621INSTALL_DIRS += \
2622 $(sysusersdir)
2623endif
2624
f8b5d994 2625EXTRA_DIST += \
ecde7065 2626 units/systemd-sysusers.service.in \
ae5b2a86 2627 sysusers.d/systemd.conf.m4 \
e400d4b3 2628 sysusers.d/systemd-remote.conf.m4 \
94655a16 2629 sysusers.d/basic.conf.in
f8b5d994 2630
94a15ffa
KS
2631# ------------------------------------------------------------------------------
2632dist_factory_etc_DATA = \
2633 factory/etc/nsswitch.conf
2634
2f88c858 2635if HAVE_PAM
94a15ffa
KS
2636dist_factory_pam_DATA = \
2637 factory/etc/pam.d/system-auth \
2638 factory/etc/pam.d/other
2f88c858 2639endif
94a15ffa 2640
418b9be5
LP
2641# ------------------------------------------------------------------------------
2642if ENABLE_FIRSTBOOT
2643systemd_firstboot_SOURCES = \
2644 src/firstboot/firstboot.c
2645
2646systemd_firstboot_LDADD = \
cc8b113e 2647 libsystemd-shared.la \
418b9be5
LP
2648 -lcrypt
2649
2650rootbin_PROGRAMS += \
2651 systemd-firstboot
2652
2653nodist_systemunit_DATA += \
2654 units/systemd-firstboot.service
2655
e2680723
LP
2656SYSINIT_TARGET_WANTS += \
2657 systemd-firstboot.service
418b9be5
LP
2658endif
2659
e37f6d61
MP
2660EXTRA_DIST += \
2661 units/systemd-firstboot.service.in
2662
d7832d2c 2663# ------------------------------------------------------------------------------
48d437bb 2664systemd_machine_id_setup_SOURCES = \
4fc55688 2665 src/machine-id-setup/machine-id-setup-main.c \
08e1fb68
LP
2666 src/core/machine-id-setup.c \
2667 src/core/machine-id-setup.h
d4a66a7f 2668
48d437bb 2669systemd_machine_id_setup_LDADD = \
cc8b113e 2670 libsystemd-shared.la
d4a66a7f 2671
4a9b1dd4
LP
2672SYSINIT_TARGET_WANTS += \
2673 systemd-machine-id-commit.service
2674
d7832d2c 2675# ------------------------------------------------------------------------------
48d437bb 2676systemd_sysctl_SOURCES = \
dce818b3 2677 src/sysctl/sysctl.c
d4a66a7f 2678
48d437bb 2679systemd_sysctl_LDADD = \
cc8b113e 2680 libsystemd-shared.la
d4a66a7f 2681
6edd7d0a
LP
2682# ------------------------------------------------------------------------------
2683systemd_sleep_SOURCES = \
2684 src/sleep/sleep.c
2685
2686systemd_sleep_LDADD = \
cc8b113e 2687 libsystemd-shared.la
6edd7d0a 2688
d7832d2c 2689# ------------------------------------------------------------------------------
48d437bb 2690systemd_fsck_SOURCES = \
dce818b3 2691 src/fsck/fsck.c
87d2c1ff 2692
48d437bb 2693systemd_fsck_LDADD = \
cc8b113e 2694 libsystemd-shared.la
807e17f0 2695
d7832d2c 2696# ------------------------------------------------------------------------------
48d437bb 2697systemd_ac_power_SOURCES = \
dce818b3 2698 src/ac-power/ac-power.c
0b7964b8 2699
48d437bb 2700systemd_ac_power_LDADD = \
cc8b113e 2701 libsystemd-shared.la
0b7964b8 2702
d7832d2c 2703# ------------------------------------------------------------------------------
48d437bb 2704systemd_detect_virt_SOURCES = \
dce818b3 2705 src/detect-virt/detect-virt.c
4927fcae 2706
48d437bb 2707systemd_detect_virt_LDADD = \
cc8b113e 2708 libsystemd-shared.la
7e8f489a 2709
96ede260
LP
2710INSTALL_EXEC_HOOKS += \
2711 systemd-detect-virt-install-hook
2712
27b5482c
LP
2713# ------------------------------------------------------------------------------
2714systemd_delta_SOURCES = \
2715 src/delta/delta.c
2716
2717systemd_delta_LDADD = \
cc8b113e 2718 libsystemd-shared.la
27b5482c 2719
d7832d2c 2720# ------------------------------------------------------------------------------
48d437bb 2721systemd_getty_generator_SOURCES = \
dce818b3 2722 src/getty-generator/getty-generator.c
f6144808 2723
48d437bb 2724systemd_getty_generator_LDADD = \
cc8b113e 2725 libsystemd-shared.la
7e8f489a 2726
326bb68c
LP
2727# ------------------------------------------------------------------------------
2728systemd_debug_generator_SOURCES = \
2729 src/debug-generator/debug-generator.c
2730
2731systemd_debug_generator_LDADD = \
cc8b113e 2732 libsystemd-shared.la
326bb68c 2733
6b1dc2bd
LP
2734# ------------------------------------------------------------------------------
2735systemd_fstab_generator_SOURCES = \
2736 src/fstab-generator/fstab-generator.c \
2737 src/core/mount-setup.c
2738
2739systemd_fstab_generator_LDADD = \
cc8b113e 2740 libsystemd-shared.la
6b1dc2bd 2741
d360705f
LP
2742# ------------------------------------------------------------------------------
2743systemd_system_update_generator_SOURCES = \
2744 src/system-update-generator/system-update-generator.c
2745
2746systemd_system_update_generator_LDADD = \
cc8b113e 2747 libsystemd-shared.la
d360705f 2748
d2c68822 2749# ------------------------------------------------------------------------------
4df5c00b
UTL
2750if ENABLE_HIBERNATE
2751systemgenerator_PROGRAMS += \
72ba9f04 2752 systemd-hibernate-resume-generator
4df5c00b
UTL
2753
2754rootlibexec_PROGRAMS += \
72ba9f04 2755 systemd-hibernate-resume
4df5c00b
UTL
2756
2757systemd_hibernate_resume_SOURCES = \
72ba9f04 2758 src/hibernate-resume/hibernate-resume.c
4df5c00b
UTL
2759
2760systemd_hibernate_resume_LDADD = \
cc8b113e 2761 libsystemd-shared.la
4df5c00b 2762
d2c68822 2763systemd_hibernate_resume_generator_SOURCES = \
782c2652 2764 src/hibernate-resume/hibernate-resume-generator.c
d2c68822
IS
2765
2766systemd_hibernate_resume_generator_LDADD = \
cc8b113e 2767 libsystemd-shared.la
d2c68822 2768
4df5c00b 2769dist_systemunit_DATA += \
72ba9f04
IS
2770 units/hibernate.target \
2771 units/hybrid-sleep.target
4df5c00b
UTL
2772
2773nodist_systemunit_DATA += \
72ba9f04
IS
2774 units/systemd-hibernate.service \
2775 units/systemd-hibernate-resume@.service \
2776 units/systemd-hybrid-sleep.service
4df5c00b
UTL
2777endif
2778
e37f6d61
MP
2779EXTRA_DIST += \
2780 units/systemd-hibernate.service.in \
2781 units/systemd-hibernate-resume@.service.in \
2782 units/systemd-hybrid-sleep.service.in
2783
5b46fc6c 2784# ------------------------------------------------------------------------------
4df5c00b 2785if ENABLE_EFI
563217eb 2786if HAVE_BLKID
5b46fc6c 2787bootctl_SOURCES = \
0974a682
KS
2788 src/boot/bootctl.c
2789
2790bootctl_CPPFLAGS = \
2791 $(AM_CPPFLAGS) \
2792 -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\" \
e7dd673d 2793 -DBOOTLIBDIR=\"$(bootlibdir)\"
0974a682
KS
2794
2795bootctl_CFLAGS = \
2796 $(AM_CFLAGS) \
2797 $(BLKID_CFLAGS)
5b46fc6c
TG
2798
2799bootctl_LDADD = \
cc8b113e 2800 libsystemd-shared.la \
0974a682 2801 $(BLKID_LIBS)
5b46fc6c
TG
2802
2803bin_PROGRAMS += \
2804 bootctl
51d0f1c9 2805
17163897 2806dist_bashcompletion_data += \
95fe27d9
TA
2807 shell-completion/bash/bootctl
2808
17163897 2809dist_zshcompletion_data += \
51d0f1c9 2810 shell-completion/zsh/_bootctl
563217eb 2811endif
51d0f1c9 2812
0fa2cac4 2813# ------------------------------------------------------------------------------
484122c3 2814if HAVE_GNUEFI
0fa2cac4
KS
2815efi_cppflags = \
2816 $(EFI_CPPFLAGS) \
2817 -I$(top_builddir) -include config.h \
2818 -I$(EFI_INC_DIR)/efi \
2819 -I$(EFI_INC_DIR)/efi/$(EFI_ARCH) \
2820 -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\"
2821
2822efi_cflags = \
2823 $(EFI_CFLAGS) \
2824 -Wall \
2825 -Wextra \
33d25be0 2826 -std=gnu90 \
0fa2cac4
KS
2827 -nostdinc \
2828 -ggdb -O0 \
2829 -fpic \
2830 -fshort-wchar \
2831 -nostdinc \
2832 -ffreestanding \
2833 -fno-strict-aliasing \
2834 -fno-stack-protector \
2835 -Wsign-compare \
32ef61b8 2836 -Wno-missing-field-initializers
0fa2cac4
KS
2837
2838if ARCH_X86_64
2839efi_cflags += \
2840 -mno-red-zone \
32ef61b8
KK
2841 -mno-sse \
2842 -mno-mmx \
0fa2cac4 2843 -DEFI_FUNCTION_WRAPPER \
33d25be0 2844 -DGNU_EFI_USE_MS_ABI
0fa2cac4
KS
2845endif
2846
32ef61b8
KK
2847if ARCH_IA32
2848efi_cflags += \
2849 -mno-sse \
2850 -mno-mmx
2851endif
2852
0fa2cac4
KS
2853efi_ldflags = \
2854 $(EFI_LDFLAGS) \
2855 -T $(EFI_LDS_DIR)/elf_$(EFI_ARCH)_efi.lds \
2856 -shared \
2857 -Bsymbolic \
2858 -nostdlib \
2859 -znocombreloc \
2860 -L $(EFI_LIB_DIR) \
2861 $(EFI_LDS_DIR)/crt0-efi-$(EFI_ARCH).o
2862
684edf2e
KK
2863# Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary' instead,
2864# and add required symbols manually.
2865if ARCH_AARCH64
2866efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
2867EFI_FORMAT = -O binary
2868else
2869EFI_FORMAT = --target=efi-app-$(EFI_ARCH)
2870endif
f80099c0
MAP
2871endif
2872endif
684edf2e 2873
0fa2cac4 2874# ------------------------------------------------------------------------------
e7dd673d
TG
2875systemd_boot_headers = \
2876 src/boot/efi/util.h \
2877 src/boot/efi/console.h \
2878 src/boot/efi/graphics.h \
8110e144 2879 src/boot/efi/pefile.h \
92ed3bb4 2880 src/boot/efi/measure.h \
8110e144 2881 src/boot/efi/disk.h
e7dd673d
TG
2882
2883systemd_boot_sources = \
2884 src/boot/efi/util.c \
2885 src/boot/efi/console.c \
2886 src/boot/efi/graphics.c \
2887 src/boot/efi/pefile.c \
8110e144 2888 src/boot/efi/disk.c \
92ed3bb4 2889 src/boot/efi/measure.c \
e7dd673d
TG
2890 src/boot/efi/boot.c
2891
f80099c0
MAP
2892EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
2893
e7dd673d
TG
2894systemd_boot_objects = $(addprefix $(top_builddir)/,$(systemd_boot_sources:.c=.o))
2895systemd_boot_solib = $(top_builddir)/src/boot/efi/systemd_boot.so
2896systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi
2897
4c32f2c9
ZJS
2898if ENABLE_EFI
2899if HAVE_GNUEFI
e7dd673d 2900bootlib_DATA = $(systemd_boot)
e7dd673d
TG
2901
2902$(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers))
2903 @$(MKDIR_P) $(top_builddir)/src/boot/efi/
0fa2cac4
KS
2904 $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
2905
e7dd673d
TG
2906$(systemd_boot_solib): $(systemd_boot_objects)
2907 $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \
0fa2cac4
KS
2908 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
2909 nm -D -u $@ | grep ' U ' && exit 1 || :
2910
e7dd673d 2911$(systemd_boot): $(systemd_boot_solib)
c4a77bcb 2912 $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
684edf2e 2913 -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
f80099c0
MAP
2914endif
2915endif
0fa2cac4 2916
4c32f2c9
ZJS
2917CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
2918
0fa2cac4
KS
2919# ------------------------------------------------------------------------------
2920stub_headers = \
e7dd673d
TG
2921 src/boot/efi/util.h \
2922 src/boot/efi/pefile.h \
8110e144 2923 src/boot/efi/disk.h \
37fa3690 2924 src/boot/efi/graphics.h \
2f8d3364 2925 src/boot/efi/splash.h \
92ed3bb4 2926 src/boot/efi/measure.h \
e7dd673d 2927 src/boot/efi/linux.h
0fa2cac4
KS
2928
2929stub_sources = \
e7dd673d
TG
2930 src/boot/efi/util.c \
2931 src/boot/efi/pefile.c \
8110e144 2932 src/boot/efi/disk.c \
37fa3690 2933 src/boot/efi/graphics.c \
2f8d3364 2934 src/boot/efi/splash.c \
e7dd673d 2935 src/boot/efi/linux.c \
92ed3bb4 2936 src/boot/efi/measure.c \
e7dd673d 2937 src/boot/efi/stub.c
0fa2cac4 2938
2c8849ad
KS
2939EXTRA_DIST += \
2940 $(stub_sources) \
2941 $(stub_headers) \
2942 test/splash.bmp
f80099c0 2943
0fa2cac4 2944stub_objects = $(addprefix $(top_builddir)/,$(stub_sources:.c=.o))
e7dd673d 2945stub_solib = $(top_builddir)/src/boot/efi/stub.so
0fa2cac4
KS
2946stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub
2947
4c32f2c9
ZJS
2948if ENABLE_EFI
2949if HAVE_GNUEFI
e7dd673d 2950bootlib_DATA += $(stub)
0fa2cac4 2951
e7dd673d
TG
2952$(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(stub_headers))
2953 @$(MKDIR_P) $(top_builddir)/src/boot/efi/
0fa2cac4
KS
2954 $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
2955
2956$(stub_solib): $(stub_objects)
2957 $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
2958 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
2959 nm -D -u $@ | grep ' U ' && exit 1 || :
2960
2961$(stub): $(stub_solib)
c4a77bcb 2962 $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
684edf2e 2963 -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
4c32f2c9
ZJS
2964endif
2965endif
2966
2967CLEANFILES += $(stub_objects) $(stub_solib) $(stub)
2968
0fa2cac4
KS
2969
2970# ------------------------------------------------------------------------------
2971CLEANFILES += test-efi-disk.img
0fa2cac4 2972
e7dd673d 2973test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh
0fa2cac4
KS
2974 $(AM_V_GEN)test/test-efi-create-disk.sh
2975
2976test-efi: test-efi-disk.img
2977 $(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img
f4ce2b3e 2978
e37f6d61
MP
2979EXTRA_DIST += test/test-efi-create-disk.sh
2980
1a14a53c 2981# ------------------------------------------------------------------------------
046d2bd4 2982if HAVE_BLKID
1a14a53c
LP
2983systemgenerator_PROGRAMS += \
2984 systemd-gpt-auto-generator
2985
2986systemd_gpt_auto_generator_SOURCES = \
1b9e5b12 2987 src/gpt-auto-generator/gpt-auto-generator.c \
a095315b 2988 src/basic/blkid-util.h
1a14a53c
LP
2989
2990systemd_gpt_auto_generator_LDADD = \
cc8b113e 2991 libsystemd-shared.la \
1a14a53c
LP
2992 $(BLKID_LIBS)
2993
2994systemd_gpt_auto_generator_CFLAGS = \
2995 $(AM_CFLAGS) \
2996 $(BLKID_CFLAGS)
046d2bd4 2997endif
1a14a53c 2998
674eb685 2999# ------------------------------------------------------------------------------
1401ec2d
KS
3000dist_xinitrc_SCRIPTS = \
3001 xorg/50-systemd-user.sh
3002
95ed3294
TA
3003# ------------------------------------------------------------------------------
3004systemd_sysv_generator_SOURCES = \
3005 src/sysv-generator/sysv-generator.c
3006
3007systemd_sysv_generator_LDADD = \
a095315b 3008 libcore.la
95ed3294 3009
d7832d2c 3010# ------------------------------------------------------------------------------
48d437bb 3011systemd_rc_local_generator_SOURCES = \
dce818b3 3012 src/rc-local-generator/rc-local-generator.c
7e8f489a 3013
48d437bb 3014systemd_rc_local_generator_LDADD = \
cc8b113e 3015 libsystemd-shared.la
7e8f489a 3016
d7832d2c 3017# ------------------------------------------------------------------------------
2b93b027
LP
3018systemd_remount_fs_SOURCES = \
3019 src/remount-fs/remount-fs.c \
08e1fb68
LP
3020 src/core/mount-setup.c \
3021 src/core/mount-setup.h
609518c1 3022
2b93b027 3023systemd_remount_fs_LDADD = \
cc8b113e 3024 libsystemd-shared.la
609518c1 3025
d7832d2c 3026# ------------------------------------------------------------------------------
48d437bb 3027systemd_cgroups_agent_SOURCES = \
dce818b3 3028 src/cgroups-agent/cgroups-agent.c
7640a5de 3029
48d437bb 3030systemd_cgroups_agent_LDADD = \
cc8b113e 3031 libsystemd-shared.la
7640a5de 3032
d7832d2c 3033# ------------------------------------------------------------------------------
b1a5a998
MB
3034systemd_escape_SOURCES = \
3035 src/escape/escape.c
3036
3037systemd_escape_LDADD = \
cc8b113e 3038 libsystemd-shared.la
b1a5a998
MB
3039
3040# -----------------------------------------------------------------------------
48d437bb 3041systemctl_SOURCES = \
dce818b3 3042 src/systemctl/systemctl.c
f401e48c 3043
48d437bb 3044systemctl_LDADD = \
cc8b113e 3045 libsystemd-shared.la
f401e48c 3046
d7832d2c 3047# ------------------------------------------------------------------------------
48d437bb 3048systemd_notify_SOURCES = \
d6bc8348 3049 src/notify/notify.c
1822350d 3050
48d437bb 3051systemd_notify_LDADD = \
cc8b113e 3052 libsystemd-shared.la
681cfc6c 3053
9a00f57a
LP
3054# ------------------------------------------------------------------------------
3055systemd_path_SOURCES = \
3056 src/path/path.c
3057
3058systemd_path_LDADD = \
cc8b113e 3059 libsystemd-shared.la
9a00f57a 3060
d7832d2c 3061# ------------------------------------------------------------------------------
48d437bb 3062systemd_ask_password_SOURCES = \
dce818b3 3063 src/ask-password/ask-password.c
681cfc6c 3064
48d437bb 3065systemd_ask_password_LDADD = \
cc8b113e 3066 libsystemd-shared.la
681cfc6c 3067
d7832d2c 3068# ------------------------------------------------------------------------------
48d437bb 3069systemd_reply_password_SOURCES = \
dce818b3 3070 src/reply-password/reply-password.c
681cfc6c 3071
48d437bb 3072systemd_reply_password_LDADD = \
cc8b113e 3073 libsystemd-shared.la
1822350d 3074
d7832d2c 3075# ------------------------------------------------------------------------------
48d437bb 3076systemd_cgls_SOURCES = \
dce818b3 3077 src/cgls/cgls.c
4668191d 3078
48d437bb 3079systemd_cgls_LDADD = \
cc8b113e 3080 libsystemd-shared.la
4668191d 3081
d7832d2c 3082# ------------------------------------------------------------------------------
8f2d43a0 3083systemd_cgtop_SOURCES = \
dce818b3 3084 src/cgtop/cgtop.c
8f2d43a0
LP
3085
3086systemd_cgtop_LDADD = \
cc8b113e 3087 libsystemd-shared.la
8f2d43a0 3088
d7832d2c 3089# ------------------------------------------------------------------------------
48d437bb 3090systemd_nspawn_SOURCES = \
08e1fb68 3091 src/nspawn/nspawn.c \
f757855e
LP
3092 src/nspawn/nspawn-settings.c \
3093 src/nspawn/nspawn-settings.h \
e83bebef
LP
3094 src/nspawn/nspawn-mount.c \
3095 src/nspawn/nspawn-mount.h \
9a2a5625
LP
3096 src/nspawn/nspawn-network.c \
3097 src/nspawn/nspawn-network.h \
7a8f6325
LP
3098 src/nspawn/nspawn-expose-ports.c \
3099 src/nspawn/nspawn-expose-ports.h \
34829a32
LP
3100 src/nspawn/nspawn-cgroup.c \
3101 src/nspawn/nspawn-cgroup.h \
f011b0b8
DH
3102 src/nspawn/nspawn-seccomp.c \
3103 src/nspawn/nspawn-seccomp.h \
b7103bc5
LP
3104 src/nspawn/nspawn-register.c \
3105 src/nspawn/nspawn-register.h \
ee645080
LP
3106 src/nspawn/nspawn-setuid.c \
3107 src/nspawn/nspawn-setuid.h \
7732f92b
LP
3108 src/nspawn/nspawn-stub-pid1.c \
3109 src/nspawn/nspawn-stub-pid1.h \
7336138e
LP
3110 src/nspawn/nspawn-patch-uid.c \
3111 src/nspawn/nspawn-patch-uid.h \
08e1fb68
LP
3112 src/core/mount-setup.c \
3113 src/core/mount-setup.h \
3114 src/core/loopback-setup.c \
317feb4d 3115 src/core/loopback-setup.h
4668191d 3116
f757855e
LP
3117nodist_systemd_nspawn_SOURCES = \
3118 src/nspawn/nspawn-gperf.c
3119
3120gperf_gperf_sources += \
3121 src/nspawn/nspawn-gperf.gperf
3122
e9642be2
LP
3123systemd_nspawn_CFLAGS = \
3124 $(AM_CFLAGS) \
cc8b113e 3125 $(ACL_CFLAGS) \
e1ada21e 3126 $(BLKID_CFLAGS) \
cc8b113e
FS
3127 $(SECCOMP_CFLAGS) \
3128 $(SELINUX_CFLAGS)
e9642be2 3129
48d437bb 3130systemd_nspawn_LDADD = \
cc8b113e
FS
3131 libsystemd-shared.la \
3132 $(ACL_LIBS) \
3133 $(BLKID_LIBS) \
3134 $(SECCOMP_LIBS) \
3135 $(SELINUX_LIBS)
8eea53dd 3136
6d0b55c2
LP
3137if HAVE_LIBIPTC
3138systemd_nspawn_LDADD += \
a095315b 3139 libfirewall.la
6d0b55c2
LP
3140endif
3141
7336138e
LP
3142test_patch_uid_SOURCES = \
3143 src/nspawn/nspawn-patch-uid.c \
3144 src/nspawn/nspawn-patch-uid.h \
3145 src/nspawn/test-patch-uid.c
3146
cc8b113e
FS
3147test_patch_uid_CFLAGS = \
3148 $(AM_CFLAGS) \
3149 $(ACL_CFLAGS)
3150
7336138e 3151test_patch_uid_LDADD = \
cc8b113e
FS
3152 libsystemd-shared.la \
3153 $(ACL_LIBS)
7336138e
LP
3154
3155manual_tests += \
3156 test-patch-uid
3157
c2756a68
LP
3158# ------------------------------------------------------------------------------
3159systemd_run_SOURCES = \
3160 src/run/run.c
3161
3162systemd_run_LDADD = \
cc8b113e 3163 libsystemd-shared.la
c2756a68 3164
450442cf
LP
3165# ------------------------------------------------------------------------------
3166systemd_mount_SOURCES = \
3167 src/mount/mount-tool.c
3168
3169systemd_mount_LDADD = \
3170 libsystemd-shared.la
3171
d7832d2c 3172# ------------------------------------------------------------------------------
f299e3e4 3173systemd_stdio_bridge_SOURCES = \
798c486f 3174 src/stdio-bridge/stdio-bridge.c
f252ff17 3175
f299e3e4 3176systemd_stdio_bridge_LDADD = \
cc8b113e 3177 libsystemd-shared.la
7c9a6f90 3178
d7832d2c 3179# ------------------------------------------------------------------------------
48d437bb 3180systemd_tty_ask_password_agent_SOURCES = \
dce818b3 3181 src/tty-ask-password-agent/tty-ask-password-agent.c
2a018e83 3182
48d437bb 3183systemd_tty_ask_password_agent_LDADD = \
cc8b113e 3184 libsystemd-shared.la
48d437bb 3185
de1c301e 3186# ------------------------------------------------------------------------------
add00dfd 3187libsystemd_internal_la_SOURCES = \
a7edaadd
LP
3188 src/systemd/sd-bus.h \
3189 src/systemd/sd-bus-protocol.h \
87b20a81 3190 src/systemd/sd-bus-vtable.h \
faaa5728 3191 src/systemd/sd-utf8.h \
c8a8806e 3192 src/systemd/sd-event.h \
1c4baffc 3193 src/systemd/sd-netlink.h \
3bedba4a 3194 src/systemd/sd-resolve.h \
0bba8d6e 3195 src/systemd/sd-login.h \
be127913 3196 src/systemd/sd-id128.h \
0ebee881 3197 src/systemd/sd-daemon.h \
9a00f57a 3198 src/systemd/sd-path.h \
a903fd34 3199 src/systemd/sd-network.h \
23fbe14f 3200 src/systemd/sd-hwdb.h \
57fa1d09 3201 src/systemd/sd-device.h \
73a7e461 3202 src/libsystemd/libsystemd.sym \
607553f9
TG
3203 src/libsystemd/sd-bus/sd-bus.c \
3204 src/libsystemd/sd-bus/bus-control.c \
3205 src/libsystemd/sd-bus/bus-control.h \
3206 src/libsystemd/sd-bus/bus-error.c \
3207 src/libsystemd/sd-bus/bus-error.h \
96aad8d1
LP
3208 src/libsystemd/sd-bus/bus-common-errors.h \
3209 src/libsystemd/sd-bus/bus-common-errors.c \
607553f9
TG
3210 src/libsystemd/sd-bus/bus-internal.c \
3211 src/libsystemd/sd-bus/bus-internal.h \
3212 src/libsystemd/sd-bus/bus-socket.c \
3213 src/libsystemd/sd-bus/bus-socket.h \
3214 src/libsystemd/sd-bus/bus-kernel.c \
3215 src/libsystemd/sd-bus/bus-kernel.h \
3216 src/libsystemd/sd-bus/bus-container.c \
3217 src/libsystemd/sd-bus/bus-container.h \
3218 src/libsystemd/sd-bus/bus-message.c \
3219 src/libsystemd/sd-bus/bus-message.h \
3220 src/libsystemd/sd-bus/bus-creds.c \
3221 src/libsystemd/sd-bus/bus-creds.h \
3222 src/libsystemd/sd-bus/bus-signature.c \
3223 src/libsystemd/sd-bus/bus-signature.h \
3224 src/libsystemd/sd-bus/bus-type.c \
3225 src/libsystemd/sd-bus/bus-type.h \
3226 src/libsystemd/sd-bus/bus-match.c \
3227 src/libsystemd/sd-bus/bus-match.h \
3228 src/libsystemd/sd-bus/bus-bloom.c \
3229 src/libsystemd/sd-bus/bus-bloom.h \
3230 src/libsystemd/sd-bus/bus-introspect.c \
3231 src/libsystemd/sd-bus/bus-introspect.h \
3232 src/libsystemd/sd-bus/bus-objects.c \
3233 src/libsystemd/sd-bus/bus-objects.h \
3234 src/libsystemd/sd-bus/bus-gvariant.c \
3235 src/libsystemd/sd-bus/bus-gvariant.h \
3236 src/libsystemd/sd-bus/bus-convenience.c \
8f8f05a9
LP
3237 src/libsystemd/sd-bus/bus-track.c \
3238 src/libsystemd/sd-bus/bus-track.h \
19befb2d
LP
3239 src/libsystemd/sd-bus/bus-slot.c \
3240 src/libsystemd/sd-bus/bus-slot.h \
607553f9
TG
3241 src/libsystemd/sd-bus/bus-protocol.h \
3242 src/libsystemd/sd-bus/kdbus.h \
a095315b
KS
3243 src/libsystemd/sd-bus/bus-dump.c \
3244 src/libsystemd/sd-bus/bus-dump.h \
607553f9
TG
3245 src/libsystemd/sd-utf8/sd-utf8.c \
3246 src/libsystemd/sd-event/sd-event.c \
1c4baffc
TG
3247 src/libsystemd/sd-netlink/sd-netlink.c \
3248 src/libsystemd/sd-netlink/netlink-internal.h \
3249 src/libsystemd/sd-netlink/netlink-message.c \
89489ef7
TG
3250 src/libsystemd/sd-netlink/netlink-socket.c \
3251 src/libsystemd/sd-netlink/rtnl-message.c \
1c4baffc
TG
3252 src/libsystemd/sd-netlink/netlink-types.h \
3253 src/libsystemd/sd-netlink/netlink-types.c \
3254 src/libsystemd/sd-netlink/netlink-util.h \
3255 src/libsystemd/sd-netlink/netlink-util.c \
3256 src/libsystemd/sd-netlink/local-addresses.h \
3257 src/libsystemd/sd-netlink/local-addresses.c \
be127913 3258 src/libsystemd/sd-id128/sd-id128.c \
910fd145
LP
3259 src/libsystemd/sd-id128/id128-util.h \
3260 src/libsystemd/sd-id128/id128-util.c \
0ebee881 3261 src/libsystemd/sd-daemon/sd-daemon.c \
9a00f57a 3262 src/libsystemd/sd-login/sd-login.c \
a903fd34
LP
3263 src/libsystemd/sd-path/sd-path.c \
3264 src/libsystemd/sd-network/sd-network.c \
84e51726 3265 src/libsystemd/sd-network/network-util.h \
23fbe14f
TG
3266 src/libsystemd/sd-network/network-util.c \
3267 src/libsystemd/sd-hwdb/sd-hwdb.c \
3268 src/libsystemd/sd-hwdb/hwdb-util.h \
84d32580 3269 src/libsystemd/sd-hwdb/hwdb-internal.h \
57fa1d09
TG
3270 src/libsystemd/sd-device/device-internal.h \
3271 src/libsystemd/sd-device/device-util.h \
96df036f
TG
3272 src/libsystemd/sd-device/device-enumerator.c \
3273 src/libsystemd/sd-device/device-enumerator-private.h \
57fa1d09
TG
3274 src/libsystemd/sd-device/sd-device.c \
3275 src/libsystemd/sd-device/device-private.c \
b3d5018b 3276 src/libsystemd/sd-device/device-private.h \
4afd3348 3277 src/libsystemd/sd-resolve/sd-resolve.c
6bb648a1 3278
f0329635 3279libsystemd_internal_la_LIBADD = \
93f1bcf4
LP
3280 -lresolv
3281
add00dfd 3282noinst_LTLIBRARIES += \
b3d5018b 3283 libsystemd-internal.la
add00dfd 3284
add00dfd 3285EXTRA_DIST += \
2b0a23e8 3286 src/libsystemd/libsystemd.pc.in \
add00dfd 3287 src/libsystemd/sd-bus/DIFFERENCES \
2b0a23e8 3288 src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
add00dfd 3289
8537a389 3290libsystemd_la_SOURCES =
add00dfd 3291
6bb648a1 3292libsystemd_la_LDFLAGS = \
d9f644e2 3293 $(AM_LDFLAGS) \
b4b5212d 3294 -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
73a7e461 3295 -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
d9f644e2 3296
add00dfd 3297libsystemd_la_LIBADD = \
8537a389
FS
3298 libsystemd-internal.la \
3299 libbasic.la \
3300 libsystemd-journal-internal.la
add00dfd 3301
c3b8df24 3302pkgconfiglib_DATA += \
6bb648a1 3303 src/libsystemd/libsystemd.pc
c3b8df24 3304
be127913 3305pkginclude_HEADERS += \
882897af
LP
3306 src/systemd/sd-bus.h \
3307 src/systemd/sd-bus-protocol.h \
3308 src/systemd/sd-bus-vtable.h \
49f582c0 3309 src/systemd/sd-event.h \
be127913 3310 src/systemd/sd-login.h \
be4b47cb
KS
3311 src/systemd/sd-id128.h \
3312 src/systemd/sd-daemon.h
3313
082210c7 3314rootlib_LTLIBRARIES += \
6bb648a1 3315 libsystemd.la
de1c301e 3316
cee22bd3 3317tests += \
de1c301e 3318 test-bus-marshal \
89ffcd2a 3319 test-bus-signature \
a9beb123 3320 test-bus-benchmark \
2181a7f5 3321 test-bus-chat \
b7fc42e0 3322 test-bus-cleanup \
392d5b37 3323 test-bus-server \
dd418b9a 3324 test-bus-match \
ddeb4241 3325 test-bus-kernel \
86312ab8 3326 test-bus-kernel-bloom \
29ddb38f
LP
3327 test-bus-zero-copy \
3328 test-bus-introspect \
fd38203a 3329 test-bus-objects \
780896a4 3330 test-bus-error \
5b12334d 3331 test-bus-creds \
c1b9d935 3332 test-bus-gvariant \
70cb8b7b 3333 test-bus-track \
c813ca40 3334 test-event \
1c4baffc 3335 test-netlink \
e9140aff 3336 test-local-addresses \
3bedba4a 3337 test-resolve
89ffcd2a 3338
862e8bf8 3339bin_PROGRAMS += \
89ffcd2a 3340 busctl
de1c301e
LP
3341
3342test_bus_marshal_SOURCES = \
607553f9 3343 src/libsystemd/sd-bus/test-bus-marshal.c
de1c301e
LP
3344
3345test_bus_marshal_LDADD = \
cc8b113e 3346 libsystemd-shared.la \
de1c301e 3347 $(GLIB_LIBS) \
0b906b8d 3348 $(DBUS_LIBS)
de1c301e
LP
3349
3350test_bus_marshal_CFLAGS = \
3351 $(AM_CFLAGS) \
3352 $(GLIB_CFLAGS) \
0b906b8d 3353 $(DBUS_CFLAGS)
de1c301e
LP
3354
3355test_bus_signature_SOURCES = \
607553f9 3356 src/libsystemd/sd-bus/test-bus-signature.c
de1c301e
LP
3357
3358test_bus_signature_LDADD = \
cc8b113e 3359 libsystemd-shared.la
de1c301e 3360
89ffcd2a 3361test_bus_chat_SOURCES = \
607553f9 3362 src/libsystemd/sd-bus/test-bus-chat.c
89ffcd2a 3363
89ffcd2a 3364test_bus_chat_LDADD = \
cc8b113e 3365 libsystemd-shared.la
89ffcd2a 3366
b7fc42e0 3367test_bus_cleanup_SOURCES = \
607553f9 3368 src/libsystemd/sd-bus/test-bus-cleanup.c
b7fc42e0 3369
41fd4c4c
KS
3370test_bus_cleanup_CFLAGS = \
3371 $(AM_CFLAGS) \
3372 $(SECCOMP_CFLAGS)
3373
b7fc42e0 3374test_bus_cleanup_LDADD = \
cc8b113e 3375 libsystemd-shared.la
b7fc42e0 3376
70cb8b7b
LP
3377test_bus_track_SOURCES = \
3378 src/libsystemd/sd-bus/test-bus-track.c
3379
3380test_bus_track_CFLAGS = \
3381 $(AM_CFLAGS) \
3382 $(SECCOMP_CFLAGS)
3383
3384test_bus_track_LDADD = \
3385 libsystemd-shared.la
3386
2181a7f5 3387test_bus_server_SOURCES = \
607553f9 3388 src/libsystemd/sd-bus/test-bus-server.c
2181a7f5 3389
2181a7f5 3390test_bus_server_LDADD = \
cc8b113e 3391 libsystemd-shared.la
2181a7f5 3392
29ddb38f 3393test_bus_objects_SOURCES = \
607553f9 3394 src/libsystemd/sd-bus/test-bus-objects.c
29ddb38f 3395
29ddb38f 3396test_bus_objects_LDADD = \
cc8b113e 3397 libsystemd-shared.la
29ddb38f 3398
780896a4 3399test_bus_error_SOURCES = \
607553f9 3400 src/libsystemd/sd-bus/test-bus-error.c
780896a4 3401
cc8b113e 3402# Link statically because this test uses BUS_ERROR_MAP_ELF_REGISTER
780896a4 3403test_bus_error_LDADD = \
a095315b 3404 libshared.la
780896a4 3405
c1b9d935 3406test_bus_gvariant_SOURCES = \
607553f9 3407 src/libsystemd/sd-bus/test-bus-gvariant.c
c1b9d935
LP
3408
3409test_bus_gvariant_LDADD = \
cc8b113e 3410 libsystemd-shared.la \
0b906b8d 3411 $(GLIB_LIBS)
c1b9d935
LP
3412
3413test_bus_gvariant_CFLAGS = \
3414 $(AM_CFLAGS) \
3415 $(GLIB_CFLAGS)
3416
5b12334d 3417test_bus_creds_SOURCES = \
607553f9 3418 src/libsystemd/sd-bus/test-bus-creds.c
5b12334d
LP
3419
3420test_bus_creds_LDADD = \
cc8b113e 3421 libsystemd-shared.la
5b12334d 3422
392d5b37 3423test_bus_match_SOURCES = \
607553f9 3424 src/libsystemd/sd-bus/test-bus-match.c
392d5b37 3425
392d5b37 3426test_bus_match_LDADD = \
cc8b113e 3427 libsystemd-shared.la
dd418b9a
LP
3428
3429test_bus_kernel_SOURCES = \
607553f9 3430 src/libsystemd/sd-bus/test-bus-kernel.c
dd418b9a 3431
dd418b9a 3432test_bus_kernel_LDADD = \
cc8b113e 3433 libsystemd-shared.la
392d5b37 3434
86312ab8 3435test_bus_kernel_bloom_SOURCES = \
607553f9 3436 src/libsystemd/sd-bus/test-bus-kernel-bloom.c
86312ab8 3437
86312ab8 3438test_bus_kernel_bloom_LDADD = \
cc8b113e 3439 libsystemd-shared.la
86312ab8 3440
a9beb123
TG
3441test_bus_benchmark_SOURCES = \
3442 src/libsystemd/sd-bus/test-bus-benchmark.c
8f155917 3443
a9beb123 3444test_bus_benchmark_LDADD = \
cc8b113e 3445 libsystemd-shared.la
8f155917 3446
453a0c29 3447test_bus_zero_copy_SOURCES = \
607553f9 3448 src/libsystemd/sd-bus/test-bus-zero-copy.c
453a0c29 3449
453a0c29 3450test_bus_zero_copy_LDADD = \
cc8b113e 3451 libsystemd-shared.la
453a0c29 3452
29ddb38f 3453test_bus_introspect_SOURCES = \
607553f9 3454 src/libsystemd/sd-bus/test-bus-introspect.c
29ddb38f 3455
29ddb38f 3456test_bus_introspect_LDADD = \
cc8b113e 3457 libsystemd-shared.la
29ddb38f 3458
fd38203a 3459test_event_SOURCES = \
607553f9 3460 src/libsystemd/sd-event/test-event.c
fd38203a
LP
3461
3462test_event_LDADD = \
cc8b113e 3463 libsystemd-shared.la
fd38203a 3464
1c4baffc
TG
3465test_netlink_SOURCES = \
3466 src/libsystemd/sd-netlink/test-netlink.c
0b54473e 3467
1c4baffc 3468test_netlink_LDADD = \
cc8b113e 3469 libsystemd-shared.la
0b54473e 3470
e9140aff 3471test_local_addresses_SOURCES = \
1c4baffc 3472 src/libsystemd/sd-netlink/test-local-addresses.c
e9140aff
LP
3473
3474test_local_addresses_LDADD = \
cc8b113e 3475 libsystemd-shared.la
e9140aff 3476
3bedba4a 3477test_resolve_SOURCES = \
607553f9 3478 src/libsystemd/sd-resolve/test-resolve.c
5681d7fb 3479
3bedba4a 3480test_resolve_LDADD = \
cc8b113e 3481 libsystemd-shared.la
5681d7fb 3482
89ffcd2a 3483busctl_SOURCES = \
a1ad3767
LP
3484 src/libsystemd/sd-bus/busctl.c \
3485 src/libsystemd/sd-bus/busctl-introspect.c \
3486 src/libsystemd/sd-bus/busctl-introspect.h
89ffcd2a
LP
3487
3488busctl_LDADD = \
cc8b113e 3489 libsystemd-shared.la
89ffcd2a 3490
c61be55d
TG
3491# ------------------------------------------------------------------------------
3492noinst_LTLIBRARIES += \
fe8db0c5 3493 libsystemd-network.la
c61be55d 3494
679be2a7
CR
3495libsystemd_network_la_CFLAGS = \
3496 $(AM_CFLAGS) \
3497 $(KMOD_CFLAGS)
3498
fe8db0c5 3499libsystemd_network_la_SOURCES = \
c61be55d 3500 src/systemd/sd-dhcp-client.h \
b44cd882 3501 src/systemd/sd-dhcp-server.h \
fe8db0c5 3502 src/systemd/sd-dhcp-lease.h \
5c1d3fc9 3503 src/systemd/sd-ipv4ll.h \
e3dca008 3504 src/systemd/sd-ipv4acd.h \
3ad0c5d8 3505 src/systemd/sd-ndisc.h \
a903fd34
LP
3506 src/systemd/sd-dhcp6-client.h \
3507 src/systemd/sd-dhcp6-lease.h \
e7aa89f9 3508 src/systemd/sd-lldp.h \
fe8db0c5 3509 src/libsystemd-network/sd-dhcp-client.c \
b44cd882 3510 src/libsystemd-network/sd-dhcp-server.c \
fe8db0c5
TG
3511 src/libsystemd-network/dhcp-network.c \
3512 src/libsystemd-network/dhcp-option.c \
3513 src/libsystemd-network/dhcp-packet.c \
3514 src/libsystemd-network/dhcp-internal.h \
b44cd882 3515 src/libsystemd-network/dhcp-server-internal.h \
fe8db0c5
TG
3516 src/libsystemd-network/dhcp-protocol.h \
3517 src/libsystemd-network/dhcp-lease-internal.h \
5c1d3fc9
UTL
3518 src/libsystemd-network/sd-dhcp-lease.c \
3519 src/libsystemd-network/sd-ipv4ll.c \
e3dca008 3520 src/libsystemd-network/sd-ipv4acd.c \
996d1697
TG
3521 src/libsystemd-network/arp-util.h \
3522 src/libsystemd-network/arp-util.c \
c6f7c917 3523 src/libsystemd-network/network-internal.c \
e3169126 3524 src/libsystemd-network/network-internal.h \
3ad0c5d8 3525 src/libsystemd-network/sd-ndisc.c \
1e7a0e21
LP
3526 src/libsystemd-network/ndisc-internal.h \
3527 src/libsystemd-network/ndisc-router.h \
3528 src/libsystemd-network/ndisc-router.c \
940367a0
TG
3529 src/libsystemd-network/icmp6-util.h \
3530 src/libsystemd-network/icmp6-util.c \
3fb2c570 3531 src/libsystemd-network/sd-dhcp6-client.c \
e3169126 3532 src/libsystemd-network/dhcp6-internal.h \
228b2a12 3533 src/libsystemd-network/dhcp6-protocol.h \
f12ed3bf 3534 src/libsystemd-network/dhcp6-network.c \
3fb2c570
PF
3535 src/libsystemd-network/dhcp6-option.c \
3536 src/libsystemd-network/dhcp6-lease-internal.h \
ad1ad5c8 3537 src/libsystemd-network/sd-dhcp6-lease.c \
cfb5b380
TG
3538 src/libsystemd-network/dhcp-identifier.h \
3539 src/libsystemd-network/dhcp-identifier.c \
13b3cdb9 3540 src/libsystemd-network/lldp-internal.h \
ad1ad5c8
SS
3541 src/libsystemd-network/lldp-network.h \
3542 src/libsystemd-network/lldp-network.c \
34437b4f
LP
3543 src/libsystemd-network/lldp-neighbor.h \
3544 src/libsystemd-network/lldp-neighbor.c \
ad1ad5c8 3545 src/libsystemd-network/sd-lldp.c
fe8db0c5
TG
3546
3547libsystemd_network_la_LIBADD = \
679be2a7 3548 $(KMOD_LIBS)
c61be55d
TG
3549
3550test_dhcp_option_SOURCES = \
fe8db0c5
TG
3551 src/libsystemd-network/dhcp-protocol.h \
3552 src/libsystemd-network/dhcp-internal.h \
3553 src/libsystemd-network/test-dhcp-option.c
c61be55d
TG
3554
3555test_dhcp_option_LDADD = \
fe8db0c5 3556 libsystemd-network.la \
cc8b113e 3557 libsystemd-shared.la
c61be55d
TG
3558
3559test_dhcp_client_SOURCES = \
3560 src/systemd/sd-dhcp-client.h \
fe8db0c5
TG
3561 src/libsystemd-network/dhcp-protocol.h \
3562 src/libsystemd-network/dhcp-internal.h \
3563 src/libsystemd-network/test-dhcp-client.c
c61be55d
TG
3564
3565test_dhcp_client_LDADD = \
fe8db0c5 3566 libsystemd-network.la \
cc8b113e 3567 libsystemd-shared.la
c61be55d 3568
b44cd882
TG
3569test_dhcp_server_SOURCES = \
3570 src/libsystemd-network/test-dhcp-server.c
3571
3572test_dhcp_server_LDADD = \
3573 libsystemd-network.la \
cc8b113e 3574 libsystemd-shared.la
b44cd882 3575
d9bf4f8c 3576test_ipv4ll_SOURCES = \
5590bbe5 3577 src/systemd/sd-ipv4ll.h \
996d1697 3578 src/libsystemd-network/arp-util.h \
5590bbe5 3579 src/libsystemd-network/test-ipv4ll.c
d9bf4f8c
UTL
3580
3581test_ipv4ll_LDADD = \
5590bbe5 3582 libsystemd-network.la \
cc8b113e 3583 libsystemd-shared.la
d9bf4f8c 3584
7b713b81
TG
3585test_ipv4ll_manual_SOURCES = \
3586 src/systemd/sd-ipv4ll.h \
3587 src/libsystemd-network/test-ipv4ll-manual.c
3588
3589test_ipv4ll_manual_LDADD = \
3590 libsystemd-network.la \
cc8b113e 3591 libsystemd-shared.la
7b713b81
TG
3592
3593test_acd_SOURCES = \
3594 src/systemd/sd-ipv4acd.h \
3595 src/libsystemd-network/test-acd.c
3596
3597test_acd_LDADD = \
3598 libsystemd-network.la \
cc8b113e 3599 libsystemd-shared.la
7b713b81 3600
3ad0c5d8 3601test_ndisc_rs_SOURCES = \
f20a35cc 3602 src/systemd/sd-dhcp6-client.h \
3ad0c5d8 3603 src/systemd/sd-ndisc.h \
940367a0 3604 src/libsystemd-network/icmp6-util.h \
3ad0c5d8 3605 src/libsystemd-network/test-ndisc-rs.c \
cfb5b380
TG
3606 src/libsystemd-network/dhcp-identifier.h \
3607 src/libsystemd-network/dhcp-identifier.c
f20a35cc 3608
3ad0c5d8 3609test_ndisc_rs_LDADD = \
f20a35cc 3610 libsystemd-network.la \
a095315b 3611 libudev.la \
cc8b113e 3612 libsystemd-shared.la
f20a35cc 3613
813e3a6f
PF
3614test_dhcp6_client_SOURCES = \
3615 src/systemd/sd-dhcp6-client.h \
f12ed3bf 3616 src/libsystemd-network/dhcp6-internal.h \
cfb5b380
TG
3617 src/libsystemd-network/test-dhcp6-client.c \
3618 src/libsystemd-network/dhcp-identifier.h \
3619 src/libsystemd-network/dhcp-identifier.c
813e3a6f
PF
3620
3621test_dhcp6_client_LDADD = \
3622 libsystemd-network.la \
a095315b 3623 libudev.la \
cc8b113e 3624 libsystemd-shared.la
813e3a6f 3625
ad1ad5c8 3626test_lldp_SOURCES = \
a095315b 3627 src/libsystemd-network/test-lldp.c
ad1ad5c8
SS
3628
3629test_lldp_LDADD = \
3630 libsystemd-network.la \
cc8b113e 3631 libsystemd-shared.la
ad1ad5c8 3632
c61be55d
TG
3633tests += \
3634 test-dhcp-option \
d9bf4f8c 3635 test-dhcp-client \
b44cd882 3636 test-dhcp-server \
f20a35cc 3637 test-ipv4ll \
3ad0c5d8 3638 test-ndisc-rs \
ad1ad5c8
SS
3639 test-dhcp6-client \
3640 test-lldp
c61be55d 3641
3e214785 3642# ------------------------------------------------------------------------------
3e214785 3643include_HEADERS += \
bb061708 3644 src/libudev/libudev.h
3e214785 3645
082210c7 3646rootlib_LTLIBRARIES += \
3e214785
KS
3647 libudev.la
3648
3e214785 3649libudev_la_SOURCES =\
dc579853 3650 src/libudev/libudev.sym \
bb061708 3651 src/libudev/libudev-private.h \
f4ac4d1a 3652 src/libudev/libudev-device-internal.h \
bb061708
KS
3653 src/libudev/libudev.c \
3654 src/libudev/libudev-list.c \
3655 src/libudev/libudev-util.c \
3656 src/libudev/libudev-device.c \
f4ac4d1a 3657 src/libudev/libudev-device-private.c \
bb061708
KS
3658 src/libudev/libudev-enumerate.c \
3659 src/libudev/libudev-monitor.c \
2001208c 3660 src/libudev/libudev-queue.c \
2001208c 3661 src/libudev/libudev-hwdb.c
3e214785
KS
3662
3663libudev_la_LDFLAGS = \
3664 $(AM_LDFLAGS) \
20bbd54f
KS
3665 -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3666 -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3e214785 3667
33502ffe 3668libudev_la_LIBADD = \
cc8b113e
FS
3669 libsystemd-internal.la \
3670 libbasic.la
33502ffe 3671
3e214785 3672pkgconfiglib_DATA += \
bb061708 3673 src/libudev/libudev.pc
3e214785
KS
3674
3675EXTRA_DIST += \
dc579853 3676 src/libudev/libudev.pc.in
3e214785 3677
04a9d3a0
KS
3678# ------------------------------------------------------------------------------
3679noinst_LTLIBRARIES += \
48d7417d 3680 libudev-internal.la
04a9d3a0 3681
48d7417d 3682libudev_internal_la_SOURCES =\
f4ac4d1a 3683 $(libudev_la_SOURCES)
04a9d3a0 3684
3e214785 3685# ------------------------------------------------------------------------------
63ed840e 3686INSTALL_DIRS += \
65eb4378 3687 $(sysconfdir)/udev/rules.d
3e214785 3688
9dc670ea 3689dist_network_DATA = \
dd4d2c1c 3690 network/99-default.link \
4eaea664 3691 network/80-container-host0.network \
3af18d8e
LP
3692 network/80-container-ve.network \
3693 network/80-container-vz.network
daeb71a3 3694
3e214785 3695dist_udevrules_DATA += \
3e214785 3696 rules/50-udev-default.rules \
52346b5f 3697 rules/60-block.rules \
0a8da830 3698 rules/60-drm.rules \
51c0c286 3699 rules/60-evdev.rules \
3e214785 3700 rules/60-persistent-storage-tape.rules \
3e214785
KS
3701 rules/60-persistent-input.rules \
3702 rules/60-persistent-alsa.rules \
3703 rules/60-persistent-storage.rules \
a31a0c92 3704 rules/60-serial.rules \
0bb91b50 3705 rules/64-btrfs.rules \
ebb90c83 3706 rules/70-mouse.rules \
0bb7b986 3707 rules/70-touchpad.rules \
3e214785 3708 rules/75-net-description.rules \
3e214785 3709 rules/78-sound-card.rules \
654b036b 3710 rules/80-net-setup-link.rules
3e214785 3711
e2eb18d5
A
3712nodist_udevrules_DATA += \
3713 rules/99-systemd.rules
3714
3e214785
KS
3715udevconfdir = $(sysconfdir)/udev
3716dist_udevconf_DATA = \
3717 src/udev/udev.conf
3718
2f4d3bb9 3719pkgconfigdata_DATA += \
3e214785
KS
3720 src/udev/udev.pc
3721
3722EXTRA_DIST += \
3723 rules/99-systemd.rules.in \
3724 src/udev/udev.pc.in
3725
3e214785 3726EXTRA_DIST += \
51dfddc2 3727 units/systemd-udevd.service.in \
f13b388f 3728 units/systemd-udev-trigger.service.in \
65eb4378 3729 units/systemd-udev-settle.service.in
3e214785 3730
6ff39241
ZJS
3731SOCKETS_TARGET_WANTS += \
3732 systemd-udevd-control.socket \
3733 systemd-udevd-kernel.socket
ecde7065 3734
6ff39241
ZJS
3735SYSINIT_TARGET_WANTS += \
3736 systemd-udevd.service \
65eb4378 3737 systemd-udev-trigger.service
3e214785 3738
f432bb91 3739rootbin_PROGRAMS += \
3e214785
KS
3740 udevadm
3741
f13b388f
KS
3742rootlibexec_PROGRAMS += \
3743 systemd-udevd
3e214785 3744
04a9d3a0
KS
3745noinst_LTLIBRARIES += \
3746 libudev-core.la
3747
9e4ded30 3748src/udev/keyboard-keys-list.txt:
9d7d42bc 3749 $(AM_V_at)$(MKDIR_P) $(dir $@)
4c148220 3750 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($$2 != "KEY_MAX") { print $$2 } }' > $@
9d7d42bc 3751
9e4ded30 3752src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt
9d7d42bc
KS
3753 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3754
dff55e5d 3755src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
9d7d42bc
KS
3756 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3757
9e4ded30
ZJS
3758gperf_txt_sources += \
3759 src/udev/keyboard-keys-list.txt
3760
04a9d3a0 3761libudev_core_la_SOURCES = \
3e214785
KS
3762 src/udev/udev.h \
3763 src/udev/udev-event.c \
3764 src/udev/udev-watch.c \
3765 src/udev/udev-node.c \
3766 src/udev/udev-rules.c \
3767 src/udev/udev-ctrl.c \
3768 src/udev/udev-builtin.c \
0bb91b50 3769 src/udev/udev-builtin-btrfs.c \
3e214785
KS
3770 src/udev/udev-builtin-hwdb.c \
3771 src/udev/udev-builtin-input_id.c \
9d7d42bc 3772 src/udev/udev-builtin-keyboard.c \
a660c63c 3773 src/udev/udev-builtin-net_id.c \
0b99c9f8 3774 src/udev/udev-builtin-net_setup_link.c \
3e214785 3775 src/udev/udev-builtin-path_id.c \
af6f0d42
TG
3776 src/udev/udev-builtin-usb_id.c \
3777 src/udev/net/link-config.h \
a5010333
TG
3778 src/udev/net/link-config.c \
3779 src/udev/net/ethtool-util.h \
3780 src/udev/net/ethtool-util.c
3e214785 3781
9d7d42bc
KS
3782nodist_libudev_core_la_SOURCES = \
3783 src/udev/keyboard-keys-from-name.h \
af6f0d42 3784 src/udev/net/link-config-gperf.c
9d7d42bc 3785
f757855e 3786gperf_gperf_sources += \
af6f0d42 3787 src/udev/net/link-config-gperf.gperf
9d7d42bc 3788
04a9d3a0 3789libudev_core_la_CFLAGS = \
235450b0 3790 $(AM_CFLAGS) \
3e214785
KS
3791 $(BLKID_CFLAGS) \
3792 $(KMOD_CFLAGS)
3793
04a9d3a0 3794libudev_core_la_LIBADD = \
c6f7c917 3795 libsystemd-network.la \
a095315b 3796 libshared.la \
3e214785
KS
3797 $(BLKID_LIBS) \
3798 $(KMOD_LIBS)
3799
e3043162
TG
3800if HAVE_KMOD
3801libudev_core_la_SOURCES += \
3802 src/udev/udev-builtin-kmod.c
a3bd8447
TG
3803
3804dist_udevrules_DATA += \
3805 rules/80-drivers.rules
e3043162
TG
3806endif
3807
f553b3b1
AO
3808if HAVE_BLKID
3809libudev_core_la_SOURCES += \
3810 src/udev/udev-builtin-blkid.c
3811endif
3812
83cd6b75 3813if HAVE_ACL
04a9d3a0 3814libudev_core_la_SOURCES += \
83cd6b75 3815 src/udev/udev-builtin-uaccess.c \
4193534e 3816 src/login/logind-acl.c \
58dfc42e
LP
3817 src/libsystemd/sd-login/sd-login.c \
3818 src/systemd/sd-login.h
83cd6b75
KS
3819endif
3820
f13b388f 3821systemd_udevd_SOURCES = \
83cd6b75 3822 src/udev/udevd.c
3e214785 3823
f13b388f 3824systemd_udevd_LDADD = \
cc8b113e
FS
3825 libudev-core.la \
3826 libbasic.la
3e214785
KS
3827
3828udevadm_SOURCES = \
3e214785
KS
3829 src/udev/udevadm.c \
3830 src/udev/udevadm-info.c \
3831 src/udev/udevadm-control.c \
3832 src/udev/udevadm-monitor.c \
796b06c2 3833 src/udev/udevadm-hwdb.c \
3e214785
KS
3834 src/udev/udevadm-settle.c \
3835 src/udev/udevadm-trigger.c \
3836 src/udev/udevadm-test.c \
d6170d27
ZJS
3837 src/udev/udevadm-test-builtin.c \
3838 src/udev/udevadm-util.c \
3839 src/udev/udevadm-util.h
3e214785 3840
3e214785 3841udevadm_LDADD = \
cc8b113e
FS
3842 libudev-core.la \
3843 libbasic.la
3e214785 3844
65eb4378 3845# ------------------------------------------------------------------------------
fe659612 3846if ENABLE_HWDB
65eb4378
TG
3847INSTALL_DIRS += \
3848 $(sysconfdir)/udev/hwdb.d
3849
3850systemd_hwdb_SOURCES = \
3851 src/libsystemd/sd-hwdb/hwdb-internal.h \
3852 src/hwdb/hwdb.c
3853
3854systemd_hwdb_LDADD = \
a095315b 3855 libshared.la
65eb4378
TG
3856
3857rootbin_PROGRAMS += \
3858 systemd-hwdb
3859
3860dist_udevhwdb_DATA = \
3861 hwdb/20-pci-vendor-model.hwdb \
3862 hwdb/20-pci-classes.hwdb \
3863 hwdb/20-usb-vendor-model.hwdb \
3864 hwdb/20-usb-classes.hwdb \
3865 hwdb/20-sdio-vendor-model.hwdb \
3866 hwdb/20-sdio-classes.hwdb \
3867 hwdb/20-bluetooth-vendor-product.hwdb \
3868 hwdb/20-acpi-vendor.hwdb \
3869 hwdb/20-OUI.hwdb \
3870 hwdb/20-net-ifname.hwdb \
51c0c286 3871 hwdb/60-evdev.hwdb \
65eb4378 3872 hwdb/60-keyboard.hwdb \
001a2473 3873 hwdb/70-mouse.hwdb \
0bb7b986
PH
3874 hwdb/70-pointingstick.hwdb \
3875 hwdb/70-touchpad.hwdb
65eb4378 3876
65eb4378
TG
3877SYSINIT_TARGET_WANTS += \
3878 systemd-hwdb-update.service
3879
c4eb3681
KS
3880# Update hwdb on installation. Do not bother if installing
3881# in DESTDIR, since this is likely for packaging purposes.
3882hwdb-update-hook:
65eb4378 3883 -test -n "$(DESTDIR)" || $(rootbindir)/systemd-hwdb update
c4eb3681
KS
3884
3885INSTALL_DATA_HOOKS += \
3886 hwdb-update-hook
3887
ee623f0d 3888hwdb-remove-hook:
beb23689 3889 -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
fe659612 3890endif
ee623f0d 3891
e37f6d61
MP
3892EXTRA_DIST += \
3893 units/systemd-hwdb-update.service.in \
3894 hwdb/ids-update.pl \
3895 hwdb/sdio.ids
3896
3e214785 3897# ------------------------------------------------------------------------------
5433c3e1 3898if ENABLE_TESTS
6b8b149a 3899TESTS += \
30dc7898
MP
3900 test/udev-test.pl \
3901 test/hwdb-test.sh
72521ab9
MP
3902
3903if HAVE_PYTHON
3904TESTS += \
c3f6a561
ZJS
3905 test/rule-syntax-check.py \
3906 hwdb/parse_hwdb.py
dcf13690
ZJS
3907
3908if HAVE_SYSV_COMPAT
3909TESTS += \
5aaf8768 3910 test/sysv-generator-test.py
72521ab9 3911endif
dcf13690 3912endif
5433c3e1 3913endif
3e214785 3914
301a9c67
ZJS
3915tests += \
3916 test-libudev
3917
cee22bd3 3918manual_tests += \
3e214785
KS
3919 test-udev
3920
3921test_libudev_SOURCES = \
0b87a077 3922 src/test/test-libudev.c
3e214785
KS
3923
3924test_libudev_LDADD = \
cc8b113e 3925 libsystemd-shared.la
3e214785
KS
3926
3927test_udev_SOURCES = \
4cb72937 3928 src/test/test-udev.c
3e214785 3929
3e214785 3930test_udev_LDADD = \
a4705396 3931 libudev-core.la \
cc8b113e 3932 libsystemd-shared.la \
6ada823a 3933 $(BLKID_LIBS) \
cc8b113e
FS
3934 $(KMOD_LIBS) \
3935 -lrt
3e214785 3936
5433c3e1 3937if ENABLE_TESTS
9b80f05f 3938check_DATA += \
0b87a077 3939 test/sys
5433c3e1 3940endif
3e214785
KS
3941
3942# packed sysfs test tree
17d6dede
EV
3943test/sys: test/sys.tar.xz
3944 -rm -rf test/sys
bd923ff2
ZJS
3945 $(AM_V_at)$(MKDIR_P) $(dir $@)
3946 $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
17d6dede 3947 -touch test/sys
3e214785
KS
3948
3949test-sys-distclean:
0b87a077 3950 -rm -rf test/sys
3e214785
KS
3951DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3952
3953EXTRA_DIST += \
0b87a077
KS
3954 test/sys.tar.xz \
3955 test/udev-test.pl \
30dc7898 3956 test/hwdb-test.sh \
e28aa588
MP
3957 test/rule-syntax-check.py \
3958 test/sysv-generator-test.py \
c3f6a561
ZJS
3959 test/mocks/fsck \
3960 hwdb/parse_hwdb.py
e28aa588 3961
3e214785
KS
3962# ------------------------------------------------------------------------------
3963ata_id_SOURCES = \
3964 src/udev/ata_id/ata_id.c
3965
3966ata_id_LDADD = \
a095315b 3967 libshared.la
3e214785
KS
3968
3969udevlibexec_PROGRAMS += \
3970 ata_id
3971
3972# ------------------------------------------------------------------------------
3973cdrom_id_SOURCES = \
3974 src/udev/cdrom_id/cdrom_id.c
3975
3976cdrom_id_LDADD = \
a095315b 3977 libshared.la
3e214785
KS
3978
3979udevlibexec_PROGRAMS += \
3980 cdrom_id
3981
3982dist_udevrules_DATA += \
20d83f2f 3983 rules/60-cdrom_id.rules
3e214785
KS
3984
3985# ------------------------------------------------------------------------------
3986collect_SOURCES = \
3987 src/udev/collect/collect.c
3988
3989collect_LDADD = \
a095315b 3990 libshared.la
3e214785
KS
3991
3992udevlibexec_PROGRAMS += \
3993 collect
3994
3995# ------------------------------------------------------------------------------
3996scsi_id_SOURCES =\
3997 src/udev/scsi_id/scsi_id.c \
3998 src/udev/scsi_id/scsi_serial.c \
3999 src/udev/scsi_id/scsi.h \
4000 src/udev/scsi_id/scsi_id.h
4001
4002scsi_id_LDADD = \
a095315b 4003 libshared.la
3e214785
KS
4004
4005udevlibexec_PROGRAMS += \
4006 scsi_id
4007
4008EXTRA_DIST += \
4009 src/udev/scsi_id/README
4010
4011# ------------------------------------------------------------------------------
4012v4l_id_SOURCES = \
4013 src/udev/v4l_id/v4l_id.c
4014
4015v4l_id_LDADD = \
a095315b 4016 libshared.la
3e214785
KS
4017
4018udevlibexec_PROGRAMS += \
4019 v4l_id
4020
4021dist_udevrules_DATA += \
20d83f2f 4022 rules/60-persistent-v4l.rules
3e214785 4023
3e214785
KS
4024# ------------------------------------------------------------------------------
4025mtd_probe_SOURCES = \
4026 src/udev/mtd_probe/mtd_probe.c \
4027 src/udev/mtd_probe/mtd_probe.h \
4028 src/udev/mtd_probe/probe_smartmedia.c
4029
3e214785 4030dist_udevrules_DATA += \
20d83f2f 4031 rules/75-probe_mtd.rules
3e214785
KS
4032
4033udevlibexec_PROGRAMS += \
4034 mtd_probe
4035
48d437bb 4036# ------------------------------------------------------------------------------
48d437bb 4037test_id128_SOURCES = \
379079ba 4038 src/test/test-id128.c
051c7d1e 4039
48d437bb 4040test_id128_LDADD = \
cc8b113e 4041 libsystemd-shared.la
051c7d1e 4042
cee22bd3 4043tests += \
e0eaab7c
KS
4044 test-id128
4045
2ca0435b
ZJS
4046# ------------------------------------------------------------------------------
4047
7f6e8043
ZJS
4048bin_PROGRAMS += \
4049 systemd-socket-activate
2ca0435b 4050
7f6e8043 4051systemd_socket_activate_SOURCES = \
2ca0435b
ZJS
4052 src/activate/activate.c
4053
7f6e8043 4054systemd_socket_activate_LDADD = \
cc8b113e 4055 libsystemd-shared.la
2ca0435b 4056
48d437bb
KS
4057# ------------------------------------------------------------------------------
4058systemd_journald_SOURCES = \
4059 src/journal/journald.c \
d025f1e4 4060 src/journal/journald-server.h
e6960940 4061
48d437bb 4062systemd_journald_LDADD = \
a095315b 4063 libjournal-core.la \
cc8b113e 4064 libsystemd-shared.la
2a018e83 4065
755a02c6 4066systemd_cat_SOURCES = \
6185ac1e 4067 src/journal/cat.c
755a02c6
LP
4068
4069systemd_cat_LDADD = \
a095315b 4070 libjournal-core.la
755a02c6 4071
2adeb166
UTL
4072if HAVE_LIBCURL
4073rootlibexec_PROGRAMS += \
4074 systemd-journal-upload
4075
4076systemd_journal_upload_SOURCES = \
4077 src/journal-remote/journal-upload.h \
4078 src/journal-remote/journal-upload.c \
4079 src/journal-remote/journal-upload-journal.c
4080
4081systemd_journal_upload_CFLAGS = \
4082 $(AM_CFLAGS) \
4083 $(LIBCURL_CFLAGS)
4084
4085systemd_journal_upload_LDADD = \
cc8b113e 4086 libsystemd-shared.la \
2adeb166
UTL
4087 $(LIBCURL_LIBS)
4088
4089nodist_systemunit_DATA += \
4090 units/systemd-journal-upload.service
4091
4092nodist_pkgsysconf_DATA += \
4093 src/journal-remote/journal-upload.conf
4094endif
4095
4096EXTRA_DIST += \
4097 units/systemd-journal-upload.service.in \
4098 src/journal-remote/journal-upload.conf.in
4099
cc64d017
ZJS
4100if HAVE_MICROHTTPD
4101rootlibexec_PROGRAMS += \
4102 systemd-journal-remote
4103
fdfccdbc 4104systemd_journal_remote_SOURCES = \
1e4e7b71
ZJS
4105 src/journal-remote/journal-remote-parse.h \
4106 src/journal-remote/journal-remote-parse.c \
4107 src/journal-remote/journal-remote-write.h \
4108 src/journal-remote/journal-remote-write.c \
9ff48d09 4109 src/journal-remote/journal-remote.h \
1e4e7b71 4110 src/journal-remote/journal-remote.c
fdfccdbc
ZJS
4111
4112systemd_journal_remote_LDADD = \
a095315b 4113 libjournal-core.la
fdfccdbc 4114
cc64d017 4115systemd_journal_remote_SOURCES += \
1e4e7b71
ZJS
4116 src/journal-remote/microhttpd-util.h \
4117 src/journal-remote/microhttpd-util.c
cc64d017
ZJS
4118
4119systemd_journal_remote_CFLAGS = \
4120 $(AM_CFLAGS) \
4121 $(MICROHTTPD_CFLAGS)
4122
4123systemd_journal_remote_LDADD += \
4124 $(MICROHTTPD_LIBS)
4125
bedd083a
ŁS
4126if ENABLE_TMPFILES
4127dist_tmpfiles_DATA += \
4128 tmpfiles.d/systemd-remote.conf
4129endif
4130
cc64d017
ZJS
4131if HAVE_GNUTLS
4132systemd_journal_remote_LDADD += \
4133 $(GNUTLS_LIBS)
08b62a9a 4134endif
ad95fd1d
ZJS
4135
4136# systemd-journal-remote make sense mostly with full crypto stack
4137dist_systemunit_DATA += \
4138 units/systemd-journal-remote.socket
4139
4140nodist_systemunit_DATA += \
4141 units/systemd-journal-remote.service
4142
ad95fd1d
ZJS
4143journal-remote-install-hook: journal-install-hook
4144 -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
4145 -chown 0:0 $(DESTDIR)/var/log/journal/remote
4146 -chmod 755 $(DESTDIR)/var/log/journal/remote
4147
4148INSTALL_EXEC_HOOKS += journal-remote-install-hook
ad95fd1d
ZJS
4149
4150nodist_pkgsysconf_DATA += \
4151 src/journal-remote/journal-remote.conf
4152
4153EXTRA_DIST += \
e37f6d61 4154 units/systemd-journal-remote.service.in \
2c8849ad
KS
4155 src/journal-remote/journal-remote.conf.in \
4156 src/journal-remote/log-generator.py
cc64d017
ZJS
4157endif
4158
145d2258
KS
4159# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4160journalctl_CFLAGS = \
4161 $(AM_CFLAGS)
a54156a2 4162
169c4f65 4163journalctl_SOURCES = \
f33d3ec1 4164 src/journal/journalctl.c
2a018e83 4165
169c4f65 4166journalctl_LDADD = \
cc8b113e 4167 libsystemd-shared.la \
795ab08f 4168 libudev-core.la
478c8269 4169
f6a971bc
LP
4170if HAVE_QRENCODE
4171journalctl_SOURCES += \
4172 src/journal/journal-qrcode.c \
4173 src/journal/journal-qrcode.h
4174
a54156a2 4175journalctl_CFLAGS += \
f6a971bc
LP
4176 $(QRENCODE_CFLAGS)
4177
4178journalctl_LDADD += \
4179 $(QRENCODE_LIBS)
4180endif
4181
48d437bb 4182test_journal_SOURCES = \
cbdca852 4183 src/journal/test-journal.c
2a018e83 4184
48d437bb 4185test_journal_LDADD = \
a095315b 4186 libjournal-core.la
2fb1aeda 4187
b070e7f3
LP
4188test_journal_send_SOURCES = \
4189 src/journal/test-journal-send.c
4190
4191test_journal_send_LDADD = \
a095315b 4192 libjournal-core.la
b070e7f3 4193
e88baee8 4194test_journal_syslog_SOURCES = \
d025f1e4 4195 src/journal/test-journal-syslog.c
e88baee8
ZJS
4196
4197test_journal_syslog_LDADD = \
a095315b 4198 libjournal-core.la
e88baee8 4199
cbdca852
LP
4200test_journal_match_SOURCES = \
4201 src/journal/test-journal-match.c
4202
4203test_journal_match_LDADD = \
a095315b 4204 libjournal-core.la
cbdca852 4205
a4bcff5b
LP
4206test_journal_enum_SOURCES = \
4207 src/journal/test-journal-enum.c
4208
4209test_journal_enum_LDADD = \
a095315b 4210 libjournal-core.la
a4bcff5b 4211
cbdca852
LP
4212test_journal_stream_SOURCES = \
4213 src/journal/test-journal-stream.c
4214
4215test_journal_stream_LDADD = \
a095315b 4216 libjournal-core.la
cbdca852 4217
d0767ffd
LP
4218test_journal_flush_SOURCES = \
4219 src/journal/test-journal-flush.c
4220
4221test_journal_flush_LDADD = \
a095315b 4222 libjournal-core.la
d0767ffd 4223
3b6c7e78
ZJS
4224test_journal_init_SOURCES = \
4225 src/journal/test-journal-init.c
4226
4227test_journal_init_LDADD = \
a095315b 4228 libjournal-core.la
3b6c7e78 4229
beec0085
LP
4230test_journal_verify_SOURCES = \
4231 src/journal/test-journal-verify.c
4232
4233test_journal_verify_LDADD = \
a095315b 4234 libjournal-core.la
beec0085 4235
7a050b54
MV
4236test_journal_interleaving_SOURCES = \
4237 src/journal/test-journal-interleaving.c
4238
4239test_journal_interleaving_LDADD = \
a095315b 4240 libjournal-core.la
7a050b54 4241
f8019684
LP
4242test_mmap_cache_SOURCES = \
4243 src/journal/test-mmap-cache.c
4244
4245test_mmap_cache_LDADD = \
a095315b 4246 libjournal-core.la
f8019684 4247
d4205751
LP
4248test_catalog_SOURCES = \
4249 src/journal/test-catalog.c
4250
96115cdf
TA
4251test_catalog_CPPFLAGS = \
4252 $(AM_CPPFLAGS) \
4b930ded 4253 -DCATALOG_DIR=\"$(abs_top_builddir)/catalog\"
143bfdaf 4254
d4205751 4255test_catalog_LDADD = \
a095315b 4256 libjournal-core.la
d4205751 4257
843fecc0
RC
4258test_compress_SOURCES = \
4259 src/journal/test-compress.c
4260
4261test_compress_LDADD = \
cc8b113e
FS
4262 libsystemd-shared.la
4263
4264if HAVE_LZ4
4265test_compress_LDADD += \
4266 -llz4
4267endif
843fecc0 4268
fd53fee0
ZJS
4269test_compress_benchmark_SOURCES = \
4270 src/journal/test-compress-benchmark.c
4271
4272test_compress_benchmark_LDADD = \
cc8b113e 4273 libsystemd-shared.la
fd53fee0 4274
8bb3626d
ZJS
4275test_audit_type_SOURCES = \
4276 src/journal/test-audit-type.c
4277
4278test_audit_type_LDADD = \
a095315b 4279 libjournal-core.la
8bb3626d 4280
a095315b 4281libjournal_core_la_SOURCES = \
d025f1e4
ZJS
4282 src/journal/journald-kmsg.c \
4283 src/journal/journald-kmsg.h \
4284 src/journal/journald-syslog.c \
4285 src/journal/journald-syslog.h \
4286 src/journal/journald-stream.c \
4287 src/journal/journald-stream.h \
4288 src/journal/journald-server.c \
4289 src/journal/journald-server.h \
4290 src/journal/journald-console.c \
4291 src/journal/journald-console.h \
40b71e89
ST
4292 src/journal/journald-wall.c \
4293 src/journal/journald-wall.h \
d025f1e4
ZJS
4294 src/journal/journald-native.c \
4295 src/journal/journald-native.h \
875c2e22
LP
4296 src/journal/journald-audit.c \
4297 src/journal/journald-audit.h \
d025f1e4
ZJS
4298 src/journal/journald-rate-limit.c \
4299 src/journal/journald-rate-limit.h \
4300 src/journal/journal-internal.h
96d1efba 4301
a095315b 4302nodist_libjournal_core_la_SOURCES = \
48d7417d 4303 src/journal/journald-gperf.c
7560fffc 4304
a095315b 4305libjournal_core_la_LIBADD = \
cc8b113e 4306 libsystemd-shared.la
7560fffc 4307
48d7417d 4308noinst_LTLIBRARIES += \
a095315b 4309 libjournal-core.la
20263082 4310
0031ccd3
KS
4311journal-install-hook:
4312 -$(MKDIR_P) $(DESTDIR)/var/log/journal
4313 -chown 0:0 $(DESTDIR)/var/log/journal
4314 -chmod 755 $(DESTDIR)/var/log/journal
4315 -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4316 -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
2ca0435b 4317
0031ccd3 4318journal-uninstall-hook:
ad95fd1d 4319 -rmdir $(DESTDIR)/var/log/journal/remote
0031ccd3
KS
4320 -rmdir $(DESTDIR)/var/log/journal/
4321
4322INSTALL_EXEC_HOOKS += journal-install-hook
4323UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4324
4325# ------------------------------------------------------------------------------
c4eb3681 4326# Update catalog on installation. Do not bother if installing
e2bb347f
ZJS
4327# in DESTDIR, since this is likely for packaging purposes.
4328catalog-update-hook:
4ec24515 4329 -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
e2bb347f 4330
f975e76c 4331INSTALL_DATA_HOOKS += \
e2bb347f
ZJS
4332 catalog-update-hook
4333
4ec24515
ZJS
4334catalog-remove-hook:
4335 -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4336
4337UNINSTALL_DATA_HOOKS += \
4338 catalog-remove-hook
4339
cee22bd3 4340tests += \
216e2ade 4341 test-journal \
ce1e49c3 4342 test-journal-enum \
e88baee8
ZJS
4343 test-journal-send \
4344 test-journal-syslog \
95ea1b90 4345 test-journal-match \
beec0085 4346 test-journal-stream \
3b6c7e78 4347 test-journal-init \
8e41de0d 4348 test-journal-verify \
7a050b54 4349 test-journal-interleaving \
d0767ffd 4350 test-journal-flush \
844ec79b 4351 test-mmap-cache \
8bb3626d
ZJS
4352 test-catalog \
4353 test-audit-type
95ea1b90 4354
3b1a55e1 4355if HAVE_COMPRESSION
fd53fee0
ZJS
4356tests += \
4357 test-compress \
4358 test-compress-benchmark
3b1a55e1 4359endif
843fecc0 4360
48d437bb 4361pkginclude_HEADERS += \
81527be1 4362 src/systemd/sd-journal.h \
aacf3b48
LP
4363 src/systemd/sd-messages.h \
4364 src/systemd/_sd-common.h
2a018e83 4365
add00dfd
KS
4366libsystemd_journal_internal_la_SOURCES = \
4367 src/journal/sd-journal.c \
4368 src/systemd/sd-journal.h \
4369 src/systemd/_sd-common.h \
4370 src/journal/journal-file.c \
4371 src/journal/journal-file.h \
4372 src/journal/journal-vacuum.c \
4373 src/journal/journal-vacuum.h \
4374 src/journal/journal-verify.c \
4375 src/journal/journal-verify.h \
4376 src/journal/lookup3.c \
4377 src/journal/lookup3.h \
4378 src/journal/journal-send.c \
4379 src/journal/journal-def.h \
4380 src/journal/compress.h \
4381 src/journal/catalog.c \
4382 src/journal/catalog.h \
4383 src/journal/mmap-cache.c \
1325ec42 4384 src/journal/mmap-cache.h \
4733607e
ZJS
4385 src/journal/compress.c \
4386 src/journal/audit-type.h \
b68f10bf
ZJS
4387 src/journal/audit-type.c \
4388 src/shared/gcrypt-util.h \
4389 src/shared/gcrypt-util.c
ee3c31bf
MAP
4390
4391nodist_libsystemd_journal_internal_la_SOURCES = \
4733607e
ZJS
4392 src/journal/audit_type-to-name.h
4393
4394gperf_txt_sources += \
4395 src/journal/audit_type-list.txt
add00dfd
KS
4396
4397# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
fe582db9 4398libsystemd_journal_internal_la_CFLAGS = \
add00dfd
KS
4399 $(AM_CFLAGS)
4400
42fcc4d2 4401libsystemd_journal_internal_la_LIBADD =
add00dfd 4402
d89c8fdf 4403if HAVE_XZ
add00dfd
KS
4404libsystemd_journal_internal_la_CFLAGS += \
4405 $(XZ_CFLAGS)
4406
4407libsystemd_journal_internal_la_LIBADD += \
4408 $(XZ_LIBS)
4409endif
4410
d89c8fdf
ZJS
4411if HAVE_LZ4
4412libsystemd_journal_internal_la_LIBADD += \
4413 -llz4
4414endif
4415
add00dfd
KS
4416if HAVE_GCRYPT
4417libsystemd_journal_internal_la_SOURCES += \
4418 src/journal/journal-authenticate.c \
4419 src/journal/journal-authenticate.h \
4420 src/journal/fsprg.c \
b68f10bf 4421 src/journal/fsprg.h
add00dfd
KS
4422
4423libsystemd_journal_internal_la_LIBADD += \
4424 $(GCRYPT_LIBS)
4425
4a8cf554 4426# fsprg.c is a drop-in file using void pointer arithmetic
add00dfd
KS
4427libsystemd_journal_internal_la_CFLAGS += \
4428 $(GCRYPT_CFLAGS) \
4429 -Wno-pointer-arith
4430endif
2a018e83 4431
474abe33
LP
4432noinst_LTLIBRARIES += \
4433 libsystemd-journal-internal.la
4434
48d437bb 4435rootlibexec_PROGRAMS += \
cc64d017 4436 systemd-journald
b1b2a107 4437
48d437bb 4438rootbin_PROGRAMS += \
169c4f65 4439 journalctl
b1b2a107 4440
755a02c6 4441bin_PROGRAMS += \
6185ac1e 4442 systemd-cat
755a02c6 4443
48d437bb 4444dist_systemunit_DATA += \
03ee5c38 4445 units/systemd-journald.socket \
875c2e22
LP
4446 units/systemd-journald-dev-log.socket \
4447 units/systemd-journald-audit.socket
b1b2a107 4448
48d437bb 4449nodist_systemunit_DATA += \
b8156be0 4450 units/systemd-journald.service \
ecde7065
LP
4451 units/systemd-journal-flush.service \
4452 units/systemd-journal-catalog-update.service
b2423f1f 4453
e6960940 4454dist_pkgsysconf_DATA += \
18b754d3 4455 src/journal/journald.conf
e6960940 4456
4b930ded 4457nodist_catalog_DATA = \
c66c2c7c 4458 catalog/systemd.bg.catalog \
a220f358
VV
4459 catalog/systemd.be.catalog \
4460 catalog/systemd.be@latin.catalog \
a6e9f2b9 4461 catalog/systemd.fr.catalog \
a6e9f2b9 4462 catalog/systemd.it.catalog \
d6740361 4463 catalog/systemd.pl.catalog \
b3e486b8 4464 catalog/systemd.pt_BR.catalog \
d6740361 4465 catalog/systemd.ru.catalog \
e0c7a4e0 4466 catalog/systemd.zh_CN.catalog \
ea01a90d 4467 catalog/systemd.zh_TW.catalog \
d4205751
LP
4468 catalog/systemd.catalog
4469
4b930ded
LP
4470EXTRA_DIST += \
4471 $(nodist_catalog_DATA:.catalog=.catalog.in)
4472
4473# Note that we don't use @@ for replacement markers here, but %%. This is
4474# because the catalog uses @@ already for its runtime replacement handling and
4475# we don't want to conflict with that.
4476catalog/%.catalog: catalog/%.catalog.in
4477 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4478 $(SED) -e 's~%SUPPORT_URL%~$(SUPPORT_URL)~' < $< > $@
4479
6ff39241 4480SOCKETS_TARGET_WANTS += \
03ee5c38 4481 systemd-journald.socket \
875c2e22
LP
4482 systemd-journald-dev-log.socket \
4483 systemd-journald-audit.socket
03ee5c38 4484
6ff39241
ZJS
4485SYSINIT_TARGET_WANTS += \
4486 systemd-journald.service \
ecde7065
LP
4487 systemd-journal-flush.service \
4488 systemd-journal-catalog-update.service
5008d581 4489
48d437bb 4490EXTRA_DIST += \
e6960940 4491 units/systemd-journald.service.in \
b8156be0 4492 units/systemd-journal-flush.service.in \
9e4ded30 4493 units/systemd-journal-catalog-update.service.in
e6960940 4494
9e4ded30
ZJS
4495gperf_gperf_sources += \
4496 src/journal/journald-gperf.gperf
5008d581 4497
4caf4ac1 4498# ------------------------------------------------------------------------------
7b17a7d7 4499if HAVE_MICROHTTPD
7b17a7d7
LP
4500gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4501
4502rootlibexec_PROGRAMS += \
4503 systemd-journal-gatewayd
4504
4505systemd_journal_gatewayd_SOURCES = \
1e4e7b71
ZJS
4506 src/journal-remote/journal-gatewayd.c \
4507 src/journal-remote/microhttpd-util.h \
4508 src/journal-remote/microhttpd-util.c
7b17a7d7
LP
4509
4510systemd_journal_gatewayd_LDADD = \
cc8b113e 4511 libsystemd-shared.la \
7b17a7d7
LP
4512 $(MICROHTTPD_LIBS)
4513
cafc7f91
ZJS
4514if HAVE_GNUTLS
4515systemd_journal_gatewayd_LDADD += \
4516 $(GNUTLS_LIBS)
4517endif
4518
7b17a7d7 4519systemd_journal_gatewayd_CFLAGS = \
7b17a7d7
LP
4520 $(AM_CFLAGS) \
4521 $(MICROHTTPD_CFLAGS)
4522
96115cdf
TA
4523systemd_journal_gatewayd_CPPFLAGS = \
4524 $(AM_CPPFLAGS) \
4525 -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4526
7b17a7d7
LP
4527dist_systemunit_DATA += \
4528 units/systemd-journal-gatewayd.socket
4529
4530nodist_systemunit_DATA += \
4531 units/systemd-journal-gatewayd.service
4532
4533dist_gatewayddocumentroot_DATA = \
1e4e7b71 4534 src/journal-remote/browse.html
7b17a7d7
LP
4535
4536endif
4537
e4d1062c
ZJS
4538EXTRA_DIST += \
4539 units/systemd-journal-gatewayd.service.in
4540
912b54ad
DS
4541# ------------------------------------------------------------------------------
4542
96c374d0
LP
4543systemd_socket_proxyd_SOURCES = \
4544 src/socket-proxy/socket-proxyd.c
912b54ad 4545
96c374d0 4546systemd_socket_proxyd_LDADD = \
cc8b113e 4547 libsystemd-shared.la
912b54ad 4548
6185ac1e 4549# ------------------------------------------------------------------------------
f5e04665 4550if ENABLE_COREDUMP
f5e04665 4551systemd_coredump_SOURCES = \
f50cd2b2
LP
4552 src/coredump/coredump.c \
4553 src/coredump/coredump-vacuum.c \
4554 src/coredump/coredump-vacuum.h
f5e04665 4555
cc8b113e
FS
4556systemd_coredump_CFLAGS = \
4557 $(AM_CFLAGS) \
4558 $(ACL_CFLAGS)
4559
f5e04665 4560systemd_coredump_LDADD = \
cc8b113e
FS
4561 libsystemd-shared.la \
4562 $(ACL_LIBS)
ba1261bc 4563
8d4e028f
LP
4564if HAVE_ELFUTILS
4565systemd_coredump_SOURCES += \
f50cd2b2
LP
4566 src/coredump/stacktrace.c \
4567 src/coredump/stacktrace.h
8d4e028f
LP
4568
4569systemd_coredump_LDADD += \
4570 $(ELFUTILS_LIBS)
4571endif
4572
3c171f0b
LP
4573nodist_systemunit_DATA += \
4574 units/systemd-coredump@.service
4575
4576dist_systemunit_DATA += \
4577 units/systemd-coredump.socket
4578
4579SOCKETS_TARGET_WANTS += \
4580 systemd-coredump.socket
4581
f5e04665 4582rootlibexec_PROGRAMS += \
6185ac1e 4583 systemd-coredump
f5e04665 4584
34c10968 4585dist_pkgsysconf_DATA += \
f50cd2b2 4586 src/coredump/coredump.conf
34c10968 4587
f4bab169 4588coredumpctl_SOURCES = \
f50cd2b2 4589 src/coredump/coredumpctl.c
d51167c6 4590
f4bab169 4591coredumpctl_LDADD = \
cc8b113e 4592 libsystemd-shared.la
d51167c6
MB
4593
4594bin_PROGRAMS += \
f4bab169 4595 coredumpctl
d51167c6 4596
0dc5d23c
LP
4597manual_tests += \
4598 test-coredump-vacuum
4599
4600test_coredump_vacuum_SOURCES = \
f50cd2b2
LP
4601 src/coredump/test-coredump-vacuum.c \
4602 src/coredump/coredump-vacuum.c \
4603 src/coredump/coredump-vacuum.h
0dc5d23c
LP
4604
4605test_coredump_vacuum_LDADD = \
cc8b113e 4606 libsystemd-shared.la
0dc5d23c 4607
17163897 4608dist_bashcompletion_data += \
f4bab169 4609 shell-completion/bash/coredumpctl
d51167c6 4610
17163897 4611dist_zshcompletion_data += \
f4bab169 4612 shell-completion/zsh/_coredumpctl
70e104c4 4613
ae5b2a86 4614nodist_sysctl_DATA = \
94c525f0 4615 sysctl.d/50-coredump.conf
f5e04665 4616
6185ac1e 4617CLEANFILES += \
94c525f0 4618 sysctl.d/50-coredump.conf
f5e04665
LP
4619endif
4620
299031ca 4621EXTRA_DIST += \
3c171f0b
LP
4622 sysctl.d/50-coredump.conf.in \
4623 units/systemd-coredump@.service.in
299031ca 4624
48d437bb
KS
4625# ------------------------------------------------------------------------------
4626if ENABLE_BINFMT
4627systemd_binfmt_SOURCES = \
4628 src/binfmt/binfmt.c
4629
4630systemd_binfmt_LDADD = \
cc8b113e 4631 libsystemd-shared.la
3d20ed6d 4632
48d437bb
KS
4633rootlibexec_PROGRAMS += \
4634 systemd-binfmt
d7ccca2e 4635
48d437bb
KS
4636dist_systemunit_DATA += \
4637 units/proc-sys-fs-binfmt_misc.automount \
4638 units/proc-sys-fs-binfmt_misc.mount
d7ccca2e 4639
48d437bb
KS
4640nodist_systemunit_DATA += \
4641 units/systemd-binfmt.service
d7ccca2e 4642
6ff39241
ZJS
4643INSTALL_DIRS += \
4644 $(prefix)/lib/binfmt.d \
4645 $(sysconfdir)/binfmt.d
8e1bd70d 4646
6ff39241
ZJS
4647SYSINIT_TARGET_WANTS += \
4648 systemd-binfmt.service \
4649 proc-sys-fs-binfmt_misc.automount
8e1bd70d 4650
299031ca 4651endif
8e1bd70d 4652
48d437bb
KS
4653EXTRA_DIST += \
4654 units/systemd-binfmt.service.in
3d20ed6d 4655
e5e83e83
LP
4656# ------------------------------------------------------------------------------
4657if ENABLE_VCONSOLE
4658systemd_vconsole_setup_SOURCES = \
4659 src/vconsole/vconsole-setup.c
4660
4661systemd_vconsole_setup_LDADD = \
cc8b113e 4662 libsystemd-shared.la
e5e83e83
LP
4663
4664rootlibexec_PROGRAMS += \
4665 systemd-vconsole-setup
4666
3b0ed75c 4667nodist_udevrules_DATA += \
f6ba8671
RS
4668 src/vconsole/90-vconsole.rules
4669
9e4ded30
ZJS
4670nodist_systemunit_DATA += \
4671 units/systemd-vconsole-setup.service
299031ca 4672endif
e5e83e83
LP
4673
4674EXTRA_DIST += \
3b0ed75c 4675 src/vconsole/90-vconsole.rules.in \
e5e83e83 4676 units/systemd-vconsole-setup.service.in
e5e83e83 4677
4de85612
LP
4678# ------------------------------------------------------------------------------
4679if ENABLE_QUOTACHECK
4680rootlibexec_PROGRAMS += \
4681 systemd-quotacheck
4682
4683nodist_systemunit_DATA += \
93a1d735 4684 units/systemd-quotacheck.service
4de85612 4685
4de85612 4686systemd_quotacheck_SOURCES = \
dce818b3 4687 src/quotacheck/quotacheck.c
4de85612
LP
4688
4689systemd_quotacheck_LDADD = \
cc8b113e 4690 libsystemd-shared.la
4de85612
LP
4691endif
4692
299031ca
BK
4693EXTRA_DIST += \
4694 units/systemd-quotacheck.service.in
4695
b51fc639
DR
4696nodist_systemunit_DATA += \
4697 units/quotaon.service
4698
4de85612
LP
4699# ------------------------------------------------------------------------------
4700if ENABLE_RANDOMSEED
4701rootlibexec_PROGRAMS += \
4702 systemd-random-seed
4703
4704nodist_systemunit_DATA += \
c35b956d 4705 units/systemd-random-seed.service
4de85612 4706
4de85612 4707systemd_random_seed_SOURCES = \
dce818b3 4708 src/random-seed/random-seed.c
4de85612
LP
4709
4710systemd_random_seed_LDADD = \
cc8b113e 4711 libsystemd-shared.la
4de85612 4712
6ff39241 4713SYSINIT_TARGET_WANTS += \
c35b956d 4714 systemd-random-seed.service
edcf89be 4715
4de85612
LP
4716endif
4717
299031ca 4718EXTRA_DIST += \
c35b956d 4719 units/systemd-random-seed.service.in
299031ca 4720
3731acf1
LP
4721# ------------------------------------------------------------------------------
4722if ENABLE_BACKLIGHT
4723rootlibexec_PROGRAMS += \
4724 systemd-backlight
4725
4726nodist_systemunit_DATA += \
4727 units/systemd-backlight@.service
4728
4729systemd_backlight_SOURCES = \
4730 src/backlight/backlight.c
4731
4732systemd_backlight_LDADD = \
cc8b113e 4733 libsystemd-shared.la
3731acf1
LP
4734endif
4735
4736EXTRA_DIST += \
4737 units/systemd-backlight@.service.in
4738
3990f247
LP
4739# ------------------------------------------------------------------------------
4740if ENABLE_RFKILL
4741rootlibexec_PROGRAMS += \
4742 systemd-rfkill
4743
4744nodist_systemunit_DATA += \
d35c1bb1
LP
4745 units/systemd-rfkill.service
4746
4747dist_systemunit_DATA += \
4748 units/systemd-rfkill.socket
3990f247
LP
4749
4750systemd_rfkill_SOURCES = \
4751 src/rfkill/rfkill.c
4752
4753systemd_rfkill_LDADD = \
cc8b113e 4754 libsystemd-shared.la
3990f247
LP
4755endif
4756
4757EXTRA_DIST += \
d35c1bb1 4758 units/systemd-rfkill.service.in
3990f247 4759
b4d0195b
LP
4760# ------------------------------------------------------------------------------
4761if HAVE_LIBCRYPTSETUP
4762rootlibexec_PROGRAMS += \
4763 systemd-cryptsetup
4764
4765systemgenerator_PROGRAMS += \
4766 systemd-cryptsetup-generator
4767
4768dist_systemunit_DATA += \
9542239e
LP
4769 units/cryptsetup.target \
4770 units/cryptsetup-pre.target
b4d0195b
LP
4771
4772systemd_cryptsetup_SOURCES = \
3bdf9c1d 4773 src/cryptsetup/cryptsetup.c
b4d0195b
LP
4774
4775systemd_cryptsetup_CFLAGS = \
4776 $(AM_CFLAGS) \
3e214785 4777 $(LIBCRYPTSETUP_CFLAGS)
b4d0195b
LP
4778
4779systemd_cryptsetup_LDADD = \
cc8b113e 4780 libsystemd-shared.la \
49e942b2 4781 $(LIBCRYPTSETUP_LIBS)
b4d0195b
LP
4782
4783systemd_cryptsetup_generator_SOURCES = \
f33d3ec1 4784 src/cryptsetup/cryptsetup-generator.c
b4d0195b
LP
4785
4786systemd_cryptsetup_generator_LDADD = \
cc8b113e 4787 libsystemd-shared.la
b4d0195b 4788
6ff39241
ZJS
4789SYSINIT_TARGET_WANTS += \
4790 cryptsetup.target
d0d6944c 4791
b4d0195b
LP
4792endif
4793
48d437bb
KS
4794# ------------------------------------------------------------------------------
4795if ENABLE_HOSTNAMED
4796systemd_hostnamed_SOURCES = \
3bdf9c1d 4797 src/hostname/hostnamed.c
48d437bb 4798
48d437bb 4799systemd_hostnamed_LDADD = \
cc8b113e 4800 libsystemd-shared.la
3d20ed6d 4801
48d437bb
KS
4802rootlibexec_PROGRAMS += \
4803 systemd-hostnamed
3d20ed6d 4804
48d437bb
KS
4805nodist_systemunit_DATA += \
4806 units/systemd-hostnamed.service
e9278741 4807
36e46fe9 4808dist_systemunit_DATA_busnames += \
cde360cd
LP
4809 units/org.freedesktop.hostname1.busname
4810
48d437bb
KS
4811dist_dbuspolicy_DATA += \
4812 src/hostname/org.freedesktop.hostname1.conf
e9ddabc2 4813
48d437bb
KS
4814dist_dbussystemservice_DATA += \
4815 src/hostname/org.freedesktop.hostname1.service
e9ddabc2 4816
299031ca
BK
4817polkitpolicy_files += \
4818 src/hostname/org.freedesktop.hostname1.policy
e9ddabc2 4819
91e8651b
ZJS
4820SYSTEM_UNIT_ALIASES += \
4821 systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
48d437bb 4822
cde360cd
LP
4823BUSNAMES_TARGET_WANTS += \
4824 org.freedesktop.hostname1.busname
4825
dbc4fbae
LP
4826hostnamectl_SOURCES = \
4827 src/hostname/hostnamectl.c
4828
dbc4fbae 4829hostnamectl_LDADD = \
cc8b113e 4830 libsystemd-shared.la
dbc4fbae
LP
4831
4832bin_PROGRAMS += \
4833 hostnamectl
4834
17163897 4835dist_bashcompletion_data += \
d611dadc
MB
4836 shell-completion/bash/hostnamectl
4837
17163897 4838dist_zshcompletion_data += \
db456cd0 4839 shell-completion/zsh/_hostnamectl
a5ba84b7 4840endif
299031ca 4841
cd49e2f6
LP
4842polkitpolicy_in_files += \
4843 src/hostname/org.freedesktop.hostname1.policy.in
4844
4845EXTRA_DIST += \
2c99aba7 4846 units/systemd-hostnamed.service.in
cd49e2f6
LP
4847
4848# ------------------------------------------------------------------------------
36e46fe9 4849dist_systemunit_DATA_busnames += \
5892a914 4850 units/org.freedesktop.systemd1.busname
15e91323
LP
4851
4852BUSNAMES_TARGET_WANTS += \
5892a914 4853 org.freedesktop.systemd1.busname
294c8660 4854
48d437bb
KS
4855# ------------------------------------------------------------------------------
4856if ENABLE_LOCALED
4857systemd_localed_SOURCES = \
4897d1dc
ZJS
4858 src/locale/localed.c \
4859 src/locale/keymap-util.c \
4860 src/locale/keymap-util.h
48d437bb 4861
48d437bb 4862systemd_localed_LDADD = \
cc8b113e 4863 libsystemd-shared.la \
e669a55b 4864 -ldl
d4f5a1f4
DH
4865
4866systemd_localed_CFLAGS = \
4867 $(AM_CFLAGS) \
4868 $(XKBCOMMON_CFLAGS)
07faed4f 4869
48d437bb
KS
4870nodist_systemunit_DATA += \
4871 units/systemd-localed.service
07faed4f 4872
36e46fe9 4873dist_systemunit_DATA_busnames += \
cde360cd
LP
4874 units/org.freedesktop.locale1.busname
4875
48d437bb
KS
4876rootlibexec_PROGRAMS += \
4877 systemd-localed
07faed4f 4878
48d437bb
KS
4879dist_dbuspolicy_DATA += \
4880 src/locale/org.freedesktop.locale1.conf
e23a0ce8 4881
48d437bb
KS
4882dist_dbussystemservice_DATA += \
4883 src/locale/org.freedesktop.locale1.service
e23a0ce8 4884
299031ca
BK
4885polkitpolicy_files += \
4886 src/locale/org.freedesktop.locale1.policy
e23a0ce8 4887
91e8651b
ZJS
4888SYSTEM_UNIT_ALIASES += \
4889 systemd-localed.service dbus-org.freedesktop.locale1.service
2a796654 4890
cde360cd
LP
4891BUSNAMES_TARGET_WANTS += \
4892 org.freedesktop.locale1.busname
4893
2c8849ad 4894dist_pkgdata_DATA = \
4e829d21
ZJS
4895 src/locale/kbd-model-map \
4896 src/locale/language-fallback-map
776a564f 4897
aa63b56f
ZJS
4898test_keymap_util_SOURCES = \
4899 src/locale/test-keymap-util.c \
4900 src/locale/keymap-util.c \
4901 src/locale/keymap-util.h
4902
4903test_keymap_util_LDADD = \
65e15f40 4904 libsystemd-shared.la \
aa63b56f
ZJS
4905 -ldl
4906
4907tests += \
4908 test-keymap-util
4909
2087a7af
LP
4910localectl_SOURCES = \
4911 src/locale/localectl.c
4912
2087a7af 4913localectl_LDADD = \
cc8b113e 4914 libsystemd-shared.la
2087a7af
LP
4915
4916bin_PROGRAMS += \
4917 localectl
4918
17163897 4919dist_bashcompletion_data += \
d611dadc
MB
4920 shell-completion/bash/localectl
4921
17163897 4922dist_zshcompletion_data += \
c4c12f13 4923 shell-completion/zsh/_localectl
a5ba84b7 4924endif
2a796654 4925
9f700755
ZJS
4926.PHONY: update-kbd-model-map
4927
299031ca
BK
4928polkitpolicy_in_files += \
4929 src/locale/org.freedesktop.locale1.policy.in
4930
4931EXTRA_DIST += \
4932 units/systemd-localed.service.in
4933
48d437bb
KS
4934# ------------------------------------------------------------------------------
4935if ENABLE_TIMEDATED
4936systemd_timedated_SOURCES = \
3bdf9c1d 4937 src/timedate/timedated.c
2a796654 4938
48d437bb 4939systemd_timedated_LDADD = \
cc8b113e 4940 libsystemd-shared.la
15673083 4941
48d437bb
KS
4942rootlibexec_PROGRAMS += \
4943 systemd-timedated
15673083 4944
48d437bb
KS
4945dist_dbussystemservice_DATA += \
4946 src/timedate/org.freedesktop.timedate1.service
e9278741 4947
48d437bb
KS
4948dist_dbuspolicy_DATA += \
4949 src/timedate/org.freedesktop.timedate1.conf
e9278741 4950
48d437bb
KS
4951nodist_systemunit_DATA += \
4952 units/systemd-timedated.service
b2423f1f 4953
36e46fe9 4954dist_systemunit_DATA_busnames += \
cde360cd
LP
4955 units/org.freedesktop.timedate1.busname
4956
299031ca
BK
4957polkitpolicy_files += \
4958 src/timedate/org.freedesktop.timedate1.policy
97c4a07d 4959
91e8651b
ZJS
4960SYSTEM_UNIT_ALIASES += \
4961 systemd-timedated.service dbus-org.freedesktop.timedate1.service
449ddb2d 4962
cde360cd
LP
4963BUSNAMES_TARGET_WANTS += \
4964 org.freedesktop.timedate1.busname
4965
6d0274f1
LP
4966timedatectl_SOURCES = \
4967 src/timedate/timedatectl.c
4968
6d0274f1 4969timedatectl_LDADD = \
cc8b113e 4970 libsystemd-shared.la
6d0274f1
LP
4971
4972bin_PROGRAMS += \
4973 timedatectl
d611dadc 4974
17163897 4975dist_bashcompletion_data += \
d611dadc 4976 shell-completion/bash/timedatectl
20c8382b 4977
17163897 4978dist_zshcompletion_data += \
20c8382b 4979 shell-completion/zsh/_timedatectl
299031ca
BK
4980endif
4981
4982polkitpolicy_in_files += \
4983 src/timedate/org.freedesktop.timedate1.policy.in
83620960 4984
48d437bb
KS
4985EXTRA_DIST += \
4986 units/systemd-timedated.service.in
449ddb2d 4987
4caf4ac1 4988# ------------------------------------------------------------------------------
687ed123
KS
4989if ENABLE_TIMESYNCD
4990systemd_timesyncd_SOURCES = \
e8af6973 4991 src/timesync/timesyncd.c \
84e51726
LP
4992 src/timesync/timesyncd-manager.c \
4993 src/timesync/timesyncd-manager.h \
4994 src/timesync/timesyncd-conf.c \
4995 src/timesync/timesyncd-conf.h \
4996 src/timesync/timesyncd-server.c \
4997 src/timesync/timesyncd-server.h
e8af6973
LP
4998
4999nodist_systemd_timesyncd_SOURCES = \
5000 src/timesync/timesyncd-gperf.c
5001
687ed123 5002systemd_timesyncd_LDADD = \
e0e5ce23 5003 libsystemd-network.la \
cc8b113e
FS
5004 libsystemd-shared.la \
5005 -lm
687ed123 5006
a91df40e 5007rootlibexec_PROGRAMS += \
687ed123 5008 systemd-timesyncd
a91df40e
KS
5009
5010nodist_systemunit_DATA += \
5011 units/systemd-timesyncd.service
5012
32104125 5013GENERAL_ALIASES += \
e9b11a84 5014 $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
32104125 5015
e8af6973
LP
5016nodist_pkgsysconf_DATA += \
5017 src/timesync/timesyncd.conf
5018
f4747733
EV
5019endif
5020
5021gperf_gperf_sources += \
5022 src/timesync/timesyncd-gperf.gperf
5023
e8af6973 5024EXTRA_DIST += \
f4747733 5025 units/systemd-timesyncd.service.in \
e8af6973 5026 src/timesync/timesyncd.conf.in
687ed123 5027
2abb5b3b
ZJS
5028# ------------------------------------------------------------------------------
5029test_nss_SOURCES = \
5030 src/test/test-nss.c
5031
5032test_nss_LDADD = \
5033 libsystemd-internal.la \
cc8b113e 5034 libbasic.la \
2abb5b3b
ZJS
5035 -ldl
5036
b7b61747 5037manual_tests += \
2abb5b3b
ZJS
5038 test-nss
5039
409093fe
LP
5040# ------------------------------------------------------------------------------
5041libnss_systemd_la_SOURCES = \
5042 src/nss-systemd/nss-systemd.sym \
5043 src/nss-systemd/nss-systemd.c
5044
5045libnss_systemd_la_LDFLAGS = \
5046 $(AM_LDFLAGS) \
5047 -module \
5048 -export-dynamic \
5049 -avoid-version \
5050 -shared \
5051 -shrext .so.2 \
5052 -Wl,--version-script=$(top_srcdir)/src/nss-systemd/nss-systemd.sym
5053
5054libnss_systemd_la_LIBADD = \
5055 libsystemd-internal.la \
5056 libbasic.la
5057
af0a10bf 5058rootlib_LTLIBRARIES += \
409093fe
LP
5059 libnss_systemd.la
5060
687ed123 5061# ------------------------------------------------------------------------------
4caf4ac1
KS
5062if HAVE_MYHOSTNAME
5063libnss_myhostname_la_SOURCES = \
947127ff 5064 src/nss-myhostname/nss-myhostname.sym \
e80af1bd 5065 src/nss-myhostname/nss-myhostname.c
4caf4ac1 5066
4caf4ac1
KS
5067libnss_myhostname_la_LDFLAGS = \
5068 $(AM_LDFLAGS) \
5069 -module \
5070 -export-dynamic \
5071 -avoid-version \
5072 -shared \
947127ff
LP
5073 -shrext .so.2 \
5074 -Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
4caf4ac1 5075
d1ca51b1 5076libnss_myhostname_la_LIBADD = \
cc8b113e
FS
5077 libsystemd-internal.la \
5078 libbasic.la
d1ca51b1 5079
af0a10bf 5080rootlib_LTLIBRARIES += \
4caf4ac1 5081 libnss_myhostname.la
4caf4ac1
KS
5082endif
5083
1ee306e1
LP
5084# ------------------------------------------------------------------------------
5085if ENABLE_MACHINED
5086systemd_machined_SOURCES = \
5087 src/machine/machined.c \
a8b409db
ZJS
5088 src/machine/machined.h
5089
a8b409db 5090systemd_machined_LDADD = \
a095315b 5091 libmachine-core.la
a8b409db
ZJS
5092
5093rootlibexec_PROGRAMS += \
5094 systemd-machined
5095
a095315b 5096libmachine_core_la_SOURCES = \
1ee306e1
LP
5097 src/machine/machine.c \
5098 src/machine/machine.h \
cd61c3bf 5099 src/machine/machined-dbus.c \
ebeccf9e 5100 src/machine/machine-dbus.c \
69c4e277 5101 src/machine/machine-dbus.h \
003dffde 5102 src/machine/image-dbus.c \
56599585
LP
5103 src/machine/image-dbus.h \
5104 src/machine/operation.c \
5105 src/machine/operation.h
1ee306e1 5106
a095315b 5107libmachine_core_la_LIBADD = \
cc8b113e 5108 libsystemd-shared.la
1ee306e1 5109
a8b409db 5110noinst_LTLIBRARIES += \
a095315b 5111 libmachine-core.la
1ee306e1
LP
5112
5113machinectl_SOURCES = \
5114 src/machine/machinectl.c
5115
1ee306e1 5116machinectl_LDADD = \
cc8b113e 5117 libsystemd-shared.la
1ee306e1
LP
5118
5119rootbin_PROGRAMS += \
5120 machinectl
5121
a8b409db
ZJS
5122test_machine_tables_SOURCES = \
5123 src/machine/test-machine-tables.c
5124
a8b409db 5125test_machine_tables_LDADD = \
a095315b 5126 libmachine-core.la
a8b409db
ZJS
5127
5128tests += \
5129 test-machine-tables
5130
1ee306e1
LP
5131nodist_systemunit_DATA += \
5132 units/systemd-machined.service
5133
5134dist_systemunit_DATA += \
36e46fe9
MB
5135 units/machine.slice
5136
5137dist_systemunit_DATA_busnames += \
cde360cd 5138 units/org.freedesktop.machine1.busname
1ee306e1
LP
5139
5140dist_dbussystemservice_DATA += \
5141 src/machine/org.freedesktop.machine1.service
5142
5143dist_dbuspolicy_DATA += \
5144 src/machine/org.freedesktop.machine1.conf
5145
d04c1fb8
LP
5146polkitpolicy_files += \
5147 src/machine/org.freedesktop.machine1.policy
5148
17163897
ZJS
5149dist_bashcompletion_data += \
5150 shell-completion/bash/machinectl
5151
5152dist_zshcompletion_data += \
d895500c
WH
5153 shell-completion/zsh/_machinectl \
5154 shell-completion/zsh/_sd_machines
439b7ce8 5155
1ee306e1
LP
5156SYSTEM_UNIT_ALIASES += \
5157 systemd-machined.service dbus-org.freedesktop.machine1.service
5158
cde360cd
LP
5159BUSNAMES_TARGET_WANTS += \
5160 org.freedesktop.machine1.busname
5161
cabb0bc6
LP
5162libnss_mymachines_la_SOURCES = \
5163 src/nss-mymachines/nss-mymachines.sym \
5164 src/nss-mymachines/nss-mymachines.c
5165
5166libnss_mymachines_la_LDFLAGS = \
5167 $(AM_LDFLAGS) \
5168 -module \
5169 -export-dynamic \
5170 -avoid-version \
5171 -shared \
5172 -shrext .so.2 \
5173 -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
5174
5175libnss_mymachines_la_LIBADD = \
cc8b113e
FS
5176 libsystemd-internal.la \
5177 libbasic.la
cabb0bc6 5178
af0a10bf 5179rootlib_LTLIBRARIES += \
cabb0bc6 5180 libnss_mymachines.la
72648326 5181
3d7415f4
LP
5182endif
5183
3712e124
MP
5184polkitpolicy_in_files += \
5185 src/machine/org.freedesktop.machine1.policy.in
5186
e37f6d61
MP
5187EXTRA_DIST += \
5188 units/systemd-machined.service.in
5189
3d7415f4
LP
5190# ------------------------------------------------------------------------------
5191if ENABLE_IMPORTD
5192
72648326 5193if HAVE_LIBCURL
85dbc41d
LP
5194if HAVE_XZ
5195if HAVE_ZLIB
8af3cf74 5196if HAVE_BZIP2
85dbc41d 5197if HAVE_GCRYPT
72648326 5198
3d7415f4
LP
5199rootlibexec_PROGRAMS += \
5200 systemd-importd \
b6e676ce 5201 systemd-pull \
587fec42
LP
5202 systemd-import \
5203 systemd-export
72648326 5204
3d7415f4 5205systemd_importd_SOURCES = \
ff828763 5206 src/import/importd.c
3d7415f4
LP
5207
5208systemd_importd_CFLAGS = \
5209 $(AM_CFLAGS) \
b6e676ce 5210 -D SYSTEMD_PULL_PATH=\"$(rootlibexecdir)/systemd-pull\" \
587fec42
LP
5211 -D SYSTEMD_IMPORT_PATH=\"$(rootlibexecdir)/systemd-import\" \
5212 -D SYSTEMD_EXPORT_PATH=\"$(rootlibexecdir)/systemd-export\"
3d7415f4
LP
5213
5214systemd_importd_LDADD = \
cc8b113e 5215 libsystemd-shared.la
3d7415f4 5216
ff828763
LP
5217systemd_pull_SOURCES = \
5218 src/import/pull.c \
dc2c282b
LP
5219 src/import/pull-raw.c \
5220 src/import/pull-raw.h \
5221 src/import/pull-tar.c \
5222 src/import/pull-tar.h \
dc2c282b
LP
5223 src/import/pull-job.c \
5224 src/import/pull-job.h \
5225 src/import/pull-common.c \
5226 src/import/pull-common.h \
b6e676ce
LP
5227 src/import/import-common.c \
5228 src/import/import-common.h \
3e2cda69
LP
5229 src/import/import-compress.c \
5230 src/import/import-compress.h \
72648326
LP
5231 src/import/curl-util.c \
5232 src/import/curl-util.h \
edce2aed
LP
5233 src/import/qcow2-util.c \
5234 src/import/qcow2-util.h
72648326 5235
ff828763 5236systemd_pull_CFLAGS = \
72648326 5237 $(AM_CFLAGS) \
49bb233b 5238 $(LIBCURL_CFLAGS) \
edce2aed 5239 $(XZ_CFLAGS) \
85dbc41d 5240 $(ZLIB_CFLAGS) \
3576d631
LP
5241 $(GCRYPT_CFLAGS) \
5242 -D VENDOR_KEYRING_PATH=\"$(rootlibexecdir)/import-pubring.gpg\" \
5243 -D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\"
72648326 5244
ff828763 5245systemd_pull_LDADD = \
cc8b113e 5246 libsystemd-shared.la \
49bb233b 5247 $(LIBCURL_LIBS) \
edce2aed 5248 $(XZ_LIBS) \
85dbc41d 5249 $(ZLIB_LIBS) \
8af3cf74 5250 -lbz2 \
85dbc41d 5251 $(GCRYPT_LIBS)
edce2aed 5252
b6e676ce
LP
5253systemd_import_SOURCES = \
5254 src/import/import.c \
5255 src/import/import-raw.c \
5256 src/import/import-raw.h \
5257 src/import/import-tar.c \
5258 src/import/import-tar.h \
5259 src/import/import-common.c \
5260 src/import/import-common.h \
5261 src/import/import-compress.c \
5262 src/import/import-compress.h \
5263 src/import/qcow2-util.c \
5264 src/import/qcow2-util.h
5265
5266systemd_import_CFLAGS = \
5267 $(AM_CFLAGS) \
5268 $(XZ_CFLAGS) \
5269 $(ZLIB_CFLAGS)
5270
5271systemd_import_LDADD = \
cc8b113e 5272 libsystemd-shared.la \
b6e676ce
LP
5273 $(XZ_LIBS) \
5274 $(ZLIB_LIBS) \
5275 -lbz2
5276
587fec42
LP
5277systemd_export_SOURCES = \
5278 src/import/export.c \
5279 src/import/export-tar.c \
5280 src/import/export-tar.h \
5281 src/import/export-raw.c \
5282 src/import/export-raw.h \
5283 src/import/import-common.c \
5284 src/import/import-common.h \
5285 src/import/import-compress.c \
5286 src/import/import-compress.h
5287
5288systemd_export_CFLAGS = \
5289 $(AM_CFLAGS) \
5290 $(XZ_CFLAGS) \
5291 $(ZLIB_CFLAGS)
5292
5293systemd_export_LDADD = \
cc8b113e 5294 libsystemd-shared.la \
587fec42
LP
5295 $(XZ_LIBS) \
5296 $(ZLIB_LIBS) \
5297 -lbz2
5298
b30bf55d 5299dist_rootlibexec_DATA += \
3d7415f4
LP
5300 src/import/import-pubring.gpg
5301
5302nodist_systemunit_DATA += \
5303 units/systemd-importd.service
5304
3d7415f4
LP
5305dist_systemunit_DATA_busnames += \
5306 units/org.freedesktop.import1.busname
5307
5308BUSNAMES_TARGET_WANTS += \
5309 org.freedesktop.import1.busname
5310
5311SYSTEM_UNIT_ALIASES += \
5312 systemd-importd.service dbus-org.freedesktop.import1.service
5313
5314dist_dbussystemservice_DATA += \
5315 src/import/org.freedesktop.import1.service
5316
5317dist_dbuspolicy_DATA += \
5318 src/import/org.freedesktop.import1.conf
5319
5320polkitpolicy_files += \
5321 src/import/org.freedesktop.import1.policy
5322
edce2aed
LP
5323manual_tests += \
5324 test-qcow2
5325
5326test_qcow2_SOURCES = \
5327 src/import/test-qcow2.c \
5328 src/import/qcow2-util.c \
5329 src/import/qcow2-util.h
5330
5331test_qcow2_CFLAGS = \
5332 $(AM_CFLAGS) \
5333 $(ZLIB_CFLAGS)
5334
5335test_qcow2_LDADD = \
cc8b113e 5336 libsystemd-shared.la \
edce2aed 5337 $(ZLIB_LIBS)
3576d631 5338
72648326 5339endif
85dbc41d
LP
5340endif
5341endif
5342endif
8af3cf74 5343endif
72648326 5344
1ee306e1
LP
5345endif
5346
3712e124
MP
5347polkitpolicy_in_files += \
5348 src/import/org.freedesktop.import1.policy.in
5349
e37f6d61 5350EXTRA_DIST += \
2b442ac8 5351 units/systemd-importd.service.in
e37f6d61
MP
5352
5353
091a364c
TG
5354# ------------------------------------------------------------------------------
5355if ENABLE_RESOLVED
2b442ac8 5356
6d99904f
ZJS
5357basic_dns_sources = \
5358 src/resolve/resolved-dns-dnssec.c \
5359 src/resolve/resolved-dns-dnssec.h \
5360 src/resolve/resolved-dns-packet.c \
5361 src/resolve/resolved-dns-packet.h \
5362 src/resolve/resolved-dns-rr.c \
5363 src/resolve/resolved-dns-rr.h \
5364 src/resolve/resolved-dns-answer.c \
5365 src/resolve/resolved-dns-answer.h \
5366 src/resolve/resolved-dns-question.c \
5367 src/resolve/resolved-dns-question.h \
5368 src/resolve/dns-type.c \
5369 src/resolve/dns-type.h
5370
091a364c 5371systemd_resolved_SOURCES = \
091a364c 5372 src/resolve/resolved.c \
74b2466e 5373 src/resolve/resolved-manager.c \
39d8db04 5374 src/resolve/resolved-manager.h \
4e945a6f
LP
5375 src/resolve/resolved-conf.c \
5376 src/resolve/resolved-conf.h \
f8dc7e34
LP
5377 src/resolve/resolved-resolv-conf.c \
5378 src/resolve/resolved-resolv-conf.h \
74b2466e 5379 src/resolve/resolved-bus.c \
39d8db04 5380 src/resolve/resolved-bus.h \
74b2466e
LP
5381 src/resolve/resolved-link.h \
5382 src/resolve/resolved-link.c \
3abaabda
LP
5383 src/resolve/resolved-link-bus.c \
5384 src/resolve/resolved-link-bus.h \
5f402ae8
DM
5385 src/resolve/resolved-llmnr.h \
5386 src/resolve/resolved-llmnr.c \
bc7702b0
DM
5387 src/resolve/resolved-mdns.h \
5388 src/resolve/resolved-mdns.c \
51323288 5389 src/resolve/resolved-def.h \
6d99904f 5390 $(basic_dns_sources) \
74b2466e
LP
5391 src/resolve/resolved-dns-query.h \
5392 src/resolve/resolved-dns-query.c \
839a4a20
LP
5393 src/resolve/resolved-dns-synthesize.h \
5394 src/resolve/resolved-dns-synthesize.c \
ec2c5e43
LP
5395 src/resolve/resolved-dns-transaction.h \
5396 src/resolve/resolved-dns-transaction.c \
74b2466e
LP
5397 src/resolve/resolved-dns-scope.h \
5398 src/resolve/resolved-dns-scope.c \
5399 src/resolve/resolved-dns-server.h \
5400 src/resolve/resolved-dns-server.c \
a51c1048
LP
5401 src/resolve/resolved-dns-search-domain.h \
5402 src/resolve/resolved-dns-search-domain.c \
322345fd 5403 src/resolve/resolved-dns-cache.h \
623a4c97
LP
5404 src/resolve/resolved-dns-cache.c \
5405 src/resolve/resolved-dns-zone.h \
5406 src/resolve/resolved-dns-zone.c \
5407 src/resolve/resolved-dns-stream.h \
7263f724 5408 src/resolve/resolved-dns-stream.c \
0d2cd476
LP
5409 src/resolve/resolved-dns-trust-anchor.h \
5410 src/resolve/resolved-dns-trust-anchor.c \
b30bf55d
LP
5411 src/resolve/resolved-dns-stub.h \
5412 src/resolve/resolved-dns-stub.c \
dd0bc0f1
LP
5413 src/resolve/resolved-etc-hosts.h \
5414 src/resolve/resolved-etc-hosts.c \
91e023d8
ZJS
5415 src/shared/gcrypt-util.c \
5416 src/shared/gcrypt-util.h
f884afb2 5417
091a364c 5418nodist_systemd_resolved_SOURCES = \
ee3c31bf
MAP
5419 src/resolve/dns_type-from-name.h \
5420 src/resolve/dns_type-to-name.h \
091a364c
TG
5421 src/resolve/resolved-gperf.c
5422
cc8b113e
FS
5423systemd_resolved_CFLAGS = \
5424 $(AM_CFLAGS) \
5425 $(GCRYPT_CFLAGS)
5426
091a364c 5427systemd_resolved_LDADD = \
ffcf82d2 5428 libsystemd-network.la \
cc8b113e
FS
5429 libsystemd-shared.la \
5430 $(GCRYPT_LIBS) \
5431 -lm
091a364c
TG
5432
5433rootlibexec_PROGRAMS += \
5434 systemd-resolved
5435
5436nodist_systemunit_DATA += \
5437 units/systemd-resolved.service
5438
36e46fe9 5439dist_systemunit_DATA_busnames += \
b7e6c03d
KS
5440 units/org.freedesktop.resolve1.busname
5441
18641cb1
KS
5442dist_dbuspolicy_DATA += \
5443 src/resolve/org.freedesktop.resolve1.conf
5444
5445dist_dbussystemservice_DATA += \
5446 src/resolve/org.freedesktop.resolve1.service
5447
b7e6c03d
KS
5448SYSTEM_UNIT_ALIASES += \
5449 systemd-resolved.service dbus-org.freedesktop.resolve1.service
5450
5451BUSNAMES_TARGET_WANTS += \
5452 org.freedesktop.resolve1.busname
5453
091a364c
TG
5454GENERAL_ALIASES += \
5455 $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
5456
5457nodist_pkgsysconf_DATA += \
5458 src/resolve/resolved.conf
5459
4d1cf1e2
LP
5460libnss_resolve_la_SOURCES = \
5461 src/nss-resolve/nss-resolve.sym \
5462 src/nss-resolve/nss-resolve.c
5463
5464libnss_resolve_la_LDFLAGS = \
5465 $(AM_LDFLAGS) \
5466 -module \
5467 -export-dynamic \
5468 -avoid-version \
5469 -shared \
5470 -shrext .so.2 \
5471 -Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
5472
5473libnss_resolve_la_LIBADD = \
8c78165d 5474 libsystemd-internal.la \
cc8b113e 5475 libbasic.la \
e97379de 5476 -ldl
4d1cf1e2 5477
af0a10bf 5478rootlib_LTLIBRARIES += \
4d1cf1e2
LP
5479 libnss_resolve.la
5480
b5eb973b
LP
5481systemd_resolve_SOURCES = \
5482 src/resolve/resolve-tool.c \
6d99904f 5483 $(basic_dns_sources) \
4ac2ca1b
ZJS
5484 src/shared/gcrypt-util.c \
5485 src/shared/gcrypt-util.h
ee3c31bf 5486
b5eb973b 5487nodist_systemd_resolve_SOURCES = \
7263f724
ZJS
5488 src/resolve/dns_type-from-name.h \
5489 src/resolve/dns_type-to-name.h
bdef7319 5490
cc8b113e
FS
5491systemd_resolve_CFLAGS = \
5492 $(AM_CFLAGS) \
5493 $(GCRYPT_CFLAGS)
5494
b5eb973b 5495systemd_resolve_LDADD = \
cc8b113e
FS
5496 libsystemd-shared.la \
5497 $(GCRYPT_LIBS) \
5498 -lm
bdef7319 5499
6c38b6c0 5500bin_PROGRAMS += \
b5eb973b 5501 systemd-resolve
bdef7319 5502
e81eb287
ZJS
5503dist_bashcompletion_data += \
5504 shell-completion/bash/systemd-resolve
5505
5506dist_zshcompletion_data += \
5507 shell-completion/zsh/_systemd-resolve
5508
2b442ac8 5509tests += \
e49a8dcc
FB
5510 test-dns-packet \
5511 test-resolve-tables \
2b442ac8
LP
5512 test-dnssec
5513
412577e3
LP
5514manual_tests += \
5515 test-dnssec-complex
5516
6d99904f
ZJS
5517test_resolve_tables_SOURCES = \
5518 src/resolve/test-resolve-tables.c \
5519 src/resolve/dns_type-from-name.h \
5520 src/resolve/dns_type-to-name.h \
5521 $(basic_dns_sources) \
5522 src/shared/test-tables.h
5523
cc8b113e
FS
5524test_resolve_tables_CFLAGS = \
5525 $(AM_CFLAGS) \
5526 $(GCRYPT_CFLAGS)
5527
6d99904f 5528test_resolve_tables_LDADD = \
cc8b113e
FS
5529 libsystemd-shared.la \
5530 $(GCRYPT_LIBS) \
5531 -lm
6d99904f
ZJS
5532
5533test_dns_packet_SOURCES = \
5534 src/resolve/test-dns-packet.c \
5535 $(basic_dns_sources)
5536
fff85dbe
ZJS
5537test_dns_packet_CPPFLAGS = \
5538 $(AM_CPPFLAGS) \
5539 -DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\"
5540
cc8b113e
FS
5541test_dns_packet_CFLAGS = \
5542 $(AM_CFLAGS) \
5543 $(GCRYPT_CFLAGS)
5544
6d99904f 5545test_dns_packet_LDADD = \
cc8b113e
FS
5546 libsystemd-shared.la \
5547 $(GCRYPT_LIBS) \
5548 -lm
6d99904f
ZJS
5549
5550EXTRA_DIST += \
5551 src/resolve/test-data/_openpgpkey.fedoraproject.org.pkts \
5552 src/resolve/test-data/fedoraproject.org.pkts \
5553 src/resolve/test-data/gandi.net.pkts \
5554 src/resolve/test-data/google.com.pkts \
5555 src/resolve/test-data/root.pkts \
5556 src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
5557 src/resolve/test-data/teamits.com.pkts \
fa45182e
ZJS
5558 src/resolve/test-data/zbyszek@fedoraproject.org.pkts \
5559 src/resolve/test-data/_443._tcp.fedoraproject.org.pkts \
718af59e
ZJS
5560 src/resolve/test-data/kyhwana.org.pkts \
5561 src/resolve/test-data/fake-caa.pkts
6d99904f 5562
2b442ac8
LP
5563test_dnssec_SOURCES = \
5564 src/resolve/test-dnssec.c \
6d99904f 5565 $(basic_dns_sources)
2b442ac8 5566
cc8b113e
FS
5567test_dnssec_CFLAGS = \
5568 $(AM_CFLAGS) \
5569 $(GCRYPT_CFLAGS)
5570
2b442ac8 5571test_dnssec_LDADD = \
cc8b113e
FS
5572 libsystemd-shared.la \
5573 $(GCRYPT_LIBS) \
5574 -lm
2b442ac8 5575
412577e3
LP
5576test_dnssec_complex_SOURCES = \
5577 src/resolve/test-dnssec-complex.c \
5578 src/resolve/dns-type.c \
5579 src/resolve/dns-type.h
5580
5581test_dnssec_complex_LDADD = \
cc8b113e 5582 libsystemd-shared.la
412577e3 5583
2b442ac8 5584endif
091a364c 5585
955c5010
EV
5586gperf_txt_sources += \
5587 src/resolve/dns_type-list.txt
5588
5589gperf_gperf_sources += \
5590 src/resolve/resolved-gperf.gperf
5591
e37f6d61 5592EXTRA_DIST += \
2b442ac8
LP
5593 units/systemd-resolved.service.m4.in \
5594 src/resolve/resolved.conf.in
e37f6d61 5595
b30bf55d
LP
5596dist_rootlibexec_DATA += \
5597 src/resolve/resolv.conf
5598
f579559b 5599# ------------------------------------------------------------------------------
3c9317d2 5600if ENABLE_NETWORKD
f579559b
TG
5601rootlibexec_PROGRAMS += \
5602 systemd-networkd
5603
5604systemd_networkd_SOURCES = \
911f4d4d
TG
5605 src/network/networkd.c
5606
5607systemd_networkd_LDADD = \
8c8302a6 5608 libnetworkd-core.la
911f4d4d 5609
5a8bcb67
LP
5610if HAVE_LIBIPTC
5611systemd_networkd_LDADD += \
a095315b 5612 libfirewall.la
5a8bcb67
LP
5613endif
5614
911f4d4d 5615noinst_LTLIBRARIES += \
a095315b 5616 libnetworkd-core.la
911f4d4d 5617
a095315b 5618libnetworkd_core_la_CFLAGS = \
bddfc8af 5619 $(AM_CFLAGS)
679be2a7 5620
a095315b 5621libnetworkd_core_la_SOURCES = \
3a67e927 5622 src/libsystemd-network/network-internal.h \
441e9ae4
TG
5623 src/network/netdev/netdev.h \
5624 src/network/netdev/netdev.c \
5625 src/network/netdev/vrf.h \
5626 src/network/netdev/vrf.c \
5627 src/network/netdev/tunnel.h \
5628 src/network/netdev/tunnel.c \
5629 src/network/netdev/veth.h \
5630 src/network/netdev/veth.c \
5631 src/network/netdev/vxlan.h \
5632 src/network/netdev/vxlan.c \
5633 src/network/netdev/vlan.h \
5634 src/network/netdev/vlan.c \
5635 src/network/netdev/macvlan.h \
5636 src/network/netdev/macvlan.c \
5637 src/network/netdev/ipvlan.h \
5638 src/network/netdev/ipvlan.c \
5639 src/network/netdev/dummy.h \
5640 src/network/netdev/dummy.c \
5641 src/network/netdev/tuntap.h \
5642 src/network/netdev/tuntap.c \
5643 src/network/netdev/bond.h \
5644 src/network/netdev/bond.c \
5645 src/network/netdev/bridge.h \
5646 src/network/netdev/bridge.c \
5647 src/network/netdev/vcan.h \
5648 src/network/netdev/vcan.c \
23f53b99
TG
5649 src/network/networkd-manager.h \
5650 src/network/networkd-manager.c \
5651 src/network/networkd-manager-bus.c \
5652 src/network/networkd-conf.h \
5653 src/network/networkd-conf.c \
5654 src/network/networkd-link.h \
5655 src/network/networkd-link.c \
e331e246 5656 src/network/networkd-link-bus.c \
b22d8a00 5657 src/network/networkd-ipv4ll.c \
3c9b8860 5658 src/network/networkd-dhcp4.c \
5c79bd79 5659 src/network/networkd-dhcp6.c \
1e7a0e21 5660 src/network/networkd-ndisc.h \
a13c50e7 5661 src/network/networkd-ndisc.c \
fc2f9534 5662 src/network/networkd-network.h \
f579559b 5663 src/network/networkd-network.c \
3175fcde 5664 src/network/networkd-network-bus.c \
fc2f9534 5665 src/network/networkd-address.h \
f579559b 5666 src/network/networkd-address.c \
fc2f9534 5667 src/network/networkd-route.h \
f579559b 5668 src/network/networkd-route.c \
fc2f9534 5669 src/network/networkd-fdb.h \
b98b483b 5670 src/network/networkd-fdb.c \
13b498f9
TJ
5671 src/network/networkd-brvlan.h \
5672 src/network/networkd-brvlan.c \
fc2f9534
LP
5673 src/network/networkd-address-pool.h \
5674 src/network/networkd-address-pool.c \
5675 src/network/networkd-util.h \
8e1ad1ea
LP
5676 src/network/networkd-util.c \
5677 src/network/networkd-lldp-tx.h \
5678 src/network/networkd-lldp-tx.c
f579559b 5679
a095315b 5680nodist_libnetworkd_core_la_SOURCES = \
413708d1 5681 src/network/networkd-gperf.c \
c0dda186 5682 src/network/networkd-network-gperf.c \
441e9ae4 5683 src/network/netdev/netdev-gperf.c
f579559b 5684
a095315b 5685libnetworkd_core_la_LIBADD = \
fe8db0c5 5686 libsystemd-network.la \
cc8b113e 5687 libsystemd-shared.la
f579559b 5688
020d5900
TG
5689rootlibexec_PROGRAMS += \
5690 systemd-networkd-wait-online
5691
679be2a7 5692systemd_networkd_wait_online_CFLAGS = \
bddfc8af 5693 $(AM_CFLAGS)
679be2a7 5694
020d5900 5695systemd_networkd_wait_online_SOURCES = \
3a67e927 5696 src/libsystemd-network/network-internal.h \
c5fcf6e4
TG
5697 src/network/wait-online/link.h \
5698 src/network/wait-online/link.c \
5699 src/network/wait-online/manager.h \
5700 src/network/wait-online/manager.c \
5701 src/network/wait-online/wait-online.c
3a67e927 5702
020d5900 5703systemd_networkd_wait_online_LDADD = \
d38cbe1b 5704 libsystemd-network.la \
cc8b113e 5705 libsystemd-shared.la
020d5900 5706
ee8c4568
LP
5707rootbin_PROGRAMS += \
5708 networkctl
5709
5710networkctl_SOURCES = \
5711 src/network/networkctl.c
5712
5713networkctl_LDADD = \
cc8b113e 5714 libsystemd-shared.la \
ee8c4568
LP
5715 libsystemd-network.la
5716
17163897 5717dist_bashcompletion_data += \
e7035a47 5718 shell-completion/bash/networkctl
e7035a47 5719
c41aa4b4
ZJS
5720test_networkd_conf_SOURCES = \
5721 src/network/test-networkd-conf.c
5722
5723test_networkd_conf_LDADD = \
5724 libnetworkd-core.la
5725
f579559b 5726test_network_SOURCES = \
911f4d4d 5727 src/network/test-network.c
f579559b
TG
5728
5729test_network_LDADD = \
8c8302a6 5730 libnetworkd-core.la
f579559b 5731
5a8bcb67
LP
5732if HAVE_LIBIPTC
5733test_network_LDADD += \
a095315b 5734 libfirewall.la
5a8bcb67
LP
5735endif
5736
86bbe5bf
ZJS
5737test_network_tables_SOURCES = \
5738 src/network/test-network-tables.c \
5739 src/shared/test-tables.h
5740
5741test_network_tables_LDADD = \
a095315b 5742 libnetworkd-core.la \
86bbe5bf
ZJS
5743 libudev-core.la
5744
6ca5708a
KS
5745if HAVE_LIBIPTC
5746test_network_tables_LDADD += \
a095315b 5747 libfirewall.la
6ca5708a
KS
5748endif
5749
cde93897 5750tests += \
c41aa4b4 5751 test-networkd-conf \
86bbe5bf
ZJS
5752 test-network \
5753 test-network-tables
f579559b 5754
36c95795
ZJS
5755dist_systemunit_DATA += \
5756 units/systemd-networkd.socket
5757
2dcf7ec6
TG
5758nodist_systemunit_DATA += \
5759 units/systemd-networkd.service \
5760 units/systemd-networkd-wait-online.service
5761
e331e246
TG
5762dist_systemunit_DATA_busnames += \
5763 units/org.freedesktop.network1.busname
5764
5765dist_dbussystemservice_DATA += \
5766 src/network/org.freedesktop.network1.service
5767
5768dist_dbuspolicy_DATA += \
5769 src/network/org.freedesktop.network1.conf
5770
2dcf7ec6 5771GENERAL_ALIASES += \
5544ee85 5772 $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \
2dcf7ec6 5773 $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
bfa501e1 5774 $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
2dcf7ec6 5775
23cb977a
TG
5776SYSTEM_UNIT_ALIASES += \
5777 systemd-networkd.service dbus-org.freedesktop.network1.service
5778
5779BUSNAMES_TARGET_WANTS += \
5780 org.freedesktop.network1.busname
5781
2c99aba7
MP
5782polkitrules_files += \
5783 src/network/systemd-networkd.rules
5784
5785polkitpkla_files += \
5786 src/network/systemd-networkd.pkla
5787
f4747733
EV
5788endif
5789
9e4ded30 5790gperf_gperf_sources += \
413708d1 5791 src/network/networkd-gperf.gperf \
c0dda186 5792 src/network/networkd-network-gperf.gperf \
441e9ae4 5793 src/network/netdev/netdev-gperf.gperf
9e4ded30
ZJS
5794
5795EXTRA_DIST += \
2c99aba7
MP
5796 src/network/systemd-networkd.rules \
5797 src/network/systemd-networkd.pkla \
b5acb956 5798 units/systemd-networkd.service.m4.in \
4ddb85b1
MP
5799 units/systemd-networkd-wait-online.service.in \
5800 test/networkd-test.py
f579559b 5801
48d437bb
KS
5802# ------------------------------------------------------------------------------
5803if ENABLE_LOGIND
5804systemd_logind_SOURCES = \
5805 src/login/logind.c \
a8b409db
ZJS
5806 src/login/logind.h
5807
5808nodist_systemd_logind_SOURCES = \
5809 src/login/logind-gperf.c
5810
a8b409db 5811systemd_logind_LDADD = \
a095315b 5812 liblogind-core.la
a8b409db 5813
a095315b 5814liblogind_core_la_SOURCES = \
2b3ab29d 5815 src/login/logind-core.c \
48d437bb 5816 src/login/logind-device.c \
69dd4165 5817 src/login/logind-device.h \
069cfc85
LP
5818 src/login/logind-button.c \
5819 src/login/logind-button.h \
23406ce5
LP
5820 src/login/logind-action.c \
5821 src/login/logind-action.h \
48d437bb 5822 src/login/logind-seat.c \
69dd4165 5823 src/login/logind-seat.h \
48d437bb 5824 src/login/logind-session.c \
69dd4165 5825 src/login/logind-session.h \
118ecf32
DH
5826 src/login/logind-session-device.c \
5827 src/login/logind-session-device.h \
48d437bb 5828 src/login/logind-user.c \
69dd4165 5829 src/login/logind-user.h \
f8e2fb7b
LP
5830 src/login/logind-inhibit.c \
5831 src/login/logind-inhibit.h \
718db961 5832 src/login/logind-dbus.c \
69dd4165
KS
5833 src/login/logind-session-dbus.c \
5834 src/login/logind-seat-dbus.c \
48d437bb 5835 src/login/logind-user-dbus.c \
e2fa5721 5836 src/login/logind-utmp.c \
58dfc42e 5837 src/login/logind-acl.h
8e274523 5838
a095315b 5839liblogind_core_la_LIBADD = \
cc8b113e 5840 libsystemd-shared.la
78b2e3a6 5841
2b3ab29d 5842if HAVE_ACL
a095315b 5843liblogind_core_la_SOURCES += \
2b3ab29d 5844 src/login/logind-acl.c
2b3ab29d
ZJS
5845endif
5846
a8b409db 5847noinst_LTLIBRARIES += \
a095315b 5848 liblogind-core.la
addab137 5849
48d437bb 5850rootlibexec_PROGRAMS += \
ea24d8d1 5851 systemd-logind
48d437bb 5852
169c4f65 5853loginctl_SOURCES = \
48d437bb 5854 src/login/loginctl.c \
8b169c0f 5855 src/login/sysfs-show.h \
f33d3ec1 5856 src/login/sysfs-show.c
139be57d 5857
169c4f65 5858loginctl_LDADD = \
cc8b113e 5859 libsystemd-shared.la
7e4249b9 5860
48d437bb 5861rootbin_PROGRAMS += \
169c4f65
LP
5862 loginctl
5863
17163897 5864dist_bashcompletion_data += \
d611dadc
MB
5865 shell-completion/bash/loginctl
5866
17163897 5867dist_zshcompletion_data += \
67e654f8
WG
5868 shell-completion/zsh/_loginctl \
5869 shell-completion/zsh/_systemd-inhibit
799d54be 5870
eecd1362
LP
5871systemd_inhibit_SOURCES = \
5872 src/login/inhibit.c
5873
eecd1362 5874systemd_inhibit_LDADD = \
cc8b113e 5875 libsystemd-shared.la
eecd1362
LP
5876
5877rootbin_PROGRAMS += \
5878 systemd-inhibit
5879
48d437bb 5880test_login_SOURCES = \
58dfc42e 5881 src/libsystemd/sd-login/test-login.c
48d437bb
KS
5882
5883test_login_LDADD = \
cc8b113e 5884 libsystemd-shared.la
4a2a8b5a 5885
35375afe
ZJS
5886test_login_shared_SOURCES = \
5887 src/login/test-login-shared.c
5888
5889test_login_shared_LDADD = \
cc8b113e 5890 libsystemd-shared.la
35375afe 5891
f8e2fb7b
LP
5892test_inhibit_SOURCES = \
5893 src/login/test-inhibit.c
5894
5895test_inhibit_LDADD = \
cc8b113e 5896 libsystemd-shared.la
f8e2fb7b 5897
a8b409db
ZJS
5898test_login_tables_SOURCES = \
5899 src/login/test-login-tables.c
5900
a8b409db 5901test_login_tables_LDADD = \
a095315b 5902 liblogind-core.la
a8b409db 5903
cee22bd3 5904manual_tests += \
f8e2fb7b
LP
5905 test-login \
5906 test-inhibit
490aed58 5907
a8b409db 5908tests += \
35375afe
ZJS
5909 test-login-tables \
5910 test-login-shared
a8b409db 5911
48d437bb
KS
5912if HAVE_PAM
5913pam_systemd_la_SOURCES = \
e09c69d9 5914 src/login/pam_systemd.sym \
dfb0c6cc 5915 src/login/pam_systemd.c
22be093f 5916
48d437bb
KS
5917pam_systemd_la_CFLAGS = \
5918 $(AM_CFLAGS) \
aac7c5ed 5919 $(PAM_CFLAGS)
22be093f 5920
48d437bb 5921pam_systemd_la_LDFLAGS = \
f7b6a32e 5922 $(AM_LDFLAGS) \
48d437bb
KS
5923 -module \
5924 -export-dynamic \
5925 -avoid-version \
5926 -shared \
e09c69d9 5927 -Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
48d437bb
KS
5928
5929pam_systemd_la_LIBADD = \
a095315b 5930 libshared.la \
b7739c77 5931 $(PAM_LIBS)
22be093f 5932
48d437bb
KS
5933pamlib_LTLIBRARIES = \
5934 pam_systemd.la
5c390a4a 5935
651742d8 5936if ENABLE_PAM_CONFIG
5c390a4a
ZJS
5937dist_pamconf_DATA = \
5938 src/login/systemd-user
651742d8 5939endif
83e7d885 5940
a13cff19
KS
5941EXTRA_DIST += \
5942 src/login/systemd-user.m4
48d437bb 5943endif
22be093f 5944
48d437bb 5945nodist_systemunit_DATA += \
ea24d8d1 5946 units/systemd-logind.service
ac34b3af
ZJS
5947
5948dist_systemunit_DATA += \
36e46fe9
MB
5949 units/user.slice
5950
5951dist_systemunit_DATA_busnames += \
cde360cd 5952 units/org.freedesktop.login1.busname
88213476 5953
48d437bb
KS
5954dist_dbussystemservice_DATA += \
5955 src/login/org.freedesktop.login1.service
88213476 5956
48d437bb
KS
5957dist_dbuspolicy_DATA += \
5958 src/login/org.freedesktop.login1.conf
88213476 5959
95365a57 5960nodist_pkgsysconf_DATA += \
18b754d3 5961 src/login/logind.conf
a8f11321 5962
299031ca
BK
5963polkitpolicy_files += \
5964 src/login/org.freedesktop.login1.policy
10e87ee7 5965
6ff39241
ZJS
5966INSTALL_DIRS += \
5967 $(systemdstatedir)
5968
5969MULTI_USER_TARGET_WANTS += \
ea24d8d1 5970 systemd-logind.service
6ff39241 5971
91e8651b
ZJS
5972SYSTEM_UNIT_ALIASES += \
5973 systemd-logind.service dbus-org.freedesktop.login1.service
490aed58 5974
cde360cd
LP
5975BUSNAMES_TARGET_WANTS += \
5976 org.freedesktop.login1.busname
5977
48d437bb 5978dist_udevrules_DATA += \
cc093337 5979 src/login/70-uaccess.rules \
069cfc85 5980 src/login/70-power-switch.rules
131a4dcf
KS
5981
5982nodist_udevrules_DATA += \
d7e1c95e 5983 src/login/71-seat.rules \
131a4dcf 5984 src/login/73-seat-late.rules
114a50f8 5985
299031ca
BK
5986endif
5987
5988polkitpolicy_in_files += \
5989 src/login/org.freedesktop.login1.policy.in
5990
9e4ded30
ZJS
5991gperf_gperf_sources += \
5992 src/login/logind-gperf.gperf
5993
48d437bb 5994EXTRA_DIST += \
d7e1c95e 5995 src/login/71-seat.rules.in \
131a4dcf 5996 src/login/73-seat-late.rules.in \
95365a57
ZJS
5997 units/systemd-logind.service.in \
5998 src/login/logind.conf.in
48d437bb 5999
48d437bb 6000# ------------------------------------------------------------------------------
83e7d885
ZJS
6001if HAVE_PAM
6002
6003systemd_user_sessions_SOURCES = \
6004 src/user-sessions/user-sessions.c
6005
6006systemd_user_sessions_LDADD = \
cc8b113e 6007 libsystemd-shared.la
83e7d885
ZJS
6008
6009rootlibexec_PROGRAMS += \
6010 systemd-user-sessions
6011
6012nodist_systemunit_DATA += \
6013 units/systemd-user-sessions.service
6014
83e7d885
ZJS
6015MULTI_USER_TARGET_WANTS += \
6016 systemd-user-sessions.service
6017
6018endif
6019
e37f6d61
MP
6020EXTRA_DIST += \
6021 units/systemd-user-sessions.service.in
6022
83e7d885 6023# ------------------------------------------------------------------------------
2c8849ad
KS
6024EXTRA_DIST += \
6025 test/Makefile \
6026 test/README.testsuite \
6027 test/TEST-01-BASIC \
6028 test/TEST-01-BASIC/Makefile \
6029 test/TEST-01-BASIC/test.sh \
6030 test/TEST-02-CRYPTSETUP \
6031 test/TEST-02-CRYPTSETUP/Makefile \
6032 test/TEST-02-CRYPTSETUP/test.sh \
6033 test/TEST-03-JOBS \
6034 test/TEST-03-JOBS/Makefile \
6035 test/TEST-03-JOBS/test-jobs.sh \
6036 test/TEST-03-JOBS/test.sh \
1c36b4a7
EV
6037 test/TEST-04-JOURNAL/Makefile \
6038 test/TEST-04-JOURNAL/test-journal.sh \
6039 test/TEST-04-JOURNAL/test.sh \
68a8f177
EV
6040 test/TEST-05-RLIMITS/Makefile \
6041 test/TEST-05-RLIMITS/test-rlimits.sh \
6042 test/TEST-05-RLIMITS/test.sh \
586bedd4
EV
6043 test/TEST-06-SELINUX/Makefile \
6044 test/TEST-06-SELINUX/test-selinux-checks.sh \
6045 test/TEST-06-SELINUX/test.sh \
6046 test/TEST-06-SELINUX/systemd_test.te \
6047 test/TEST-06-SELINUX/systemd_test.if \
09f6f45a
EV
6048 test/TEST-07-ISSUE-1981/Makefile \
6049 test/TEST-07-ISSUE-1981/test-segfault.sh \
6050 test/TEST-07-ISSUE-1981/test.sh \
52c0bed3
EV
6051 test/TEST-08-ISSUE-2730/Makefile \
6052 test/TEST-08-ISSUE-2730/test.sh \
6053 test/TEST-09-ISSUE-2691/Makefile \
6054 test/TEST-09-ISSUE-2691/test.sh \
33e40442
EV
6055 test/TEST-10-ISSUE-2467/Makefile \
6056 test/TEST-10-ISSUE-2467/test.sh \
0b2abe0f
EV
6057 test/TEST-11-ISSUE-3166/Makefile \
6058 test/TEST-11-ISSUE-3166/test.sh \
03ae6f7d
EV
6059 test/TEST-12-ISSUE-3171/Makefile \
6060 test/TEST-12-ISSUE-3171/test.sh \
c7934185 6061 test/TEST-13-NSPAWN-SMOKE/Makefile \
c7934185
EV
6062 test/TEST-13-NSPAWN-SMOKE/create-busybox-container \
6063 test/TEST-13-NSPAWN-SMOKE/test.sh \
2c8849ad
KS
6064 test/test-functions
6065
6066EXTRA_DIST += \
6067 test/loopy2.service \
6068 test/loopy3.service \
6069 test/loopy4.service \
6070 test/loopy.service \
6071 test/loopy.service.d \
6072 test/loopy.service.d/compat.conf
83e7d885 6073
8d7e170a 6074# ------------------------------------------------------------------------------
4e7b3c20 6075substitutions = \
d0790384 6076 '|rootlibdir=$(rootlibdir)|' \
4e7b3c20
ZJS
6077 '|rootlibexecdir=$(rootlibexecdir)|' \
6078 '|rootbindir=$(rootbindir)|' \
6079 '|bindir=$(bindir)|' \
6080 '|SYSTEMCTL=$(rootbindir)/systemctl|' \
6081 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
6082 '|pkgsysconfdir=$(pkgsysconfdir)|' \
6083 '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
6084 '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
6085 '|pkgdatadir=$(pkgdatadir)|' \
6086 '|systemunitdir=$(systemunitdir)|' \
6087 '|userunitdir=$(userunitdir)|' \
6088 '|systempresetdir=$(systempresetdir)|' \
6089 '|userpresetdir=$(userpresetdir)|' \
6090 '|udevhwdbdir=$(udevhwdbdir)|' \
6091 '|udevrulesdir=$(udevrulesdir)|' \
6092 '|catalogdir=$(catalogdir)|' \
6093 '|tmpfilesdir=$(tmpfilesdir)|' \
1b992147 6094 '|sysusersdir=$(sysusersdir)|' \
4e7b3c20 6095 '|sysctldir=$(sysctldir)|' \
d267e69d
ZJS
6096 '|systemgeneratordir=$(systemgeneratordir)|' \
6097 '|usergeneratordir=$(usergeneratordir)|' \
ad95fd1d 6098 '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
4e7b3c20
ZJS
6099 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
6100 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
6101 '|PACKAGE_URL=$(PACKAGE_URL)|' \
952d97ed 6102 '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
ef5bfcf6 6103 '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
4e7b3c20
ZJS
6104 '|prefix=$(prefix)|' \
6105 '|exec_prefix=$(exec_prefix)|' \
6106 '|libdir=$(libdir)|' \
6107 '|includedir=$(includedir)|' \
6108 '|VERSION=$(VERSION)|' \
6109 '|rootprefix=$(rootprefix)|' \
6110 '|udevlibexecdir=$(udevlibexecdir)|' \
6111 '|SUSHELL=$(SUSHELL)|' \
66b0e0e0 6112 '|SULOGIN=$(SULOGIN)|' \
4e7b3c20
ZJS
6113 '|DEBUGTTY=$(DEBUGTTY)|' \
6114 '|KILL=$(KILL)|' \
edeb68c5 6115 '|KMOD=$(KMOD)|' \
d31dd62b
FB
6116 '|MOUNT_PATH=$(MOUNT_PATH)|' \
6117 '|UMOUNT_PATH=$(UMOUNT_PATH)|' \
3d56f7df 6118 '|MKDIR_P=$(MKDIR_P)|' \
4e7b3c20
ZJS
6119 '|QUOTAON=$(QUOTAON)|' \
6120 '|QUOTACHECK=$(QUOTACHECK)|' \
6121 '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
6122 '|VARLOGDIR=$(varlogdir)|' \
6123 '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
6124 '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
6125 '|PYTHON=$(PYTHON)|' \
2dcf7ec6 6126 '|NTP_SERVERS=$(NTP_SERVERS)|' \
f7dc3ab9 6127 '|DNS_SERVERS=$(DNS_SERVERS)|' \
61ecb465 6128 '|DEFAULT_DNSSEC_MODE=$(DEFAULT_DNSSEC_MODE)|' \
95365a57 6129 '|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \
f7dc3ab9 6130 '|systemuidmax=$(SYSTEM_UID_MAX)|' \
f8b5d994 6131 '|systemgidmax=$(SYSTEM_GID_MAX)|' \
d4e85aac
LP
6132 '|TTY_GID=$(TTY_GID)|' \
6133 '|systemsleepdir=$(systemsleepdir)|' \
40af96f6 6134 '|systemshutdowndir=$(systemshutdowndir)|' \
d4e85aac
LP
6135 '|binfmtdir=$(binfmtdir)|' \
6136 '|modulesloaddir=$(modulesloaddir)|'
4e7b3c20 6137
5e6afdd3 6138SED_PROCESS = \
a00e4879 6139 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4e7b3c20 6140 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
96bd03d5 6141 < $< > $@
70fcff31 6142
dff55e5d 6143units/%: units/%.in
5e6afdd3
LP
6144 $(SED_PROCESS)
6145
dff55e5d 6146man/%: man/%.in
5e6afdd3 6147 $(SED_PROCESS)
f5e04665 6148
dff55e5d 6149sysctl.d/%: sysctl.d/%.in
f5e04665 6150 $(SED_PROCESS)
5e6afdd3 6151
dff55e5d 6152%.pc: %.pc.in
8c6db833
LP
6153 $(SED_PROCESS)
6154
ad95fd1d
ZJS
6155%.conf: %.conf.in
6156 $(SED_PROCESS)
6157
873e4133 6158src/core/%.systemd: src/core/%.systemd.in
590f18a2
LP
6159 $(SED_PROCESS)
6160
dff55e5d 6161src/%.policy.in: src/%.policy.in.in
25705583
LP
6162 $(SED_PROCESS)
6163
c0a67aef
ZJS
6164shell-completion/%: shell-completion/%.in
6165 $(SED_PROCESS)
6166
dff55e5d 6167%.rules: %.rules.in
0b191e60
LP
6168 $(SED_PROCESS)
6169
e8af6973
LP
6170%.conf: %.conf.in
6171 $(SED_PROCESS)
6172
dff55e5d 6173%.sh: %.sh.in
3e214785
KS
6174 $(SED_PROCESS)
6175 $(AM_V_GEN)chmod +x $@
6176
f975e971 6177src/%.c: src/%.gperf
bd923ff2 6178 $(AM_V_at)$(MKDIR_P) $(dir $@)
c8503a3e 6179 $(AM_V_GPERF)$(GPERF) < $< > $@
f975e971 6180
f3967584 6181src/%: src/%.m4 $(top_builddir)/config.status
bd923ff2 6182 $(AM_V_at)$(MKDIR_P) $(dir $@)
ebea41b8 6183 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
f975e971 6184
f3967584 6185sysusers.d/%: sysusers.d/%.m4 $(top_builddir)/config.status
5a16bc26
ŁS
6186 $(AM_V_at)$(MKDIR_P) $(dir $@)
6187 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6188
f3967584 6189tmpfiles.d/%: tmpfiles.d/%.m4 $(top_builddir)/config.status
aeb50ff0
TG
6190 $(AM_V_at)$(MKDIR_P) $(dir $@)
6191 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6192
6193
f3967584 6194units/%: units/%.m4 $(top_builddir)/config.status
4acbce79 6195 $(AM_V_at)$(MKDIR_P) $(dir $@)
38936e3c 6196 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
5e6afdd3 6197
f3967584 6198units/user/%: units/user/%.m4 $(top_builddir)/config.status
4acbce79 6199 $(AM_V_at)$(MKDIR_P) $(dir $@)
38936e3c 6200 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
a7b6f8e5 6201
46ba8aae 6202if ENABLE_POLKIT
3ce14249 6203nodist_polkitpolicy_DATA = \
299031ca 6204 $(polkitpolicy_files) \
90ccc3fc 6205 $(polkitpolicy_in_in_files:.policy.in.in=.policy)
e8c0de91
MP
6206polkitrules_DATA = $(polkitrules_files)
6207polkitpkla_DATA = $(polkitpkla_files)
46ba8aae 6208endif
90ccc3fc
KS
6209
6210EXTRA_DIST += \
6211 $(polkitpolicy_in_files) \
6212 $(polkitpolicy_in_in_files)
6213
2a4b7e7b 6214# ------------------------------------------------------------------------------
0689798a 6215man/custom-entities.ent: configure.ac
1a13e31d
ZJS
6216 $(AM_V_GEN)$(MKDIR_P) $(dir $@)
6217 $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
21ac6ff1 6218 printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
1a13e31d
ZJS
6219 > $@ # '
6220
0689798a 6221CLEANFILES += \
1a13e31d
ZJS
6222 man/custom-entities.ent
6223
c6365917
LP
6224XSLTPROC_FLAGS = \
6225 --nonet \
21ac6ff1 6226 --xinclude \
7c1d34c5 6227 --stringparam man.output.quietly 1 \
e362b372 6228 --stringparam funcsynopsis.style ansi \
e362b372 6229 --stringparam man.authors.section.enabled 0 \
702f64b9 6230 --stringparam man.copyright.section.enabled 0 \
1a13e31d
ZJS
6231 --stringparam systemd.version $(VERSION) \
6232 --path '$(builddir)/man:$(srcdir)/man'
c6365917 6233
ce245c84 6234XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc)
9f2c5942 6235XSLTPROC_PROCESS_MAN = \
ce245c84 6236 $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
d1ab0ca0 6237
9f2c5942 6238XSLTPROC_PROCESS_HTML = \
ce245c84 6239 $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
d1ab0ca0 6240
1a13e31d 6241man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
f9378423
LP
6242 $(XSLTPROC_PROCESS_MAN)
6243
1a13e31d 6244man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
359957ee
LP
6245 $(XSLTPROC_PROCESS_MAN)
6246
1a13e31d 6247man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
9f2c5942
LP
6248 $(XSLTPROC_PROCESS_MAN)
6249
1a13e31d 6250man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
9f2c5942
LP
6251 $(XSLTPROC_PROCESS_MAN)
6252
1a13e31d 6253man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
f9378423
LP
6254 $(XSLTPROC_PROCESS_MAN)
6255
1a13e31d 6256man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
9f2c5942 6257 $(XSLTPROC_PROCESS_HTML)
87cfe600
ZJS
6258
6259define html-alias
78316212 6260 $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
87cfe600
ZJS
6261endef
6262
4afb5c73
ZJS
6263EXTRA_DIST += \
6264 man/custom-html.xsl \
6265 man/custom-man.xsl
6266
2a4b7e7b 6267# ------------------------------------------------------------------------------
0ce8860a
LP
6268if HAVE_SYSV_COMPAT
6269sysvinit_DATA = \
6270 docs/sysvinit/README
6271
6272varlog_DATA = \
6273 docs/var-log/README
6274
6275docs/sysvinit/README: docs/sysvinit/README.in
6276 $(SED_PROCESS)
6277
6278docs/var-log/README: docs/var-log/README.in
6279 $(SED_PROCESS)
6280
5b4882b6
KS
6281CLEANFILES += \
6282 docs/sysvinit/README \
6283 docs/var-log/README
0ce8860a
LP
6284endif
6285
52edb228
ZJS
6286EXTRA_DIST += \
6287 docs/sysvinit/README.in \
6288 docs/var-log/README.in
6289
6ff39241 6290SOCKETS_TARGET_WANTS += \
d6b07ef7 6291 systemd-initctl.socket
6ff39241 6292
37161c51 6293if HAVE_UTMP
245d345f 6294if HAVE_SYSV_COMPAT
d5d8429a 6295MULTI_USER_TARGET_WANTS += \
6ff39241 6296 systemd-update-utmp-runlevel.service
d5d8429a 6297GRAPHICAL_TARGET_WANTS += \
6ff39241 6298 systemd-update-utmp-runlevel.service
d5d8429a 6299RESCUE_TARGET_WANTS += \
6ff39241 6300 systemd-update-utmp-runlevel.service
245d345f 6301endif
8ea48dfc 6302
3f92e4b4 6303SYSINIT_TARGET_WANTS += \
37161c51
ERB
6304 systemd-update-utmp.service
6305endif
6306
6307SYSINIT_TARGET_WANTS += \
12e34d9d 6308 systemd-update-done.service
8ea48dfc 6309
6ff39241
ZJS
6310LOCAL_FS_TARGET_WANTS += \
6311 systemd-remount-fs.service \
113b3fc1
LP
6312 tmp.mount \
6313 var-lib-machines.mount
8ea48dfc 6314
6ff39241
ZJS
6315MULTI_USER_TARGET_WANTS += \
6316 getty.target \
83e7d885 6317 systemd-ask-password-wall.path
8ea48dfc 6318
6ff39241
ZJS
6319SYSINIT_TARGET_WANTS += \
6320 dev-hugepages.mount \
6321 dev-mqueue.mount \
6322 sys-kernel-config.mount \
6323 sys-kernel-debug.mount \
6324 sys-fs-fuse-connections.mount \
6ff39241
ZJS
6325 systemd-sysctl.service \
6326 systemd-ask-password-console.path
6351163b 6327
245d345f 6328if HAVE_SYSV_COMPAT
91e8651b
ZJS
6329SYSTEM_UNIT_ALIASES += \
6330 poweroff.target runlevel0.target \
6331 rescue.target runlevel1.target \
6332 multi-user.target runlevel2.target \
6333 multi-user.target runlevel3.target \
6334 multi-user.target runlevel4.target \
6335 graphical.target runlevel5.target \
245d345f
ZJS
6336 reboot.target runlevel6.target
6337endif
2a4b7e7b 6338
245d345f 6339SYSTEM_UNIT_ALIASES += \
91e8651b
ZJS
6340 graphical.target default.target \
6341 reboot.target ctrl-alt-del.target \
6342 getty@.service autovt@.service
6343
91e8651b
ZJS
6344GENERAL_ALIASES += \
6345 $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
6346 $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
6347 $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
e2438b7a 6348 $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
91e8651b 6349
245d345f 6350if HAVE_SYSV_COMPAT
91e8651b
ZJS
6351INSTALL_DIRS += \
6352 $(systemunitdir)/runlevel1.target.wants \
6353 $(systemunitdir)/runlevel2.target.wants \
6354 $(systemunitdir)/runlevel3.target.wants \
6355 $(systemunitdir)/runlevel4.target.wants \
245d345f
ZJS
6356 $(systemunitdir)/runlevel5.target.wants
6357endif
2a4b7e7b 6358
245d345f 6359INSTALL_DIRS += \
91e8651b
ZJS
6360 $(prefix)/lib/modules-load.d \
6361 $(sysconfdir)/modules-load.d \
9dc670ea
TG
6362 $(prefix)/lib/systemd/network \
6363 $(sysconfdir)/systemd/network \
91e8651b
ZJS
6364 $(prefix)/lib/sysctl.d \
6365 $(sysconfdir)/sysctl.d \
06f42898
KS
6366 $(prefix)/lib/kernel/install.d \
6367 $(sysconfdir)/kernel/install.d \
91e8651b
ZJS
6368 $(systemshutdowndir) \
6369 $(systemsleepdir) \
6370 $(systemgeneratordir) \
6371 $(usergeneratordir) \
6372 \
6373 $(userunitdir) \
6374 $(pkgsysconfdir)/system \
6375 $(pkgsysconfdir)/system/multi-user.target.wants \
6376 $(pkgsysconfdir)/system/getty.target.wants \
6377 $(pkgsysconfdir)/user \
6378 $(dbussessionservicedir) \
6379 $(sysconfdir)/xdg/systemd
cd3f8b7d 6380
48d437bb 6381install-exec-hook: $(INSTALL_EXEC_HOOKS)
2a018e83 6382
4ec24515 6383uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
ae446765 6384
91e8651b 6385install-data-hook: $(INSTALL_DATA_HOOKS)
ae446765 6386
3e214785
KS
6387distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
6388
9b281072 6389clean-local: $(CLEAN_LOCAL_HOOKS)
f13b388f 6390 rm -rf $(abs_srcdir)/install-tree
5fe25aff 6391 rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
f5944e0f 6392 $(abs_srcdir)/hwdb/iab.txt
f13b388f 6393
d1ab0ca0 6394DISTCHECK_CONFIGURE_FLAGS = \
d2d12cd1
LP
6395 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
6396 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
6397 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
db059f1b 6398 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
4f87c47b 6399 --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
8c6db833 6400 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
5c390a4a 6401 --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
3e214785 6402 --with-rootprefix=$$dc_install_base \
b20e61f4 6403 --enable-compat-libs
80a5cbac 6404
1d0b59f9
TG
6405if HAVE_SYSV_COMPAT
6406DISTCHECK_CONFIGURE_FLAGS += \
6407 --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
dee4c244 6408 --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
d354315f
ZJS
6409else
6410DISTCHECK_CONFIGURE_FLAGS += \
6411 --with-sysvinit-path= \
6412 --with-sysvrcnd-path=
1d0b59f9
TG
6413endif
6414
2fe9e87a
MP
6415if ENABLE_SPLIT_USR
6416DISTCHECK_CONFIGURE_FLAGS += \
6417 --enable-split-usr
6418else
6419DISTCHECK_CONFIGURE_FLAGS += \
6420 --disable-split-usr
6421endif
6422
7118d2f7 6423.PHONY: dist-check-help
78eb158a
ZJS
6424dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
6425 for i in $(abspath $^); do \
6426 if $$i --help | grep -v 'default:' | grep -E -q '.{80}.' ; then \
6427 echo "$(basename $$i) --help output is too wide:"; \
6428 $$i --help | awk 'length > 80' | grep -E --color=yes '.{80}'; \
6429 exit 1; \
6430 fi; done
6431
7f495b98
ZJS
6432include_compilers = "$(CC)" "$(CC) -ansi" "$(CC) -std=iso9899:1990"
6433public_headers = $(filter-out src/systemd/_sd-common.h, $(pkginclude_HEADERS) $(include_HEADERS))
6434.PHONY: dist-check-includes
6435dist-check-includes: $(public_headers)
6436 @res=0; \
6437 for i in $(abspath $^); do \
6438 for cc in $(include_compilers); do \
6439 echo "$$cc -o/dev/null -c -x c -include "$$i" - </dev/null"; \
6440 $$cc -o/dev/null -c -x c -include "$$i" - </dev/null || res=1; \
6441 done; \
6442 done; exit $$res
6443
9f700755 6444.PHONY: hwdb-update
796b06c2 6445hwdb-update:
7f8e692b 6446 ( cd $(top_srcdir)/hwdb && \
fd5a4613
KS
6447 wget -O usb.ids 'http://www.linux-usb.org/usb.ids' && \
6448 wget -O pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids' && \
eee15abc
KS
6449 wget -O ma-large.txt 'http://standards.ieee.org/develop/regauth/oui/oui.txt' && \
6450 wget -O ma-medium.txt 'http://standards.ieee.org/develop/regauth/oui28/mam.txt' && \
6451 wget -O ma-small.txt 'http://standards.ieee.org/develop/regauth/oui36/oui36.txt' && \
3411164a
FMQ
6452 wget -O pnp_id_registry.html 'http://www.uefi.org/uefi-pnp-export' && \
6453 wget -O acpi_id_registry.html 'http://www.uefi.org/uefi-acpi-export' && \
6454 ./ids-update.pl && \
6455 ./acpi-update.py > 20-acpi-vendor.hwdb.base && \
6456 patch -p0 -o- 20-acpi-vendor.hwdb.base < 20-acpi-vendor.hwdb.patch > 20-acpi-vendor.hwdb )
796b06c2 6457
7ee7b225
DH
6458.PHONY: built-sources
6459built-sources: $(BUILT_SOURCES)
6460
381a662a
KS
6461.PHONY: git-tag
6462git-tag:
6463 git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
6464
6f58d70e
KS
6465.PHONY: git-tar
6466git-tar:
e2b6ad03 6467 git archive --format=tar --prefix=systemd-$(VERSION)/ HEAD | gzip > systemd-$(VERSION).tar.gz
6f58d70e 6468
381a662a 6469www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
a45f61d7 6470
9f700755 6471.PHONY: doc-sync
8388607b 6472doc-sync: all
202288be 6473 rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
690804ca 6474
9f700755 6475.PHONY: install-tree
f13b388f
KS
6476install-tree: all
6477 rm -rf $(abs_srcdir)/install-tree
d426d8c8 6478 $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
f13b388f 6479 tree $(abs_srcdir)/install-tree
cac914e6
LP
6480
6481# Let's run all tests of the test suite, but under valgrind. Let's
70fd7917 6482# exclude perl/python/shell scripts we have in there
9f700755 6483.PHONY: valgrind-tests
cac914e6 6484valgrind-tests: $(TESTS)
70fd7917 6485 $(AM_V_GEN)for f in $(filter-out %.pl %.py, $^); do \
0bd179ff 6486 if $(LIBTOOL) --mode=execute file $$f | grep -q shell; then \
a0846368 6487 echo -e "$${x}Skipping non-binary $$f"; else \
9b55cd56 6488 echo -e "$${x}Running $$f"; \
4854dc58 6489 $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
9b55cd56 6490 x="\n\n"; \
a27e222b
LP
6491 done
6492
9173a308 6493exported-%: %
aac5ad0d 6494 $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
9173a308
ZJS
6495
6496exported: $(addprefix exported-, $(lib_LTLIBRARIES))
b7b85f22 6497 $(AM_V_GEN)sort -u $^ > $@
d23284fa 6498
9f700755 6499.PHONY: check-api-docs
d23284fa 6500check-api-docs: exported man
f1e0c183 6501 $(AM_V_GEN)for symbol in `cat exported` ; do \
a27e222b
LP
6502 if test -f $(builddir)/man/$$symbol.html ; then \
6503 echo " Symbol $$symbol() is documented." ; \
6504 else \
6505 echo "‣ Symbol $$symbol() lacks documentation." ; \
6506 fi ; \
f1e0c183 6507 done
9070a9c1
LP
6508
6509OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
6510ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
6511
39da205f 6512undefined defined: $(ALL_OBJECTS)
9070a9c1 6513 $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
aac5ad0d 6514 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
39da205f 6515 done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
9070a9c1
LP
6516
6517CLEANFILES += \
6518 defined \
6519 undefined
6520
9f700755 6521.PHONY: check-api-unused
d23284fa
LP
6522check-api-unused: defined undefined exported
6523 ( cat exported undefined ) | sort -u | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
f1e0c183 6524
bfb35cfd
KZ
6525.PHONY: check-includes
6526check-includes: $(top_srcdir)/tools/check-includes.pl
6527 $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
6528 | xargs $(top_srcdir)/tools/check-includes.pl
6529
6530EXTRA_DIST += \
6531 $(top_srcdir)/tools/check-includes.pl
6532
f1e0c183 6533# Stupid test that everything purported to be exported really is
f1e0c183
ZJS
6534define generate-sym-test
6535 $(AM_V_at)$(MKDIR_P) $(dir $@)
4e1b76c2
DR
6536 $(AM_V_at)printf '#include <stdio.h>\n' > $@
6537 $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
6538 $(AM_V_at)printf 'void* functions[] = {\n' >> $@
6539 $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
6540 $(AM_V_at)printf '};\nint main(void) {\n' >> $@
6541 $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
6542 $(AM_V_at)printf 'return 0; }\n' >> $@
f1e0c183
ZJS
6543endef
6544
6bb648a1 6545test-libsystemd-sym.c: \
2b0a23e8 6546 $(top_builddir)/src/libsystemd/libsystemd.sym \
add00dfd
KS
6547 src/systemd/sd-journal.h \
6548 src/systemd/sd-daemon.h \
6549 src/systemd/sd-login.h \
6550 src/systemd/sd-bus.h \
93f1bcf4 6551 src/systemd/sd-utf8.h \
2de30868 6552 src/systemd/sd-resolve.h \
882897af
LP
6553 src/systemd/sd-path.h \
6554 src/systemd/sd-event.h
f1e0c183
ZJS
6555 $(generate-sym-test)
6556
add00dfd
KS
6557test-libudev-sym.c: \
6558 src/libudev/libudev.sym \
6559 src/udev/udev.h
6560 $(generate-sym-test)
6561
2c8849ad 6562nodist_test_libsystemd_sym_SOURCES = \
add00dfd
KS
6563 test-libsystemd-sym.c
6564test_libsystemd_sym_LDADD = \
6565 libsystemd.la
6566
2c8849ad 6567nodist_test_libudev_sym_SOURCES = \
add00dfd 6568 test-libudev-sym.c
9ea28c55
KS
6569test_libudev_sym_CFLAGS = \
6570 $(AM_CFLAGS) \
6571 -Wno-deprecated-declarations
add00dfd
KS
6572test_libudev_sym_LDADD = \
6573 libudev.la
6574
6575BUILT_SOURCES += \
2c8849ad
KS
6576 test-libsystemd-sym.c \
6577 test-libudev-sym.c
6578
6579CLEANFILES += \
6580 test-libsystemd-sym.c \
6581 test-libudev-sym.c
add00dfd
KS
6582
6583tests += \
6584 test-libsystemd-sym \
6585 test-libudev-sym
6586
bd390ae7 6587.PHONY: cppcheck
16f4efb4 6588cppcheck:
43a99a7a 6589 cppcheck --enable=all -q $(top_srcdir)
0d8efe35
DR
6590
6591# Used to extract compile flags for YCM.
6592print-%:
6593 @echo $($*)
43c71255
LP
6594
6595git-contrib:
1ef11fb6 6596 @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | sed 's/ / /g' | awk '{ print $$0 "," }' | sort -u
2ea8c083
MS
6597
6598EXTRA_DIST += \
6599 tools/gdb-sd_dump_hashmaps.py
3576d631
LP
6600
6601list-keys:
6602 gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --list-keys
6603
6604add-key:
6605 gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import -