]> git.ipfire.org Git - thirdparty/systemd.git/blob - Makefile.am
Merge pull request #6257 from keszybz/unnecessary-job-log
[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=19
46 LIBSYSTEMD_REVISION=0
47 LIBSYSTEMD_AGE=19
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-input-id.rules \
3882 rules/60-persistent-storage-tape.rules \
3883 rules/60-persistent-input.rules \
3884 rules/60-persistent-alsa.rules \
3885 rules/60-persistent-storage.rules \
3886 rules/60-sensor.rules \
3887 rules/60-serial.rules \
3888 rules/64-btrfs.rules \
3889 rules/70-joystick.rules \
3890 rules/70-mouse.rules \
3891 rules/70-touchpad.rules \
3892 rules/75-net-description.rules \
3893 rules/78-sound-card.rules \
3894 rules/80-net-setup-link.rules
3895
3896 nodist_udevrules_DATA += \
3897 rules/50-udev-default.rules \
3898 rules/99-systemd.rules
3899
3900 udevconfdir = $(sysconfdir)/udev
3901 dist_udevconf_DATA = \
3902 src/udev/udev.conf
3903
3904 pkgconfigdata_DATA += \
3905 src/udev/udev.pc
3906
3907 EXTRA_DIST += \
3908 rules/50-udev-default.rules.in \
3909 rules/99-systemd.rules.in \
3910 src/udev/udev.pc.in
3911
3912 EXTRA_DIST += \
3913 units/systemd-udevd.service.in \
3914 units/systemd-udev-trigger.service.in \
3915 units/systemd-udev-settle.service.in
3916
3917 SOCKETS_TARGET_WANTS += \
3918 systemd-udevd-control.socket \
3919 systemd-udevd-kernel.socket
3920
3921 SYSINIT_TARGET_WANTS += \
3922 systemd-udevd.service \
3923 systemd-udev-trigger.service
3924
3925 rootbin_PROGRAMS += \
3926 udevadm
3927
3928 rootlibexec_PROGRAMS += \
3929 systemd-udevd
3930
3931 noinst_LTLIBRARIES += \
3932 libudev-core.la
3933
3934 src/udev/keyboard-keys-list.txt:
3935 $(AM_V_at)$(MKDIR_P) $(dir $@)
3936 $(AM_V_GEN)$(top_srcdir)/src/udev/generate-keyboard-keys-list.sh "$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS)" > $@
3937
3938 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt
3939 $(AM_V_GEN)$(top_srcdir)/src/udev/generate-keyboard-keys-gperf.sh $< > $@
3940
3941 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3942 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3943
3944 gperf_txt_sources += \
3945 src/udev/keyboard-keys-list.txt
3946
3947 libudev_core_la_SOURCES = \
3948 src/udev/udev.h \
3949 src/udev/udev-event.c \
3950 src/udev/udev-watch.c \
3951 src/udev/udev-node.c \
3952 src/udev/udev-rules.c \
3953 src/udev/udev-ctrl.c \
3954 src/udev/udev-builtin.c \
3955 src/udev/udev-builtin-btrfs.c \
3956 src/udev/udev-builtin-hwdb.c \
3957 src/udev/udev-builtin-input_id.c \
3958 src/udev/udev-builtin-keyboard.c \
3959 src/udev/udev-builtin-net_id.c \
3960 src/udev/udev-builtin-net_setup_link.c \
3961 src/udev/udev-builtin-path_id.c \
3962 src/udev/udev-builtin-usb_id.c \
3963 src/udev/net/link-config.h \
3964 src/udev/net/link-config.c \
3965 src/udev/net/ethtool-util.h \
3966 src/udev/net/ethtool-util.c
3967
3968 nodist_libudev_core_la_SOURCES = \
3969 src/udev/keyboard-keys-from-name.h \
3970 src/udev/net/link-config-gperf.c
3971
3972 gperf_gperf_sources += \
3973 src/udev/net/link-config-gperf.gperf
3974
3975 libudev_core_la_CFLAGS = \
3976 $(AM_CFLAGS) \
3977 $(BLKID_CFLAGS) \
3978 $(KMOD_CFLAGS) \
3979 -DLOG_REALM=LOG_REALM_UDEV
3980
3981 libudev_core_la_LIBADD = \
3982 libsystemd-network.la \
3983 libshared.la \
3984 $(BLKID_LIBS) \
3985 $(KMOD_LIBS)
3986
3987 if HAVE_KMOD
3988 libudev_core_la_SOURCES += \
3989 src/udev/udev-builtin-kmod.c
3990
3991 dist_udevrules_DATA += \
3992 rules/80-drivers.rules
3993 endif
3994
3995 if HAVE_BLKID
3996 libudev_core_la_SOURCES += \
3997 src/udev/udev-builtin-blkid.c
3998 endif
3999
4000 if HAVE_ACL
4001 libudev_core_la_SOURCES += \
4002 src/udev/udev-builtin-uaccess.c \
4003 src/login/logind-acl.c \
4004 src/libsystemd/sd-login/sd-login.c \
4005 src/systemd/sd-login.h
4006 endif
4007
4008 systemd_udevd_SOURCES = \
4009 src/udev/udevd.c
4010
4011 systemd_udevd_CFLAGS = \
4012 $(AM_CFLAGS) \
4013 -DLOG_REALM=LOG_REALM_UDEV
4014
4015 systemd_udevd_LDADD = \
4016 libudev-core.la \
4017 libbasic.la
4018
4019 udevadm_SOURCES = \
4020 src/udev/udevadm.c \
4021 src/udev/udevadm-info.c \
4022 src/udev/udevadm-control.c \
4023 src/udev/udevadm-monitor.c \
4024 src/udev/udevadm-hwdb.c \
4025 src/udev/udevadm-settle.c \
4026 src/udev/udevadm-trigger.c \
4027 src/udev/udevadm-test.c \
4028 src/udev/udevadm-test-builtin.c \
4029 src/udev/udevadm-util.c \
4030 src/udev/udevadm-util.h
4031
4032 udevadm_LDADD = \
4033 libudev-core.la \
4034 libbasic.la
4035
4036 # ------------------------------------------------------------------------------
4037 if ENABLE_HWDB
4038 INSTALL_DIRS += \
4039 $(sysconfdir)/udev/hwdb.d
4040
4041 systemd_hwdb_SOURCES = \
4042 src/libsystemd/sd-hwdb/hwdb-internal.h \
4043 src/hwdb/hwdb.c
4044
4045 systemd_hwdb_LDADD = \
4046 libshared.la
4047
4048 rootbin_PROGRAMS += \
4049 systemd-hwdb
4050
4051 dist_udevhwdb_DATA = \
4052 hwdb/20-pci-vendor-model.hwdb \
4053 hwdb/20-pci-classes.hwdb \
4054 hwdb/20-usb-vendor-model.hwdb \
4055 hwdb/20-usb-classes.hwdb \
4056 hwdb/20-sdio-vendor-model.hwdb \
4057 hwdb/20-sdio-classes.hwdb \
4058 hwdb/20-bluetooth-vendor-product.hwdb \
4059 hwdb/20-acpi-vendor.hwdb \
4060 hwdb/20-OUI.hwdb \
4061 hwdb/20-net-ifname.hwdb \
4062 hwdb/60-evdev.hwdb \
4063 hwdb/60-keyboard.hwdb \
4064 hwdb/60-sensor.hwdb \
4065 hwdb/70-mouse.hwdb \
4066 hwdb/70-pointingstick.hwdb \
4067 hwdb/70-touchpad.hwdb
4068
4069 SYSINIT_TARGET_WANTS += \
4070 systemd-hwdb-update.service
4071
4072 # Update hwdb on installation. Do not bother if installing
4073 # in DESTDIR, since this is likely for packaging purposes.
4074 hwdb-update-hook:
4075 -test -n "$(DESTDIR)" || $(rootbindir)/systemd-hwdb update
4076
4077 INSTALL_DATA_HOOKS += \
4078 hwdb-update-hook
4079
4080 hwdb-remove-hook:
4081 -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
4082 endif
4083
4084 EXTRA_DIST += \
4085 units/systemd-hwdb-update.service.in \
4086 hwdb/ids-update.pl \
4087 hwdb/sdio.ids
4088
4089 # ------------------------------------------------------------------------------
4090 if ENABLE_TESTS
4091 TESTS += \
4092 test/udev-test.pl \
4093 test/hwdb-test.sh
4094
4095 if HAVE_PYTHON
4096 TESTS += \
4097 test/rule-syntax-check.py \
4098 hwdb/parse_hwdb.py
4099
4100 if HAVE_SYSV_COMPAT
4101 TESTS += \
4102 test/sysv-generator-test.py
4103 endif
4104 endif
4105 endif
4106
4107 tests += \
4108 test-libudev
4109
4110 manual_tests += \
4111 test-udev
4112
4113 test_libudev_SOURCES = \
4114 src/test/test-libudev.c
4115
4116 test_libudev_LDADD = \
4117 libsystemd-shared.la
4118
4119 test_udev_SOURCES = \
4120 src/test/test-udev.c
4121
4122 test_udev_LDADD = \
4123 libudev-core.la \
4124 libsystemd-shared.la \
4125 $(BLKID_LIBS) \
4126 $(KMOD_LIBS) \
4127 -lrt
4128
4129 if ENABLE_TESTS
4130 check_DATA += \
4131 test/sys
4132 endif
4133
4134 # sysfs test tree
4135 test/sys: test/sys-script.py
4136 -rm -rf $@
4137 $(AM_V_at)$(MKDIR_P) $(dir $@)
4138 $(AM_V_GEN)$(top_srcdir)/test/sys-script.py $(dir $@)
4139 -touch $@
4140
4141 test-sys-distclean:
4142 -rm -rf test/sys
4143 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
4144
4145 EXTRA_DIST += \
4146 test/sys-script.py \
4147 test/udev-test.pl \
4148 test/hwdb-test.sh \
4149 test/rule-syntax-check.py \
4150 test/sysv-generator-test.py \
4151 test/mocks/fsck \
4152 hwdb/parse_hwdb.py
4153
4154 # ------------------------------------------------------------------------------
4155 ata_id_SOURCES = \
4156 src/udev/ata_id/ata_id.c
4157
4158 ata_id_CFLAGS = \
4159 $(AM_CFLAGS) \
4160 -DLOG_REALM=LOG_REALM_UDEV
4161
4162 ata_id_LDADD = \
4163 libshared.la
4164
4165 udevlibexec_PROGRAMS += \
4166 ata_id
4167
4168 # ------------------------------------------------------------------------------
4169 cdrom_id_SOURCES = \
4170 src/udev/cdrom_id/cdrom_id.c
4171
4172 cdrom_id_CFLAGS = \
4173 $(AM_CFLAGS) \
4174 -DLOG_REALM=LOG_REALM_UDEV
4175
4176 cdrom_id_LDADD = \
4177 libshared.la
4178
4179 udevlibexec_PROGRAMS += \
4180 cdrom_id
4181
4182 dist_udevrules_DATA += \
4183 rules/60-cdrom_id.rules
4184
4185 # ------------------------------------------------------------------------------
4186 collect_SOURCES = \
4187 src/udev/collect/collect.c
4188
4189 collect_CFLAGS = \
4190 $(AM_CFLAGS) \
4191 -DLOG_REALM=LOG_REALM_UDEV
4192
4193 collect_LDADD = \
4194 libshared.la
4195
4196 udevlibexec_PROGRAMS += \
4197 collect
4198
4199 # ------------------------------------------------------------------------------
4200 scsi_id_SOURCES =\
4201 src/udev/scsi_id/scsi_id.c \
4202 src/udev/scsi_id/scsi_serial.c \
4203 src/udev/scsi_id/scsi.h \
4204 src/udev/scsi_id/scsi_id.h
4205
4206 scsi_id_CFLAGS = \
4207 $(AM_CFLAGS) \
4208 -DLOG_REALM=LOG_REALM_UDEV
4209
4210 scsi_id_LDADD = \
4211 libshared.la
4212
4213 udevlibexec_PROGRAMS += \
4214 scsi_id
4215
4216 EXTRA_DIST += \
4217 src/udev/scsi_id/README
4218
4219 # ------------------------------------------------------------------------------
4220 v4l_id_SOURCES = \
4221 src/udev/v4l_id/v4l_id.c
4222
4223 v4l_id_CFLAGS = \
4224 $(AM_CFLAGS) \
4225 -DLOG_REALM=LOG_REALM_UDEV
4226
4227 v4l_id_LDADD = \
4228 libshared.la
4229
4230 udevlibexec_PROGRAMS += \
4231 v4l_id
4232
4233 dist_udevrules_DATA += \
4234 rules/60-persistent-v4l.rules
4235
4236 # ------------------------------------------------------------------------------
4237 mtd_probe_SOURCES = \
4238 src/udev/mtd_probe/mtd_probe.c \
4239 src/udev/mtd_probe/mtd_probe.h \
4240 src/udev/mtd_probe/probe_smartmedia.c
4241
4242 mtd_probe_CFLAGS = \
4243 $(AM_CFLAGS) \
4244 -DLOG_REALM=LOG_REALM_UDEV
4245
4246 dist_udevrules_DATA += \
4247 rules/75-probe_mtd.rules
4248
4249 udevlibexec_PROGRAMS += \
4250 mtd_probe
4251
4252 # ------------------------------------------------------------------------------
4253 test_id128_SOURCES = \
4254 src/test/test-id128.c
4255
4256 test_id128_LDADD = \
4257 libsystemd-shared.la
4258
4259 tests += \
4260 test-id128
4261
4262 # ------------------------------------------------------------------------------
4263 test_hash_SOURCES = \
4264 src/test/test-hash.c
4265
4266 test_hash_LDADD = \
4267 libsystemd-shared.la
4268
4269 tests += \
4270 test-hash
4271
4272 # ------------------------------------------------------------------------------
4273
4274 bin_PROGRAMS += \
4275 systemd-socket-activate
4276
4277 systemd_socket_activate_SOURCES = \
4278 src/activate/activate.c
4279
4280 systemd_socket_activate_LDADD = \
4281 libsystemd-shared.la
4282
4283 # ------------------------------------------------------------------------------
4284 systemd_journald_SOURCES = \
4285 src/journal/journald.c \
4286 src/journal/journald-server.h
4287
4288 systemd_journald_LDADD = \
4289 libjournal-core.la \
4290 libsystemd-shared.la
4291
4292 systemd_cat_SOURCES = \
4293 src/journal/cat.c
4294
4295 systemd_cat_LDADD = \
4296 libjournal-core.la
4297
4298 if HAVE_LIBCURL
4299 rootlibexec_PROGRAMS += \
4300 systemd-journal-upload
4301
4302 systemd_journal_upload_SOURCES = \
4303 src/journal-remote/journal-upload.h \
4304 src/journal-remote/journal-upload.c \
4305 src/journal-remote/journal-upload-journal.c
4306
4307 systemd_journal_upload_CFLAGS = \
4308 $(AM_CFLAGS) \
4309 $(LIBCURL_CFLAGS)
4310
4311 systemd_journal_upload_LDADD = \
4312 libsystemd-shared.la \
4313 $(LIBCURL_LIBS)
4314
4315 nodist_systemunit_DATA += \
4316 units/systemd-journal-upload.service
4317
4318 nodist_pkgsysconf_DATA += \
4319 src/journal-remote/journal-upload.conf
4320 endif
4321
4322 EXTRA_DIST += \
4323 units/systemd-journal-upload.service.in \
4324 src/journal-remote/journal-upload.conf.in
4325
4326 if HAVE_MICROHTTPD
4327 rootlibexec_PROGRAMS += \
4328 systemd-journal-remote
4329
4330 systemd_journal_remote_SOURCES = \
4331 src/journal-remote/journal-remote-parse.h \
4332 src/journal-remote/journal-remote-parse.c \
4333 src/journal-remote/journal-remote-write.h \
4334 src/journal-remote/journal-remote-write.c \
4335 src/journal-remote/journal-remote.h \
4336 src/journal-remote/journal-remote.c
4337
4338 systemd_journal_remote_LDADD = \
4339 libjournal-core.la
4340
4341 systemd_journal_remote_SOURCES += \
4342 src/journal-remote/microhttpd-util.h \
4343 src/journal-remote/microhttpd-util.c
4344
4345 systemd_journal_remote_CFLAGS = \
4346 $(AM_CFLAGS) \
4347 $(MICROHTTPD_CFLAGS)
4348
4349 systemd_journal_remote_LDADD += \
4350 $(MICROHTTPD_LIBS)
4351
4352 if HAVE_GNUTLS
4353 systemd_journal_remote_LDADD += \
4354 $(GNUTLS_LIBS)
4355 endif
4356
4357 # systemd-journal-remote make sense mostly with full crypto stack
4358 dist_systemunit_DATA += \
4359 units/systemd-journal-remote.socket
4360
4361 nodist_systemunit_DATA += \
4362 units/systemd-journal-remote.service
4363
4364 journal-remote-install-hook: journal-install-hook
4365 -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
4366 -chown 0:0 $(DESTDIR)/var/log/journal/remote
4367 -chmod 755 $(DESTDIR)/var/log/journal/remote
4368
4369 INSTALL_EXEC_HOOKS += journal-remote-install-hook
4370
4371 nodist_pkgsysconf_DATA += \
4372 src/journal-remote/journal-remote.conf
4373
4374 EXTRA_DIST += \
4375 units/systemd-journal-remote.service.in \
4376 src/journal-remote/journal-remote.conf.in \
4377 src/journal-remote/log-generator.py
4378 endif
4379
4380 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4381 journalctl_CFLAGS = \
4382 $(AM_CFLAGS)
4383
4384 journalctl_SOURCES = \
4385 src/journal/journalctl.c
4386
4387 journalctl_LDADD = \
4388 libsystemd-shared.la \
4389 libudev-core.la
4390
4391 if HAVE_QRENCODE
4392 journalctl_SOURCES += \
4393 src/journal/journal-qrcode.c \
4394 src/journal/journal-qrcode.h
4395
4396 journalctl_CFLAGS += \
4397 $(QRENCODE_CFLAGS)
4398
4399 journalctl_LDADD += \
4400 $(QRENCODE_LIBS)
4401 endif
4402
4403 test_journal_SOURCES = \
4404 src/journal/test-journal.c
4405
4406 test_journal_LDADD = \
4407 libjournal-core.la
4408
4409 test_journal_send_SOURCES = \
4410 src/journal/test-journal-send.c
4411
4412 test_journal_send_LDADD = \
4413 libjournal-core.la
4414
4415 test_journal_syslog_SOURCES = \
4416 src/journal/test-journal-syslog.c
4417
4418 test_journal_syslog_LDADD = \
4419 libjournal-core.la
4420
4421 test_journal_match_SOURCES = \
4422 src/journal/test-journal-match.c
4423
4424 test_journal_match_LDADD = \
4425 libjournal-core.la
4426
4427 test_journal_enum_SOURCES = \
4428 src/journal/test-journal-enum.c
4429
4430 test_journal_enum_LDADD = \
4431 libjournal-core.la
4432
4433 test_journal_stream_SOURCES = \
4434 src/journal/test-journal-stream.c
4435
4436 test_journal_stream_LDADD = \
4437 libjournal-core.la
4438
4439 test_journal_flush_SOURCES = \
4440 src/journal/test-journal-flush.c
4441
4442 test_journal_flush_LDADD = \
4443 libjournal-core.la
4444
4445 test_journal_init_SOURCES = \
4446 src/journal/test-journal-init.c
4447
4448 test_journal_init_LDADD = \
4449 libjournal-core.la
4450
4451 test_journal_verify_SOURCES = \
4452 src/journal/test-journal-verify.c
4453
4454 test_journal_verify_LDADD = \
4455 libjournal-core.la
4456
4457 test_journal_interleaving_SOURCES = \
4458 src/journal/test-journal-interleaving.c
4459
4460 test_journal_interleaving_LDADD = \
4461 libjournal-core.la
4462
4463 test_mmap_cache_SOURCES = \
4464 src/journal/test-mmap-cache.c
4465
4466 test_mmap_cache_LDADD = \
4467 libjournal-core.la
4468
4469 test_catalog_SOURCES = \
4470 src/journal/test-catalog.c
4471
4472 test_catalog_CPPFLAGS = \
4473 $(AM_CPPFLAGS) \
4474 -DCATALOG_DIR=\"$(abs_top_builddir)/catalog\"
4475
4476 test_catalog_LDADD = \
4477 libjournal-core.la
4478
4479 test_compress_SOURCES = \
4480 src/journal/test-compress.c
4481
4482 test_compress_LDADD = \
4483 libsystemd-shared.la
4484
4485 if HAVE_LZ4
4486 test_compress_LDADD += \
4487 -llz4
4488 endif
4489
4490 test_compress_benchmark_SOURCES = \
4491 src/journal/test-compress-benchmark.c
4492
4493 test_compress_benchmark_LDADD = \
4494 libsystemd-shared.la
4495
4496 test_audit_type_SOURCES = \
4497 src/journal/test-audit-type.c
4498
4499 test_audit_type_LDADD = \
4500 libjournal-core.la
4501
4502 libjournal_core_la_SOURCES = \
4503 src/journal/journald-kmsg.c \
4504 src/journal/journald-kmsg.h \
4505 src/journal/journald-syslog.c \
4506 src/journal/journald-syslog.h \
4507 src/journal/journald-stream.c \
4508 src/journal/journald-stream.h \
4509 src/journal/journald-server.c \
4510 src/journal/journald-server.h \
4511 src/journal/journald-console.c \
4512 src/journal/journald-console.h \
4513 src/journal/journald-wall.c \
4514 src/journal/journald-wall.h \
4515 src/journal/journald-native.c \
4516 src/journal/journald-native.h \
4517 src/journal/journald-audit.c \
4518 src/journal/journald-audit.h \
4519 src/journal/journald-rate-limit.c \
4520 src/journal/journald-rate-limit.h \
4521 src/journal/journal-internal.h
4522
4523 nodist_libjournal_core_la_SOURCES = \
4524 src/journal/journald-gperf.c
4525
4526 libjournal_core_la_LIBADD = \
4527 libsystemd-shared.la
4528
4529 noinst_LTLIBRARIES += \
4530 libjournal-core.la
4531
4532 journal-install-hook:
4533 -$(MKDIR_P) $(DESTDIR)/var/log/journal
4534 -chown 0:0 $(DESTDIR)/var/log/journal
4535 -chmod 755 $(DESTDIR)/var/log/journal
4536 -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4537 -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4538
4539 journal-uninstall-hook:
4540 -rmdir $(DESTDIR)/var/log/journal/remote
4541 -rmdir $(DESTDIR)/var/log/journal/
4542
4543 INSTALL_EXEC_HOOKS += journal-install-hook
4544 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4545
4546 # ------------------------------------------------------------------------------
4547 # Update catalog on installation. Do not bother if installing
4548 # in DESTDIR, since this is likely for packaging purposes.
4549 catalog-update-hook:
4550 -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4551
4552 INSTALL_DATA_HOOKS += \
4553 catalog-update-hook
4554
4555 catalog-remove-hook:
4556 -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4557
4558 UNINSTALL_DATA_HOOKS += \
4559 catalog-remove-hook
4560
4561 tests += \
4562 test-journal \
4563 test-journal-enum \
4564 test-journal-send \
4565 test-journal-syslog \
4566 test-journal-match \
4567 test-journal-stream \
4568 test-journal-init \
4569 test-journal-verify \
4570 test-journal-interleaving \
4571 test-journal-flush \
4572 test-mmap-cache \
4573 test-catalog \
4574 test-audit-type
4575
4576 if HAVE_COMPRESSION
4577 tests += \
4578 test-compress \
4579 test-compress-benchmark
4580 endif
4581
4582 pkginclude_HEADERS += \
4583 src/systemd/sd-journal.h \
4584 src/systemd/sd-messages.h \
4585 src/systemd/_sd-common.h
4586
4587 libsystemd_journal_internal_la_SOURCES = \
4588 src/journal/sd-journal.c \
4589 src/systemd/sd-journal.h \
4590 src/systemd/_sd-common.h \
4591 src/journal/journal-file.c \
4592 src/journal/journal-file.h \
4593 src/journal/journal-vacuum.c \
4594 src/journal/journal-vacuum.h \
4595 src/journal/journal-verify.c \
4596 src/journal/journal-verify.h \
4597 src/journal/lookup3.c \
4598 src/journal/lookup3.h \
4599 src/journal/journal-send.c \
4600 src/journal/journal-def.h \
4601 src/journal/compress.h \
4602 src/journal/catalog.c \
4603 src/journal/catalog.h \
4604 src/journal/mmap-cache.c \
4605 src/journal/mmap-cache.h \
4606 src/journal/compress.c \
4607 src/journal/audit-type.h \
4608 src/journal/audit-type.c \
4609 src/shared/gcrypt-util.h \
4610 src/shared/gcrypt-util.c
4611
4612 nodist_libsystemd_journal_internal_la_SOURCES = \
4613 src/journal/audit_type-to-name.h
4614
4615 gperf_txt_sources += \
4616 src/journal/audit_type-list.txt
4617
4618 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4619 libsystemd_journal_internal_la_CFLAGS = \
4620 $(AM_CFLAGS)
4621
4622 libsystemd_journal_internal_la_LIBADD =
4623
4624 if HAVE_XZ
4625 libsystemd_journal_internal_la_CFLAGS += \
4626 $(XZ_CFLAGS)
4627
4628 libsystemd_journal_internal_la_LIBADD += \
4629 $(XZ_LIBS)
4630 endif
4631
4632 if HAVE_LZ4
4633 libsystemd_journal_internal_la_LIBADD += \
4634 -llz4
4635 endif
4636
4637 if HAVE_GCRYPT
4638 libsystemd_journal_internal_la_SOURCES += \
4639 src/journal/journal-authenticate.c \
4640 src/journal/journal-authenticate.h \
4641 src/journal/fsprg.c \
4642 src/journal/fsprg.h
4643
4644 libsystemd_journal_internal_la_LIBADD += \
4645 $(GCRYPT_LIBS)
4646
4647 libsystemd_journal_internal_la_CFLAGS += \
4648 $(GCRYPT_CFLAGS)
4649 endif
4650
4651 noinst_LTLIBRARIES += \
4652 libsystemd-journal-internal.la
4653
4654 rootlibexec_PROGRAMS += \
4655 systemd-journald
4656
4657 rootbin_PROGRAMS += \
4658 journalctl
4659
4660 bin_PROGRAMS += \
4661 systemd-cat
4662
4663 dist_systemunit_DATA += \
4664 units/systemd-journald.socket \
4665 units/systemd-journald-dev-log.socket \
4666 units/systemd-journald-audit.socket
4667
4668 nodist_systemunit_DATA += \
4669 units/systemd-journald.service \
4670 units/systemd-journal-flush.service \
4671 units/systemd-journal-catalog-update.service
4672
4673 dist_pkgsysconf_DATA += \
4674 src/journal/journald.conf
4675
4676 nodist_catalog_DATA = \
4677 catalog/systemd.bg.catalog \
4678 catalog/systemd.be.catalog \
4679 catalog/systemd.be@latin.catalog \
4680 catalog/systemd.fr.catalog \
4681 catalog/systemd.it.catalog \
4682 catalog/systemd.pl.catalog \
4683 catalog/systemd.pt_BR.catalog \
4684 catalog/systemd.ru.catalog \
4685 catalog/systemd.zh_CN.catalog \
4686 catalog/systemd.zh_TW.catalog \
4687 catalog/systemd.catalog
4688
4689 EXTRA_DIST += \
4690 $(nodist_catalog_DATA:.catalog=.catalog.in)
4691
4692 # Note that we don't use @@ for replacement markers here, but %%. This is
4693 # because the catalog uses @@ already for its runtime replacement handling and
4694 # we don't want to conflict with that.
4695 catalog/%.catalog: catalog/%.catalog.in
4696 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4697 $(SED) -e 's~%SUPPORT_URL%~$(SUPPORT_URL)~' < $< > $@
4698
4699 SOCKETS_TARGET_WANTS += \
4700 systemd-journald.socket \
4701 systemd-journald-dev-log.socket \
4702 systemd-journald-audit.socket
4703
4704 SYSINIT_TARGET_WANTS += \
4705 systemd-journald.service \
4706 systemd-journal-flush.service \
4707 systemd-journal-catalog-update.service
4708
4709 EXTRA_DIST += \
4710 units/systemd-journald.service.in \
4711 units/systemd-journal-flush.service.in \
4712 units/systemd-journal-catalog-update.service.in
4713
4714 gperf_gperf_sources += \
4715 src/journal/journald-gperf.gperf
4716
4717 # ------------------------------------------------------------------------------
4718 if HAVE_MICROHTTPD
4719 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4720
4721 rootlibexec_PROGRAMS += \
4722 systemd-journal-gatewayd
4723
4724 systemd_journal_gatewayd_SOURCES = \
4725 src/journal-remote/journal-gatewayd.c \
4726 src/journal-remote/microhttpd-util.h \
4727 src/journal-remote/microhttpd-util.c
4728
4729 systemd_journal_gatewayd_LDADD = \
4730 libsystemd-shared.la \
4731 $(MICROHTTPD_LIBS)
4732
4733 if HAVE_GNUTLS
4734 systemd_journal_gatewayd_LDADD += \
4735 $(GNUTLS_LIBS)
4736 endif
4737
4738 systemd_journal_gatewayd_CFLAGS = \
4739 $(AM_CFLAGS) \
4740 $(MICROHTTPD_CFLAGS)
4741
4742 systemd_journal_gatewayd_CPPFLAGS = \
4743 $(AM_CPPFLAGS) \
4744 -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4745
4746 dist_systemunit_DATA += \
4747 units/systemd-journal-gatewayd.socket
4748
4749 nodist_systemunit_DATA += \
4750 units/systemd-journal-gatewayd.service
4751
4752 dist_gatewayddocumentroot_DATA = \
4753 src/journal-remote/browse.html
4754
4755 endif
4756
4757 EXTRA_DIST += \
4758 units/systemd-journal-gatewayd.service.in
4759
4760 # ------------------------------------------------------------------------------
4761
4762 systemd_socket_proxyd_SOURCES = \
4763 src/socket-proxy/socket-proxyd.c
4764
4765 systemd_socket_proxyd_LDADD = \
4766 libsystemd-shared.la
4767
4768 # ------------------------------------------------------------------------------
4769 if ENABLE_COREDUMP
4770 systemd_coredump_SOURCES = \
4771 src/coredump/coredump.c \
4772 src/coredump/coredump-vacuum.c \
4773 src/coredump/coredump-vacuum.h
4774
4775 systemd_coredump_CFLAGS = \
4776 $(AM_CFLAGS) \
4777 $(ACL_CFLAGS)
4778
4779 systemd_coredump_LDADD = \
4780 libsystemd-shared.la \
4781 $(ACL_LIBS)
4782
4783 if HAVE_ELFUTILS
4784 systemd_coredump_SOURCES += \
4785 src/coredump/stacktrace.c \
4786 src/coredump/stacktrace.h
4787
4788 systemd_coredump_LDADD += \
4789 $(ELFUTILS_LIBS)
4790 endif
4791
4792 nodist_systemunit_DATA += \
4793 units/systemd-coredump@.service
4794
4795 dist_systemunit_DATA += \
4796 units/systemd-coredump.socket
4797
4798 SOCKETS_TARGET_WANTS += \
4799 systemd-coredump.socket
4800
4801 rootlibexec_PROGRAMS += \
4802 systemd-coredump
4803
4804 dist_pkgsysconf_DATA += \
4805 src/coredump/coredump.conf
4806
4807 coredumpctl_SOURCES = \
4808 src/coredump/coredumpctl.c
4809
4810 coredumpctl_LDADD = \
4811 libsystemd-shared.la
4812
4813 bin_PROGRAMS += \
4814 coredumpctl
4815
4816 manual_tests += \
4817 test-coredump-vacuum
4818
4819 test_coredump_vacuum_SOURCES = \
4820 src/coredump/test-coredump-vacuum.c \
4821 src/coredump/coredump-vacuum.c \
4822 src/coredump/coredump-vacuum.h
4823
4824 test_coredump_vacuum_LDADD = \
4825 libsystemd-shared.la
4826
4827 dist_bashcompletion_data += \
4828 shell-completion/bash/coredumpctl
4829
4830 dist_zshcompletion_data += \
4831 shell-completion/zsh/_coredumpctl
4832
4833 nodist_sysctl_DATA = \
4834 sysctl.d/50-coredump.conf
4835
4836 CLEANFILES += \
4837 sysctl.d/50-coredump.conf
4838 endif
4839
4840 EXTRA_DIST += \
4841 sysctl.d/50-coredump.conf.in \
4842 units/systemd-coredump@.service.in
4843
4844 # ------------------------------------------------------------------------------
4845 if ENABLE_BINFMT
4846 systemd_binfmt_SOURCES = \
4847 src/binfmt/binfmt.c
4848
4849 systemd_binfmt_LDADD = \
4850 libsystemd-shared.la
4851
4852 rootlibexec_PROGRAMS += \
4853 systemd-binfmt
4854
4855 dist_systemunit_DATA += \
4856 units/proc-sys-fs-binfmt_misc.automount \
4857 units/proc-sys-fs-binfmt_misc.mount
4858
4859 nodist_systemunit_DATA += \
4860 units/systemd-binfmt.service
4861
4862 INSTALL_DIRS += \
4863 $(prefix)/lib/binfmt.d \
4864 $(sysconfdir)/binfmt.d
4865
4866 SYSINIT_TARGET_WANTS += \
4867 systemd-binfmt.service \
4868 proc-sys-fs-binfmt_misc.automount
4869
4870 endif
4871
4872 EXTRA_DIST += \
4873 units/systemd-binfmt.service.in
4874
4875 # ------------------------------------------------------------------------------
4876 if ENABLE_VCONSOLE
4877 systemd_vconsole_setup_SOURCES = \
4878 src/vconsole/vconsole-setup.c
4879
4880 systemd_vconsole_setup_LDADD = \
4881 libsystemd-shared.la
4882
4883 rootlibexec_PROGRAMS += \
4884 systemd-vconsole-setup
4885
4886 nodist_udevrules_DATA += \
4887 src/vconsole/90-vconsole.rules
4888
4889 nodist_systemunit_DATA += \
4890 units/systemd-vconsole-setup.service
4891 endif
4892
4893 EXTRA_DIST += \
4894 src/vconsole/90-vconsole.rules.in \
4895 units/systemd-vconsole-setup.service.in
4896
4897 # ------------------------------------------------------------------------------
4898 if ENABLE_QUOTACHECK
4899 rootlibexec_PROGRAMS += \
4900 systemd-quotacheck
4901
4902 nodist_systemunit_DATA += \
4903 units/systemd-quotacheck.service
4904
4905 systemd_quotacheck_SOURCES = \
4906 src/quotacheck/quotacheck.c
4907
4908 systemd_quotacheck_LDADD = \
4909 libsystemd-shared.la
4910 endif
4911
4912 EXTRA_DIST += \
4913 units/systemd-quotacheck.service.in
4914
4915 nodist_systemunit_DATA += \
4916 units/quotaon.service
4917
4918 # ------------------------------------------------------------------------------
4919 if ENABLE_RANDOMSEED
4920 rootlibexec_PROGRAMS += \
4921 systemd-random-seed
4922
4923 nodist_systemunit_DATA += \
4924 units/systemd-random-seed.service
4925
4926 systemd_random_seed_SOURCES = \
4927 src/random-seed/random-seed.c
4928
4929 systemd_random_seed_LDADD = \
4930 libsystemd-shared.la
4931
4932 SYSINIT_TARGET_WANTS += \
4933 systemd-random-seed.service
4934
4935 endif
4936
4937 EXTRA_DIST += \
4938 units/systemd-random-seed.service.in
4939
4940 # ------------------------------------------------------------------------------
4941 if ENABLE_BACKLIGHT
4942 rootlibexec_PROGRAMS += \
4943 systemd-backlight
4944
4945 nodist_systemunit_DATA += \
4946 units/systemd-backlight@.service
4947
4948 systemd_backlight_SOURCES = \
4949 src/backlight/backlight.c
4950
4951 systemd_backlight_LDADD = \
4952 libsystemd-shared.la
4953 endif
4954
4955 EXTRA_DIST += \
4956 units/systemd-backlight@.service.in
4957
4958 # ------------------------------------------------------------------------------
4959 if ENABLE_RFKILL
4960 rootlibexec_PROGRAMS += \
4961 systemd-rfkill
4962
4963 nodist_systemunit_DATA += \
4964 units/systemd-rfkill.service
4965
4966 dist_systemunit_DATA += \
4967 units/systemd-rfkill.socket
4968
4969 systemd_rfkill_SOURCES = \
4970 src/rfkill/rfkill.c
4971
4972 systemd_rfkill_LDADD = \
4973 libsystemd-shared.la
4974 endif
4975
4976 EXTRA_DIST += \
4977 units/systemd-rfkill.service.in
4978
4979 # ------------------------------------------------------------------------------
4980 if HAVE_LIBCRYPTSETUP
4981 rootlibexec_PROGRAMS += \
4982 systemd-cryptsetup \
4983 systemd-veritysetup
4984
4985 systemgenerator_PROGRAMS += \
4986 systemd-cryptsetup-generator \
4987 systemd-veritysetup-generator
4988
4989 dist_systemunit_DATA += \
4990 units/cryptsetup.target \
4991 units/cryptsetup-pre.target
4992
4993 systemd_cryptsetup_SOURCES = \
4994 src/cryptsetup/cryptsetup.c
4995
4996 systemd_cryptsetup_CFLAGS = \
4997 $(AM_CFLAGS) \
4998 $(LIBCRYPTSETUP_CFLAGS)
4999
5000 systemd_cryptsetup_LDADD = \
5001 libsystemd-shared.la \
5002 $(LIBCRYPTSETUP_LIBS)
5003
5004 systemd_cryptsetup_generator_SOURCES = \
5005 src/cryptsetup/cryptsetup-generator.c
5006
5007 systemd_cryptsetup_generator_LDADD = \
5008 libsystemd-shared.la
5009
5010 systemd_veritysetup_SOURCES = \
5011 src/veritysetup/veritysetup.c
5012
5013 systemd_veritysetup_CFLAGS = \
5014 $(AM_CFLAGS) \
5015 $(LIBCRYPTSETUP_CFLAGS)
5016
5017 systemd_veritysetup_LDADD = \
5018 libsystemd-shared.la \
5019 $(LIBCRYPTSETUP_LIBS)
5020
5021 systemd_veritysetup_generator_SOURCES = \
5022 src/veritysetup/veritysetup-generator.c
5023
5024 systemd_veritysetup_generator_LDADD = \
5025 libsystemd-shared.la
5026
5027 SYSINIT_TARGET_WANTS += \
5028 cryptsetup.target
5029
5030 endif
5031
5032 # ------------------------------------------------------------------------------
5033 if ENABLE_HOSTNAMED
5034 systemd_hostnamed_SOURCES = \
5035 src/hostname/hostnamed.c
5036
5037 systemd_hostnamed_LDADD = \
5038 libsystemd-shared.la
5039
5040 rootlibexec_PROGRAMS += \
5041 systemd-hostnamed
5042
5043 nodist_systemunit_DATA += \
5044 units/systemd-hostnamed.service
5045
5046 dist_systemunit_DATA_busnames += \
5047 units/org.freedesktop.hostname1.busname
5048
5049 dist_dbuspolicy_DATA += \
5050 src/hostname/org.freedesktop.hostname1.conf
5051
5052 dist_dbussystemservice_DATA += \
5053 src/hostname/org.freedesktop.hostname1.service
5054
5055 polkitpolicy_files += \
5056 src/hostname/org.freedesktop.hostname1.policy
5057
5058 SYSTEM_UNIT_ALIASES += \
5059 systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
5060
5061 BUSNAMES_TARGET_WANTS += \
5062 org.freedesktop.hostname1.busname
5063
5064 hostnamectl_SOURCES = \
5065 src/hostname/hostnamectl.c
5066
5067 hostnamectl_LDADD = \
5068 libsystemd-shared.la
5069
5070 bin_PROGRAMS += \
5071 hostnamectl
5072
5073 dist_bashcompletion_data += \
5074 shell-completion/bash/hostnamectl
5075
5076 dist_zshcompletion_data += \
5077 shell-completion/zsh/_hostnamectl
5078 endif
5079
5080 polkitpolicy_in_files += \
5081 src/hostname/org.freedesktop.hostname1.policy.in
5082
5083 EXTRA_DIST += \
5084 units/systemd-hostnamed.service.in
5085
5086 # ------------------------------------------------------------------------------
5087 dist_systemunit_DATA_busnames += \
5088 units/org.freedesktop.systemd1.busname
5089
5090 BUSNAMES_TARGET_WANTS += \
5091 org.freedesktop.systemd1.busname
5092
5093 # ------------------------------------------------------------------------------
5094 if ENABLE_LOCALED
5095 systemd_localed_SOURCES = \
5096 src/locale/localed.c \
5097 src/locale/keymap-util.c \
5098 src/locale/keymap-util.h
5099
5100 systemd_localed_LDADD = \
5101 libsystemd-shared.la \
5102 -ldl
5103
5104 nodist_systemunit_DATA += \
5105 units/systemd-localed.service
5106
5107 dist_systemunit_DATA_busnames += \
5108 units/org.freedesktop.locale1.busname
5109
5110 rootlibexec_PROGRAMS += \
5111 systemd-localed
5112
5113 dist_dbuspolicy_DATA += \
5114 src/locale/org.freedesktop.locale1.conf
5115
5116 dist_dbussystemservice_DATA += \
5117 src/locale/org.freedesktop.locale1.service
5118
5119 polkitpolicy_files += \
5120 src/locale/org.freedesktop.locale1.policy
5121
5122 SYSTEM_UNIT_ALIASES += \
5123 systemd-localed.service dbus-org.freedesktop.locale1.service
5124
5125 BUSNAMES_TARGET_WANTS += \
5126 org.freedesktop.locale1.busname
5127
5128 dist_pkgdata_DATA = \
5129 src/locale/kbd-model-map \
5130 src/locale/language-fallback-map
5131
5132 test_keymap_util_SOURCES = \
5133 src/locale/test-keymap-util.c \
5134 src/locale/keymap-util.c \
5135 src/locale/keymap-util.h
5136
5137 test_keymap_util_LDADD = \
5138 libsystemd-shared.la \
5139 -ldl
5140
5141 tests += \
5142 test-keymap-util
5143
5144 localectl_SOURCES = \
5145 src/locale/localectl.c
5146
5147 localectl_LDADD = \
5148 libsystemd-shared.la
5149
5150 bin_PROGRAMS += \
5151 localectl
5152
5153 dist_bashcompletion_data += \
5154 shell-completion/bash/localectl
5155
5156 dist_zshcompletion_data += \
5157 shell-completion/zsh/_localectl
5158 endif
5159
5160 polkitpolicy_in_files += \
5161 src/locale/org.freedesktop.locale1.policy.in
5162
5163 EXTRA_DIST += \
5164 units/systemd-localed.service.in
5165
5166 # ------------------------------------------------------------------------------
5167 if ENABLE_TIMEDATED
5168 systemd_timedated_SOURCES = \
5169 src/timedate/timedated.c
5170
5171 systemd_timedated_LDADD = \
5172 libsystemd-shared.la
5173
5174 rootlibexec_PROGRAMS += \
5175 systemd-timedated
5176
5177 dist_dbussystemservice_DATA += \
5178 src/timedate/org.freedesktop.timedate1.service
5179
5180 dist_dbuspolicy_DATA += \
5181 src/timedate/org.freedesktop.timedate1.conf
5182
5183 nodist_systemunit_DATA += \
5184 units/systemd-timedated.service
5185
5186 dist_systemunit_DATA_busnames += \
5187 units/org.freedesktop.timedate1.busname
5188
5189 polkitpolicy_files += \
5190 src/timedate/org.freedesktop.timedate1.policy
5191
5192 SYSTEM_UNIT_ALIASES += \
5193 systemd-timedated.service dbus-org.freedesktop.timedate1.service
5194
5195 BUSNAMES_TARGET_WANTS += \
5196 org.freedesktop.timedate1.busname
5197
5198 timedatectl_SOURCES = \
5199 src/timedate/timedatectl.c
5200
5201 timedatectl_LDADD = \
5202 libsystemd-shared.la
5203
5204 bin_PROGRAMS += \
5205 timedatectl
5206
5207 dist_bashcompletion_data += \
5208 shell-completion/bash/timedatectl
5209
5210 dist_zshcompletion_data += \
5211 shell-completion/zsh/_timedatectl
5212 endif
5213
5214 polkitpolicy_in_files += \
5215 src/timedate/org.freedesktop.timedate1.policy.in
5216
5217 EXTRA_DIST += \
5218 units/systemd-timedated.service.in
5219
5220 # ------------------------------------------------------------------------------
5221 if ENABLE_TIMESYNCD
5222 systemd_timesyncd_SOURCES = \
5223 src/timesync/timesyncd.c \
5224 src/timesync/timesyncd-manager.c \
5225 src/timesync/timesyncd-manager.h \
5226 src/timesync/timesyncd-conf.c \
5227 src/timesync/timesyncd-conf.h \
5228 src/timesync/timesyncd-server.c \
5229 src/timesync/timesyncd-server.h
5230
5231 nodist_systemd_timesyncd_SOURCES = \
5232 src/timesync/timesyncd-gperf.c
5233
5234 systemd_timesyncd_LDADD = \
5235 libsystemd-network.la \
5236 libsystemd-shared.la \
5237 -lm
5238
5239 test_timesync_SOURCES = \
5240 src/timesync/test-timesync.c \
5241 src/timesync/timesyncd-manager.c \
5242 src/timesync/timesyncd-manager.h \
5243 src/timesync/timesyncd-conf.c \
5244 src/timesync/timesyncd-conf.h \
5245 src/timesync/timesyncd-server.c \
5246 src/timesync/timesyncd-server.h
5247
5248 nodist_test_timesync_SOURCES = \
5249 src/timesync/timesyncd-gperf.c
5250
5251 test_timesync_LDADD = \
5252 libsystemd-shared.la \
5253 -lm
5254
5255 tests += \
5256 test-timesync
5257
5258 rootlibexec_PROGRAMS += \
5259 systemd-timesyncd
5260
5261 nodist_systemunit_DATA += \
5262 units/systemd-timesyncd.service
5263
5264 GENERAL_ALIASES += \
5265 $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
5266
5267 nodist_pkgsysconf_DATA += \
5268 src/timesync/timesyncd.conf
5269
5270 endif
5271
5272 gperf_gperf_sources += \
5273 src/timesync/timesyncd-gperf.gperf
5274
5275 EXTRA_DIST += \
5276 units/systemd-timesyncd.service.in \
5277 src/timesync/timesyncd.conf.in
5278
5279 # ------------------------------------------------------------------------------
5280 test_nss_SOURCES = \
5281 src/test/test-nss.c
5282
5283 test_nss_LDADD = \
5284 libsystemd-internal.la \
5285 libbasic.la \
5286 -ldl
5287
5288 manual_tests += \
5289 test-nss
5290
5291 # ------------------------------------------------------------------------------
5292 if ENABLE_NSS_SYSTEMD
5293 libnss_systemd_la_SOURCES = \
5294 src/nss-systemd/nss-systemd.sym \
5295 src/nss-systemd/nss-systemd.c
5296
5297 libnss_systemd_la_LDFLAGS = \
5298 $(AM_LDFLAGS) \
5299 -module \
5300 -export-dynamic \
5301 -avoid-version \
5302 -shared \
5303 -shrext .so.2 \
5304 -Wl,--version-script=$(top_srcdir)/src/nss-systemd/nss-systemd.sym
5305
5306 libnss_systemd_la_LIBADD = \
5307 libsystemd-internal.la \
5308 libbasic.la
5309
5310 rootlib_LTLIBRARIES += \
5311 libnss_systemd.la
5312 endif
5313
5314 # ------------------------------------------------------------------------------
5315 if HAVE_MYHOSTNAME
5316 libnss_myhostname_la_SOURCES = \
5317 src/nss-myhostname/nss-myhostname.sym \
5318 src/nss-myhostname/nss-myhostname.c
5319
5320 libnss_myhostname_la_LDFLAGS = \
5321 $(AM_LDFLAGS) \
5322 -module \
5323 -export-dynamic \
5324 -avoid-version \
5325 -shared \
5326 -shrext .so.2 \
5327 -Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
5328
5329 libnss_myhostname_la_LIBADD = \
5330 libsystemd-internal.la \
5331 libbasic.la
5332
5333 rootlib_LTLIBRARIES += \
5334 libnss_myhostname.la
5335 endif
5336
5337 # ------------------------------------------------------------------------------
5338 if ENABLE_MACHINED
5339
5340 dist_systemunit_DATA += \
5341 units/var-lib-machines.mount
5342
5343 systemd_machined_SOURCES = \
5344 src/machine/machined.c \
5345 src/machine/machined.h
5346
5347 systemd_machined_LDADD = \
5348 libmachine-core.la
5349
5350 rootlibexec_PROGRAMS += \
5351 systemd-machined
5352
5353 libmachine_core_la_SOURCES = \
5354 src/machine/machine.c \
5355 src/machine/machine.h \
5356 src/machine/machined-dbus.c \
5357 src/machine/machine-dbus.c \
5358 src/machine/machine-dbus.h \
5359 src/machine/image-dbus.c \
5360 src/machine/image-dbus.h \
5361 src/machine/operation.c \
5362 src/machine/operation.h
5363
5364 libmachine_core_la_LIBADD = \
5365 libsystemd-shared.la
5366
5367 noinst_LTLIBRARIES += \
5368 libmachine-core.la
5369
5370 machinectl_SOURCES = \
5371 src/machine/machinectl.c
5372
5373 machinectl_LDADD = \
5374 libsystemd-shared.la
5375
5376 rootbin_PROGRAMS += \
5377 machinectl
5378
5379 test_machine_tables_SOURCES = \
5380 src/machine/test-machine-tables.c
5381
5382 test_machine_tables_LDADD = \
5383 libmachine-core.la
5384
5385 tests += \
5386 test-machine-tables
5387
5388 nodist_systemunit_DATA += \
5389 units/systemd-machined.service
5390
5391 dist_systemunit_DATA += \
5392 units/machine.slice
5393
5394 dist_systemunit_DATA_busnames += \
5395 units/org.freedesktop.machine1.busname
5396
5397 dist_dbussystemservice_DATA += \
5398 src/machine/org.freedesktop.machine1.service
5399
5400 dist_dbuspolicy_DATA += \
5401 src/machine/org.freedesktop.machine1.conf
5402
5403 polkitpolicy_files += \
5404 src/machine/org.freedesktop.machine1.policy
5405
5406 dist_bashcompletion_data += \
5407 shell-completion/bash/machinectl
5408
5409 dist_zshcompletion_data += \
5410 shell-completion/zsh/_machinectl \
5411 shell-completion/zsh/_sd_machines
5412
5413 SYSTEM_UNIT_ALIASES += \
5414 systemd-machined.service dbus-org.freedesktop.machine1.service
5415
5416 BUSNAMES_TARGET_WANTS += \
5417 org.freedesktop.machine1.busname
5418
5419 libnss_mymachines_la_SOURCES = \
5420 src/nss-mymachines/nss-mymachines.sym \
5421 src/nss-mymachines/nss-mymachines.c
5422
5423 libnss_mymachines_la_LDFLAGS = \
5424 $(AM_LDFLAGS) \
5425 -module \
5426 -export-dynamic \
5427 -avoid-version \
5428 -shared \
5429 -shrext .so.2 \
5430 -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
5431
5432 libnss_mymachines_la_LIBADD = \
5433 libsystemd-internal.la \
5434 libbasic.la
5435
5436 rootlib_LTLIBRARIES += \
5437 libnss_mymachines.la
5438
5439 endif
5440
5441 polkitpolicy_in_files += \
5442 src/machine/org.freedesktop.machine1.policy.in
5443
5444 EXTRA_DIST += \
5445 units/systemd-machined.service.in
5446
5447 # ------------------------------------------------------------------------------
5448 if ENABLE_IMPORTD
5449
5450 if HAVE_LIBCURL
5451 if HAVE_XZ
5452 if HAVE_ZLIB
5453 if HAVE_BZIP2
5454 if HAVE_GCRYPT
5455
5456 rootlibexec_PROGRAMS += \
5457 systemd-importd \
5458 systemd-pull \
5459 systemd-import \
5460 systemd-export
5461
5462 systemd_importd_SOURCES = \
5463 src/import/importd.c
5464
5465 systemd_importd_CFLAGS = \
5466 $(AM_CFLAGS) \
5467 -D SYSTEMD_PULL_PATH=\"$(rootlibexecdir)/systemd-pull\" \
5468 -D SYSTEMD_IMPORT_PATH=\"$(rootlibexecdir)/systemd-import\" \
5469 -D SYSTEMD_EXPORT_PATH=\"$(rootlibexecdir)/systemd-export\"
5470
5471 systemd_importd_LDADD = \
5472 libsystemd-shared.la
5473
5474 systemd_pull_SOURCES = \
5475 src/import/pull.c \
5476 src/import/pull-raw.c \
5477 src/import/pull-raw.h \
5478 src/import/pull-tar.c \
5479 src/import/pull-tar.h \
5480 src/import/pull-job.c \
5481 src/import/pull-job.h \
5482 src/import/pull-common.c \
5483 src/import/pull-common.h \
5484 src/import/import-common.c \
5485 src/import/import-common.h \
5486 src/import/import-compress.c \
5487 src/import/import-compress.h \
5488 src/import/curl-util.c \
5489 src/import/curl-util.h \
5490 src/import/qcow2-util.c \
5491 src/import/qcow2-util.h
5492
5493 systemd_pull_CFLAGS = \
5494 $(AM_CFLAGS) \
5495 $(LIBCURL_CFLAGS) \
5496 $(XZ_CFLAGS) \
5497 $(ZLIB_CFLAGS) \
5498 $(GCRYPT_CFLAGS) \
5499 -D VENDOR_KEYRING_PATH=\"$(rootlibexecdir)/import-pubring.gpg\" \
5500 -D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\"
5501
5502 systemd_pull_LDADD = \
5503 libsystemd-shared.la \
5504 $(LIBCURL_LIBS) \
5505 $(XZ_LIBS) \
5506 $(ZLIB_LIBS) \
5507 -lbz2 \
5508 $(GCRYPT_LIBS)
5509
5510 systemd_import_SOURCES = \
5511 src/import/import.c \
5512 src/import/import-raw.c \
5513 src/import/import-raw.h \
5514 src/import/import-tar.c \
5515 src/import/import-tar.h \
5516 src/import/import-common.c \
5517 src/import/import-common.h \
5518 src/import/import-compress.c \
5519 src/import/import-compress.h \
5520 src/import/qcow2-util.c \
5521 src/import/qcow2-util.h
5522
5523 systemd_import_CFLAGS = \
5524 $(AM_CFLAGS) \
5525 $(XZ_CFLAGS) \
5526 $(ZLIB_CFLAGS)
5527
5528 systemd_import_LDADD = \
5529 libsystemd-shared.la \
5530 $(XZ_LIBS) \
5531 $(ZLIB_LIBS) \
5532 -lbz2
5533
5534 systemd_export_SOURCES = \
5535 src/import/export.c \
5536 src/import/export-tar.c \
5537 src/import/export-tar.h \
5538 src/import/export-raw.c \
5539 src/import/export-raw.h \
5540 src/import/import-common.c \
5541 src/import/import-common.h \
5542 src/import/import-compress.c \
5543 src/import/import-compress.h
5544
5545 systemd_export_CFLAGS = \
5546 $(AM_CFLAGS) \
5547 $(XZ_CFLAGS) \
5548 $(ZLIB_CFLAGS)
5549
5550 systemd_export_LDADD = \
5551 libsystemd-shared.la \
5552 $(XZ_LIBS) \
5553 $(ZLIB_LIBS) \
5554 -lbz2
5555
5556 dist_rootlibexec_DATA += \
5557 src/import/import-pubring.gpg
5558
5559 nodist_systemunit_DATA += \
5560 units/systemd-importd.service
5561
5562 dist_systemunit_DATA_busnames += \
5563 units/org.freedesktop.import1.busname
5564
5565 BUSNAMES_TARGET_WANTS += \
5566 org.freedesktop.import1.busname
5567
5568 SYSTEM_UNIT_ALIASES += \
5569 systemd-importd.service dbus-org.freedesktop.import1.service
5570
5571 dist_dbussystemservice_DATA += \
5572 src/import/org.freedesktop.import1.service
5573
5574 dist_dbuspolicy_DATA += \
5575 src/import/org.freedesktop.import1.conf
5576
5577 polkitpolicy_files += \
5578 src/import/org.freedesktop.import1.policy
5579
5580 manual_tests += \
5581 test-qcow2
5582
5583 test_qcow2_SOURCES = \
5584 src/import/test-qcow2.c \
5585 src/import/qcow2-util.c \
5586 src/import/qcow2-util.h
5587
5588 test_qcow2_CFLAGS = \
5589 $(AM_CFLAGS) \
5590 $(ZLIB_CFLAGS)
5591
5592 test_qcow2_LDADD = \
5593 libsystemd-shared.la \
5594 $(ZLIB_LIBS)
5595
5596 endif
5597 endif
5598 endif
5599 endif
5600 endif
5601
5602 endif
5603
5604 polkitpolicy_in_files += \
5605 src/import/org.freedesktop.import1.policy.in
5606
5607 EXTRA_DIST += \
5608 units/systemd-importd.service.in
5609
5610
5611 # ------------------------------------------------------------------------------
5612 if ENABLE_RESOLVED
5613
5614 basic_dns_sources = \
5615 src/resolve/resolved-dns-dnssec.c \
5616 src/resolve/resolved-dns-dnssec.h \
5617 src/resolve/resolved-dns-packet.c \
5618 src/resolve/resolved-dns-packet.h \
5619 src/resolve/resolved-dns-rr.c \
5620 src/resolve/resolved-dns-rr.h \
5621 src/resolve/resolved-dns-answer.c \
5622 src/resolve/resolved-dns-answer.h \
5623 src/resolve/resolved-dns-question.c \
5624 src/resolve/resolved-dns-question.h \
5625 src/resolve/dns-type.c \
5626 src/resolve/dns-type.h
5627
5628 systemd_resolved_SOURCES = \
5629 src/resolve/resolved.c \
5630 src/resolve/resolved-manager.c \
5631 src/resolve/resolved-manager.h \
5632 src/resolve/resolved-conf.c \
5633 src/resolve/resolved-conf.h \
5634 src/resolve/resolved-resolv-conf.c \
5635 src/resolve/resolved-resolv-conf.h \
5636 src/resolve/resolved-bus.c \
5637 src/resolve/resolved-bus.h \
5638 src/resolve/resolved-link.h \
5639 src/resolve/resolved-link.c \
5640 src/resolve/resolved-link-bus.c \
5641 src/resolve/resolved-link-bus.h \
5642 src/resolve/resolved-llmnr.h \
5643 src/resolve/resolved-llmnr.c \
5644 src/resolve/resolved-mdns.h \
5645 src/resolve/resolved-mdns.c \
5646 src/resolve/resolved-def.h \
5647 $(basic_dns_sources) \
5648 src/resolve/resolved-dns-query.h \
5649 src/resolve/resolved-dns-query.c \
5650 src/resolve/resolved-dns-synthesize.h \
5651 src/resolve/resolved-dns-synthesize.c \
5652 src/resolve/resolved-dns-transaction.h \
5653 src/resolve/resolved-dns-transaction.c \
5654 src/resolve/resolved-dns-scope.h \
5655 src/resolve/resolved-dns-scope.c \
5656 src/resolve/resolved-dns-server.h \
5657 src/resolve/resolved-dns-server.c \
5658 src/resolve/resolved-dns-search-domain.h \
5659 src/resolve/resolved-dns-search-domain.c \
5660 src/resolve/resolved-dns-cache.h \
5661 src/resolve/resolved-dns-cache.c \
5662 src/resolve/resolved-dns-zone.h \
5663 src/resolve/resolved-dns-zone.c \
5664 src/resolve/resolved-dns-stream.h \
5665 src/resolve/resolved-dns-stream.c \
5666 src/resolve/resolved-dns-trust-anchor.h \
5667 src/resolve/resolved-dns-trust-anchor.c \
5668 src/resolve/resolved-dns-stub.h \
5669 src/resolve/resolved-dns-stub.c \
5670 src/resolve/resolved-etc-hosts.h \
5671 src/resolve/resolved-etc-hosts.c \
5672 src/shared/gcrypt-util.c \
5673 src/shared/gcrypt-util.h
5674
5675 nodist_systemd_resolved_SOURCES = \
5676 src/resolve/dns_type-from-name.h \
5677 src/resolve/dns_type-to-name.h \
5678 src/resolve/resolved-gperf.c
5679
5680 systemd_resolved_CFLAGS = \
5681 $(AM_CFLAGS) \
5682 $(GCRYPT_CFLAGS)
5683
5684 systemd_resolved_LDADD = \
5685 libsystemd-network.la \
5686 libsystemd-shared.la \
5687 $(GCRYPT_LIBS) \
5688 -lm
5689
5690 rootlibexec_PROGRAMS += \
5691 systemd-resolved
5692
5693 nodist_systemunit_DATA += \
5694 units/systemd-resolved.service
5695
5696 dist_systemunit_DATA_busnames += \
5697 units/org.freedesktop.resolve1.busname
5698
5699 dist_dbuspolicy_DATA += \
5700 src/resolve/org.freedesktop.resolve1.conf
5701
5702 dist_dbussystemservice_DATA += \
5703 src/resolve/org.freedesktop.resolve1.service
5704
5705 BUSNAMES_TARGET_WANTS += \
5706 org.freedesktop.resolve1.busname
5707
5708 GENERAL_ALIASES += \
5709 $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service \
5710 $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/dbus-org.freedesktop.resolve1.service
5711
5712 nodist_pkgsysconf_DATA += \
5713 src/resolve/resolved.conf
5714
5715 dist_rootlibexec_DATA += \
5716 src/resolve/resolv.conf
5717
5718 libnss_resolve_la_SOURCES = \
5719 src/nss-resolve/nss-resolve.sym \
5720 src/nss-resolve/nss-resolve.c
5721
5722 libnss_resolve_la_LDFLAGS = \
5723 $(AM_LDFLAGS) \
5724 -module \
5725 -export-dynamic \
5726 -avoid-version \
5727 -shared \
5728 -shrext .so.2 \
5729 -Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
5730
5731 libnss_resolve_la_LIBADD = \
5732 libsystemd-internal.la \
5733 libbasic.la
5734
5735 rootlib_LTLIBRARIES += \
5736 libnss_resolve.la
5737
5738 systemd_resolve_SOURCES = \
5739 src/resolve/resolve-tool.c \
5740 $(basic_dns_sources) \
5741 src/shared/gcrypt-util.c \
5742 src/shared/gcrypt-util.h
5743
5744 nodist_systemd_resolve_SOURCES = \
5745 src/resolve/dns_type-from-name.h \
5746 src/resolve/dns_type-to-name.h
5747
5748 systemd_resolve_CFLAGS = \
5749 $(AM_CFLAGS) \
5750 $(GCRYPT_CFLAGS)
5751
5752 systemd_resolve_LDADD = \
5753 libsystemd-shared.la \
5754 $(GCRYPT_LIBS) \
5755 -lm
5756
5757 bin_PROGRAMS += \
5758 systemd-resolve
5759
5760 dist_bashcompletion_data += \
5761 shell-completion/bash/systemd-resolve
5762
5763 dist_zshcompletion_data += \
5764 shell-completion/zsh/_systemd-resolve
5765
5766 tests += \
5767 test-dns-packet \
5768 test-resolve-tables \
5769 test-resolved-packet \
5770 test-dnssec
5771
5772 manual_tests += \
5773 test-dnssec-complex
5774
5775 test_resolve_tables_SOURCES = \
5776 src/resolve/test-resolve-tables.c \
5777 src/resolve/dns_type-from-name.h \
5778 src/resolve/dns_type-to-name.h \
5779 $(basic_dns_sources) \
5780 src/shared/test-tables.h
5781
5782 test_resolve_tables_CFLAGS = \
5783 $(AM_CFLAGS) \
5784 $(GCRYPT_CFLAGS)
5785
5786 test_resolve_tables_LDADD = \
5787 libsystemd-shared.la \
5788 $(GCRYPT_LIBS) \
5789 -lm
5790
5791 test_resolved_packet_SOURCES = \
5792 src/resolve/test-resolved-packet.c \
5793 $(basic_dns_sources)
5794
5795 test_resolved_packet_CFLAGS = \
5796 $(AM_CFLAGS) \
5797 $(GCRYPT_CFLAGS)
5798
5799 test_resolved_packet_LDADD = \
5800 libsystemd-shared.la \
5801 $(GCRYPT_LIBS) \
5802 -lm
5803
5804 test_dns_packet_SOURCES = \
5805 src/resolve/test-dns-packet.c \
5806 $(basic_dns_sources)
5807
5808 test_dns_packet_CPPFLAGS = \
5809 $(AM_CPPFLAGS) \
5810 -I $(top_srcdir)/src/test
5811
5812 test_dns_packet_CFLAGS = \
5813 $(AM_CFLAGS) \
5814 $(GCRYPT_CFLAGS)
5815
5816 test_dns_packet_LDADD = \
5817 libsystemd-shared.la \
5818 $(GCRYPT_LIBS) \
5819 -lm
5820
5821 TEST_DATA_FILES += \
5822 test/test-resolve/_openpgpkey.fedoraproject.org.pkts \
5823 test/test-resolve/fedoraproject.org.pkts \
5824 test/test-resolve/gandi.net.pkts \
5825 test/test-resolve/google.com.pkts \
5826 test/test-resolve/root.pkts \
5827 test/test-resolve/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
5828 test/test-resolve/teamits.com.pkts \
5829 test/test-resolve/zbyszek@fedoraproject.org.pkts \
5830 test/test-resolve/_443._tcp.fedoraproject.org.pkts \
5831 test/test-resolve/kyhwana.org.pkts \
5832 test/test-resolve/fake-caa.pkts
5833
5834 EXTRA_DIST += $(TEST_DATA_FILES)
5835
5836 test_dnssec_SOURCES = \
5837 src/resolve/test-dnssec.c \
5838 $(basic_dns_sources)
5839
5840 test_dnssec_CFLAGS = \
5841 $(AM_CFLAGS) \
5842 $(GCRYPT_CFLAGS)
5843
5844 test_dnssec_LDADD = \
5845 libsystemd-shared.la \
5846 $(GCRYPT_LIBS) \
5847 -lm
5848
5849 test_dnssec_complex_SOURCES = \
5850 src/resolve/test-dnssec-complex.c \
5851 src/resolve/dns-type.c \
5852 src/resolve/dns-type.h
5853
5854 test_dnssec_complex_LDADD = \
5855 libsystemd-shared.la
5856
5857 endif
5858
5859 gperf_txt_sources += \
5860 src/resolve/dns_type-list.txt
5861
5862 gperf_gperf_sources += \
5863 src/resolve/resolved-gperf.gperf
5864
5865 EXTRA_DIST += \
5866 units/systemd-resolved.service.m4.in \
5867 src/resolve/resolved.conf.in
5868
5869 # ------------------------------------------------------------------------------
5870 if ENABLE_NETWORKD
5871 rootlibexec_PROGRAMS += \
5872 systemd-networkd
5873
5874 systemd_networkd_SOURCES = \
5875 src/network/networkd.c
5876
5877 systemd_networkd_LDADD = \
5878 libnetworkd-core.la
5879
5880 if HAVE_LIBIPTC
5881 systemd_networkd_LDADD += \
5882 libfirewall.la
5883 endif
5884
5885 noinst_LTLIBRARIES += \
5886 libnetworkd-core.la
5887
5888 libnetworkd_core_la_CFLAGS = \
5889 $(AM_CFLAGS)
5890
5891 libnetworkd_core_la_SOURCES = \
5892 src/libsystemd-network/network-internal.h \
5893 src/network/netdev/netdev.h \
5894 src/network/netdev/netdev.c \
5895 src/network/netdev/vrf.h \
5896 src/network/netdev/vrf.c \
5897 src/network/netdev/tunnel.h \
5898 src/network/netdev/tunnel.c \
5899 src/network/netdev/veth.h \
5900 src/network/netdev/veth.c \
5901 src/network/netdev/vxlan.h \
5902 src/network/netdev/vxlan.c \
5903 src/network/netdev/geneve.h \
5904 src/network/netdev/geneve.c \
5905 src/network/netdev/vlan.h \
5906 src/network/netdev/vlan.c \
5907 src/network/netdev/macvlan.h \
5908 src/network/netdev/macvlan.c \
5909 src/network/netdev/ipvlan.h \
5910 src/network/netdev/ipvlan.c \
5911 src/network/netdev/dummy.h \
5912 src/network/netdev/dummy.c \
5913 src/network/netdev/tuntap.h \
5914 src/network/netdev/tuntap.c \
5915 src/network/netdev/bond.h \
5916 src/network/netdev/bond.c \
5917 src/network/netdev/bridge.h \
5918 src/network/netdev/bridge.c \
5919 src/network/netdev/vcan.h \
5920 src/network/netdev/vcan.c \
5921 src/network/networkd-manager.h \
5922 src/network/networkd-manager.c \
5923 src/network/networkd-manager-bus.c \
5924 src/network/networkd-conf.h \
5925 src/network/networkd-conf.c \
5926 src/network/networkd-link.h \
5927 src/network/networkd-link.c \
5928 src/network/networkd-link-bus.c \
5929 src/network/networkd-ipv4ll.c \
5930 src/network/networkd-ipv6-proxy-ndp.h \
5931 src/network/networkd-ipv6-proxy-ndp.c \
5932 src/network/networkd-dhcp4.c \
5933 src/network/networkd-dhcp6.c \
5934 src/network/networkd-ndisc.h \
5935 src/network/networkd-radv.c \
5936 src/network/networkd-radv.h \
5937 src/network/networkd-ndisc.c \
5938 src/network/networkd-network.h \
5939 src/network/networkd-network.c \
5940 src/network/networkd-network-bus.c \
5941 src/network/networkd-address.h \
5942 src/network/networkd-address.c \
5943 src/network/networkd-address-label.h \
5944 src/network/networkd-address-label.c \
5945 src/network/networkd-route.h \
5946 src/network/networkd-route.c \
5947 src/network/networkd-fdb.h \
5948 src/network/networkd-fdb.c \
5949 src/network/networkd-brvlan.h \
5950 src/network/networkd-brvlan.c \
5951 src/network/networkd-address-pool.h \
5952 src/network/networkd-address-pool.c \
5953 src/network/networkd-util.h \
5954 src/network/networkd-util.c \
5955 src/network/networkd-lldp-tx.h \
5956 src/network/networkd-lldp-tx.c
5957
5958 nodist_libnetworkd_core_la_SOURCES = \
5959 src/network/networkd-gperf.c \
5960 src/network/networkd-network-gperf.c \
5961 src/network/netdev/netdev-gperf.c
5962
5963 libnetworkd_core_la_LIBADD = \
5964 libsystemd-network.la \
5965 libsystemd-shared.la
5966
5967 rootlibexec_PROGRAMS += \
5968 systemd-networkd-wait-online
5969
5970 systemd_networkd_wait_online_CFLAGS = \
5971 $(AM_CFLAGS)
5972
5973 systemd_networkd_wait_online_SOURCES = \
5974 src/libsystemd-network/network-internal.h \
5975 src/network/wait-online/link.h \
5976 src/network/wait-online/link.c \
5977 src/network/wait-online/manager.h \
5978 src/network/wait-online/manager.c \
5979 src/network/wait-online/wait-online.c
5980
5981 systemd_networkd_wait_online_LDADD = \
5982 libsystemd-network.la \
5983 libsystemd-shared.la
5984
5985 rootbin_PROGRAMS += \
5986 networkctl
5987
5988 networkctl_SOURCES = \
5989 src/network/networkctl.c
5990
5991 networkctl_LDADD = \
5992 libsystemd-shared.la \
5993 libsystemd-network.la
5994
5995 dist_bashcompletion_data += \
5996 shell-completion/bash/networkctl
5997
5998 dist_zshcompletion_data += \
5999 shell-completion/zsh/_networkctl
6000
6001 test_networkd_conf_SOURCES = \
6002 src/network/test-networkd-conf.c
6003
6004 test_networkd_conf_LDADD = \
6005 libnetworkd-core.la
6006
6007 test_network_SOURCES = \
6008 src/network/test-network.c
6009
6010 test_network_LDADD = \
6011 libnetworkd-core.la
6012
6013 if HAVE_LIBIPTC
6014 test_network_LDADD += \
6015 libfirewall.la
6016 endif
6017
6018 test_network_tables_SOURCES = \
6019 src/network/test-network-tables.c \
6020 src/shared/test-tables.h
6021
6022 test_network_tables_LDADD = \
6023 libnetworkd-core.la \
6024 libudev-core.la
6025
6026 if HAVE_LIBIPTC
6027 test_network_tables_LDADD += \
6028 libfirewall.la
6029 endif
6030
6031 tests += \
6032 test-networkd-conf \
6033 test-network \
6034 test-network-tables
6035
6036 dist_systemunit_DATA += \
6037 units/systemd-networkd.socket
6038
6039 nodist_systemunit_DATA += \
6040 units/systemd-networkd.service \
6041 units/systemd-networkd-wait-online.service
6042
6043 dist_systemunit_DATA_busnames += \
6044 units/org.freedesktop.network1.busname
6045
6046 dist_dbussystemservice_DATA += \
6047 src/network/org.freedesktop.network1.service
6048
6049 dist_dbuspolicy_DATA += \
6050 src/network/org.freedesktop.network1.conf
6051
6052 GENERAL_ALIASES += \
6053 $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \
6054 $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
6055 $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service \
6056 $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/dbus-org.freedesktop.network1.service
6057
6058 BUSNAMES_TARGET_WANTS += \
6059 org.freedesktop.network1.busname
6060
6061 polkitrules_files += \
6062 src/network/systemd-networkd.rules
6063
6064 polkitpkla_files += \
6065 src/network/systemd-networkd.pkla
6066
6067 endif
6068
6069 gperf_gperf_sources += \
6070 src/network/networkd-gperf.gperf \
6071 src/network/networkd-network-gperf.gperf \
6072 src/network/netdev/netdev-gperf.gperf
6073
6074 EXTRA_DIST += \
6075 src/network/systemd-networkd.rules \
6076 src/network/systemd-networkd.pkla \
6077 units/systemd-networkd.service.m4.in \
6078 units/systemd-networkd-wait-online.service.in \
6079 test/networkd-test.py \
6080 test/test-exec-deserialization.py
6081
6082 # ------------------------------------------------------------------------------
6083 if ENABLE_LOGIND
6084 systemd_logind_SOURCES = \
6085 src/login/logind.c \
6086 src/login/logind.h
6087
6088 nodist_systemd_logind_SOURCES = \
6089 src/login/logind-gperf.c
6090
6091 systemd_logind_LDADD = \
6092 liblogind-core.la
6093
6094 liblogind_core_la_SOURCES = \
6095 src/login/logind-core.c \
6096 src/login/logind-device.c \
6097 src/login/logind-device.h \
6098 src/login/logind-button.c \
6099 src/login/logind-button.h \
6100 src/login/logind-action.c \
6101 src/login/logind-action.h \
6102 src/login/logind-seat.c \
6103 src/login/logind-seat.h \
6104 src/login/logind-session.c \
6105 src/login/logind-session.h \
6106 src/login/logind-session-device.c \
6107 src/login/logind-session-device.h \
6108 src/login/logind-user.c \
6109 src/login/logind-user.h \
6110 src/login/logind-inhibit.c \
6111 src/login/logind-inhibit.h \
6112 src/login/logind-dbus.c \
6113 src/login/logind-session-dbus.c \
6114 src/login/logind-seat-dbus.c \
6115 src/login/logind-user-dbus.c \
6116 src/login/logind-utmp.c \
6117 src/login/logind-acl.h
6118
6119 liblogind_core_la_LIBADD = \
6120 libsystemd-shared.la
6121
6122 if HAVE_ACL
6123 liblogind_core_la_SOURCES += \
6124 src/login/logind-acl.c
6125 endif
6126
6127 noinst_LTLIBRARIES += \
6128 liblogind-core.la
6129
6130 rootlibexec_PROGRAMS += \
6131 systemd-logind
6132
6133 loginctl_SOURCES = \
6134 src/login/loginctl.c \
6135 src/login/sysfs-show.h \
6136 src/login/sysfs-show.c
6137
6138 loginctl_LDADD = \
6139 libsystemd-shared.la
6140
6141 rootbin_PROGRAMS += \
6142 loginctl
6143
6144 dist_bashcompletion_data += \
6145 shell-completion/bash/loginctl
6146
6147 dist_zshcompletion_data += \
6148 shell-completion/zsh/_loginctl \
6149 shell-completion/zsh/_systemd-inhibit
6150
6151 systemd_inhibit_SOURCES = \
6152 src/login/inhibit.c
6153
6154 systemd_inhibit_LDADD = \
6155 libsystemd-shared.la
6156
6157 rootbin_PROGRAMS += \
6158 systemd-inhibit
6159
6160 test_login_SOURCES = \
6161 src/libsystemd/sd-login/test-login.c
6162
6163 test_login_LDADD = \
6164 libsystemd-shared.la
6165
6166 test_login_shared_SOURCES = \
6167 src/login/test-login-shared.c
6168
6169 test_login_shared_LDADD = \
6170 libsystemd-shared.la
6171
6172 test_inhibit_SOURCES = \
6173 src/login/test-inhibit.c
6174
6175 test_inhibit_LDADD = \
6176 libsystemd-shared.la
6177
6178 test_login_tables_SOURCES = \
6179 src/login/test-login-tables.c
6180
6181 test_login_tables_LDADD = \
6182 liblogind-core.la
6183
6184 manual_tests += \
6185 test-inhibit
6186
6187 tests += \
6188 test-login \
6189 test-login-tables \
6190 test-login-shared
6191
6192 if HAVE_PAM
6193 pam_systemd_la_SOURCES = \
6194 src/login/pam_systemd.sym \
6195 src/login/pam_systemd.c
6196
6197 pam_systemd_la_CFLAGS = \
6198 $(AM_CFLAGS) \
6199 $(PAM_CFLAGS)
6200
6201 pam_systemd_la_LDFLAGS = \
6202 $(AM_LDFLAGS) \
6203 -module \
6204 -export-dynamic \
6205 -avoid-version \
6206 -shared \
6207 -Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
6208
6209 pam_systemd_la_LIBADD = \
6210 libshared.la \
6211 $(PAM_LIBS)
6212
6213 pamlib_LTLIBRARIES = \
6214 pam_systemd.la
6215
6216 if ENABLE_PAM_CONFIG
6217 dist_pamconf_DATA = \
6218 src/login/systemd-user
6219 endif
6220
6221 EXTRA_DIST += \
6222 src/login/systemd-user.m4
6223 endif
6224
6225 nodist_systemunit_DATA += \
6226 units/systemd-logind.service
6227
6228 dist_systemunit_DATA += \
6229 units/user.slice
6230
6231 dist_systemunit_DATA_busnames += \
6232 units/org.freedesktop.login1.busname
6233
6234 dist_dbussystemservice_DATA += \
6235 src/login/org.freedesktop.login1.service
6236
6237 dist_dbuspolicy_DATA += \
6238 src/login/org.freedesktop.login1.conf
6239
6240 nodist_pkgsysconf_DATA += \
6241 src/login/logind.conf
6242
6243 polkitpolicy_files += \
6244 src/login/org.freedesktop.login1.policy
6245
6246 INSTALL_DIRS += \
6247 $(systemdstatedir)
6248
6249 MULTI_USER_TARGET_WANTS += \
6250 systemd-logind.service
6251
6252 SYSTEM_UNIT_ALIASES += \
6253 systemd-logind.service dbus-org.freedesktop.login1.service
6254
6255 BUSNAMES_TARGET_WANTS += \
6256 org.freedesktop.login1.busname
6257
6258 dist_udevrules_DATA += \
6259 src/login/70-uaccess.rules \
6260 src/login/70-power-switch.rules
6261
6262 nodist_udevrules_DATA += \
6263 src/login/71-seat.rules \
6264 src/login/73-seat-late.rules
6265
6266 endif
6267
6268 polkitpolicy_in_files += \
6269 src/login/org.freedesktop.login1.policy.in
6270
6271 gperf_gperf_sources += \
6272 src/login/logind-gperf.gperf
6273
6274 EXTRA_DIST += \
6275 src/login/71-seat.rules.in \
6276 src/login/73-seat-late.rules.in \
6277 units/systemd-logind.service.in \
6278 src/login/logind.conf.in
6279
6280 # ------------------------------------------------------------------------------
6281 if HAVE_PAM
6282
6283 systemd_user_sessions_SOURCES = \
6284 src/user-sessions/user-sessions.c
6285
6286 systemd_user_sessions_LDADD = \
6287 libsystemd-shared.la
6288
6289 rootlibexec_PROGRAMS += \
6290 systemd-user-sessions
6291
6292 nodist_systemunit_DATA += \
6293 units/systemd-user-sessions.service
6294
6295 MULTI_USER_TARGET_WANTS += \
6296 systemd-user-sessions.service
6297
6298 endif
6299
6300 EXTRA_DIST += \
6301 units/systemd-user-sessions.service.in
6302
6303 # ------------------------------------------------------------------------------
6304 EXTRA_DIST += \
6305 test/Makefile \
6306 test/README.testsuite \
6307 test/TEST-01-BASIC \
6308 test/TEST-01-BASIC/Makefile \
6309 test/TEST-01-BASIC/test.sh \
6310 test/TEST-02-CRYPTSETUP \
6311 test/TEST-02-CRYPTSETUP/Makefile \
6312 test/TEST-02-CRYPTSETUP/test.sh \
6313 test/TEST-03-JOBS \
6314 test/TEST-03-JOBS/Makefile \
6315 test/TEST-03-JOBS/test-jobs.sh \
6316 test/TEST-03-JOBS/test.sh \
6317 test/TEST-04-JOURNAL/Makefile \
6318 test/TEST-04-JOURNAL/test-journal.sh \
6319 test/TEST-04-JOURNAL/test.sh \
6320 test/TEST-05-RLIMITS/Makefile \
6321 test/TEST-05-RLIMITS/test-rlimits.sh \
6322 test/TEST-05-RLIMITS/test.sh \
6323 test/TEST-06-SELINUX/Makefile \
6324 test/TEST-06-SELINUX/test-selinux-checks.sh \
6325 test/TEST-06-SELINUX/test.sh \
6326 test/TEST-06-SELINUX/systemd_test.te \
6327 test/TEST-06-SELINUX/systemd_test.if \
6328 test/TEST-07-ISSUE-1981/Makefile \
6329 test/TEST-07-ISSUE-1981/test-segfault.sh \
6330 test/TEST-07-ISSUE-1981/test.sh \
6331 test/TEST-08-ISSUE-2730/Makefile \
6332 test/TEST-08-ISSUE-2730/test.sh \
6333 test/TEST-09-ISSUE-2691/Makefile \
6334 test/TEST-09-ISSUE-2691/test.sh \
6335 test/TEST-10-ISSUE-2467/Makefile \
6336 test/TEST-10-ISSUE-2467/test.sh \
6337 test/TEST-11-ISSUE-3166/Makefile \
6338 test/TEST-11-ISSUE-3166/test.sh \
6339 test/TEST-12-ISSUE-3171/Makefile \
6340 test/TEST-12-ISSUE-3171/test.sh \
6341 test/TEST-13-NSPAWN-SMOKE/Makefile \
6342 test/TEST-13-NSPAWN-SMOKE/create-busybox-container \
6343 test/TEST-13-NSPAWN-SMOKE/test.sh \
6344 test/TEST-14-MACHINE-ID/Makefile \
6345 test/TEST-14-MACHINE-ID/test.sh \
6346 test/test-functions
6347
6348 EXTRA_DIST += \
6349 test/loopy2.service \
6350 test/loopy3.service \
6351 test/loopy4.service \
6352 test/loopy.service \
6353 test/loopy.service.d \
6354 test/loopy.service.d/compat.conf
6355
6356 # ------------------------------------------------------------------------------
6357 substitutions = \
6358 '|rootlibdir=$(rootlibdir)|' \
6359 '|rootlibexecdir=$(rootlibexecdir)|' \
6360 '|rootbindir=$(rootbindir)|' \
6361 '|bindir=$(bindir)|' \
6362 '|SYSTEMCTL=$(rootbindir)/systemctl|' \
6363 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
6364 '|pkgsysconfdir=$(pkgsysconfdir)|' \
6365 '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
6366 '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
6367 '|pkgdatadir=$(pkgdatadir)|' \
6368 '|systemunitdir=$(systemunitdir)|' \
6369 '|userunitdir=$(userunitdir)|' \
6370 '|systempresetdir=$(systempresetdir)|' \
6371 '|userpresetdir=$(userpresetdir)|' \
6372 '|udevhwdbdir=$(udevhwdbdir)|' \
6373 '|udevrulesdir=$(udevrulesdir)|' \
6374 '|catalogdir=$(catalogdir)|' \
6375 '|tmpfilesdir=$(tmpfilesdir)|' \
6376 '|sysusersdir=$(sysusersdir)|' \
6377 '|sysctldir=$(sysctldir)|' \
6378 '|systemgeneratordir=$(systemgeneratordir)|' \
6379 '|usergeneratordir=$(usergeneratordir)|' \
6380 '|systemenvgeneratordir=$(systemenvgeneratordir)|' \
6381 '|userenvgeneratordir=$(userenvgeneratordir)|' \
6382 '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
6383 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
6384 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
6385 '|PACKAGE_URL=$(PACKAGE_URL)|' \
6386 '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
6387 '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
6388 '|prefix=$(prefix)|' \
6389 '|exec_prefix=$(exec_prefix)|' \
6390 '|libdir=$(libdir)|' \
6391 '|includedir=$(includedir)|' \
6392 '|rootprefix=$(rootprefix)|' \
6393 '|udevlibexecdir=$(udevlibexecdir)|' \
6394 '|SUSHELL=$(SUSHELL)|' \
6395 '|SULOGIN=$(SULOGIN)|' \
6396 '|DEBUGTTY=$(DEBUGTTY)|' \
6397 '|KILL=$(KILL)|' \
6398 '|KMOD=$(KMOD)|' \
6399 '|MOUNT_PATH=$(MOUNT_PATH)|' \
6400 '|UMOUNT_PATH=$(UMOUNT_PATH)|' \
6401 '|MKDIR_P=$(MKDIR_P)|' \
6402 '|QUOTAON=$(QUOTAON)|' \
6403 '|QUOTACHECK=$(QUOTACHECK)|' \
6404 '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
6405 '|VARLOGDIR=$(varlogdir)|' \
6406 '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
6407 '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
6408 '|PYTHON=$(PYTHON)|' \
6409 '|NTP_SERVERS=$(NTP_SERVERS)|' \
6410 '|DNS_SERVERS=$(DNS_SERVERS)|' \
6411 '|DEFAULT_DNSSEC_MODE=$(DEFAULT_DNSSEC_MODE)|' \
6412 '|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \
6413 '|systemuidmax=$(SYSTEM_UID_MAX)|' \
6414 '|systemgidmax=$(SYSTEM_GID_MAX)|' \
6415 '|DEV_KVM_MODE=$(DEV_KVM_MODE)|' \
6416 '|TTY_GID=$(TTY_GID)|' \
6417 '|systemsleepdir=$(systemsleepdir)|' \
6418 '|systemshutdowndir=$(systemshutdowndir)|' \
6419 '|binfmtdir=$(binfmtdir)|' \
6420 '|modulesloaddir=$(modulesloaddir)|'
6421
6422 SED_PROCESS = \
6423 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
6424 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
6425 -e '/^\#\# /d' \
6426 < $< > $@
6427
6428 units/%: units/%.in
6429 $(SED_PROCESS)
6430
6431 man/%: man/%.in
6432 $(SED_PROCESS)
6433
6434 sysctl.d/%: sysctl.d/%.in
6435 $(SED_PROCESS)
6436
6437 %.pc: %.pc.in
6438 $(SED_PROCESS)
6439
6440 %.conf: %.conf.in
6441 $(SED_PROCESS)
6442
6443 src/core/%.systemd: src/core/%.systemd.in
6444 $(SED_PROCESS)
6445
6446 src/%.policy.in: src/%.policy.in.in
6447 $(SED_PROCESS)
6448
6449 src/sulogin-shell/%: src/sulogin-shell/%.in
6450 $(SED_PROCESS)
6451 $(AM_V_GEN)chmod +x $@
6452
6453 shell-completion/%: shell-completion/%.in
6454 $(SED_PROCESS)
6455
6456 %.rules: %.rules.in
6457 $(SED_PROCESS)
6458
6459 %.conf: %.conf.in
6460 $(SED_PROCESS)
6461
6462 %.sh: %.sh.in
6463 $(SED_PROCESS)
6464 $(AM_V_GEN)chmod +x $@
6465
6466 src/%.c: src/%.gperf
6467 $(AM_V_at)$(MKDIR_P) $(dir $@)
6468 $(AM_V_GPERF)$(GPERF) < $< > $@
6469
6470 src/%: src/%.m4 $(top_builddir)/config.status
6471 $(AM_V_at)$(MKDIR_P) $(dir $@)
6472 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6473
6474 sysusers.d/%: sysusers.d/%.m4 $(top_builddir)/config.status
6475 $(AM_V_at)$(MKDIR_P) $(dir $@)
6476 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6477
6478 tmpfiles.d/%: tmpfiles.d/%.m4 $(top_builddir)/config.status
6479 $(AM_V_at)$(MKDIR_P) $(dir $@)
6480 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6481
6482
6483 units/%: units/%.m4 $(top_builddir)/config.status
6484 $(AM_V_at)$(MKDIR_P) $(dir $@)
6485 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
6486
6487 units/user/%: units/user/%.m4 $(top_builddir)/config.status
6488 $(AM_V_at)$(MKDIR_P) $(dir $@)
6489 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
6490
6491 if ENABLE_POLKIT
6492 nodist_polkitpolicy_DATA = \
6493 $(polkitpolicy_files) \
6494 $(polkitpolicy_in_in_files:.policy.in.in=.policy)
6495 polkitrules_DATA = $(polkitrules_files)
6496 if ENABLE_POLKIT_PKLA
6497 polkitpkla_DATA = $(polkitpkla_files)
6498 endif
6499 endif
6500
6501 EXTRA_DIST += \
6502 $(polkitpolicy_in_files) \
6503 $(polkitpolicy_in_in_files)
6504
6505 # ------------------------------------------------------------------------------
6506 man/custom-entities.ent: configure.ac
6507 $(AM_V_GEN)$(MKDIR_P) $(dir $@)
6508 $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
6509 printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
6510 > $@ # '
6511
6512 CLEANFILES += \
6513 man/custom-entities.ent
6514
6515 XSLTPROC_FLAGS = \
6516 --nonet \
6517 --xinclude \
6518 --stringparam man.output.quietly 1 \
6519 --stringparam funcsynopsis.style ansi \
6520 --stringparam man.authors.section.enabled 0 \
6521 --stringparam man.copyright.section.enabled 0 \
6522 --stringparam systemd.version $(PACKAGE_VERSION) \
6523 --path '$(builddir)/man:$(srcdir)/man'
6524
6525 XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc)
6526 XSLTPROC_PROCESS_MAN = \
6527 $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
6528
6529 XSLTPROC_PROCESS_HTML = \
6530 $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
6531
6532 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
6533 $(XSLTPROC_PROCESS_MAN)
6534
6535 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
6536 $(XSLTPROC_PROCESS_MAN)
6537
6538 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
6539 $(XSLTPROC_PROCESS_MAN)
6540
6541 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
6542 $(XSLTPROC_PROCESS_MAN)
6543
6544 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
6545 $(XSLTPROC_PROCESS_MAN)
6546
6547 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
6548 $(XSLTPROC_PROCESS_HTML)
6549
6550 define html-alias
6551 $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
6552 endef
6553
6554 EXTRA_DIST += \
6555 man/custom-html.xsl \
6556 man/custom-man.xsl
6557
6558 # ------------------------------------------------------------------------------
6559 if HAVE_SYSV_COMPAT
6560 sysvinit_DATA = \
6561 docs/sysvinit/README
6562
6563 varlog_DATA = \
6564 docs/var-log/README
6565
6566 docs/sysvinit/README: docs/sysvinit/README.in
6567 $(SED_PROCESS)
6568
6569 docs/var-log/README: docs/var-log/README.in
6570 $(SED_PROCESS)
6571
6572 CLEANFILES += \
6573 docs/sysvinit/README \
6574 docs/var-log/README
6575 endif
6576
6577 EXTRA_DIST += \
6578 docs/sysvinit/README.in \
6579 docs/var-log/README.in
6580
6581 SOCKETS_TARGET_WANTS += \
6582 systemd-initctl.socket
6583
6584 if HAVE_UTMP
6585 if HAVE_SYSV_COMPAT
6586 MULTI_USER_TARGET_WANTS += \
6587 systemd-update-utmp-runlevel.service
6588 GRAPHICAL_TARGET_WANTS += \
6589 systemd-update-utmp-runlevel.service
6590 RESCUE_TARGET_WANTS += \
6591 systemd-update-utmp-runlevel.service
6592 endif
6593
6594 SYSINIT_TARGET_WANTS += \
6595 systemd-update-utmp.service
6596 endif
6597
6598 SYSINIT_TARGET_WANTS += \
6599 systemd-update-done.service
6600
6601 LOCAL_FS_TARGET_WANTS += \
6602 systemd-remount-fs.service \
6603 tmp.mount
6604
6605 REMOTE_FS_TARGET_WANTS += \
6606 var-lib-machines.mount
6607
6608 MULTI_USER_TARGET_WANTS += \
6609 getty.target \
6610 systemd-ask-password-wall.path
6611
6612 SYSINIT_TARGET_WANTS += \
6613 dev-hugepages.mount \
6614 dev-mqueue.mount \
6615 sys-kernel-config.mount \
6616 sys-kernel-debug.mount \
6617 sys-fs-fuse-connections.mount \
6618 systemd-sysctl.service \
6619 systemd-ask-password-console.path
6620
6621 if ENABLE_MACHINED
6622 MACHINES_TARGET_WANTS += \
6623 var-lib-machines.mount
6624 endif
6625
6626 if HAVE_SYSV_COMPAT
6627 SYSTEM_UNIT_ALIASES += \
6628 poweroff.target runlevel0.target \
6629 rescue.target runlevel1.target \
6630 multi-user.target runlevel2.target \
6631 multi-user.target runlevel3.target \
6632 multi-user.target runlevel4.target \
6633 graphical.target runlevel5.target \
6634 reboot.target runlevel6.target
6635 endif
6636
6637 SYSTEM_UNIT_ALIASES += \
6638 graphical.target default.target \
6639 reboot.target ctrl-alt-del.target \
6640 getty@.service autovt@.service
6641
6642 GENERAL_ALIASES += \
6643 $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
6644 $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
6645 $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
6646 $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
6647
6648 if HAVE_SYSV_COMPAT
6649 INSTALL_DIRS += \
6650 $(systemunitdir)/runlevel1.target.wants \
6651 $(systemunitdir)/runlevel2.target.wants \
6652 $(systemunitdir)/runlevel3.target.wants \
6653 $(systemunitdir)/runlevel4.target.wants \
6654 $(systemunitdir)/runlevel5.target.wants
6655 endif
6656
6657 INSTALL_DIRS += \
6658 $(environmentdir) \
6659 $(prefix)/lib/modules-load.d \
6660 $(sysconfdir)/modules-load.d \
6661 $(prefix)/lib/systemd/network \
6662 $(sysconfdir)/systemd/network \
6663 $(prefix)/lib/sysctl.d \
6664 $(sysconfdir)/sysctl.d \
6665 $(prefix)/lib/kernel/install.d \
6666 $(sysconfdir)/kernel/install.d \
6667 $(systemshutdowndir) \
6668 $(systemsleepdir) \
6669 $(systemgeneratordir) \
6670 $(usergeneratordir) \
6671 \
6672 $(userunitdir) \
6673 $(pkgsysconfdir)/system \
6674 $(pkgsysconfdir)/system/multi-user.target.wants \
6675 $(pkgsysconfdir)/system/getty.target.wants \
6676 $(pkgsysconfdir)/user \
6677 $(dbussessionservicedir) \
6678 $(sysconfdir)/xdg/systemd
6679
6680 install-exec-hook: $(INSTALL_EXEC_HOOKS)
6681
6682 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
6683
6684 install-data-hook: $(INSTALL_DATA_HOOKS)
6685
6686 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
6687
6688 clean-local: $(CLEAN_LOCAL_HOOKS)
6689 rm -rf $(abs_srcdir)/install-tree
6690 rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
6691 $(abs_srcdir)/hwdb/iab.txt
6692
6693 DISTCHECK_CONFIGURE_FLAGS = \
6694 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
6695 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
6696 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
6697 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
6698 --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
6699 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
6700 --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
6701 --with-rpmmacrosdir=$$dc_install_base/$(rpmmacrosdir) \
6702 --with-rootprefix=$$dc_install_base \
6703 --enable-compat-libs
6704
6705 if HAVE_SYSV_COMPAT
6706 DISTCHECK_CONFIGURE_FLAGS += \
6707 --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
6708 --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
6709 else
6710 DISTCHECK_CONFIGURE_FLAGS += \
6711 --with-sysvinit-path= \
6712 --with-sysvrcnd-path=
6713 endif
6714
6715 if ENABLE_SPLIT_USR
6716 DISTCHECK_CONFIGURE_FLAGS += \
6717 --enable-split-usr
6718 else
6719 DISTCHECK_CONFIGURE_FLAGS += \
6720 --disable-split-usr
6721 endif
6722
6723 .PHONY: dist-check-help
6724 dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
6725 for i in $(abspath $^); do \
6726 if $$i --help | grep -v 'default:' | grep -E -q '.{80}.' ; then \
6727 echo "$(basename $$i) --help output is too wide:"; \
6728 $$i --help | awk 'length > 80' | grep -E --color=yes '.{80}'; \
6729 exit 1; \
6730 fi; done
6731
6732 include_compilers = "$(CC)" "$(CC) -ansi" "$(CC) -std=iso9899:1990"
6733 public_headers = $(filter-out src/systemd/_sd-common.h, $(pkginclude_HEADERS) $(include_HEADERS))
6734 .PHONY: dist-check-includes
6735 dist-check-includes: $(public_headers)
6736 @res=0; \
6737 for i in $(abspath $^); do \
6738 for cc in $(include_compilers); do \
6739 echo "$$cc -o/dev/null -c -x c -include "$$i" - </dev/null"; \
6740 $$cc -o/dev/null -c -x c -include "$$i" - </dev/null || res=1; \
6741 done; \
6742 done; exit $$res
6743
6744 .PHONY: hwdb-update
6745 hwdb-update: tools/meson-hwdb-update.sh
6746 $< $(top_srcdir)/hwdb
6747
6748 .PHONY: built-sources
6749 built-sources: $(BUILT_SOURCES)
6750
6751 .PHONY: git-tag
6752 git-tag:
6753 git tag -s "v$(PACKAGE_VERSION)" -m "systemd $(PACKAGE_VERSION)"
6754
6755 .PHONY: git-tar
6756 git-tar:
6757 git archive -o systemd-$(PACKAGE_VERSION).tar.gz --prefix=systemd-$(PACKAGE_VERSION)/ HEAD
6758
6759 %.asc: %
6760 gpg2 --detach-sign -a -o $@ $<
6761
6762 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
6763
6764 .PHONY: doc-sync
6765 doc-sync: man
6766 rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
6767
6768 .PHONY: install-tree
6769 install-tree: all
6770 rm -rf $(abs_srcdir)/install-tree
6771 $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
6772 tree $(abs_srcdir)/install-tree
6773
6774 # Let's run all tests of the test suite, but under valgrind. Let's
6775 # exclude perl/python/shell scripts we have in there
6776 .PHONY: valgrind-tests
6777 valgrind-tests: $(TESTS)
6778 $(AM_V_GEN)for f in $(filter-out %.pl %.py, $^); do \
6779 if $(LIBTOOL) --mode=execute file $$f | grep -q shell; then \
6780 echo -e "$${x}Skipping non-binary $$f"; else \
6781 echo -e "$${x}Running $$f"; \
6782 $(AM_TESTS_ENVIRONMENT) $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
6783 x="\n\n"; \
6784 done
6785
6786 exported-%: %
6787 $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
6788
6789 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
6790 $(AM_V_GEN)sort -u $^ > $@
6791
6792 .PHONY: check-api-docs
6793 check-api-docs: exported man
6794 $(AM_V_GEN)for symbol in `cat exported` ; do \
6795 if test -f $(builddir)/man/$$symbol.html ; then \
6796 echo " Symbol $$symbol() is documented." ; \
6797 else \
6798 echo "‣ Symbol $$symbol() lacks documentation." ; \
6799 fi ; \
6800 done
6801
6802 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
6803 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
6804
6805 undefined defined: $(ALL_OBJECTS)
6806 $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
6807 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
6808 done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
6809
6810 CLEANFILES += \
6811 defined \
6812 undefined
6813
6814 .PHONY: check-api-unused
6815 check-api-unused: defined undefined exported
6816 ( cat exported undefined ) | sort -u | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
6817
6818 .PHONY: check-includes
6819 check-includes: $(top_srcdir)/tools/check-includes.pl
6820 $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
6821 | xargs $(top_srcdir)/tools/check-includes.pl
6822
6823 EXTRA_DIST += \
6824 $(top_srcdir)/tools/check-includes.pl
6825
6826 # Stupid test that everything purported to be exported really is
6827 define generate-sym-test
6828 $(AM_V_at)$(MKDIR_P) $(dir $@)
6829 $(AM_V_at)printf '#include <stdio.h>\n' > $@
6830 $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
6831 $(AM_V_at)printf 'void* functions[] = {\n' >> $@
6832 $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
6833 $(AM_V_at)printf '};\nint main(void) {\n' >> $@
6834 $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
6835 $(AM_V_at)printf 'return 0; }\n' >> $@
6836 endef
6837
6838 test-libsystemd-sym.c: \
6839 $(top_builddir)/src/libsystemd/libsystemd.sym \
6840 src/systemd/sd-journal.h \
6841 src/systemd/sd-daemon.h \
6842 src/systemd/sd-login.h \
6843 src/systemd/sd-bus.h \
6844 src/systemd/sd-utf8.h \
6845 src/systemd/sd-resolve.h \
6846 src/systemd/sd-path.h \
6847 src/systemd/sd-event.h
6848 $(generate-sym-test)
6849
6850 test-libudev-sym.c: \
6851 src/libudev/libudev.sym \
6852 src/udev/udev.h
6853 $(generate-sym-test)
6854
6855 nodist_test_libsystemd_sym_SOURCES = \
6856 test-libsystemd-sym.c
6857 test_libsystemd_sym_LDADD = \
6858 libsystemd.la
6859
6860 nodist_test_libudev_sym_SOURCES = \
6861 test-libudev-sym.c
6862 test_libudev_sym_CFLAGS = \
6863 $(AM_CFLAGS) \
6864 -Wno-deprecated-declarations
6865 test_libudev_sym_LDADD = \
6866 libudev.la
6867
6868 BUILT_SOURCES += \
6869 test-libsystemd-sym.c \
6870 test-libudev-sym.c
6871
6872 CLEANFILES += \
6873 test-libsystemd-sym.c \
6874 test-libudev-sym.c
6875
6876 tests += \
6877 test-libsystemd-sym \
6878 test-libudev-sym
6879
6880 .PHONY: install-tests
6881 install-tests: $(tests) $(TEST_DATA_FILES)
6882 for f in $(tests); do \
6883 if [ -x $(top_builddir)/.libs/$$f ]; then \
6884 install -D -m 755 $(top_builddir)/.libs/$$f $(DESTDIR)/$(testsdir)/$$f; \
6885 else \
6886 install -D -m 755 $(top_builddir)/$$f $(DESTDIR)/$(testsdir)/$$f; \
6887 fi; \
6888 done
6889 for f in $(TEST_DATA_FILES); do \
6890 install -D -m 644 $(top_srcdir)/$$f $(DESTDIR)/$(testsdir)/testdata/$${f#test/}; \
6891 done
6892
6893
6894 .PHONY: cppcheck
6895 cppcheck:
6896 cppcheck --enable=all -q $(top_srcdir)
6897
6898 # Used to extract compile flags for YCM.
6899 print-%:
6900 @echo $($*)
6901
6902 .PHONY: git-contrib
6903 git-contrib:
6904 @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | sed 's/ / /g' | awk '{ print $$0 "," }' | sort -u
6905
6906 EXTRA_DIST += \
6907 tools/gdb-sd_dump_hashmaps.py
6908
6909 .PHONY: list-keys
6910 list-keys:
6911 gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --list-keys
6912
6913 .PHONY: add-key
6914 add-key:
6915 gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import -