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