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