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