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