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