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