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