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