]> git.ipfire.org Git - thirdparty/systemd.git/blob - Makefile.am
Merge pull request #5270 from poettering/seccomp-namespace-fix
[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 PATH=$(abs_top_builddir):$$PATH;
154
155 if ENABLE_BASH_COMPLETION
156 dist_bashcompletion_DATA = $(dist_bashcompletion_data)
157 nodist_bashcompletion_DATA = $(nodist_bashcompletion_data)
158 endif
159 if ENABLE_ZSH_COMPLETION
160 dist_zshcompletion_DATA = $(dist_zshcompletion_data)
161 nodist_zshcompletion_DATA = $(nodist_zshcompletion_data)
162 endif
163 udevlibexec_PROGRAMS =
164 gperf_gperf_sources =
165 rootlib_LTLIBRARIES =
166
167 in_files = $(filter %.in,$(EXTRA_DIST))
168 in_in_files = $(filter %.in.in, $(in_files))
169 m4_files = $(filter %.m4,$(EXTRA_DIST) $(in_files:.m4.in=.m4))
170
171 CLEANFILES = $(BUILT_SOURCES) \
172 $(pkgconfigdata_DATA) \
173 $(pkgconfiglib_DATA) \
174 $(nodist_bashcompletion_data) \
175 $(nodist_zshcompletion_data) \
176 $(in_files:.in=) $(in_in_files:.in.in=) \
177 $(m4_files:.m4=)
178
179 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
180 $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
181 $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
182
183 AM_CPPFLAGS = \
184 -include $(top_builddir)/config.h \
185 -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
186 -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
187 -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
188 -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
189 -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
190 -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
191 -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
192 -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
193 -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
194 -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
195 -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
196 -DSYSTEMD_FSCK_PATH=\"$(rootlibexecdir)/systemd-fsck\" \
197 -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
198 -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
199 -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
200 -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
201 -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
202 -DROOTPREFIX=\"$(rootprefix)\" \
203 -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
204 -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
205 -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
206 -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
207 -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
208 -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
209 -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
210 -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
211 -DSYSTEMD_LANGUAGE_FALLBACK_MAP=\"$(pkgdatadir)/language-fallback-map\" \
212 -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
213 -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
214 -DQUOTACHECK=\"$(QUOTACHECK)\" \
215 -DKEXEC=\"$(KEXEC)\" \
216 -DMOUNT_PATH=\"$(MOUNT_PATH)\" \
217 -DUMOUNT_PATH=\"$(UMOUNT_PATH)\" \
218 -DLIBDIR=\"$(libdir)\" \
219 -DROOTLIBDIR=\"$(rootlibdir)\" \
220 -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
221 -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
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/bus-policy/hello.conf \
1734 test/bus-policy/methods.conf \
1735 test/bus-policy/ownerships.conf \
1736 test/bus-policy/signals.conf \
1737 test/bus-policy/check-own-rules.conf \
1738 test/bus-policy/many-rules.conf \
1739 test/bus-policy/test.conf \
1740 test/hwdb/10-bad.hwdb
1741
1742
1743 EXTRA_DIST += \
1744 src/test/test-helper.h
1745
1746 test_device_nodes_SOURCES = \
1747 src/test/test-device-nodes.c
1748
1749 test_device_nodes_LDADD = \
1750 libsystemd-shared.la
1751
1752 test_engine_SOURCES = \
1753 src/test/test-engine.c
1754
1755 test_engine_CFLAGS = \
1756 $(AM_CFLAGS) \
1757 $(SECCOMP_CFLAGS) \
1758 $(MOUNT_CFLAGS)
1759
1760 test_engine_LDADD = \
1761 libcore.la
1762
1763 test_job_type_SOURCES = \
1764 src/test/test-job-type.c
1765
1766 test_job_type_CFLAGS = \
1767 $(AM_CFLAGS) \
1768 $(SECCOMP_CFLAGS) \
1769 $(MOUNT_CFLAGS)
1770
1771 test_job_type_LDADD = \
1772 libcore.la
1773
1774 test_ns_SOURCES = \
1775 src/test/test-ns.c
1776
1777 test_ns_CFLAGS = \
1778 $(AM_CFLAGS) \
1779 $(SECCOMP_CFLAGS)
1780
1781 test_ns_LDADD = \
1782 libcore.la
1783
1784 test_loopback_SOURCES = \
1785 src/test/test-loopback.c
1786
1787 test_loopback_LDADD = \
1788 libcore.la
1789
1790 test_hostname_SOURCES = \
1791 src/test/test-hostname.c
1792
1793 test_hostname_LDADD = \
1794 libcore.la
1795
1796 test_dns_domain_SOURCES = \
1797 src/test/test-dns-domain.c
1798
1799 test_dns_domain_LDADD = \
1800 libsystemd-network.la \
1801 libsystemd-shared.la
1802
1803
1804 if ENABLE_EFI
1805 tests += \
1806 test-boot-timestamps
1807
1808 test_boot_timestamps_SOURCES = \
1809 src/test/test-boot-timestamps.c
1810
1811 test_boot_timestamps_LDADD = \
1812 libsystemd-shared.la
1813 endif
1814
1815 test_unit_name_SOURCES = \
1816 src/test/test-unit-name.c
1817
1818 test_unit_name_CFLAGS = \
1819 $(AM_CFLAGS) \
1820 $(SECCOMP_CFLAGS) \
1821 $(MOUNT_CFLAGS)
1822
1823 test_unit_name_LDADD = \
1824 libcore.la
1825
1826 test_unit_file_SOURCES = \
1827 src/test/test-unit-file.c
1828
1829 test_unit_file_CFLAGS = \
1830 $(AM_CFLAGS) \
1831 $(SECCOMP_CFLAGS) \
1832 $(MOUNT_CFLAGS)
1833
1834 test_unit_file_LDADD = \
1835 libcore.la
1836
1837 test_utf8_SOURCES = \
1838 src/test/test-utf8.c
1839
1840 test_utf8_LDADD = \
1841 libsystemd-shared.la
1842
1843 test_capability_SOURCES = \
1844 src/test/test-capability.c
1845
1846 test_capability_CFLAGS = \
1847 $(AM_CFLAGS) \
1848 $(CAP_CFLAGS)
1849
1850 test_capability_LDADD = \
1851 libsystemd-shared.la \
1852 $(CAP_LIBS)
1853
1854 test_async_SOURCES = \
1855 src/test/test-async.c
1856
1857 test_async_LDADD = \
1858 libsystemd-shared.la
1859
1860 test_locale_util_SOURCES = \
1861 src/test/test-locale-util.c
1862
1863 test_locale_util_LDADD = \
1864 libsystemd-shared.la
1865
1866 test_copy_SOURCES = \
1867 src/test/test-copy.c
1868
1869 # Link statically to ensure file is large
1870 test_copy_LDADD = \
1871 libshared.la
1872
1873 test_sigbus_SOURCES = \
1874 src/test/test-sigbus.c
1875
1876 test_sigbus_LDADD = \
1877 libsystemd-shared.la
1878
1879 test_condition_SOURCES = \
1880 src/test/test-condition.c
1881
1882 test_condition_LDADD = \
1883 libsystemd-shared.la
1884
1885 test_fdset_SOURCES = \
1886 src/test/test-fdset.c
1887
1888 test_fdset_LDADD = \
1889 libsystemd-shared.la
1890
1891 test_fstab_util_SOURCES = \
1892 src/test/test-fstab-util.c
1893
1894 test_fstab_util_LDADD = \
1895 libsystemd-shared.la
1896
1897 test_ratelimit_SOURCES = \
1898 src/test/test-ratelimit.c
1899
1900 test_ratelimit_LDADD = \
1901 libsystemd-shared.la
1902
1903 test_util_SOURCES = \
1904 src/test/test-util.c
1905
1906 test_util_LDADD = \
1907 libsystemd-shared.la
1908
1909 test_mount_util_SOURCES = \
1910 src/test/test-mount-util.c
1911
1912 test_mount_util_LDADD = \
1913 libsystemd-shared.la
1914
1915 test_hexdecoct_SOURCES = \
1916 src/test/test-hexdecoct.c
1917
1918 test_hexdecoct_LDADD = \
1919 libsystemd-shared.la
1920
1921 test_alloc_util_SOURCES = \
1922 src/test/test-alloc-util.c
1923
1924 test_alloc_util_LDADD = \
1925 libsystemd-shared.la
1926
1927 test_xattr_util_SOURCES = \
1928 src/test/test-xattr-util.c
1929
1930 test_xattr_util_LDADD = \
1931 libsystemd-shared.la
1932
1933 test_io_util_SOURCES = \
1934 src/test/test-io-util.c
1935
1936 test_io_util_LDADD = \
1937 libsystemd-shared.la
1938
1939 test_glob_util_SOURCES = \
1940 src/test/test-glob-util.c
1941
1942 test_glob_util_LDADD = \
1943 libsystemd-shared.la
1944
1945 test_fs_util_SOURCES = \
1946 src/test/test-fs-util.c
1947
1948 test_fs_util_LDADD = \
1949 libsystemd-shared.la
1950
1951 test_proc_cmdline_SOURCES = \
1952 src/test/test-proc-cmdline.c
1953
1954 test_proc_cmdline_LDADD = \
1955 libsystemd-shared.la
1956
1957 test_fd_util_SOURCES = \
1958 src/test/test-fd-util.c
1959
1960 test_fd_util_LDADD = \
1961 libsystemd-shared.la
1962
1963 test_web_util_SOURCES = \
1964 src/test/test-web-util.c
1965
1966 test_web_util_LDADD = \
1967 libsystemd-shared.la
1968
1969 test_cpu_set_util_SOURCES = \
1970 src/test/test-cpu-set-util.c
1971
1972 test_cpu_set_util_LDADD = \
1973 libsystemd-shared.la
1974
1975 test_stat_util_SOURCES = \
1976 src/test/test-stat-util.c
1977
1978 test_stat_util_LDADD = \
1979 libsystemd-shared.la
1980
1981 test_escape_SOURCES = \
1982 src/test/test-escape.c
1983
1984 test_escape_LDADD = \
1985 libsystemd-shared.la
1986
1987 test_string_util_SOURCES = \
1988 src/test/test-string-util.c
1989
1990 test_string_util_LDADD = \
1991 libsystemd-shared.la
1992
1993 test_extract_word_SOURCES = \
1994 src/test/test-extract-word.c
1995
1996 test_extract_word_LDADD = \
1997 libsystemd-shared.la
1998
1999 test_parse_util_SOURCES = \
2000 src/test/test-parse-util.c
2001
2002 test_parse_util_LDADD = \
2003 libsystemd-shared.la
2004
2005 test_user_util_SOURCES = \
2006 src/test/test-user-util.c
2007
2008 test_user_util_LDADD = \
2009 libsystemd-shared.la
2010
2011 test_hostname_util_SOURCES = \
2012 src/test/test-hostname-util.c
2013
2014 test_hostname_util_LDADD = \
2015 libsystemd-shared.la
2016
2017 test_process_util_SOURCES = \
2018 src/test/test-process-util.c
2019
2020 test_process_util_LDADD = \
2021 libsystemd-shared.la
2022
2023 test_terminal_util_SOURCES = \
2024 src/test/test-terminal-util.c
2025
2026 test_terminal_util_LDADD = \
2027 libsystemd-shared.la
2028
2029 test_path_lookup_SOURCES = \
2030 src/test/test-path-lookup.c
2031
2032 test_path_lookup_LDADD = \
2033 libsystemd-shared.la
2034
2035 test_uid_range_SOURCES = \
2036 src/test/test-uid-range.c
2037
2038 test_uid_range_LDADD = \
2039 libsystemd-shared.la
2040
2041 test_cap_list_SOURCES = \
2042 src/test/test-cap-list.c
2043
2044 test_cap_list_CFLAGS = \
2045 $(AM_CFLAGS) \
2046 $(CAP_CFLAGS)
2047
2048 test_cap_list_LDADD = \
2049 libsystemd-shared.la \
2050 $(CAP_LIBS)
2051
2052 test_socket_util_SOURCES = \
2053 src/test/test-socket-util.c
2054
2055 test_socket_util_LDADD = \
2056 libsystemd-shared.la
2057
2058 test_barrier_SOURCES = \
2059 src/test/test-barrier.c
2060
2061 test_barrier_LDADD = \
2062 libsystemd-shared.la
2063
2064 test_tmpfiles_SOURCES = \
2065 src/test/test-tmpfiles.c
2066
2067 test_tmpfiles_LDADD = \
2068 libsystemd-shared.la
2069
2070 test_namespace_SOURCES = \
2071 src/test/test-namespace.c
2072
2073 test_verbs_SOURCES = \
2074 src/test/test-verbs.c
2075
2076 test_verbs_LDADD = \
2077 libsystemd-shared.la
2078
2079 test_install_root_SOURCES = \
2080 src/test/test-install-root.c
2081
2082 test_install_root_LDADD = \
2083 libsystemd-shared.la
2084
2085 test_acl_util_SOURCES = \
2086 src/test/test-acl-util.c
2087
2088 test_acl_util_LDADD = \
2089 libsystemd-shared.la
2090
2091 test_seccomp_SOURCES = \
2092 src/test/test-seccomp.c
2093
2094 test_seccomp_LDADD = \
2095 libsystemd-shared.la \
2096 $(SECCOMP_LIBS)
2097
2098 test_namespace_LDADD = \
2099 libcore.la
2100
2101 test_rlimit_util_SOURCES = \
2102 src/test/test-rlimit-util.c
2103
2104 test_rlimit_util_LDADD = \
2105 libsystemd-shared.la
2106
2107 test_ask_password_api_SOURCES = \
2108 src/test/test-ask-password-api.c
2109
2110 test_ask_password_api_LDADD = \
2111 libsystemd-shared.la
2112
2113 test_dissect_image_SOURCES = \
2114 src/test/test-dissect-image.c
2115
2116 test_dissect_image_CFLAGS = \
2117 $(AM_CFLAGS) \
2118 $(BLKID_CFLAGS)
2119
2120 test_dissect_image_LDADD = \
2121 libsystemd-shared.la \
2122 $(BLKID_LIBS)
2123
2124 test_signal_util_SOURCES = \
2125 src/test/test-signal-util.c
2126
2127 test_signal_util_LDADD = \
2128 libsystemd-shared.la
2129
2130 test_selinux_SOURCES = \
2131 src/test/test-selinux.c
2132
2133 test_selinux_LDADD = \
2134 libsystemd-shared.la
2135
2136 test_sizeof_SOURCES = \
2137 src/test/test-sizeof.c
2138
2139 test_sizeof_LDADD = \
2140 libsystemd-shared.la
2141
2142 BUILT_SOURCES += \
2143 src/test/test-hashmap-ordered.c
2144
2145 src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
2146 $(AM_V_at)$(MKDIR_P) $(dir $@)
2147 $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
2148 { if (!match($$0, "^#include")) \
2149 gsub(/hashmap/, "ordered_hashmap"); \
2150 gsub(/HASHMAP/, "ORDERED_HASHMAP"); \
2151 gsub(/Hashmap/, "OrderedHashmap"); \
2152 print }' <$< >$@
2153
2154 nodist_test_hashmap_SOURCES = \
2155 src/test/test-hashmap-ordered.c
2156
2157 test_hashmap_SOURCES = \
2158 src/test/test-hashmap.c \
2159 src/test/test-hashmap-plain.c
2160
2161 test_hashmap_LDADD = \
2162 libsystemd-shared.la
2163
2164 test_set_SOURCES = \
2165 src/test/test-set.c
2166
2167 test_set_LDADD = \
2168 libsystemd-shared.la
2169
2170 test_bitmap_SOURCES = \
2171 src/test/test-bitmap.c
2172
2173 test_bitmap_LDADD = \
2174 libsystemd-shared.la
2175
2176 test_xml_SOURCES = \
2177 src/test/test-xml.c
2178
2179 test_xml_LDADD = \
2180 libsystemd-shared.la
2181
2182 test_list_SOURCES = \
2183 src/test/test-list.c
2184
2185 test_list_LDADD = \
2186 libsystemd-shared.la
2187
2188 test_unaligned_LDADD = \
2189 libsystemd-shared.la
2190
2191 test_unaligned_SOURCES = \
2192 src/test/test-unaligned.c
2193
2194 test_tables_SOURCES = \
2195 src/test/test-tables.c \
2196 src/shared/test-tables.h \
2197 src/journal/journald-server.c \
2198 src/journal/journald-server.h
2199
2200 test_tables_CPPFLAGS = \
2201 $(AM_CPPFLAGS)
2202
2203 test_tables_CFLAGS = \
2204 $(AM_CFLAGS) \
2205 $(SECCOMP_CFLAGS) \
2206 $(MOUNT_CFLAGS)
2207
2208 test_tables_LDADD = \
2209 libjournal-core.la \
2210 libcore.la \
2211 libudev-core.la
2212
2213 test_prioq_SOURCES = \
2214 src/test/test-prioq.c
2215
2216 test_prioq_LDADD = \
2217 libsystemd-shared.la
2218
2219 test_fileio_SOURCES = \
2220 src/test/test-fileio.c
2221
2222 test_fileio_LDADD = \
2223 libsystemd-shared.la
2224
2225 test_time_SOURCES = \
2226 src/test/test-time.c
2227
2228 test_time_LDADD = \
2229 libsystemd-shared.la
2230
2231 test_clock_SOURCES = \
2232 src/test/test-clock.c
2233
2234 test_clock_LDADD = \
2235 libsystemd-shared.la
2236
2237 test_architecture_SOURCES = \
2238 src/test/test-architecture.c
2239
2240 test_architecture_LDADD = \
2241 libsystemd-shared.la
2242
2243 test_log_SOURCES = \
2244 src/test/test-log.c
2245
2246 test_log_LDADD = \
2247 libsystemd-shared.la
2248
2249 test_ipcrm_SOURCES = \
2250 src/test/test-ipcrm.c
2251
2252 test_ipcrm_LDADD = \
2253 libsystemd-shared.la
2254
2255 test_btrfs_SOURCES = \
2256 src/test/test-btrfs.c
2257
2258 test_btrfs_LDADD = \
2259 libsystemd-shared.la
2260
2261 if HAVE_LIBIPTC
2262 test_firewall_util_SOURCES = \
2263 src/test/test-firewall-util.c
2264
2265 test_firewall_util_CFLAGS = \
2266 $(AM_CFLAGS) \
2267 $(LIBIPTC_CFLAGS)
2268
2269 test_firewall_util_LDADD = \
2270 libfirewall.la \
2271 libsystemd-shared.la \
2272 $(LIBIPTC_LIBS)
2273 endif
2274
2275 test_netlink_manual_SOURCES = \
2276 src/test/test-netlink-manual.c
2277
2278 test_netlink_manual_CFLAGS = \
2279 $(AM_CFLAGS) \
2280 $(KMOD_CFLAGS)
2281
2282 test_netlink_manual_LDADD = \
2283 libsystemd-shared.la \
2284 $(KMOD_LIBS)
2285
2286 test_ellipsize_SOURCES = \
2287 src/test/test-ellipsize.c
2288
2289 test_ellipsize_LDADD = \
2290 libsystemd-shared.la
2291
2292 test_date_SOURCES = \
2293 src/test/test-date.c
2294
2295 test_date_LDADD = \
2296 libsystemd-shared.la
2297
2298 test_sleep_SOURCES = \
2299 src/test/test-sleep.c
2300
2301 test_sleep_LDADD = \
2302 libcore.la
2303
2304 test_replace_var_SOURCES = \
2305 src/test/test-replace-var.c
2306
2307 test_replace_var_LDADD = \
2308 libsystemd-shared.la
2309
2310 test_calendarspec_SOURCES = \
2311 src/test/test-calendarspec.c
2312
2313 test_calendarspec_LDADD = \
2314 libsystemd-shared.la
2315
2316 test_strip_tab_ansi_SOURCES = \
2317 src/test/test-strip-tab-ansi.c
2318
2319 test_strip_tab_ansi_LDADD = \
2320 libsystemd-shared.la
2321
2322 test_daemon_SOURCES = \
2323 src/test/test-daemon.c
2324
2325 test_daemon_LDADD = \
2326 libsystemd-shared.la
2327
2328 test_cgroup_SOURCES = \
2329 src/test/test-cgroup.c
2330
2331 test_cgroup_LDADD = \
2332 libsystemd-shared.la
2333
2334 test_cgroup_mask_SOURCES = \
2335 src/test/test-cgroup-mask.c
2336
2337 test_cgroup_mask_CPPFLAGS = \
2338 $(AM_CPPFLAGS) \
2339 $(MOUNT_CFLAGS)
2340
2341 test_cgroup_mask_CFLAGS = \
2342 $(AM_CFLAGS) \
2343 $(SECCOMP_CFLAGS)
2344
2345 test_cgroup_mask_LDADD = \
2346 libcore.la
2347
2348 test_cgroup_util_SOURCES = \
2349 src/test/test-cgroup-util.c
2350
2351 test_cgroup_util_LDADD = \
2352 libsystemd-shared.la
2353
2354 test_env_util_SOURCES = \
2355 src/test/test-env-util.c
2356
2357 test_env_util_LDADD = \
2358 libsystemd-shared.la
2359
2360 test_strbuf_SOURCES = \
2361 src/test/test-strbuf.c
2362
2363 test_strbuf_LDADD = \
2364 libsystemd-shared.la
2365
2366 test_strv_SOURCES = \
2367 src/test/test-strv.c
2368
2369 test_strv_LDADD = \
2370 libsystemd-shared.la
2371
2372 test_path_util_SOURCES = \
2373 src/test/test-path-util.c
2374
2375 test_path_util_LDADD = \
2376 libsystemd-shared.la
2377
2378 test_path_SOURCES = \
2379 src/test/test-path.c
2380
2381 test_path_CFLAGS = \
2382 $(AM_CFLAGS) \
2383 $(MOUNT_CFLAGS)
2384
2385 test_path_LDADD = \
2386 libcore.la
2387
2388 test_execute_SOURCES = \
2389 src/test/test-execute.c
2390
2391 test_execute_CFLAGS = \
2392 $(AM_CFLAGS) \
2393 $(MOUNT_CFLAGS)
2394
2395 test_execute_LDADD = \
2396 libcore.la
2397
2398 test_siphash24_SOURCES = \
2399 src/test/test-siphash24.c
2400
2401 test_siphash24_LDADD = \
2402 libsystemd-shared.la
2403
2404 test_strxcpyx_SOURCES = \
2405 src/test/test-strxcpyx.c
2406
2407 test_strxcpyx_LDADD = \
2408 libsystemd-shared.la
2409
2410 test_install_SOURCES = \
2411 src/test/test-install.c
2412
2413 test_install_LDADD = \
2414 libsystemd-shared.la
2415
2416 test_watchdog_SOURCES = \
2417 src/test/test-watchdog.c
2418
2419 test_watchdog_LDADD = \
2420 libsystemd-shared.la
2421
2422 test_sched_prio_SOURCES = \
2423 src/test/test-sched-prio.c
2424
2425 test_sched_prio_CPPFLAGS = \
2426 $(AM_CPPFLAGS) \
2427 $(MOUNT_CFLAGS)
2428
2429 test_sched_prio_CFLAGS = \
2430 $(AM_CFLAGS) \
2431 $(SECCOMP_CFLAGS)
2432
2433 test_sched_prio_LDADD = \
2434 libcore.la
2435
2436 test_conf_files_SOURCES = \
2437 src/test/test-conf-files.c
2438
2439 test_conf_files_LDADD = \
2440 libsystemd-shared.la
2441
2442 test_conf_parser_SOURCES = \
2443 src/test/test-conf-parser.c
2444
2445 test_conf_parser_LDADD = \
2446 libsystemd-shared.la
2447
2448 test_af_list_SOURCES = \
2449 src/test/test-af-list.c
2450
2451 test_af_list_LDADD = \
2452 libsystemd-shared.la
2453
2454 test_arphrd_list_SOURCES = \
2455 src/test/test-arphrd-list.c
2456
2457 test_arphrd_list_LDADD = \
2458 libsystemd-shared.la
2459
2460 # ------------------------------------------------------------------------------
2461 ## .PHONY so it always rebuilds it
2462 .PHONY: coverage lcov-run lcov-report coverage-sync
2463
2464 # run lcov from scratch, always
2465 coverage: all
2466 $(MAKE) lcov-run
2467 $(MAKE) lcov-report
2468
2469 coverage_dir = coverage
2470 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
2471
2472 if ENABLE_COVERAGE
2473 # reset run coverage tests
2474 lcov-run:
2475 @rm -rf $(coverage_dir)
2476 lcov $(coverage_opts) --zerocounters
2477 -$(MAKE) check
2478
2479 # generate report based on current coverage data
2480 lcov-report:
2481 $(MKDIR_P) $(coverage_dir)
2482 lcov $(coverage_opts) --compat-libtool --capture --no-external \
2483 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
2484 lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
2485 genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
2486 @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
2487
2488 # lcov doesn't work properly with vpath builds, make sure that bad
2489 # output is not uploaded by mistake.
2490 coverage-sync: coverage
2491 test "$(builddir)" = "$(srcdir)"
2492 rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
2493
2494 else
2495 lcov-run lcov-report:
2496 echo "Need to reconfigure with --enable-coverage"
2497 endif
2498
2499 # ------------------------------------------------------------------------------
2500 systemd_analyze_SOURCES = \
2501 src/analyze/analyze.c \
2502 src/analyze/analyze-verify.c \
2503 src/analyze/analyze-verify.h
2504
2505 systemd_analyze_CFLAGS = \
2506 $(AM_CFLAGS) \
2507 $(SECCOMP_CFLAGS) \
2508 $(MOUNT_CFLAGS)
2509
2510 systemd_analyze_LDADD = \
2511 libcore.la
2512
2513 # ------------------------------------------------------------------------------
2514 systemd_initctl_SOURCES = \
2515 src/initctl/initctl.c
2516
2517 systemd_initctl_LDADD = \
2518 libsystemd-shared.la
2519
2520 # ------------------------------------------------------------------------------
2521 systemd_update_utmp_SOURCES = \
2522 src/update-utmp/update-utmp.c
2523
2524 systemd_update_utmp_CFLAGS = \
2525 $(AM_CFLAGS) \
2526 $(AUDIT_CFLAGS)
2527
2528 systemd_update_utmp_LDADD = \
2529 libsystemd-shared.la \
2530 $(AUDIT_LIBS)
2531
2532 # ------------------------------------------------------------------------------
2533 systemd_update_done_SOURCES = \
2534 src/update-done/update-done.c
2535
2536 systemd_update_done_LDADD = \
2537 libsystemd-shared.la
2538
2539 # ------------------------------------------------------------------------------
2540 systemd_shutdown_SOURCES = \
2541 src/core/umount.c \
2542 src/core/umount.h \
2543 src/core/shutdown.c \
2544 src/core/mount-setup.c \
2545 src/core/mount-setup.h \
2546 src/core/killall.h \
2547 src/core/killall.c
2548
2549 systemd_shutdown_LDADD = \
2550 libsystemd-shared.la
2551
2552 # ------------------------------------------------------------------------------
2553 if HAVE_KMOD
2554 systemd_modules_load_SOURCES = \
2555 src/modules-load/modules-load.c
2556
2557 systemd_modules_load_CFLAGS = \
2558 $(AM_CFLAGS) \
2559 $(KMOD_CFLAGS)
2560
2561 systemd_modules_load_LDADD = \
2562 libsystemd-shared.la \
2563 $(KMOD_LIBS)
2564
2565 rootlibexec_PROGRAMS += \
2566 systemd-modules-load
2567
2568 nodist_systemunit_DATA += \
2569 units/systemd-modules-load.service
2570
2571 SYSINIT_TARGET_WANTS += \
2572 systemd-modules-load.service
2573
2574 if ENABLE_TMPFILES
2575 nodist_systemunit_DATA += \
2576 units/kmod-static-nodes.service
2577
2578 SYSINIT_TARGET_WANTS += \
2579 kmod-static-nodes.service
2580 endif
2581 endif
2582
2583 EXTRA_DIST += \
2584 units/systemd-modules-load.service.in \
2585 units/kmod-static-nodes.service.in
2586
2587 # ------------------------------------------------------------------------------
2588 if ENABLE_TMPFILES
2589 systemd_tmpfiles_SOURCES = \
2590 src/tmpfiles/tmpfiles.c
2591
2592 systemd_tmpfiles_CFLAGS = \
2593 $(AM_CFLAGS) \
2594 $(ACL_CFLAGS)
2595
2596 systemd_tmpfiles_LDADD = \
2597 libsystemd-shared.la \
2598 $(ACL_LIBS)
2599
2600 rootbin_PROGRAMS += \
2601 systemd-tmpfiles
2602
2603 dist_systemunit_DATA += \
2604 units/systemd-tmpfiles-clean.timer
2605
2606 nodist_systemunit_DATA += \
2607 units/systemd-tmpfiles-setup-dev.service \
2608 units/systemd-tmpfiles-setup.service \
2609 units/systemd-tmpfiles-clean.service
2610
2611 nodist_tmpfiles_DATA = \
2612 tmpfiles.d/systemd.conf \
2613 tmpfiles.d/etc.conf
2614
2615 dist_tmpfiles_DATA = \
2616 tmpfiles.d/systemd-nologin.conf \
2617 tmpfiles.d/tmp.conf \
2618 tmpfiles.d/x11.conf \
2619 tmpfiles.d/var.conf \
2620 tmpfiles.d/home.conf \
2621 tmpfiles.d/systemd-nspawn.conf \
2622 tmpfiles.d/journal-nocow.conf
2623
2624 if HAVE_SYSV_COMPAT
2625 dist_tmpfiles_DATA += \
2626 tmpfiles.d/legacy.conf
2627 endif
2628
2629 SYSINIT_TARGET_WANTS += \
2630 systemd-tmpfiles-setup-dev.service \
2631 systemd-tmpfiles-setup.service
2632
2633 dist_zshcompletion_data += \
2634 shell-completion/zsh/_systemd-tmpfiles
2635
2636 TIMERS_TARGET_WANTS += \
2637 systemd-tmpfiles-clean.timer
2638
2639 INSTALL_DIRS += \
2640 $(tmpfilesdir) \
2641 $(sysconfdir)/tmpfiles.d
2642 endif
2643
2644 EXTRA_DIST += \
2645 tmpfiles.d/systemd.conf.m4 \
2646 tmpfiles.d/etc.conf.m4 \
2647 units/systemd-tmpfiles-setup-dev.service.in \
2648 units/systemd-tmpfiles-setup.service.in \
2649 units/systemd-tmpfiles-clean.service.in
2650
2651 # ------------------------------------------------------------------------------
2652 if ENABLE_SYSUSERS
2653 systemd_sysusers_SOURCES = \
2654 src/sysusers/sysusers.c
2655
2656 systemd_sysusers_LDADD = \
2657 libsystemd-shared.la
2658
2659 rootbin_PROGRAMS += \
2660 systemd-sysusers
2661
2662 nodist_systemunit_DATA += \
2663 units/systemd-sysusers.service
2664
2665 SYSINIT_TARGET_WANTS += \
2666 systemd-sysusers.service
2667
2668 nodist_sysusers_DATA = \
2669 sysusers.d/systemd.conf \
2670 sysusers.d/basic.conf
2671
2672 if HAVE_REMOTE
2673 nodist_sysusers_DATA += \
2674 sysusers.d/systemd-remote.conf
2675 endif
2676
2677 INSTALL_DIRS += \
2678 $(sysusersdir)
2679 endif
2680
2681 EXTRA_DIST += \
2682 units/systemd-sysusers.service.in \
2683 sysusers.d/systemd.conf.m4 \
2684 sysusers.d/systemd-remote.conf.m4 \
2685 sysusers.d/basic.conf.in
2686
2687 # ------------------------------------------------------------------------------
2688 dist_factory_etc_DATA = \
2689 factory/etc/nsswitch.conf
2690
2691 if HAVE_PAM
2692 dist_factory_pam_DATA = \
2693 factory/etc/pam.d/system-auth \
2694 factory/etc/pam.d/other
2695 endif
2696
2697 # ------------------------------------------------------------------------------
2698 if ENABLE_FIRSTBOOT
2699 systemd_firstboot_SOURCES = \
2700 src/firstboot/firstboot.c
2701
2702 systemd_firstboot_LDADD = \
2703 libsystemd-shared.la \
2704 -lcrypt
2705
2706 rootbin_PROGRAMS += \
2707 systemd-firstboot
2708
2709 nodist_systemunit_DATA += \
2710 units/systemd-firstboot.service
2711
2712 SYSINIT_TARGET_WANTS += \
2713 systemd-firstboot.service
2714 endif
2715
2716 EXTRA_DIST += \
2717 units/systemd-firstboot.service.in
2718
2719 # ------------------------------------------------------------------------------
2720 systemd_machine_id_setup_SOURCES = \
2721 src/machine-id-setup/machine-id-setup-main.c \
2722 src/core/machine-id-setup.c \
2723 src/core/machine-id-setup.h
2724
2725 systemd_machine_id_setup_LDADD = \
2726 libsystemd-shared.la
2727
2728 SYSINIT_TARGET_WANTS += \
2729 systemd-machine-id-commit.service
2730
2731 # ------------------------------------------------------------------------------
2732 systemd_sysctl_SOURCES = \
2733 src/sysctl/sysctl.c
2734
2735 systemd_sysctl_LDADD = \
2736 libsystemd-shared.la
2737
2738 # ------------------------------------------------------------------------------
2739 systemd_sleep_SOURCES = \
2740 src/sleep/sleep.c
2741
2742 systemd_sleep_LDADD = \
2743 libsystemd-shared.la
2744
2745 # ------------------------------------------------------------------------------
2746 systemd_fsck_SOURCES = \
2747 src/fsck/fsck.c
2748
2749 systemd_fsck_LDADD = \
2750 libsystemd-shared.la
2751
2752 # ------------------------------------------------------------------------------
2753 systemd_ac_power_SOURCES = \
2754 src/ac-power/ac-power.c
2755
2756 systemd_ac_power_LDADD = \
2757 libsystemd-shared.la
2758
2759 # ------------------------------------------------------------------------------
2760 systemd_detect_virt_SOURCES = \
2761 src/detect-virt/detect-virt.c
2762
2763 systemd_detect_virt_LDADD = \
2764 libsystemd-shared.la
2765
2766 INSTALL_EXEC_HOOKS += \
2767 systemd-detect-virt-install-hook
2768
2769 # ------------------------------------------------------------------------------
2770 systemd_delta_SOURCES = \
2771 src/delta/delta.c
2772
2773 systemd_delta_LDADD = \
2774 libsystemd-shared.la
2775
2776 # ------------------------------------------------------------------------------
2777 systemd_getty_generator_SOURCES = \
2778 src/getty-generator/getty-generator.c
2779
2780 systemd_getty_generator_LDADD = \
2781 libsystemd-shared.la
2782
2783 # ------------------------------------------------------------------------------
2784 systemd_debug_generator_SOURCES = \
2785 src/debug-generator/debug-generator.c
2786
2787 systemd_debug_generator_LDADD = \
2788 libsystemd-shared.la
2789
2790 # ------------------------------------------------------------------------------
2791 systemd_fstab_generator_SOURCES = \
2792 src/fstab-generator/fstab-generator.c \
2793 src/core/mount-setup.c
2794
2795 systemd_fstab_generator_LDADD = \
2796 libsystemd-shared.la
2797
2798 # ------------------------------------------------------------------------------
2799 systemd_system_update_generator_SOURCES = \
2800 src/system-update-generator/system-update-generator.c
2801
2802 systemd_system_update_generator_LDADD = \
2803 libsystemd-shared.la
2804
2805 # ------------------------------------------------------------------------------
2806 if ENABLE_HIBERNATE
2807 systemgenerator_PROGRAMS += \
2808 systemd-hibernate-resume-generator
2809
2810 rootlibexec_PROGRAMS += \
2811 systemd-hibernate-resume
2812
2813 systemd_hibernate_resume_SOURCES = \
2814 src/hibernate-resume/hibernate-resume.c
2815
2816 systemd_hibernate_resume_LDADD = \
2817 libsystemd-shared.la
2818
2819 systemd_hibernate_resume_generator_SOURCES = \
2820 src/hibernate-resume/hibernate-resume-generator.c
2821
2822 systemd_hibernate_resume_generator_LDADD = \
2823 libsystemd-shared.la
2824
2825 dist_systemunit_DATA += \
2826 units/hibernate.target \
2827 units/hybrid-sleep.target
2828
2829 nodist_systemunit_DATA += \
2830 units/systemd-hibernate.service \
2831 units/systemd-hibernate-resume@.service \
2832 units/systemd-hybrid-sleep.service
2833 endif
2834
2835 EXTRA_DIST += \
2836 units/systemd-hibernate.service.in \
2837 units/systemd-hibernate-resume@.service.in \
2838 units/systemd-hybrid-sleep.service.in
2839
2840 # ------------------------------------------------------------------------------
2841 if ENABLE_EFI
2842 if HAVE_BLKID
2843 bootctl_SOURCES = \
2844 src/boot/bootctl.c
2845
2846 bootctl_CPPFLAGS = \
2847 $(AM_CPPFLAGS) \
2848 -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\" \
2849 -DBOOTLIBDIR=\"$(bootlibdir)\"
2850
2851 bootctl_CFLAGS = \
2852 $(AM_CFLAGS) \
2853 $(BLKID_CFLAGS)
2854
2855 bootctl_LDADD = \
2856 libsystemd-shared.la \
2857 $(BLKID_LIBS)
2858
2859 bin_PROGRAMS += \
2860 bootctl
2861
2862 dist_bashcompletion_data += \
2863 shell-completion/bash/bootctl
2864
2865 dist_zshcompletion_data += \
2866 shell-completion/zsh/_bootctl
2867 endif
2868
2869 # ------------------------------------------------------------------------------
2870 if HAVE_GNUEFI
2871 efi_cppflags = \
2872 $(EFI_CPPFLAGS) \
2873 -I$(top_builddir) -include config.h \
2874 -I$(EFI_INC_DIR)/efi \
2875 -I$(EFI_INC_DIR)/efi/$(EFI_ARCH) \
2876 -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\"
2877
2878 efi_cflags = \
2879 $(EFI_CFLAGS) \
2880 -Wall \
2881 -Wextra \
2882 -std=gnu90 \
2883 -nostdinc \
2884 -ggdb -O0 \
2885 -fpic \
2886 -fshort-wchar \
2887 -nostdinc \
2888 -ffreestanding \
2889 -fno-strict-aliasing \
2890 -fno-stack-protector \
2891 -Wsign-compare \
2892 -Wno-missing-field-initializers
2893
2894 if ARCH_X86_64
2895 efi_cflags += \
2896 -mno-red-zone \
2897 -mno-sse \
2898 -mno-mmx \
2899 -DEFI_FUNCTION_WRAPPER \
2900 -DGNU_EFI_USE_MS_ABI
2901 endif
2902
2903 if ARCH_IA32
2904 efi_cflags += \
2905 -mno-sse \
2906 -mno-mmx
2907 endif
2908
2909 efi_ldflags = \
2910 $(EFI_LDFLAGS) \
2911 -T $(EFI_LDS_DIR)/elf_$(EFI_ARCH)_efi.lds \
2912 -shared \
2913 -Bsymbolic \
2914 -nostdlib \
2915 -znocombreloc \
2916 -L $(EFI_LIB_DIR) \
2917 $(EFI_LDS_DIR)/crt0-efi-$(EFI_ARCH).o
2918
2919 # Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary' instead,
2920 # and add required symbols manually.
2921 if ARCH_AARCH64
2922 efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
2923 EFI_FORMAT = -O binary
2924 else
2925 EFI_FORMAT = --target=efi-app-$(EFI_ARCH)
2926 endif
2927 endif
2928 endif
2929
2930 # ------------------------------------------------------------------------------
2931 systemd_boot_headers = \
2932 src/boot/efi/util.h \
2933 src/boot/efi/console.h \
2934 src/boot/efi/graphics.h \
2935 src/boot/efi/pefile.h \
2936 src/boot/efi/measure.h \
2937 src/boot/efi/disk.h
2938
2939 systemd_boot_sources = \
2940 src/boot/efi/util.c \
2941 src/boot/efi/console.c \
2942 src/boot/efi/graphics.c \
2943 src/boot/efi/pefile.c \
2944 src/boot/efi/disk.c \
2945 src/boot/efi/measure.c \
2946 src/boot/efi/boot.c
2947
2948 EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
2949
2950 systemd_boot_objects = $(addprefix $(top_builddir)/,$(systemd_boot_sources:.c=.o))
2951 systemd_boot_solib = $(top_builddir)/src/boot/efi/systemd_boot.so
2952 systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi
2953
2954 if ENABLE_EFI
2955 if HAVE_GNUEFI
2956 bootlib_DATA = $(systemd_boot)
2957
2958 $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers))
2959 @$(MKDIR_P) $(top_builddir)/src/boot/efi/
2960 $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
2961
2962 $(systemd_boot_solib): $(systemd_boot_objects)
2963 $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \
2964 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
2965 nm -D -u $@ | grep ' U ' && exit 1 || :
2966
2967 $(systemd_boot): $(systemd_boot_solib)
2968 $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
2969 -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
2970 endif
2971 endif
2972
2973 CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
2974
2975 # ------------------------------------------------------------------------------
2976 stub_headers = \
2977 src/boot/efi/util.h \
2978 src/boot/efi/pefile.h \
2979 src/boot/efi/disk.h \
2980 src/boot/efi/graphics.h \
2981 src/boot/efi/splash.h \
2982 src/boot/efi/measure.h \
2983 src/boot/efi/linux.h
2984
2985 stub_sources = \
2986 src/boot/efi/util.c \
2987 src/boot/efi/pefile.c \
2988 src/boot/efi/disk.c \
2989 src/boot/efi/graphics.c \
2990 src/boot/efi/splash.c \
2991 src/boot/efi/linux.c \
2992 src/boot/efi/measure.c \
2993 src/boot/efi/stub.c
2994
2995 EXTRA_DIST += \
2996 $(stub_sources) \
2997 $(stub_headers) \
2998 test/splash.bmp
2999
3000 stub_objects = $(addprefix $(top_builddir)/,$(stub_sources:.c=.o))
3001 stub_solib = $(top_builddir)/src/boot/efi/stub.so
3002 stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub
3003
3004 if ENABLE_EFI
3005 if HAVE_GNUEFI
3006 bootlib_DATA += $(stub)
3007
3008 $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(stub_headers))
3009 @$(MKDIR_P) $(top_builddir)/src/boot/efi/
3010 $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
3011
3012 $(stub_solib): $(stub_objects)
3013 $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
3014 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
3015 nm -D -u $@ | grep ' U ' && exit 1 || :
3016
3017 $(stub): $(stub_solib)
3018 $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
3019 -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
3020 endif
3021 endif
3022
3023 CLEANFILES += $(stub_objects) $(stub_solib) $(stub)
3024
3025
3026 # ------------------------------------------------------------------------------
3027 CLEANFILES += test-efi-disk.img
3028
3029 test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh
3030 $(AM_V_GEN)test/test-efi-create-disk.sh
3031
3032 test-efi: test-efi-disk.img
3033 $(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img
3034
3035 EXTRA_DIST += test/test-efi-create-disk.sh
3036
3037 # ------------------------------------------------------------------------------
3038 if HAVE_BLKID
3039 systemgenerator_PROGRAMS += \
3040 systemd-gpt-auto-generator
3041
3042 systemd_gpt_auto_generator_SOURCES = \
3043 src/gpt-auto-generator/gpt-auto-generator.c \
3044 src/basic/blkid-util.h
3045
3046 systemd_gpt_auto_generator_LDADD = \
3047 libsystemd-shared.la \
3048 $(BLKID_LIBS)
3049
3050 systemd_gpt_auto_generator_CFLAGS = \
3051 $(AM_CFLAGS) \
3052 $(BLKID_CFLAGS)
3053 endif
3054
3055 # ------------------------------------------------------------------------------
3056 dist_xinitrc_SCRIPTS = \
3057 xorg/50-systemd-user.sh
3058
3059 # ------------------------------------------------------------------------------
3060 systemd_sysv_generator_SOURCES = \
3061 src/sysv-generator/sysv-generator.c
3062
3063 systemd_sysv_generator_LDADD = \
3064 libcore.la
3065
3066 # ------------------------------------------------------------------------------
3067 systemd_rc_local_generator_SOURCES = \
3068 src/rc-local-generator/rc-local-generator.c
3069
3070 systemd_rc_local_generator_LDADD = \
3071 libsystemd-shared.la
3072
3073 # ------------------------------------------------------------------------------
3074 systemd_remount_fs_SOURCES = \
3075 src/remount-fs/remount-fs.c \
3076 src/core/mount-setup.c \
3077 src/core/mount-setup.h
3078
3079 systemd_remount_fs_LDADD = \
3080 libsystemd-shared.la
3081
3082 # ------------------------------------------------------------------------------
3083 systemd_volatile_root_SOURCES = \
3084 src/volatile-root/volatile-root.c
3085
3086 systemd_volatile_root_LDADD = \
3087 libsystemd-shared.la
3088
3089 # ------------------------------------------------------------------------------
3090 systemd_cgroups_agent_SOURCES = \
3091 src/cgroups-agent/cgroups-agent.c
3092
3093 systemd_cgroups_agent_LDADD = \
3094 libsystemd-shared.la
3095
3096 # ------------------------------------------------------------------------------
3097 systemd_escape_SOURCES = \
3098 src/escape/escape.c
3099
3100 systemd_escape_LDADD = \
3101 libsystemd-shared.la
3102
3103 # -----------------------------------------------------------------------------
3104 systemctl_SOURCES = \
3105 src/systemctl/systemctl.c
3106
3107 systemctl_LDADD = \
3108 libsystemd-shared.la
3109
3110 # ------------------------------------------------------------------------------
3111 systemd_notify_SOURCES = \
3112 src/notify/notify.c
3113
3114 systemd_notify_LDADD = \
3115 libsystemd-shared.la
3116
3117 # ------------------------------------------------------------------------------
3118 systemd_dissect_SOURCES = \
3119 src/dissect/dissect.c
3120
3121 systemd_dissect_LDADD = \
3122 libsystemd-shared.la
3123
3124 # ------------------------------------------------------------------------------
3125 systemd_path_SOURCES = \
3126 src/path/path.c
3127
3128 systemd_path_LDADD = \
3129 libsystemd-shared.la
3130
3131 # ------------------------------------------------------------------------------
3132 systemd_ask_password_SOURCES = \
3133 src/ask-password/ask-password.c
3134
3135 systemd_ask_password_LDADD = \
3136 libsystemd-shared.la
3137
3138 # ------------------------------------------------------------------------------
3139 systemd_reply_password_SOURCES = \
3140 src/reply-password/reply-password.c
3141
3142 systemd_reply_password_LDADD = \
3143 libsystemd-shared.la
3144
3145 # ------------------------------------------------------------------------------
3146 systemd_cgls_SOURCES = \
3147 src/cgls/cgls.c
3148
3149 systemd_cgls_LDADD = \
3150 libsystemd-shared.la
3151
3152 # ------------------------------------------------------------------------------
3153 systemd_cgtop_SOURCES = \
3154 src/cgtop/cgtop.c
3155
3156 systemd_cgtop_LDADD = \
3157 libsystemd-shared.la
3158
3159 # ------------------------------------------------------------------------------
3160 systemd_nspawn_SOURCES = \
3161 src/nspawn/nspawn.c \
3162 src/nspawn/nspawn-settings.c \
3163 src/nspawn/nspawn-settings.h \
3164 src/nspawn/nspawn-mount.c \
3165 src/nspawn/nspawn-mount.h \
3166 src/nspawn/nspawn-network.c \
3167 src/nspawn/nspawn-network.h \
3168 src/nspawn/nspawn-expose-ports.c \
3169 src/nspawn/nspawn-expose-ports.h \
3170 src/nspawn/nspawn-cgroup.c \
3171 src/nspawn/nspawn-cgroup.h \
3172 src/nspawn/nspawn-seccomp.c \
3173 src/nspawn/nspawn-seccomp.h \
3174 src/nspawn/nspawn-register.c \
3175 src/nspawn/nspawn-register.h \
3176 src/nspawn/nspawn-setuid.c \
3177 src/nspawn/nspawn-setuid.h \
3178 src/nspawn/nspawn-stub-pid1.c \
3179 src/nspawn/nspawn-stub-pid1.h \
3180 src/nspawn/nspawn-patch-uid.c \
3181 src/nspawn/nspawn-patch-uid.h \
3182 src/core/mount-setup.c \
3183 src/core/mount-setup.h \
3184 src/core/loopback-setup.c \
3185 src/core/loopback-setup.h
3186
3187 nodist_systemd_nspawn_SOURCES = \
3188 src/nspawn/nspawn-gperf.c
3189
3190 gperf_gperf_sources += \
3191 src/nspawn/nspawn-gperf.gperf
3192
3193 systemd_nspawn_CFLAGS = \
3194 $(AM_CFLAGS) \
3195 $(ACL_CFLAGS) \
3196 $(BLKID_CFLAGS) \
3197 $(SECCOMP_CFLAGS) \
3198 $(SELINUX_CFLAGS)
3199
3200 systemd_nspawn_LDADD = \
3201 libsystemd-shared.la \
3202 $(ACL_LIBS) \
3203 $(BLKID_LIBS) \
3204 $(SECCOMP_LIBS) \
3205 $(SELINUX_LIBS)
3206
3207 if HAVE_LIBIPTC
3208 systemd_nspawn_LDADD += \
3209 libfirewall.la
3210 endif
3211
3212 test_patch_uid_SOURCES = \
3213 src/nspawn/nspawn-patch-uid.c \
3214 src/nspawn/nspawn-patch-uid.h \
3215 src/nspawn/test-patch-uid.c
3216
3217 test_patch_uid_CFLAGS = \
3218 $(AM_CFLAGS) \
3219 $(ACL_CFLAGS)
3220
3221 test_patch_uid_LDADD = \
3222 libsystemd-shared.la \
3223 $(ACL_LIBS)
3224
3225 manual_tests += \
3226 test-patch-uid
3227
3228 # ------------------------------------------------------------------------------
3229 systemd_run_SOURCES = \
3230 src/run/run.c
3231
3232 systemd_run_LDADD = \
3233 libsystemd-shared.la
3234
3235 # ------------------------------------------------------------------------------
3236 systemd_mount_SOURCES = \
3237 src/mount/mount-tool.c
3238
3239 systemd_mount_LDADD = \
3240 libsystemd-shared.la
3241
3242 # ------------------------------------------------------------------------------
3243 systemd_stdio_bridge_SOURCES = \
3244 src/stdio-bridge/stdio-bridge.c
3245
3246 systemd_stdio_bridge_LDADD = \
3247 libsystemd-shared.la
3248
3249 # ------------------------------------------------------------------------------
3250 systemd_tty_ask_password_agent_SOURCES = \
3251 src/tty-ask-password-agent/tty-ask-password-agent.c
3252
3253 systemd_tty_ask_password_agent_LDADD = \
3254 libsystemd-shared.la
3255
3256 # ------------------------------------------------------------------------------
3257 libsystemd_internal_la_SOURCES = \
3258 src/systemd/sd-bus.h \
3259 src/systemd/sd-bus-protocol.h \
3260 src/systemd/sd-bus-vtable.h \
3261 src/systemd/sd-utf8.h \
3262 src/systemd/sd-event.h \
3263 src/systemd/sd-netlink.h \
3264 src/systemd/sd-resolve.h \
3265 src/systemd/sd-login.h \
3266 src/systemd/sd-id128.h \
3267 src/systemd/sd-daemon.h \
3268 src/systemd/sd-path.h \
3269 src/systemd/sd-network.h \
3270 src/systemd/sd-hwdb.h \
3271 src/systemd/sd-device.h \
3272 src/libsystemd/libsystemd.sym \
3273 src/libsystemd/sd-bus/sd-bus.c \
3274 src/libsystemd/sd-bus/bus-control.c \
3275 src/libsystemd/sd-bus/bus-control.h \
3276 src/libsystemd/sd-bus/bus-error.c \
3277 src/libsystemd/sd-bus/bus-error.h \
3278 src/libsystemd/sd-bus/bus-common-errors.h \
3279 src/libsystemd/sd-bus/bus-common-errors.c \
3280 src/libsystemd/sd-bus/bus-internal.c \
3281 src/libsystemd/sd-bus/bus-internal.h \
3282 src/libsystemd/sd-bus/bus-socket.c \
3283 src/libsystemd/sd-bus/bus-socket.h \
3284 src/libsystemd/sd-bus/bus-kernel.c \
3285 src/libsystemd/sd-bus/bus-kernel.h \
3286 src/libsystemd/sd-bus/bus-container.c \
3287 src/libsystemd/sd-bus/bus-container.h \
3288 src/libsystemd/sd-bus/bus-message.c \
3289 src/libsystemd/sd-bus/bus-message.h \
3290 src/libsystemd/sd-bus/bus-creds.c \
3291 src/libsystemd/sd-bus/bus-creds.h \
3292 src/libsystemd/sd-bus/bus-signature.c \
3293 src/libsystemd/sd-bus/bus-signature.h \
3294 src/libsystemd/sd-bus/bus-type.c \
3295 src/libsystemd/sd-bus/bus-type.h \
3296 src/libsystemd/sd-bus/bus-match.c \
3297 src/libsystemd/sd-bus/bus-match.h \
3298 src/libsystemd/sd-bus/bus-bloom.c \
3299 src/libsystemd/sd-bus/bus-bloom.h \
3300 src/libsystemd/sd-bus/bus-introspect.c \
3301 src/libsystemd/sd-bus/bus-introspect.h \
3302 src/libsystemd/sd-bus/bus-objects.c \
3303 src/libsystemd/sd-bus/bus-objects.h \
3304 src/libsystemd/sd-bus/bus-gvariant.c \
3305 src/libsystemd/sd-bus/bus-gvariant.h \
3306 src/libsystemd/sd-bus/bus-convenience.c \
3307 src/libsystemd/sd-bus/bus-track.c \
3308 src/libsystemd/sd-bus/bus-track.h \
3309 src/libsystemd/sd-bus/bus-slot.c \
3310 src/libsystemd/sd-bus/bus-slot.h \
3311 src/libsystemd/sd-bus/bus-protocol.h \
3312 src/libsystemd/sd-bus/kdbus.h \
3313 src/libsystemd/sd-bus/bus-dump.c \
3314 src/libsystemd/sd-bus/bus-dump.h \
3315 src/libsystemd/sd-utf8/sd-utf8.c \
3316 src/libsystemd/sd-event/sd-event.c \
3317 src/libsystemd/sd-netlink/sd-netlink.c \
3318 src/libsystemd/sd-netlink/netlink-internal.h \
3319 src/libsystemd/sd-netlink/netlink-message.c \
3320 src/libsystemd/sd-netlink/netlink-socket.c \
3321 src/libsystemd/sd-netlink/rtnl-message.c \
3322 src/libsystemd/sd-netlink/netlink-types.h \
3323 src/libsystemd/sd-netlink/netlink-types.c \
3324 src/libsystemd/sd-netlink/netlink-util.h \
3325 src/libsystemd/sd-netlink/netlink-util.c \
3326 src/libsystemd/sd-netlink/local-addresses.h \
3327 src/libsystemd/sd-netlink/local-addresses.c \
3328 src/libsystemd/sd-id128/sd-id128.c \
3329 src/libsystemd/sd-id128/id128-util.h \
3330 src/libsystemd/sd-id128/id128-util.c \
3331 src/libsystemd/sd-daemon/sd-daemon.c \
3332 src/libsystemd/sd-login/sd-login.c \
3333 src/libsystemd/sd-path/sd-path.c \
3334 src/libsystemd/sd-network/sd-network.c \
3335 src/libsystemd/sd-network/network-util.h \
3336 src/libsystemd/sd-network/network-util.c \
3337 src/libsystemd/sd-hwdb/sd-hwdb.c \
3338 src/libsystemd/sd-hwdb/hwdb-util.h \
3339 src/libsystemd/sd-hwdb/hwdb-internal.h \
3340 src/libsystemd/sd-device/device-internal.h \
3341 src/libsystemd/sd-device/device-util.h \
3342 src/libsystemd/sd-device/device-enumerator.c \
3343 src/libsystemd/sd-device/device-enumerator-private.h \
3344 src/libsystemd/sd-device/sd-device.c \
3345 src/libsystemd/sd-device/device-private.c \
3346 src/libsystemd/sd-device/device-private.h \
3347 src/libsystemd/sd-resolve/sd-resolve.c
3348
3349 libsystemd_internal_la_LIBADD = \
3350 -lresolv
3351
3352 noinst_LTLIBRARIES += \
3353 libsystemd-internal.la
3354
3355 EXTRA_DIST += \
3356 src/libsystemd/libsystemd.pc.in \
3357 src/libsystemd/sd-bus/DIFFERENCES \
3358 src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
3359
3360 libsystemd_la_SOURCES =
3361
3362 libsystemd_la_LDFLAGS = \
3363 $(AM_LDFLAGS) \
3364 -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
3365 -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
3366
3367 libsystemd_la_LIBADD = \
3368 libsystemd-internal.la \
3369 libbasic.la \
3370 libsystemd-journal-internal.la
3371
3372 pkgconfiglib_DATA += \
3373 src/libsystemd/libsystemd.pc
3374
3375 pkginclude_HEADERS += \
3376 src/systemd/sd-bus.h \
3377 src/systemd/sd-bus-protocol.h \
3378 src/systemd/sd-bus-vtable.h \
3379 src/systemd/sd-event.h \
3380 src/systemd/sd-login.h \
3381 src/systemd/sd-id128.h \
3382 src/systemd/sd-daemon.h
3383
3384 rootlib_LTLIBRARIES += \
3385 libsystemd.la
3386
3387 tests += \
3388 test-bus-marshal \
3389 test-bus-signature \
3390 test-bus-benchmark \
3391 test-bus-chat \
3392 test-bus-cleanup \
3393 test-bus-server \
3394 test-bus-match \
3395 test-bus-kernel \
3396 test-bus-kernel-bloom \
3397 test-bus-zero-copy \
3398 test-bus-introspect \
3399 test-bus-objects \
3400 test-bus-error \
3401 test-bus-creds \
3402 test-bus-gvariant \
3403 test-bus-track \
3404 test-event \
3405 test-netlink \
3406 test-local-addresses \
3407 test-resolve
3408
3409 bin_PROGRAMS += \
3410 busctl
3411
3412 test_bus_marshal_SOURCES = \
3413 src/libsystemd/sd-bus/test-bus-marshal.c
3414
3415 test_bus_marshal_LDADD = \
3416 libsystemd-shared.la \
3417 $(GLIB_LIBS) \
3418 $(DBUS_LIBS)
3419
3420 test_bus_marshal_CFLAGS = \
3421 $(AM_CFLAGS) \
3422 $(GLIB_CFLAGS) \
3423 $(DBUS_CFLAGS)
3424
3425 test_bus_signature_SOURCES = \
3426 src/libsystemd/sd-bus/test-bus-signature.c
3427
3428 test_bus_signature_LDADD = \
3429 libsystemd-shared.la
3430
3431 test_bus_chat_SOURCES = \
3432 src/libsystemd/sd-bus/test-bus-chat.c
3433
3434 test_bus_chat_LDADD = \
3435 libsystemd-shared.la
3436
3437 test_bus_cleanup_SOURCES = \
3438 src/libsystemd/sd-bus/test-bus-cleanup.c
3439
3440 test_bus_cleanup_CFLAGS = \
3441 $(AM_CFLAGS) \
3442 $(SECCOMP_CFLAGS)
3443
3444 test_bus_cleanup_LDADD = \
3445 libsystemd-shared.la
3446
3447 test_bus_track_SOURCES = \
3448 src/libsystemd/sd-bus/test-bus-track.c
3449
3450 test_bus_track_CFLAGS = \
3451 $(AM_CFLAGS) \
3452 $(SECCOMP_CFLAGS)
3453
3454 test_bus_track_LDADD = \
3455 libsystemd-shared.la
3456
3457 test_bus_server_SOURCES = \
3458 src/libsystemd/sd-bus/test-bus-server.c
3459
3460 test_bus_server_LDADD = \
3461 libsystemd-shared.la
3462
3463 test_bus_objects_SOURCES = \
3464 src/libsystemd/sd-bus/test-bus-objects.c
3465
3466 test_bus_objects_LDADD = \
3467 libsystemd-shared.la
3468
3469 test_bus_error_SOURCES = \
3470 src/libsystemd/sd-bus/test-bus-error.c
3471
3472 # Link statically because this test uses BUS_ERROR_MAP_ELF_REGISTER
3473 test_bus_error_LDADD = \
3474 libshared.la
3475
3476 test_bus_gvariant_SOURCES = \
3477 src/libsystemd/sd-bus/test-bus-gvariant.c
3478
3479 test_bus_gvariant_LDADD = \
3480 libsystemd-shared.la \
3481 $(GLIB_LIBS)
3482
3483 test_bus_gvariant_CFLAGS = \
3484 $(AM_CFLAGS) \
3485 $(GLIB_CFLAGS)
3486
3487 test_bus_creds_SOURCES = \
3488 src/libsystemd/sd-bus/test-bus-creds.c
3489
3490 test_bus_creds_LDADD = \
3491 libsystemd-shared.la
3492
3493 test_bus_match_SOURCES = \
3494 src/libsystemd/sd-bus/test-bus-match.c
3495
3496 test_bus_match_LDADD = \
3497 libsystemd-shared.la
3498
3499 test_bus_kernel_SOURCES = \
3500 src/libsystemd/sd-bus/test-bus-kernel.c
3501
3502 test_bus_kernel_LDADD = \
3503 libsystemd-shared.la
3504
3505 test_bus_kernel_bloom_SOURCES = \
3506 src/libsystemd/sd-bus/test-bus-kernel-bloom.c
3507
3508 test_bus_kernel_bloom_LDADD = \
3509 libsystemd-shared.la
3510
3511 test_bus_benchmark_SOURCES = \
3512 src/libsystemd/sd-bus/test-bus-benchmark.c
3513
3514 test_bus_benchmark_LDADD = \
3515 libsystemd-shared.la
3516
3517 test_bus_zero_copy_SOURCES = \
3518 src/libsystemd/sd-bus/test-bus-zero-copy.c
3519
3520 test_bus_zero_copy_LDADD = \
3521 libsystemd-shared.la
3522
3523 test_bus_introspect_SOURCES = \
3524 src/libsystemd/sd-bus/test-bus-introspect.c
3525
3526 test_bus_introspect_LDADD = \
3527 libsystemd-shared.la
3528
3529 test_event_SOURCES = \
3530 src/libsystemd/sd-event/test-event.c
3531
3532 test_event_LDADD = \
3533 libsystemd-shared.la
3534
3535 test_netlink_SOURCES = \
3536 src/libsystemd/sd-netlink/test-netlink.c
3537
3538 test_netlink_LDADD = \
3539 libsystemd-shared.la
3540
3541 test_local_addresses_SOURCES = \
3542 src/libsystemd/sd-netlink/test-local-addresses.c
3543
3544 test_local_addresses_LDADD = \
3545 libsystemd-shared.la
3546
3547 test_resolve_SOURCES = \
3548 src/libsystemd/sd-resolve/test-resolve.c
3549
3550 test_resolve_LDADD = \
3551 libsystemd-shared.la
3552
3553 busctl_SOURCES = \
3554 src/libsystemd/sd-bus/busctl.c \
3555 src/libsystemd/sd-bus/busctl-introspect.c \
3556 src/libsystemd/sd-bus/busctl-introspect.h
3557
3558 busctl_LDADD = \
3559 libsystemd-shared.la
3560
3561 # ------------------------------------------------------------------------------
3562 noinst_LTLIBRARIES += \
3563 libsystemd-network.la
3564
3565 libsystemd_network_la_CFLAGS = \
3566 $(AM_CFLAGS) \
3567 $(KMOD_CFLAGS)
3568
3569 libsystemd_network_la_SOURCES = \
3570 src/systemd/sd-dhcp-client.h \
3571 src/systemd/sd-dhcp-server.h \
3572 src/systemd/sd-dhcp-lease.h \
3573 src/systemd/sd-ipv4ll.h \
3574 src/systemd/sd-ipv4acd.h \
3575 src/systemd/sd-ndisc.h \
3576 src/systemd/sd-dhcp6-client.h \
3577 src/systemd/sd-dhcp6-lease.h \
3578 src/systemd/sd-lldp.h \
3579 src/libsystemd-network/sd-dhcp-client.c \
3580 src/libsystemd-network/sd-dhcp-server.c \
3581 src/libsystemd-network/dhcp-network.c \
3582 src/libsystemd-network/dhcp-option.c \
3583 src/libsystemd-network/dhcp-packet.c \
3584 src/libsystemd-network/dhcp-internal.h \
3585 src/libsystemd-network/dhcp-server-internal.h \
3586 src/libsystemd-network/dhcp-protocol.h \
3587 src/libsystemd-network/dhcp-lease-internal.h \
3588 src/libsystemd-network/sd-dhcp-lease.c \
3589 src/libsystemd-network/sd-ipv4ll.c \
3590 src/libsystemd-network/sd-ipv4acd.c \
3591 src/libsystemd-network/arp-util.h \
3592 src/libsystemd-network/arp-util.c \
3593 src/libsystemd-network/network-internal.c \
3594 src/libsystemd-network/network-internal.h \
3595 src/libsystemd-network/sd-ndisc.c \
3596 src/libsystemd-network/ndisc-internal.h \
3597 src/libsystemd-network/ndisc-router.h \
3598 src/libsystemd-network/ndisc-router.c \
3599 src/libsystemd-network/icmp6-util.h \
3600 src/libsystemd-network/icmp6-util.c \
3601 src/libsystemd-network/sd-dhcp6-client.c \
3602 src/libsystemd-network/dhcp6-internal.h \
3603 src/libsystemd-network/dhcp6-protocol.h \
3604 src/libsystemd-network/dhcp6-network.c \
3605 src/libsystemd-network/dhcp6-option.c \
3606 src/libsystemd-network/dhcp6-lease-internal.h \
3607 src/libsystemd-network/sd-dhcp6-lease.c \
3608 src/libsystemd-network/dhcp-identifier.h \
3609 src/libsystemd-network/dhcp-identifier.c \
3610 src/libsystemd-network/lldp-internal.h \
3611 src/libsystemd-network/lldp-network.h \
3612 src/libsystemd-network/lldp-network.c \
3613 src/libsystemd-network/lldp-neighbor.h \
3614 src/libsystemd-network/lldp-neighbor.c \
3615 src/libsystemd-network/sd-lldp.c
3616
3617 libsystemd_network_la_LIBADD = \
3618 $(KMOD_LIBS)
3619
3620 test_dhcp_option_SOURCES = \
3621 src/libsystemd-network/dhcp-protocol.h \
3622 src/libsystemd-network/dhcp-internal.h \
3623 src/libsystemd-network/test-dhcp-option.c
3624
3625 test_dhcp_option_LDADD = \
3626 libsystemd-network.la \
3627 libsystemd-shared.la
3628
3629 test_dhcp_client_SOURCES = \
3630 src/systemd/sd-dhcp-client.h \
3631 src/libsystemd-network/dhcp-protocol.h \
3632 src/libsystemd-network/dhcp-internal.h \
3633 src/libsystemd-network/test-dhcp-client.c
3634
3635 test_dhcp_client_LDADD = \
3636 libsystemd-network.la \
3637 libsystemd-shared.la
3638
3639 test_dhcp_server_SOURCES = \
3640 src/libsystemd-network/test-dhcp-server.c
3641
3642 test_dhcp_server_LDADD = \
3643 libsystemd-network.la \
3644 libsystemd-shared.la
3645
3646 test_ipv4ll_SOURCES = \
3647 src/systemd/sd-ipv4ll.h \
3648 src/libsystemd-network/arp-util.h \
3649 src/libsystemd-network/test-ipv4ll.c
3650
3651 test_ipv4ll_LDADD = \
3652 libsystemd-network.la \
3653 libsystemd-shared.la
3654
3655 test_ipv4ll_manual_SOURCES = \
3656 src/systemd/sd-ipv4ll.h \
3657 src/libsystemd-network/test-ipv4ll-manual.c
3658
3659 test_ipv4ll_manual_LDADD = \
3660 libsystemd-network.la \
3661 libsystemd-shared.la
3662
3663 test_acd_SOURCES = \
3664 src/systemd/sd-ipv4acd.h \
3665 src/libsystemd-network/test-acd.c
3666
3667 test_acd_LDADD = \
3668 libsystemd-network.la \
3669 libsystemd-shared.la
3670
3671 test_ndisc_rs_SOURCES = \
3672 src/systemd/sd-dhcp6-client.h \
3673 src/systemd/sd-ndisc.h \
3674 src/libsystemd-network/icmp6-util.h \
3675 src/libsystemd-network/test-ndisc-rs.c \
3676 src/libsystemd-network/dhcp-identifier.h \
3677 src/libsystemd-network/dhcp-identifier.c
3678
3679 test_ndisc_rs_LDADD = \
3680 libsystemd-network.la \
3681 libudev.la \
3682 libsystemd-shared.la
3683
3684 test_dhcp6_client_SOURCES = \
3685 src/systemd/sd-dhcp6-client.h \
3686 src/libsystemd-network/dhcp6-internal.h \
3687 src/libsystemd-network/test-dhcp6-client.c \
3688 src/libsystemd-network/dhcp-identifier.h \
3689 src/libsystemd-network/dhcp-identifier.c
3690
3691 test_dhcp6_client_LDADD = \
3692 libsystemd-network.la \
3693 libudev.la \
3694 libsystemd-shared.la
3695
3696 test_lldp_SOURCES = \
3697 src/libsystemd-network/test-lldp.c
3698
3699 test_lldp_LDADD = \
3700 libsystemd-network.la \
3701 libsystemd-shared.la
3702
3703 tests += \
3704 test-dhcp-option \
3705 test-dhcp-client \
3706 test-dhcp-server \
3707 test-ipv4ll \
3708 test-ndisc-rs \
3709 test-dhcp6-client \
3710 test-lldp
3711
3712 # ------------------------------------------------------------------------------
3713 include_HEADERS += \
3714 src/libudev/libudev.h
3715
3716 rootlib_LTLIBRARIES += \
3717 libudev.la
3718
3719 libudev_la_SOURCES =\
3720 src/libudev/libudev.sym \
3721 src/libudev/libudev-private.h \
3722 src/libudev/libudev-device-internal.h \
3723 src/libudev/libudev.c \
3724 src/libudev/libudev-list.c \
3725 src/libudev/libudev-util.c \
3726 src/libudev/libudev-device.c \
3727 src/libudev/libudev-device-private.c \
3728 src/libudev/libudev-enumerate.c \
3729 src/libudev/libudev-monitor.c \
3730 src/libudev/libudev-queue.c \
3731 src/libudev/libudev-hwdb.c
3732
3733 libudev_la_LDFLAGS = \
3734 $(AM_LDFLAGS) \
3735 -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3736 -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3737
3738 libudev_la_LIBADD = \
3739 libsystemd-internal.la \
3740 libbasic.la
3741
3742 pkgconfiglib_DATA += \
3743 src/libudev/libudev.pc
3744
3745 EXTRA_DIST += \
3746 src/libudev/libudev.pc.in
3747
3748 # ------------------------------------------------------------------------------
3749 noinst_LTLIBRARIES += \
3750 libudev-internal.la
3751
3752 libudev_internal_la_SOURCES =\
3753 $(libudev_la_SOURCES)
3754
3755 # ------------------------------------------------------------------------------
3756 INSTALL_DIRS += \
3757 $(sysconfdir)/udev/rules.d
3758
3759 dist_network_DATA = \
3760 network/99-default.link \
3761 network/80-container-host0.network \
3762 network/80-container-ve.network \
3763 network/80-container-vz.network
3764
3765 dist_udevrules_DATA += \
3766 rules/50-udev-default.rules \
3767 rules/60-block.rules \
3768 rules/60-drm.rules \
3769 rules/60-evdev.rules \
3770 rules/60-persistent-storage-tape.rules \
3771 rules/60-persistent-input.rules \
3772 rules/60-persistent-alsa.rules \
3773 rules/60-persistent-storage.rules \
3774 rules/60-sensor.rules \
3775 rules/60-serial.rules \
3776 rules/64-btrfs.rules \
3777 rules/70-mouse.rules \
3778 rules/70-touchpad.rules \
3779 rules/75-net-description.rules \
3780 rules/78-sound-card.rules \
3781 rules/80-net-setup-link.rules
3782
3783 nodist_udevrules_DATA += \
3784 rules/99-systemd.rules
3785
3786 udevconfdir = $(sysconfdir)/udev
3787 dist_udevconf_DATA = \
3788 src/udev/udev.conf
3789
3790 pkgconfigdata_DATA += \
3791 src/udev/udev.pc
3792
3793 EXTRA_DIST += \
3794 rules/99-systemd.rules.in \
3795 src/udev/udev.pc.in
3796
3797 EXTRA_DIST += \
3798 units/systemd-udevd.service.in \
3799 units/systemd-udev-trigger.service.in \
3800 units/systemd-udev-settle.service.in
3801
3802 SOCKETS_TARGET_WANTS += \
3803 systemd-udevd-control.socket \
3804 systemd-udevd-kernel.socket
3805
3806 SYSINIT_TARGET_WANTS += \
3807 systemd-udevd.service \
3808 systemd-udev-trigger.service
3809
3810 rootbin_PROGRAMS += \
3811 udevadm
3812
3813 rootlibexec_PROGRAMS += \
3814 systemd-udevd
3815
3816 noinst_LTLIBRARIES += \
3817 libudev-core.la
3818
3819 src/udev/keyboard-keys-list.txt:
3820 $(AM_V_at)$(MKDIR_P) $(dir $@)
3821 $(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 } }' > $@
3822
3823 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt
3824 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3825
3826 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3827 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3828
3829 gperf_txt_sources += \
3830 src/udev/keyboard-keys-list.txt
3831
3832 libudev_core_la_SOURCES = \
3833 src/udev/udev.h \
3834 src/udev/udev-event.c \
3835 src/udev/udev-watch.c \
3836 src/udev/udev-node.c \
3837 src/udev/udev-rules.c \
3838 src/udev/udev-ctrl.c \
3839 src/udev/udev-builtin.c \
3840 src/udev/udev-builtin-btrfs.c \
3841 src/udev/udev-builtin-hwdb.c \
3842 src/udev/udev-builtin-input_id.c \
3843 src/udev/udev-builtin-keyboard.c \
3844 src/udev/udev-builtin-net_id.c \
3845 src/udev/udev-builtin-net_setup_link.c \
3846 src/udev/udev-builtin-path_id.c \
3847 src/udev/udev-builtin-usb_id.c \
3848 src/udev/net/link-config.h \
3849 src/udev/net/link-config.c \
3850 src/udev/net/ethtool-util.h \
3851 src/udev/net/ethtool-util.c
3852
3853 nodist_libudev_core_la_SOURCES = \
3854 src/udev/keyboard-keys-from-name.h \
3855 src/udev/net/link-config-gperf.c
3856
3857 gperf_gperf_sources += \
3858 src/udev/net/link-config-gperf.gperf
3859
3860 libudev_core_la_CFLAGS = \
3861 $(AM_CFLAGS) \
3862 $(BLKID_CFLAGS) \
3863 $(KMOD_CFLAGS)
3864
3865 libudev_core_la_LIBADD = \
3866 libsystemd-network.la \
3867 libshared.la \
3868 $(BLKID_LIBS) \
3869 $(KMOD_LIBS)
3870
3871 if HAVE_KMOD
3872 libudev_core_la_SOURCES += \
3873 src/udev/udev-builtin-kmod.c
3874
3875 dist_udevrules_DATA += \
3876 rules/80-drivers.rules
3877 endif
3878
3879 if HAVE_BLKID
3880 libudev_core_la_SOURCES += \
3881 src/udev/udev-builtin-blkid.c
3882 endif
3883
3884 if HAVE_ACL
3885 libudev_core_la_SOURCES += \
3886 src/udev/udev-builtin-uaccess.c \
3887 src/login/logind-acl.c \
3888 src/libsystemd/sd-login/sd-login.c \
3889 src/systemd/sd-login.h
3890 endif
3891
3892 systemd_udevd_SOURCES = \
3893 src/udev/udevd.c
3894
3895 systemd_udevd_LDADD = \
3896 libudev-core.la \
3897 libbasic.la
3898
3899 udevadm_SOURCES = \
3900 src/udev/udevadm.c \
3901 src/udev/udevadm-info.c \
3902 src/udev/udevadm-control.c \
3903 src/udev/udevadm-monitor.c \
3904 src/udev/udevadm-hwdb.c \
3905 src/udev/udevadm-settle.c \
3906 src/udev/udevadm-trigger.c \
3907 src/udev/udevadm-test.c \
3908 src/udev/udevadm-test-builtin.c \
3909 src/udev/udevadm-util.c \
3910 src/udev/udevadm-util.h
3911
3912 udevadm_LDADD = \
3913 libudev-core.la \
3914 libbasic.la
3915
3916 # ------------------------------------------------------------------------------
3917 if ENABLE_HWDB
3918 INSTALL_DIRS += \
3919 $(sysconfdir)/udev/hwdb.d
3920
3921 systemd_hwdb_SOURCES = \
3922 src/libsystemd/sd-hwdb/hwdb-internal.h \
3923 src/hwdb/hwdb.c
3924
3925 systemd_hwdb_LDADD = \
3926 libshared.la
3927
3928 rootbin_PROGRAMS += \
3929 systemd-hwdb
3930
3931 dist_udevhwdb_DATA = \
3932 hwdb/20-pci-vendor-model.hwdb \
3933 hwdb/20-pci-classes.hwdb \
3934 hwdb/20-usb-vendor-model.hwdb \
3935 hwdb/20-usb-classes.hwdb \
3936 hwdb/20-sdio-vendor-model.hwdb \
3937 hwdb/20-sdio-classes.hwdb \
3938 hwdb/20-bluetooth-vendor-product.hwdb \
3939 hwdb/20-acpi-vendor.hwdb \
3940 hwdb/20-OUI.hwdb \
3941 hwdb/20-net-ifname.hwdb \
3942 hwdb/60-evdev.hwdb \
3943 hwdb/60-keyboard.hwdb \
3944 hwdb/60-sensor.hwdb \
3945 hwdb/70-mouse.hwdb \
3946 hwdb/70-pointingstick.hwdb \
3947 hwdb/70-touchpad.hwdb
3948
3949 SYSINIT_TARGET_WANTS += \
3950 systemd-hwdb-update.service
3951
3952 # Update hwdb on installation. Do not bother if installing
3953 # in DESTDIR, since this is likely for packaging purposes.
3954 hwdb-update-hook:
3955 -test -n "$(DESTDIR)" || $(rootbindir)/systemd-hwdb update
3956
3957 INSTALL_DATA_HOOKS += \
3958 hwdb-update-hook
3959
3960 hwdb-remove-hook:
3961 -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3962 endif
3963
3964 EXTRA_DIST += \
3965 units/systemd-hwdb-update.service.in \
3966 hwdb/ids-update.pl \
3967 hwdb/sdio.ids
3968
3969 # ------------------------------------------------------------------------------
3970 if ENABLE_TESTS
3971 TESTS += \
3972 test/udev-test.pl \
3973 test/hwdb-test.sh
3974
3975 if HAVE_PYTHON
3976 TESTS += \
3977 test/rule-syntax-check.py \
3978 hwdb/parse_hwdb.py
3979
3980 if HAVE_SYSV_COMPAT
3981 TESTS += \
3982 test/sysv-generator-test.py
3983 endif
3984 endif
3985 endif
3986
3987 tests += \
3988 test-libudev
3989
3990 manual_tests += \
3991 test-udev
3992
3993 test_libudev_SOURCES = \
3994 src/test/test-libudev.c
3995
3996 test_libudev_LDADD = \
3997 libsystemd-shared.la
3998
3999 test_udev_SOURCES = \
4000 src/test/test-udev.c
4001
4002 test_udev_LDADD = \
4003 libudev-core.la \
4004 libsystemd-shared.la \
4005 $(BLKID_LIBS) \
4006 $(KMOD_LIBS) \
4007 -lrt
4008
4009 if ENABLE_TESTS
4010 check_DATA += \
4011 test/sys
4012 endif
4013
4014 # packed sysfs test tree
4015 test/sys: test/sys.tar.xz
4016 -rm -rf test/sys
4017 $(AM_V_at)$(MKDIR_P) $(dir $@)
4018 $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
4019 -touch test/sys
4020
4021 test-sys-distclean:
4022 -rm -rf test/sys
4023 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
4024
4025 EXTRA_DIST += \
4026 test/sys.tar.xz \
4027 test/udev-test.pl \
4028 test/hwdb-test.sh \
4029 test/rule-syntax-check.py \
4030 test/sysv-generator-test.py \
4031 test/mocks/fsck \
4032 hwdb/parse_hwdb.py
4033
4034 # ------------------------------------------------------------------------------
4035 ata_id_SOURCES = \
4036 src/udev/ata_id/ata_id.c
4037
4038 ata_id_LDADD = \
4039 libshared.la
4040
4041 udevlibexec_PROGRAMS += \
4042 ata_id
4043
4044 # ------------------------------------------------------------------------------
4045 cdrom_id_SOURCES = \
4046 src/udev/cdrom_id/cdrom_id.c
4047
4048 cdrom_id_LDADD = \
4049 libshared.la
4050
4051 udevlibexec_PROGRAMS += \
4052 cdrom_id
4053
4054 dist_udevrules_DATA += \
4055 rules/60-cdrom_id.rules
4056
4057 # ------------------------------------------------------------------------------
4058 collect_SOURCES = \
4059 src/udev/collect/collect.c
4060
4061 collect_LDADD = \
4062 libshared.la
4063
4064 udevlibexec_PROGRAMS += \
4065 collect
4066
4067 # ------------------------------------------------------------------------------
4068 scsi_id_SOURCES =\
4069 src/udev/scsi_id/scsi_id.c \
4070 src/udev/scsi_id/scsi_serial.c \
4071 src/udev/scsi_id/scsi.h \
4072 src/udev/scsi_id/scsi_id.h
4073
4074 scsi_id_LDADD = \
4075 libshared.la
4076
4077 udevlibexec_PROGRAMS += \
4078 scsi_id
4079
4080 EXTRA_DIST += \
4081 src/udev/scsi_id/README
4082
4083 # ------------------------------------------------------------------------------
4084 v4l_id_SOURCES = \
4085 src/udev/v4l_id/v4l_id.c
4086
4087 v4l_id_LDADD = \
4088 libshared.la
4089
4090 udevlibexec_PROGRAMS += \
4091 v4l_id
4092
4093 dist_udevrules_DATA += \
4094 rules/60-persistent-v4l.rules
4095
4096 # ------------------------------------------------------------------------------
4097 mtd_probe_SOURCES = \
4098 src/udev/mtd_probe/mtd_probe.c \
4099 src/udev/mtd_probe/mtd_probe.h \
4100 src/udev/mtd_probe/probe_smartmedia.c
4101
4102 dist_udevrules_DATA += \
4103 rules/75-probe_mtd.rules
4104
4105 udevlibexec_PROGRAMS += \
4106 mtd_probe
4107
4108 # ------------------------------------------------------------------------------
4109 test_id128_SOURCES = \
4110 src/test/test-id128.c
4111
4112 test_id128_LDADD = \
4113 libsystemd-shared.la
4114
4115 tests += \
4116 test-id128
4117
4118 # ------------------------------------------------------------------------------
4119 test_hash_SOURCES = \
4120 src/test/test-hash.c
4121
4122 test_hash_LDADD = \
4123 libsystemd-shared.la
4124
4125 tests += \
4126 test-hash
4127
4128 # ------------------------------------------------------------------------------
4129
4130 bin_PROGRAMS += \
4131 systemd-socket-activate
4132
4133 systemd_socket_activate_SOURCES = \
4134 src/activate/activate.c
4135
4136 systemd_socket_activate_LDADD = \
4137 libsystemd-shared.la
4138
4139 # ------------------------------------------------------------------------------
4140 systemd_journald_SOURCES = \
4141 src/journal/journald.c \
4142 src/journal/journald-server.h
4143
4144 systemd_journald_LDADD = \
4145 libjournal-core.la \
4146 libsystemd-shared.la
4147
4148 systemd_cat_SOURCES = \
4149 src/journal/cat.c
4150
4151 systemd_cat_LDADD = \
4152 libjournal-core.la
4153
4154 if HAVE_LIBCURL
4155 rootlibexec_PROGRAMS += \
4156 systemd-journal-upload
4157
4158 systemd_journal_upload_SOURCES = \
4159 src/journal-remote/journal-upload.h \
4160 src/journal-remote/journal-upload.c \
4161 src/journal-remote/journal-upload-journal.c
4162
4163 systemd_journal_upload_CFLAGS = \
4164 $(AM_CFLAGS) \
4165 $(LIBCURL_CFLAGS)
4166
4167 systemd_journal_upload_LDADD = \
4168 libsystemd-shared.la \
4169 $(LIBCURL_LIBS)
4170
4171 nodist_systemunit_DATA += \
4172 units/systemd-journal-upload.service
4173
4174 nodist_pkgsysconf_DATA += \
4175 src/journal-remote/journal-upload.conf
4176 endif
4177
4178 EXTRA_DIST += \
4179 units/systemd-journal-upload.service.in \
4180 src/journal-remote/journal-upload.conf.in
4181
4182 if HAVE_MICROHTTPD
4183 rootlibexec_PROGRAMS += \
4184 systemd-journal-remote
4185
4186 systemd_journal_remote_SOURCES = \
4187 src/journal-remote/journal-remote-parse.h \
4188 src/journal-remote/journal-remote-parse.c \
4189 src/journal-remote/journal-remote-write.h \
4190 src/journal-remote/journal-remote-write.c \
4191 src/journal-remote/journal-remote.h \
4192 src/journal-remote/journal-remote.c
4193
4194 systemd_journal_remote_LDADD = \
4195 libjournal-core.la
4196
4197 systemd_journal_remote_SOURCES += \
4198 src/journal-remote/microhttpd-util.h \
4199 src/journal-remote/microhttpd-util.c
4200
4201 systemd_journal_remote_CFLAGS = \
4202 $(AM_CFLAGS) \
4203 $(MICROHTTPD_CFLAGS)
4204
4205 systemd_journal_remote_LDADD += \
4206 $(MICROHTTPD_LIBS)
4207
4208 if ENABLE_TMPFILES
4209 dist_tmpfiles_DATA += \
4210 tmpfiles.d/systemd-remote.conf
4211 endif
4212
4213 if HAVE_GNUTLS
4214 systemd_journal_remote_LDADD += \
4215 $(GNUTLS_LIBS)
4216 endif
4217
4218 # systemd-journal-remote make sense mostly with full crypto stack
4219 dist_systemunit_DATA += \
4220 units/systemd-journal-remote.socket
4221
4222 nodist_systemunit_DATA += \
4223 units/systemd-journal-remote.service
4224
4225 journal-remote-install-hook: journal-install-hook
4226 -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
4227 -chown 0:0 $(DESTDIR)/var/log/journal/remote
4228 -chmod 755 $(DESTDIR)/var/log/journal/remote
4229
4230 INSTALL_EXEC_HOOKS += journal-remote-install-hook
4231
4232 nodist_pkgsysconf_DATA += \
4233 src/journal-remote/journal-remote.conf
4234
4235 EXTRA_DIST += \
4236 units/systemd-journal-remote.service.in \
4237 src/journal-remote/journal-remote.conf.in \
4238 src/journal-remote/log-generator.py
4239 endif
4240
4241 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4242 journalctl_CFLAGS = \
4243 $(AM_CFLAGS)
4244
4245 journalctl_SOURCES = \
4246 src/journal/journalctl.c
4247
4248 journalctl_LDADD = \
4249 libsystemd-shared.la \
4250 libudev-core.la
4251
4252 if HAVE_QRENCODE
4253 journalctl_SOURCES += \
4254 src/journal/journal-qrcode.c \
4255 src/journal/journal-qrcode.h
4256
4257 journalctl_CFLAGS += \
4258 $(QRENCODE_CFLAGS)
4259
4260 journalctl_LDADD += \
4261 $(QRENCODE_LIBS)
4262 endif
4263
4264 test_journal_SOURCES = \
4265 src/journal/test-journal.c
4266
4267 test_journal_LDADD = \
4268 libjournal-core.la
4269
4270 test_journal_send_SOURCES = \
4271 src/journal/test-journal-send.c
4272
4273 test_journal_send_LDADD = \
4274 libjournal-core.la
4275
4276 test_journal_syslog_SOURCES = \
4277 src/journal/test-journal-syslog.c
4278
4279 test_journal_syslog_LDADD = \
4280 libjournal-core.la
4281
4282 test_journal_match_SOURCES = \
4283 src/journal/test-journal-match.c
4284
4285 test_journal_match_LDADD = \
4286 libjournal-core.la
4287
4288 test_journal_enum_SOURCES = \
4289 src/journal/test-journal-enum.c
4290
4291 test_journal_enum_LDADD = \
4292 libjournal-core.la
4293
4294 test_journal_stream_SOURCES = \
4295 src/journal/test-journal-stream.c
4296
4297 test_journal_stream_LDADD = \
4298 libjournal-core.la
4299
4300 test_journal_flush_SOURCES = \
4301 src/journal/test-journal-flush.c
4302
4303 test_journal_flush_LDADD = \
4304 libjournal-core.la
4305
4306 test_journal_init_SOURCES = \
4307 src/journal/test-journal-init.c
4308
4309 test_journal_init_LDADD = \
4310 libjournal-core.la
4311
4312 test_journal_verify_SOURCES = \
4313 src/journal/test-journal-verify.c
4314
4315 test_journal_verify_LDADD = \
4316 libjournal-core.la
4317
4318 test_journal_interleaving_SOURCES = \
4319 src/journal/test-journal-interleaving.c
4320
4321 test_journal_interleaving_LDADD = \
4322 libjournal-core.la
4323
4324 test_mmap_cache_SOURCES = \
4325 src/journal/test-mmap-cache.c
4326
4327 test_mmap_cache_LDADD = \
4328 libjournal-core.la
4329
4330 test_catalog_SOURCES = \
4331 src/journal/test-catalog.c
4332
4333 test_catalog_CPPFLAGS = \
4334 $(AM_CPPFLAGS) \
4335 -DCATALOG_DIR=\"$(abs_top_builddir)/catalog\"
4336
4337 test_catalog_LDADD = \
4338 libjournal-core.la
4339
4340 test_compress_SOURCES = \
4341 src/journal/test-compress.c
4342
4343 test_compress_LDADD = \
4344 libsystemd-shared.la
4345
4346 if HAVE_LZ4
4347 test_compress_LDADD += \
4348 -llz4
4349 endif
4350
4351 test_compress_benchmark_SOURCES = \
4352 src/journal/test-compress-benchmark.c
4353
4354 test_compress_benchmark_LDADD = \
4355 libsystemd-shared.la
4356
4357 test_audit_type_SOURCES = \
4358 src/journal/test-audit-type.c
4359
4360 test_audit_type_LDADD = \
4361 libjournal-core.la
4362
4363 libjournal_core_la_SOURCES = \
4364 src/journal/journald-kmsg.c \
4365 src/journal/journald-kmsg.h \
4366 src/journal/journald-syslog.c \
4367 src/journal/journald-syslog.h \
4368 src/journal/journald-stream.c \
4369 src/journal/journald-stream.h \
4370 src/journal/journald-server.c \
4371 src/journal/journald-server.h \
4372 src/journal/journald-console.c \
4373 src/journal/journald-console.h \
4374 src/journal/journald-wall.c \
4375 src/journal/journald-wall.h \
4376 src/journal/journald-native.c \
4377 src/journal/journald-native.h \
4378 src/journal/journald-audit.c \
4379 src/journal/journald-audit.h \
4380 src/journal/journald-rate-limit.c \
4381 src/journal/journald-rate-limit.h \
4382 src/journal/journal-internal.h
4383
4384 nodist_libjournal_core_la_SOURCES = \
4385 src/journal/journald-gperf.c
4386
4387 libjournal_core_la_LIBADD = \
4388 libsystemd-shared.la
4389
4390 noinst_LTLIBRARIES += \
4391 libjournal-core.la
4392
4393 journal-install-hook:
4394 -$(MKDIR_P) $(DESTDIR)/var/log/journal
4395 -chown 0:0 $(DESTDIR)/var/log/journal
4396 -chmod 755 $(DESTDIR)/var/log/journal
4397 -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4398 -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4399
4400 journal-uninstall-hook:
4401 -rmdir $(DESTDIR)/var/log/journal/remote
4402 -rmdir $(DESTDIR)/var/log/journal/
4403
4404 INSTALL_EXEC_HOOKS += journal-install-hook
4405 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4406
4407 # ------------------------------------------------------------------------------
4408 # Update catalog on installation. Do not bother if installing
4409 # in DESTDIR, since this is likely for packaging purposes.
4410 catalog-update-hook:
4411 -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4412
4413 INSTALL_DATA_HOOKS += \
4414 catalog-update-hook
4415
4416 catalog-remove-hook:
4417 -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4418
4419 UNINSTALL_DATA_HOOKS += \
4420 catalog-remove-hook
4421
4422 tests += \
4423 test-journal \
4424 test-journal-enum \
4425 test-journal-send \
4426 test-journal-syslog \
4427 test-journal-match \
4428 test-journal-stream \
4429 test-journal-init \
4430 test-journal-verify \
4431 test-journal-interleaving \
4432 test-journal-flush \
4433 test-mmap-cache \
4434 test-catalog \
4435 test-audit-type
4436
4437 if HAVE_COMPRESSION
4438 tests += \
4439 test-compress \
4440 test-compress-benchmark
4441 endif
4442
4443 pkginclude_HEADERS += \
4444 src/systemd/sd-journal.h \
4445 src/systemd/sd-messages.h \
4446 src/systemd/_sd-common.h
4447
4448 libsystemd_journal_internal_la_SOURCES = \
4449 src/journal/sd-journal.c \
4450 src/systemd/sd-journal.h \
4451 src/systemd/_sd-common.h \
4452 src/journal/journal-file.c \
4453 src/journal/journal-file.h \
4454 src/journal/journal-vacuum.c \
4455 src/journal/journal-vacuum.h \
4456 src/journal/journal-verify.c \
4457 src/journal/journal-verify.h \
4458 src/journal/lookup3.c \
4459 src/journal/lookup3.h \
4460 src/journal/journal-send.c \
4461 src/journal/journal-def.h \
4462 src/journal/compress.h \
4463 src/journal/catalog.c \
4464 src/journal/catalog.h \
4465 src/journal/mmap-cache.c \
4466 src/journal/mmap-cache.h \
4467 src/journal/compress.c \
4468 src/journal/audit-type.h \
4469 src/journal/audit-type.c \
4470 src/shared/gcrypt-util.h \
4471 src/shared/gcrypt-util.c
4472
4473 nodist_libsystemd_journal_internal_la_SOURCES = \
4474 src/journal/audit_type-to-name.h
4475
4476 gperf_txt_sources += \
4477 src/journal/audit_type-list.txt
4478
4479 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4480 libsystemd_journal_internal_la_CFLAGS = \
4481 $(AM_CFLAGS)
4482
4483 libsystemd_journal_internal_la_LIBADD =
4484
4485 if HAVE_XZ
4486 libsystemd_journal_internal_la_CFLAGS += \
4487 $(XZ_CFLAGS)
4488
4489 libsystemd_journal_internal_la_LIBADD += \
4490 $(XZ_LIBS)
4491 endif
4492
4493 if HAVE_LZ4
4494 libsystemd_journal_internal_la_LIBADD += \
4495 -llz4
4496 endif
4497
4498 if HAVE_GCRYPT
4499 libsystemd_journal_internal_la_SOURCES += \
4500 src/journal/journal-authenticate.c \
4501 src/journal/journal-authenticate.h \
4502 src/journal/fsprg.c \
4503 src/journal/fsprg.h
4504
4505 libsystemd_journal_internal_la_LIBADD += \
4506 $(GCRYPT_LIBS)
4507
4508 # fsprg.c is a drop-in file using void pointer arithmetic
4509 libsystemd_journal_internal_la_CFLAGS += \
4510 $(GCRYPT_CFLAGS) \
4511 -Wno-pointer-arith
4512 endif
4513
4514 noinst_LTLIBRARIES += \
4515 libsystemd-journal-internal.la
4516
4517 rootlibexec_PROGRAMS += \
4518 systemd-journald
4519
4520 rootbin_PROGRAMS += \
4521 journalctl
4522
4523 bin_PROGRAMS += \
4524 systemd-cat
4525
4526 dist_systemunit_DATA += \
4527 units/systemd-journald.socket \
4528 units/systemd-journald-dev-log.socket \
4529 units/systemd-journald-audit.socket
4530
4531 nodist_systemunit_DATA += \
4532 units/systemd-journald.service \
4533 units/systemd-journal-flush.service \
4534 units/systemd-journal-catalog-update.service
4535
4536 dist_pkgsysconf_DATA += \
4537 src/journal/journald.conf
4538
4539 nodist_catalog_DATA = \
4540 catalog/systemd.bg.catalog \
4541 catalog/systemd.be.catalog \
4542 catalog/systemd.be@latin.catalog \
4543 catalog/systemd.fr.catalog \
4544 catalog/systemd.it.catalog \
4545 catalog/systemd.pl.catalog \
4546 catalog/systemd.pt_BR.catalog \
4547 catalog/systemd.ru.catalog \
4548 catalog/systemd.zh_CN.catalog \
4549 catalog/systemd.zh_TW.catalog \
4550 catalog/systemd.catalog
4551
4552 EXTRA_DIST += \
4553 $(nodist_catalog_DATA:.catalog=.catalog.in)
4554
4555 # Note that we don't use @@ for replacement markers here, but %%. This is
4556 # because the catalog uses @@ already for its runtime replacement handling and
4557 # we don't want to conflict with that.
4558 catalog/%.catalog: catalog/%.catalog.in
4559 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4560 $(SED) -e 's~%SUPPORT_URL%~$(SUPPORT_URL)~' < $< > $@
4561
4562 SOCKETS_TARGET_WANTS += \
4563 systemd-journald.socket \
4564 systemd-journald-dev-log.socket \
4565 systemd-journald-audit.socket
4566
4567 SYSINIT_TARGET_WANTS += \
4568 systemd-journald.service \
4569 systemd-journal-flush.service \
4570 systemd-journal-catalog-update.service
4571
4572 EXTRA_DIST += \
4573 units/systemd-journald.service.in \
4574 units/systemd-journal-flush.service.in \
4575 units/systemd-journal-catalog-update.service.in
4576
4577 gperf_gperf_sources += \
4578 src/journal/journald-gperf.gperf
4579
4580 # ------------------------------------------------------------------------------
4581 if HAVE_MICROHTTPD
4582 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4583
4584 rootlibexec_PROGRAMS += \
4585 systemd-journal-gatewayd
4586
4587 systemd_journal_gatewayd_SOURCES = \
4588 src/journal-remote/journal-gatewayd.c \
4589 src/journal-remote/microhttpd-util.h \
4590 src/journal-remote/microhttpd-util.c
4591
4592 systemd_journal_gatewayd_LDADD = \
4593 libsystemd-shared.la \
4594 $(MICROHTTPD_LIBS)
4595
4596 if HAVE_GNUTLS
4597 systemd_journal_gatewayd_LDADD += \
4598 $(GNUTLS_LIBS)
4599 endif
4600
4601 systemd_journal_gatewayd_CFLAGS = \
4602 $(AM_CFLAGS) \
4603 $(MICROHTTPD_CFLAGS)
4604
4605 systemd_journal_gatewayd_CPPFLAGS = \
4606 $(AM_CPPFLAGS) \
4607 -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4608
4609 dist_systemunit_DATA += \
4610 units/systemd-journal-gatewayd.socket
4611
4612 nodist_systemunit_DATA += \
4613 units/systemd-journal-gatewayd.service
4614
4615 dist_gatewayddocumentroot_DATA = \
4616 src/journal-remote/browse.html
4617
4618 endif
4619
4620 EXTRA_DIST += \
4621 units/systemd-journal-gatewayd.service.in
4622
4623 # ------------------------------------------------------------------------------
4624
4625 systemd_socket_proxyd_SOURCES = \
4626 src/socket-proxy/socket-proxyd.c
4627
4628 systemd_socket_proxyd_LDADD = \
4629 libsystemd-shared.la
4630
4631 # ------------------------------------------------------------------------------
4632 if ENABLE_COREDUMP
4633 systemd_coredump_SOURCES = \
4634 src/coredump/coredump.c \
4635 src/coredump/coredump-vacuum.c \
4636 src/coredump/coredump-vacuum.h
4637
4638 systemd_coredump_CFLAGS = \
4639 $(AM_CFLAGS) \
4640 $(ACL_CFLAGS)
4641
4642 systemd_coredump_LDADD = \
4643 libsystemd-shared.la \
4644 $(ACL_LIBS)
4645
4646 if HAVE_ELFUTILS
4647 systemd_coredump_SOURCES += \
4648 src/coredump/stacktrace.c \
4649 src/coredump/stacktrace.h
4650
4651 systemd_coredump_LDADD += \
4652 $(ELFUTILS_LIBS)
4653 endif
4654
4655 nodist_systemunit_DATA += \
4656 units/systemd-coredump@.service
4657
4658 dist_systemunit_DATA += \
4659 units/systemd-coredump.socket
4660
4661 SOCKETS_TARGET_WANTS += \
4662 systemd-coredump.socket
4663
4664 rootlibexec_PROGRAMS += \
4665 systemd-coredump
4666
4667 dist_pkgsysconf_DATA += \
4668 src/coredump/coredump.conf
4669
4670 coredumpctl_SOURCES = \
4671 src/coredump/coredumpctl.c
4672
4673 coredumpctl_LDADD = \
4674 libsystemd-shared.la
4675
4676 bin_PROGRAMS += \
4677 coredumpctl
4678
4679 manual_tests += \
4680 test-coredump-vacuum
4681
4682 test_coredump_vacuum_SOURCES = \
4683 src/coredump/test-coredump-vacuum.c \
4684 src/coredump/coredump-vacuum.c \
4685 src/coredump/coredump-vacuum.h
4686
4687 test_coredump_vacuum_LDADD = \
4688 libsystemd-shared.la
4689
4690 dist_bashcompletion_data += \
4691 shell-completion/bash/coredumpctl
4692
4693 dist_zshcompletion_data += \
4694 shell-completion/zsh/_coredumpctl
4695
4696 nodist_sysctl_DATA = \
4697 sysctl.d/50-coredump.conf
4698
4699 CLEANFILES += \
4700 sysctl.d/50-coredump.conf
4701 endif
4702
4703 EXTRA_DIST += \
4704 sysctl.d/50-coredump.conf.in \
4705 units/systemd-coredump@.service.in
4706
4707 # ------------------------------------------------------------------------------
4708 if ENABLE_BINFMT
4709 systemd_binfmt_SOURCES = \
4710 src/binfmt/binfmt.c
4711
4712 systemd_binfmt_LDADD = \
4713 libsystemd-shared.la
4714
4715 rootlibexec_PROGRAMS += \
4716 systemd-binfmt
4717
4718 dist_systemunit_DATA += \
4719 units/proc-sys-fs-binfmt_misc.automount \
4720 units/proc-sys-fs-binfmt_misc.mount
4721
4722 nodist_systemunit_DATA += \
4723 units/systemd-binfmt.service
4724
4725 INSTALL_DIRS += \
4726 $(prefix)/lib/binfmt.d \
4727 $(sysconfdir)/binfmt.d
4728
4729 SYSINIT_TARGET_WANTS += \
4730 systemd-binfmt.service \
4731 proc-sys-fs-binfmt_misc.automount
4732
4733 endif
4734
4735 EXTRA_DIST += \
4736 units/systemd-binfmt.service.in
4737
4738 # ------------------------------------------------------------------------------
4739 if ENABLE_VCONSOLE
4740 systemd_vconsole_setup_SOURCES = \
4741 src/vconsole/vconsole-setup.c
4742
4743 systemd_vconsole_setup_LDADD = \
4744 libsystemd-shared.la
4745
4746 rootlibexec_PROGRAMS += \
4747 systemd-vconsole-setup
4748
4749 nodist_udevrules_DATA += \
4750 src/vconsole/90-vconsole.rules
4751
4752 nodist_systemunit_DATA += \
4753 units/systemd-vconsole-setup.service
4754 endif
4755
4756 EXTRA_DIST += \
4757 src/vconsole/90-vconsole.rules.in \
4758 units/systemd-vconsole-setup.service.in
4759
4760 # ------------------------------------------------------------------------------
4761 if ENABLE_QUOTACHECK
4762 rootlibexec_PROGRAMS += \
4763 systemd-quotacheck
4764
4765 nodist_systemunit_DATA += \
4766 units/systemd-quotacheck.service
4767
4768 systemd_quotacheck_SOURCES = \
4769 src/quotacheck/quotacheck.c
4770
4771 systemd_quotacheck_LDADD = \
4772 libsystemd-shared.la
4773 endif
4774
4775 EXTRA_DIST += \
4776 units/systemd-quotacheck.service.in
4777
4778 nodist_systemunit_DATA += \
4779 units/quotaon.service
4780
4781 # ------------------------------------------------------------------------------
4782 if ENABLE_RANDOMSEED
4783 rootlibexec_PROGRAMS += \
4784 systemd-random-seed
4785
4786 nodist_systemunit_DATA += \
4787 units/systemd-random-seed.service
4788
4789 systemd_random_seed_SOURCES = \
4790 src/random-seed/random-seed.c
4791
4792 systemd_random_seed_LDADD = \
4793 libsystemd-shared.la
4794
4795 SYSINIT_TARGET_WANTS += \
4796 systemd-random-seed.service
4797
4798 endif
4799
4800 EXTRA_DIST += \
4801 units/systemd-random-seed.service.in
4802
4803 # ------------------------------------------------------------------------------
4804 if ENABLE_BACKLIGHT
4805 rootlibexec_PROGRAMS += \
4806 systemd-backlight
4807
4808 nodist_systemunit_DATA += \
4809 units/systemd-backlight@.service
4810
4811 systemd_backlight_SOURCES = \
4812 src/backlight/backlight.c
4813
4814 systemd_backlight_LDADD = \
4815 libsystemd-shared.la
4816 endif
4817
4818 EXTRA_DIST += \
4819 units/systemd-backlight@.service.in
4820
4821 # ------------------------------------------------------------------------------
4822 if ENABLE_RFKILL
4823 rootlibexec_PROGRAMS += \
4824 systemd-rfkill
4825
4826 nodist_systemunit_DATA += \
4827 units/systemd-rfkill.service
4828
4829 dist_systemunit_DATA += \
4830 units/systemd-rfkill.socket
4831
4832 systemd_rfkill_SOURCES = \
4833 src/rfkill/rfkill.c
4834
4835 systemd_rfkill_LDADD = \
4836 libsystemd-shared.la
4837 endif
4838
4839 EXTRA_DIST += \
4840 units/systemd-rfkill.service.in
4841
4842 # ------------------------------------------------------------------------------
4843 if HAVE_LIBCRYPTSETUP
4844 rootlibexec_PROGRAMS += \
4845 systemd-cryptsetup \
4846 systemd-veritysetup
4847
4848 systemgenerator_PROGRAMS += \
4849 systemd-cryptsetup-generator \
4850 systemd-veritysetup-generator
4851
4852 dist_systemunit_DATA += \
4853 units/cryptsetup.target \
4854 units/cryptsetup-pre.target
4855
4856 systemd_cryptsetup_SOURCES = \
4857 src/cryptsetup/cryptsetup.c
4858
4859 systemd_cryptsetup_CFLAGS = \
4860 $(AM_CFLAGS) \
4861 $(LIBCRYPTSETUP_CFLAGS)
4862
4863 systemd_cryptsetup_LDADD = \
4864 libsystemd-shared.la \
4865 $(LIBCRYPTSETUP_LIBS)
4866
4867 systemd_cryptsetup_generator_SOURCES = \
4868 src/cryptsetup/cryptsetup-generator.c
4869
4870 systemd_cryptsetup_generator_LDADD = \
4871 libsystemd-shared.la
4872
4873 systemd_veritysetup_SOURCES = \
4874 src/veritysetup/veritysetup.c
4875
4876 systemd_veritysetup_CFLAGS = \
4877 $(AM_CFLAGS) \
4878 $(LIBCRYPTSETUP_CFLAGS)
4879
4880 systemd_veritysetup_LDADD = \
4881 libsystemd-shared.la \
4882 $(LIBCRYPTSETUP_LIBS)
4883
4884 systemd_veritysetup_generator_SOURCES = \
4885 src/veritysetup/veritysetup-generator.c
4886
4887 systemd_veritysetup_generator_LDADD = \
4888 libsystemd-shared.la
4889
4890 SYSINIT_TARGET_WANTS += \
4891 cryptsetup.target
4892
4893 endif
4894
4895 # ------------------------------------------------------------------------------
4896 if ENABLE_HOSTNAMED
4897 systemd_hostnamed_SOURCES = \
4898 src/hostname/hostnamed.c
4899
4900 systemd_hostnamed_LDADD = \
4901 libsystemd-shared.la
4902
4903 rootlibexec_PROGRAMS += \
4904 systemd-hostnamed
4905
4906 nodist_systemunit_DATA += \
4907 units/systemd-hostnamed.service
4908
4909 dist_systemunit_DATA_busnames += \
4910 units/org.freedesktop.hostname1.busname
4911
4912 dist_dbuspolicy_DATA += \
4913 src/hostname/org.freedesktop.hostname1.conf
4914
4915 dist_dbussystemservice_DATA += \
4916 src/hostname/org.freedesktop.hostname1.service
4917
4918 polkitpolicy_files += \
4919 src/hostname/org.freedesktop.hostname1.policy
4920
4921 SYSTEM_UNIT_ALIASES += \
4922 systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
4923
4924 BUSNAMES_TARGET_WANTS += \
4925 org.freedesktop.hostname1.busname
4926
4927 hostnamectl_SOURCES = \
4928 src/hostname/hostnamectl.c
4929
4930 hostnamectl_LDADD = \
4931 libsystemd-shared.la
4932
4933 bin_PROGRAMS += \
4934 hostnamectl
4935
4936 dist_bashcompletion_data += \
4937 shell-completion/bash/hostnamectl
4938
4939 dist_zshcompletion_data += \
4940 shell-completion/zsh/_hostnamectl
4941 endif
4942
4943 polkitpolicy_in_files += \
4944 src/hostname/org.freedesktop.hostname1.policy.in
4945
4946 EXTRA_DIST += \
4947 units/systemd-hostnamed.service.in
4948
4949 # ------------------------------------------------------------------------------
4950 dist_systemunit_DATA_busnames += \
4951 units/org.freedesktop.systemd1.busname
4952
4953 BUSNAMES_TARGET_WANTS += \
4954 org.freedesktop.systemd1.busname
4955
4956 # ------------------------------------------------------------------------------
4957 if ENABLE_LOCALED
4958 systemd_localed_SOURCES = \
4959 src/locale/localed.c \
4960 src/locale/keymap-util.c \
4961 src/locale/keymap-util.h
4962
4963 systemd_localed_LDADD = \
4964 libsystemd-shared.la \
4965 -ldl
4966
4967 systemd_localed_CFLAGS = \
4968 $(AM_CFLAGS) \
4969 $(XKBCOMMON_CFLAGS)
4970
4971 nodist_systemunit_DATA += \
4972 units/systemd-localed.service
4973
4974 dist_systemunit_DATA_busnames += \
4975 units/org.freedesktop.locale1.busname
4976
4977 rootlibexec_PROGRAMS += \
4978 systemd-localed
4979
4980 dist_dbuspolicy_DATA += \
4981 src/locale/org.freedesktop.locale1.conf
4982
4983 dist_dbussystemservice_DATA += \
4984 src/locale/org.freedesktop.locale1.service
4985
4986 polkitpolicy_files += \
4987 src/locale/org.freedesktop.locale1.policy
4988
4989 SYSTEM_UNIT_ALIASES += \
4990 systemd-localed.service dbus-org.freedesktop.locale1.service
4991
4992 BUSNAMES_TARGET_WANTS += \
4993 org.freedesktop.locale1.busname
4994
4995 dist_pkgdata_DATA = \
4996 src/locale/kbd-model-map \
4997 src/locale/language-fallback-map
4998
4999 test_keymap_util_SOURCES = \
5000 src/locale/test-keymap-util.c \
5001 src/locale/keymap-util.c \
5002 src/locale/keymap-util.h
5003
5004 test_keymap_util_LDADD = \
5005 libsystemd-shared.la \
5006 -ldl
5007
5008 tests += \
5009 test-keymap-util
5010
5011 localectl_SOURCES = \
5012 src/locale/localectl.c
5013
5014 localectl_LDADD = \
5015 libsystemd-shared.la
5016
5017 bin_PROGRAMS += \
5018 localectl
5019
5020 dist_bashcompletion_data += \
5021 shell-completion/bash/localectl
5022
5023 dist_zshcompletion_data += \
5024 shell-completion/zsh/_localectl
5025 endif
5026
5027 .PHONY: update-kbd-model-map
5028
5029 polkitpolicy_in_files += \
5030 src/locale/org.freedesktop.locale1.policy.in
5031
5032 EXTRA_DIST += \
5033 units/systemd-localed.service.in
5034
5035 # ------------------------------------------------------------------------------
5036 if ENABLE_TIMEDATED
5037 systemd_timedated_SOURCES = \
5038 src/timedate/timedated.c
5039
5040 systemd_timedated_LDADD = \
5041 libsystemd-shared.la
5042
5043 rootlibexec_PROGRAMS += \
5044 systemd-timedated
5045
5046 dist_dbussystemservice_DATA += \
5047 src/timedate/org.freedesktop.timedate1.service
5048
5049 dist_dbuspolicy_DATA += \
5050 src/timedate/org.freedesktop.timedate1.conf
5051
5052 nodist_systemunit_DATA += \
5053 units/systemd-timedated.service
5054
5055 dist_systemunit_DATA_busnames += \
5056 units/org.freedesktop.timedate1.busname
5057
5058 polkitpolicy_files += \
5059 src/timedate/org.freedesktop.timedate1.policy
5060
5061 SYSTEM_UNIT_ALIASES += \
5062 systemd-timedated.service dbus-org.freedesktop.timedate1.service
5063
5064 BUSNAMES_TARGET_WANTS += \
5065 org.freedesktop.timedate1.busname
5066
5067 timedatectl_SOURCES = \
5068 src/timedate/timedatectl.c
5069
5070 timedatectl_LDADD = \
5071 libsystemd-shared.la
5072
5073 bin_PROGRAMS += \
5074 timedatectl
5075
5076 dist_bashcompletion_data += \
5077 shell-completion/bash/timedatectl
5078
5079 dist_zshcompletion_data += \
5080 shell-completion/zsh/_timedatectl
5081 endif
5082
5083 polkitpolicy_in_files += \
5084 src/timedate/org.freedesktop.timedate1.policy.in
5085
5086 EXTRA_DIST += \
5087 units/systemd-timedated.service.in
5088
5089 # ------------------------------------------------------------------------------
5090 if ENABLE_TIMESYNCD
5091 systemd_timesyncd_SOURCES = \
5092 src/timesync/timesyncd.c \
5093 src/timesync/timesyncd-manager.c \
5094 src/timesync/timesyncd-manager.h \
5095 src/timesync/timesyncd-conf.c \
5096 src/timesync/timesyncd-conf.h \
5097 src/timesync/timesyncd-server.c \
5098 src/timesync/timesyncd-server.h
5099
5100 nodist_systemd_timesyncd_SOURCES = \
5101 src/timesync/timesyncd-gperf.c
5102
5103 systemd_timesyncd_LDADD = \
5104 libsystemd-network.la \
5105 libsystemd-shared.la \
5106 -lm
5107
5108 rootlibexec_PROGRAMS += \
5109 systemd-timesyncd
5110
5111 nodist_systemunit_DATA += \
5112 units/systemd-timesyncd.service
5113
5114 GENERAL_ALIASES += \
5115 $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
5116
5117 nodist_pkgsysconf_DATA += \
5118 src/timesync/timesyncd.conf
5119
5120 endif
5121
5122 gperf_gperf_sources += \
5123 src/timesync/timesyncd-gperf.gperf
5124
5125 EXTRA_DIST += \
5126 units/systemd-timesyncd.service.in \
5127 src/timesync/timesyncd.conf.in
5128
5129 # ------------------------------------------------------------------------------
5130 test_nss_SOURCES = \
5131 src/test/test-nss.c
5132
5133 test_nss_LDADD = \
5134 libsystemd-internal.la \
5135 libbasic.la \
5136 -ldl
5137
5138 manual_tests += \
5139 test-nss
5140
5141 # ------------------------------------------------------------------------------
5142 libnss_systemd_la_SOURCES = \
5143 src/nss-systemd/nss-systemd.sym \
5144 src/nss-systemd/nss-systemd.c
5145
5146 libnss_systemd_la_LDFLAGS = \
5147 $(AM_LDFLAGS) \
5148 -module \
5149 -export-dynamic \
5150 -avoid-version \
5151 -shared \
5152 -shrext .so.2 \
5153 -Wl,--version-script=$(top_srcdir)/src/nss-systemd/nss-systemd.sym
5154
5155 libnss_systemd_la_LIBADD = \
5156 libsystemd-internal.la \
5157 libbasic.la
5158
5159 rootlib_LTLIBRARIES += \
5160 libnss_systemd.la
5161
5162 # ------------------------------------------------------------------------------
5163 if HAVE_MYHOSTNAME
5164 libnss_myhostname_la_SOURCES = \
5165 src/nss-myhostname/nss-myhostname.sym \
5166 src/nss-myhostname/nss-myhostname.c
5167
5168 libnss_myhostname_la_LDFLAGS = \
5169 $(AM_LDFLAGS) \
5170 -module \
5171 -export-dynamic \
5172 -avoid-version \
5173 -shared \
5174 -shrext .so.2 \
5175 -Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
5176
5177 libnss_myhostname_la_LIBADD = \
5178 libsystemd-internal.la \
5179 libbasic.la
5180
5181 rootlib_LTLIBRARIES += \
5182 libnss_myhostname.la
5183 endif
5184
5185 # ------------------------------------------------------------------------------
5186 if ENABLE_MACHINED
5187 systemd_machined_SOURCES = \
5188 src/machine/machined.c \
5189 src/machine/machined.h
5190
5191 systemd_machined_LDADD = \
5192 libmachine-core.la
5193
5194 rootlibexec_PROGRAMS += \
5195 systemd-machined
5196
5197 libmachine_core_la_SOURCES = \
5198 src/machine/machine.c \
5199 src/machine/machine.h \
5200 src/machine/machined-dbus.c \
5201 src/machine/machine-dbus.c \
5202 src/machine/machine-dbus.h \
5203 src/machine/image-dbus.c \
5204 src/machine/image-dbus.h \
5205 src/machine/operation.c \
5206 src/machine/operation.h
5207
5208 libmachine_core_la_LIBADD = \
5209 libsystemd-shared.la
5210
5211 noinst_LTLIBRARIES += \
5212 libmachine-core.la
5213
5214 machinectl_SOURCES = \
5215 src/machine/machinectl.c
5216
5217 machinectl_LDADD = \
5218 libsystemd-shared.la
5219
5220 rootbin_PROGRAMS += \
5221 machinectl
5222
5223 test_machine_tables_SOURCES = \
5224 src/machine/test-machine-tables.c
5225
5226 test_machine_tables_LDADD = \
5227 libmachine-core.la
5228
5229 tests += \
5230 test-machine-tables
5231
5232 nodist_systemunit_DATA += \
5233 units/systemd-machined.service
5234
5235 dist_systemunit_DATA += \
5236 units/machine.slice
5237
5238 dist_systemunit_DATA_busnames += \
5239 units/org.freedesktop.machine1.busname
5240
5241 dist_dbussystemservice_DATA += \
5242 src/machine/org.freedesktop.machine1.service
5243
5244 dist_dbuspolicy_DATA += \
5245 src/machine/org.freedesktop.machine1.conf
5246
5247 polkitpolicy_files += \
5248 src/machine/org.freedesktop.machine1.policy
5249
5250 dist_bashcompletion_data += \
5251 shell-completion/bash/machinectl
5252
5253 dist_zshcompletion_data += \
5254 shell-completion/zsh/_machinectl \
5255 shell-completion/zsh/_sd_machines
5256
5257 SYSTEM_UNIT_ALIASES += \
5258 systemd-machined.service dbus-org.freedesktop.machine1.service
5259
5260 BUSNAMES_TARGET_WANTS += \
5261 org.freedesktop.machine1.busname
5262
5263 libnss_mymachines_la_SOURCES = \
5264 src/nss-mymachines/nss-mymachines.sym \
5265 src/nss-mymachines/nss-mymachines.c
5266
5267 libnss_mymachines_la_LDFLAGS = \
5268 $(AM_LDFLAGS) \
5269 -module \
5270 -export-dynamic \
5271 -avoid-version \
5272 -shared \
5273 -shrext .so.2 \
5274 -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
5275
5276 libnss_mymachines_la_LIBADD = \
5277 libsystemd-internal.la \
5278 libbasic.la
5279
5280 rootlib_LTLIBRARIES += \
5281 libnss_mymachines.la
5282
5283 endif
5284
5285 polkitpolicy_in_files += \
5286 src/machine/org.freedesktop.machine1.policy.in
5287
5288 EXTRA_DIST += \
5289 units/systemd-machined.service.in
5290
5291 # ------------------------------------------------------------------------------
5292 if ENABLE_IMPORTD
5293
5294 if HAVE_LIBCURL
5295 if HAVE_XZ
5296 if HAVE_ZLIB
5297 if HAVE_BZIP2
5298 if HAVE_GCRYPT
5299
5300 rootlibexec_PROGRAMS += \
5301 systemd-importd \
5302 systemd-pull \
5303 systemd-import \
5304 systemd-export
5305
5306 systemd_importd_SOURCES = \
5307 src/import/importd.c
5308
5309 systemd_importd_CFLAGS = \
5310 $(AM_CFLAGS) \
5311 -D SYSTEMD_PULL_PATH=\"$(rootlibexecdir)/systemd-pull\" \
5312 -D SYSTEMD_IMPORT_PATH=\"$(rootlibexecdir)/systemd-import\" \
5313 -D SYSTEMD_EXPORT_PATH=\"$(rootlibexecdir)/systemd-export\"
5314
5315 systemd_importd_LDADD = \
5316 libsystemd-shared.la
5317
5318 systemd_pull_SOURCES = \
5319 src/import/pull.c \
5320 src/import/pull-raw.c \
5321 src/import/pull-raw.h \
5322 src/import/pull-tar.c \
5323 src/import/pull-tar.h \
5324 src/import/pull-job.c \
5325 src/import/pull-job.h \
5326 src/import/pull-common.c \
5327 src/import/pull-common.h \
5328 src/import/import-common.c \
5329 src/import/import-common.h \
5330 src/import/import-compress.c \
5331 src/import/import-compress.h \
5332 src/import/curl-util.c \
5333 src/import/curl-util.h \
5334 src/import/qcow2-util.c \
5335 src/import/qcow2-util.h
5336
5337 systemd_pull_CFLAGS = \
5338 $(AM_CFLAGS) \
5339 $(LIBCURL_CFLAGS) \
5340 $(XZ_CFLAGS) \
5341 $(ZLIB_CFLAGS) \
5342 $(GCRYPT_CFLAGS) \
5343 -D VENDOR_KEYRING_PATH=\"$(rootlibexecdir)/import-pubring.gpg\" \
5344 -D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\"
5345
5346 systemd_pull_LDADD = \
5347 libsystemd-shared.la \
5348 $(LIBCURL_LIBS) \
5349 $(XZ_LIBS) \
5350 $(ZLIB_LIBS) \
5351 -lbz2 \
5352 $(GCRYPT_LIBS)
5353
5354 systemd_import_SOURCES = \
5355 src/import/import.c \
5356 src/import/import-raw.c \
5357 src/import/import-raw.h \
5358 src/import/import-tar.c \
5359 src/import/import-tar.h \
5360 src/import/import-common.c \
5361 src/import/import-common.h \
5362 src/import/import-compress.c \
5363 src/import/import-compress.h \
5364 src/import/qcow2-util.c \
5365 src/import/qcow2-util.h
5366
5367 systemd_import_CFLAGS = \
5368 $(AM_CFLAGS) \
5369 $(XZ_CFLAGS) \
5370 $(ZLIB_CFLAGS)
5371
5372 systemd_import_LDADD = \
5373 libsystemd-shared.la \
5374 $(XZ_LIBS) \
5375 $(ZLIB_LIBS) \
5376 -lbz2
5377
5378 systemd_export_SOURCES = \
5379 src/import/export.c \
5380 src/import/export-tar.c \
5381 src/import/export-tar.h \
5382 src/import/export-raw.c \
5383 src/import/export-raw.h \
5384 src/import/import-common.c \
5385 src/import/import-common.h \
5386 src/import/import-compress.c \
5387 src/import/import-compress.h
5388
5389 systemd_export_CFLAGS = \
5390 $(AM_CFLAGS) \
5391 $(XZ_CFLAGS) \
5392 $(ZLIB_CFLAGS)
5393
5394 systemd_export_LDADD = \
5395 libsystemd-shared.la \
5396 $(XZ_LIBS) \
5397 $(ZLIB_LIBS) \
5398 -lbz2
5399
5400 dist_rootlibexec_DATA += \
5401 src/import/import-pubring.gpg
5402
5403 nodist_systemunit_DATA += \
5404 units/systemd-importd.service
5405
5406 dist_systemunit_DATA_busnames += \
5407 units/org.freedesktop.import1.busname
5408
5409 BUSNAMES_TARGET_WANTS += \
5410 org.freedesktop.import1.busname
5411
5412 SYSTEM_UNIT_ALIASES += \
5413 systemd-importd.service dbus-org.freedesktop.import1.service
5414
5415 dist_dbussystemservice_DATA += \
5416 src/import/org.freedesktop.import1.service
5417
5418 dist_dbuspolicy_DATA += \
5419 src/import/org.freedesktop.import1.conf
5420
5421 polkitpolicy_files += \
5422 src/import/org.freedesktop.import1.policy
5423
5424 manual_tests += \
5425 test-qcow2
5426
5427 test_qcow2_SOURCES = \
5428 src/import/test-qcow2.c \
5429 src/import/qcow2-util.c \
5430 src/import/qcow2-util.h
5431
5432 test_qcow2_CFLAGS = \
5433 $(AM_CFLAGS) \
5434 $(ZLIB_CFLAGS)
5435
5436 test_qcow2_LDADD = \
5437 libsystemd-shared.la \
5438 $(ZLIB_LIBS)
5439
5440 endif
5441 endif
5442 endif
5443 endif
5444 endif
5445
5446 endif
5447
5448 polkitpolicy_in_files += \
5449 src/import/org.freedesktop.import1.policy.in
5450
5451 EXTRA_DIST += \
5452 units/systemd-importd.service.in
5453
5454
5455 # ------------------------------------------------------------------------------
5456 if ENABLE_RESOLVED
5457
5458 basic_dns_sources = \
5459 src/resolve/resolved-dns-dnssec.c \
5460 src/resolve/resolved-dns-dnssec.h \
5461 src/resolve/resolved-dns-packet.c \
5462 src/resolve/resolved-dns-packet.h \
5463 src/resolve/resolved-dns-rr.c \
5464 src/resolve/resolved-dns-rr.h \
5465 src/resolve/resolved-dns-answer.c \
5466 src/resolve/resolved-dns-answer.h \
5467 src/resolve/resolved-dns-question.c \
5468 src/resolve/resolved-dns-question.h \
5469 src/resolve/dns-type.c \
5470 src/resolve/dns-type.h
5471
5472 systemd_resolved_SOURCES = \
5473 src/resolve/resolved.c \
5474 src/resolve/resolved-manager.c \
5475 src/resolve/resolved-manager.h \
5476 src/resolve/resolved-conf.c \
5477 src/resolve/resolved-conf.h \
5478 src/resolve/resolved-resolv-conf.c \
5479 src/resolve/resolved-resolv-conf.h \
5480 src/resolve/resolved-bus.c \
5481 src/resolve/resolved-bus.h \
5482 src/resolve/resolved-link.h \
5483 src/resolve/resolved-link.c \
5484 src/resolve/resolved-link-bus.c \
5485 src/resolve/resolved-link-bus.h \
5486 src/resolve/resolved-llmnr.h \
5487 src/resolve/resolved-llmnr.c \
5488 src/resolve/resolved-mdns.h \
5489 src/resolve/resolved-mdns.c \
5490 src/resolve/resolved-def.h \
5491 $(basic_dns_sources) \
5492 src/resolve/resolved-dns-query.h \
5493 src/resolve/resolved-dns-query.c \
5494 src/resolve/resolved-dns-synthesize.h \
5495 src/resolve/resolved-dns-synthesize.c \
5496 src/resolve/resolved-dns-transaction.h \
5497 src/resolve/resolved-dns-transaction.c \
5498 src/resolve/resolved-dns-scope.h \
5499 src/resolve/resolved-dns-scope.c \
5500 src/resolve/resolved-dns-server.h \
5501 src/resolve/resolved-dns-server.c \
5502 src/resolve/resolved-dns-search-domain.h \
5503 src/resolve/resolved-dns-search-domain.c \
5504 src/resolve/resolved-dns-cache.h \
5505 src/resolve/resolved-dns-cache.c \
5506 src/resolve/resolved-dns-zone.h \
5507 src/resolve/resolved-dns-zone.c \
5508 src/resolve/resolved-dns-stream.h \
5509 src/resolve/resolved-dns-stream.c \
5510 src/resolve/resolved-dns-trust-anchor.h \
5511 src/resolve/resolved-dns-trust-anchor.c \
5512 src/resolve/resolved-dns-stub.h \
5513 src/resolve/resolved-dns-stub.c \
5514 src/resolve/resolved-etc-hosts.h \
5515 src/resolve/resolved-etc-hosts.c \
5516 src/shared/gcrypt-util.c \
5517 src/shared/gcrypt-util.h
5518
5519 nodist_systemd_resolved_SOURCES = \
5520 src/resolve/dns_type-from-name.h \
5521 src/resolve/dns_type-to-name.h \
5522 src/resolve/resolved-gperf.c
5523
5524 systemd_resolved_CFLAGS = \
5525 $(AM_CFLAGS) \
5526 $(GCRYPT_CFLAGS)
5527
5528 systemd_resolved_LDADD = \
5529 libsystemd-network.la \
5530 libsystemd-shared.la \
5531 $(GCRYPT_LIBS) \
5532 -lm
5533
5534 rootlibexec_PROGRAMS += \
5535 systemd-resolved
5536
5537 nodist_systemunit_DATA += \
5538 units/systemd-resolved.service
5539
5540 dist_systemunit_DATA_busnames += \
5541 units/org.freedesktop.resolve1.busname
5542
5543 dist_dbuspolicy_DATA += \
5544 src/resolve/org.freedesktop.resolve1.conf
5545
5546 dist_dbussystemservice_DATA += \
5547 src/resolve/org.freedesktop.resolve1.service
5548
5549 SYSTEM_UNIT_ALIASES += \
5550 systemd-resolved.service dbus-org.freedesktop.resolve1.service
5551
5552 BUSNAMES_TARGET_WANTS += \
5553 org.freedesktop.resolve1.busname
5554
5555 GENERAL_ALIASES += \
5556 $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
5557
5558 nodist_pkgsysconf_DATA += \
5559 src/resolve/resolved.conf
5560
5561 libnss_resolve_la_SOURCES = \
5562 src/nss-resolve/nss-resolve.sym \
5563 src/nss-resolve/nss-resolve.c
5564
5565 libnss_resolve_la_LDFLAGS = \
5566 $(AM_LDFLAGS) \
5567 -module \
5568 -export-dynamic \
5569 -avoid-version \
5570 -shared \
5571 -shrext .so.2 \
5572 -Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
5573
5574 libnss_resolve_la_LIBADD = \
5575 libsystemd-internal.la \
5576 libbasic.la \
5577 -ldl
5578
5579 rootlib_LTLIBRARIES += \
5580 libnss_resolve.la
5581
5582 systemd_resolve_SOURCES = \
5583 src/resolve/resolve-tool.c \
5584 $(basic_dns_sources) \
5585 src/shared/gcrypt-util.c \
5586 src/shared/gcrypt-util.h
5587
5588 nodist_systemd_resolve_SOURCES = \
5589 src/resolve/dns_type-from-name.h \
5590 src/resolve/dns_type-to-name.h
5591
5592 systemd_resolve_CFLAGS = \
5593 $(AM_CFLAGS) \
5594 $(GCRYPT_CFLAGS)
5595
5596 systemd_resolve_LDADD = \
5597 libsystemd-shared.la \
5598 $(GCRYPT_LIBS) \
5599 -lm
5600
5601 bin_PROGRAMS += \
5602 systemd-resolve
5603
5604 dist_bashcompletion_data += \
5605 shell-completion/bash/systemd-resolve
5606
5607 dist_zshcompletion_data += \
5608 shell-completion/zsh/_systemd-resolve
5609
5610 tests += \
5611 test-dns-packet \
5612 test-resolve-tables \
5613 test-dnssec
5614
5615 manual_tests += \
5616 test-dnssec-complex
5617
5618 test_resolve_tables_SOURCES = \
5619 src/resolve/test-resolve-tables.c \
5620 src/resolve/dns_type-from-name.h \
5621 src/resolve/dns_type-to-name.h \
5622 $(basic_dns_sources) \
5623 src/shared/test-tables.h
5624
5625 test_resolve_tables_CFLAGS = \
5626 $(AM_CFLAGS) \
5627 $(GCRYPT_CFLAGS)
5628
5629 test_resolve_tables_LDADD = \
5630 libsystemd-shared.la \
5631 $(GCRYPT_LIBS) \
5632 -lm
5633
5634 test_dns_packet_SOURCES = \
5635 src/resolve/test-dns-packet.c \
5636 $(basic_dns_sources)
5637
5638 test_dns_packet_CPPFLAGS = \
5639 $(AM_CPPFLAGS) \
5640 -DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\"
5641
5642 test_dns_packet_CFLAGS = \
5643 $(AM_CFLAGS) \
5644 $(GCRYPT_CFLAGS)
5645
5646 test_dns_packet_LDADD = \
5647 libsystemd-shared.la \
5648 $(GCRYPT_LIBS) \
5649 -lm
5650
5651 EXTRA_DIST += \
5652 src/resolve/test-data/_openpgpkey.fedoraproject.org.pkts \
5653 src/resolve/test-data/fedoraproject.org.pkts \
5654 src/resolve/test-data/gandi.net.pkts \
5655 src/resolve/test-data/google.com.pkts \
5656 src/resolve/test-data/root.pkts \
5657 src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
5658 src/resolve/test-data/teamits.com.pkts \
5659 src/resolve/test-data/zbyszek@fedoraproject.org.pkts \
5660 src/resolve/test-data/_443._tcp.fedoraproject.org.pkts \
5661 src/resolve/test-data/kyhwana.org.pkts \
5662 src/resolve/test-data/fake-caa.pkts
5663
5664 test_dnssec_SOURCES = \
5665 src/resolve/test-dnssec.c \
5666 $(basic_dns_sources)
5667
5668 test_dnssec_CFLAGS = \
5669 $(AM_CFLAGS) \
5670 $(GCRYPT_CFLAGS)
5671
5672 test_dnssec_LDADD = \
5673 libsystemd-shared.la \
5674 $(GCRYPT_LIBS) \
5675 -lm
5676
5677 test_dnssec_complex_SOURCES = \
5678 src/resolve/test-dnssec-complex.c \
5679 src/resolve/dns-type.c \
5680 src/resolve/dns-type.h
5681
5682 test_dnssec_complex_LDADD = \
5683 libsystemd-shared.la
5684
5685 endif
5686
5687 gperf_txt_sources += \
5688 src/resolve/dns_type-list.txt
5689
5690 gperf_gperf_sources += \
5691 src/resolve/resolved-gperf.gperf
5692
5693 EXTRA_DIST += \
5694 units/systemd-resolved.service.m4.in \
5695 src/resolve/resolved.conf.in
5696
5697 dist_rootlibexec_DATA += \
5698 src/resolve/resolv.conf
5699
5700 # ------------------------------------------------------------------------------
5701 if ENABLE_NETWORKD
5702 rootlibexec_PROGRAMS += \
5703 systemd-networkd
5704
5705 systemd_networkd_SOURCES = \
5706 src/network/networkd.c
5707
5708 systemd_networkd_LDADD = \
5709 libnetworkd-core.la
5710
5711 if HAVE_LIBIPTC
5712 systemd_networkd_LDADD += \
5713 libfirewall.la
5714 endif
5715
5716 noinst_LTLIBRARIES += \
5717 libnetworkd-core.la
5718
5719 libnetworkd_core_la_CFLAGS = \
5720 $(AM_CFLAGS)
5721
5722 libnetworkd_core_la_SOURCES = \
5723 src/libsystemd-network/network-internal.h \
5724 src/network/netdev/netdev.h \
5725 src/network/netdev/netdev.c \
5726 src/network/netdev/vrf.h \
5727 src/network/netdev/vrf.c \
5728 src/network/netdev/tunnel.h \
5729 src/network/netdev/tunnel.c \
5730 src/network/netdev/veth.h \
5731 src/network/netdev/veth.c \
5732 src/network/netdev/vxlan.h \
5733 src/network/netdev/vxlan.c \
5734 src/network/netdev/vlan.h \
5735 src/network/netdev/vlan.c \
5736 src/network/netdev/macvlan.h \
5737 src/network/netdev/macvlan.c \
5738 src/network/netdev/ipvlan.h \
5739 src/network/netdev/ipvlan.c \
5740 src/network/netdev/dummy.h \
5741 src/network/netdev/dummy.c \
5742 src/network/netdev/tuntap.h \
5743 src/network/netdev/tuntap.c \
5744 src/network/netdev/bond.h \
5745 src/network/netdev/bond.c \
5746 src/network/netdev/bridge.h \
5747 src/network/netdev/bridge.c \
5748 src/network/netdev/vcan.h \
5749 src/network/netdev/vcan.c \
5750 src/network/networkd-manager.h \
5751 src/network/networkd-manager.c \
5752 src/network/networkd-manager-bus.c \
5753 src/network/networkd-conf.h \
5754 src/network/networkd-conf.c \
5755 src/network/networkd-link.h \
5756 src/network/networkd-link.c \
5757 src/network/networkd-link-bus.c \
5758 src/network/networkd-ipv4ll.c \
5759 src/network/networkd-dhcp4.c \
5760 src/network/networkd-dhcp6.c \
5761 src/network/networkd-ndisc.h \
5762 src/network/networkd-ndisc.c \
5763 src/network/networkd-network.h \
5764 src/network/networkd-network.c \
5765 src/network/networkd-network-bus.c \
5766 src/network/networkd-address.h \
5767 src/network/networkd-address.c \
5768 src/network/networkd-route.h \
5769 src/network/networkd-route.c \
5770 src/network/networkd-fdb.h \
5771 src/network/networkd-fdb.c \
5772 src/network/networkd-brvlan.h \
5773 src/network/networkd-brvlan.c \
5774 src/network/networkd-address-pool.h \
5775 src/network/networkd-address-pool.c \
5776 src/network/networkd-util.h \
5777 src/network/networkd-util.c \
5778 src/network/networkd-lldp-tx.h \
5779 src/network/networkd-lldp-tx.c
5780
5781 nodist_libnetworkd_core_la_SOURCES = \
5782 src/network/networkd-gperf.c \
5783 src/network/networkd-network-gperf.c \
5784 src/network/netdev/netdev-gperf.c
5785
5786 libnetworkd_core_la_LIBADD = \
5787 libsystemd-network.la \
5788 libsystemd-shared.la
5789
5790 rootlibexec_PROGRAMS += \
5791 systemd-networkd-wait-online
5792
5793 systemd_networkd_wait_online_CFLAGS = \
5794 $(AM_CFLAGS)
5795
5796 systemd_networkd_wait_online_SOURCES = \
5797 src/libsystemd-network/network-internal.h \
5798 src/network/wait-online/link.h \
5799 src/network/wait-online/link.c \
5800 src/network/wait-online/manager.h \
5801 src/network/wait-online/manager.c \
5802 src/network/wait-online/wait-online.c
5803
5804 systemd_networkd_wait_online_LDADD = \
5805 libsystemd-network.la \
5806 libsystemd-shared.la
5807
5808 rootbin_PROGRAMS += \
5809 networkctl
5810
5811 networkctl_SOURCES = \
5812 src/network/networkctl.c
5813
5814 networkctl_LDADD = \
5815 libsystemd-shared.la \
5816 libsystemd-network.la
5817
5818 dist_bashcompletion_data += \
5819 shell-completion/bash/networkctl
5820
5821 dist_zshcompletion_data += \
5822 shell-completion/zsh/_networkctl
5823
5824 test_networkd_conf_SOURCES = \
5825 src/network/test-networkd-conf.c
5826
5827 test_networkd_conf_LDADD = \
5828 libnetworkd-core.la
5829
5830 test_network_SOURCES = \
5831 src/network/test-network.c
5832
5833 test_network_LDADD = \
5834 libnetworkd-core.la
5835
5836 if HAVE_LIBIPTC
5837 test_network_LDADD += \
5838 libfirewall.la
5839 endif
5840
5841 test_network_tables_SOURCES = \
5842 src/network/test-network-tables.c \
5843 src/shared/test-tables.h
5844
5845 test_network_tables_LDADD = \
5846 libnetworkd-core.la \
5847 libudev-core.la
5848
5849 if HAVE_LIBIPTC
5850 test_network_tables_LDADD += \
5851 libfirewall.la
5852 endif
5853
5854 tests += \
5855 test-networkd-conf \
5856 test-network \
5857 test-network-tables
5858
5859 dist_systemunit_DATA += \
5860 units/systemd-networkd.socket
5861
5862 nodist_systemunit_DATA += \
5863 units/systemd-networkd.service \
5864 units/systemd-networkd-wait-online.service
5865
5866 dist_systemunit_DATA_busnames += \
5867 units/org.freedesktop.network1.busname
5868
5869 dist_dbussystemservice_DATA += \
5870 src/network/org.freedesktop.network1.service
5871
5872 dist_dbuspolicy_DATA += \
5873 src/network/org.freedesktop.network1.conf
5874
5875 GENERAL_ALIASES += \
5876 $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \
5877 $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
5878 $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
5879
5880 SYSTEM_UNIT_ALIASES += \
5881 systemd-networkd.service dbus-org.freedesktop.network1.service
5882
5883 BUSNAMES_TARGET_WANTS += \
5884 org.freedesktop.network1.busname
5885
5886 polkitrules_files += \
5887 src/network/systemd-networkd.rules
5888
5889 polkitpkla_files += \
5890 src/network/systemd-networkd.pkla
5891
5892 endif
5893
5894 gperf_gperf_sources += \
5895 src/network/networkd-gperf.gperf \
5896 src/network/networkd-network-gperf.gperf \
5897 src/network/netdev/netdev-gperf.gperf
5898
5899 EXTRA_DIST += \
5900 src/network/systemd-networkd.rules \
5901 src/network/systemd-networkd.pkla \
5902 units/systemd-networkd.service.m4.in \
5903 units/systemd-networkd-wait-online.service.in \
5904 test/networkd-test.py
5905
5906 # ------------------------------------------------------------------------------
5907 if ENABLE_LOGIND
5908 systemd_logind_SOURCES = \
5909 src/login/logind.c \
5910 src/login/logind.h
5911
5912 nodist_systemd_logind_SOURCES = \
5913 src/login/logind-gperf.c
5914
5915 systemd_logind_LDADD = \
5916 liblogind-core.la
5917
5918 liblogind_core_la_SOURCES = \
5919 src/login/logind-core.c \
5920 src/login/logind-device.c \
5921 src/login/logind-device.h \
5922 src/login/logind-button.c \
5923 src/login/logind-button.h \
5924 src/login/logind-action.c \
5925 src/login/logind-action.h \
5926 src/login/logind-seat.c \
5927 src/login/logind-seat.h \
5928 src/login/logind-session.c \
5929 src/login/logind-session.h \
5930 src/login/logind-session-device.c \
5931 src/login/logind-session-device.h \
5932 src/login/logind-user.c \
5933 src/login/logind-user.h \
5934 src/login/logind-inhibit.c \
5935 src/login/logind-inhibit.h \
5936 src/login/logind-dbus.c \
5937 src/login/logind-session-dbus.c \
5938 src/login/logind-seat-dbus.c \
5939 src/login/logind-user-dbus.c \
5940 src/login/logind-utmp.c \
5941 src/login/logind-acl.h
5942
5943 liblogind_core_la_LIBADD = \
5944 libsystemd-shared.la
5945
5946 if HAVE_ACL
5947 liblogind_core_la_SOURCES += \
5948 src/login/logind-acl.c
5949 endif
5950
5951 noinst_LTLIBRARIES += \
5952 liblogind-core.la
5953
5954 rootlibexec_PROGRAMS += \
5955 systemd-logind
5956
5957 loginctl_SOURCES = \
5958 src/login/loginctl.c \
5959 src/login/sysfs-show.h \
5960 src/login/sysfs-show.c
5961
5962 loginctl_LDADD = \
5963 libsystemd-shared.la
5964
5965 rootbin_PROGRAMS += \
5966 loginctl
5967
5968 dist_bashcompletion_data += \
5969 shell-completion/bash/loginctl
5970
5971 dist_zshcompletion_data += \
5972 shell-completion/zsh/_loginctl \
5973 shell-completion/zsh/_systemd-inhibit
5974
5975 systemd_inhibit_SOURCES = \
5976 src/login/inhibit.c
5977
5978 systemd_inhibit_LDADD = \
5979 libsystemd-shared.la
5980
5981 rootbin_PROGRAMS += \
5982 systemd-inhibit
5983
5984 test_login_SOURCES = \
5985 src/libsystemd/sd-login/test-login.c
5986
5987 test_login_LDADD = \
5988 libsystemd-shared.la
5989
5990 test_login_shared_SOURCES = \
5991 src/login/test-login-shared.c
5992
5993 test_login_shared_LDADD = \
5994 libsystemd-shared.la
5995
5996 test_inhibit_SOURCES = \
5997 src/login/test-inhibit.c
5998
5999 test_inhibit_LDADD = \
6000 libsystemd-shared.la
6001
6002 test_login_tables_SOURCES = \
6003 src/login/test-login-tables.c
6004
6005 test_login_tables_LDADD = \
6006 liblogind-core.la
6007
6008 manual_tests += \
6009 test-login \
6010 test-inhibit
6011
6012 tests += \
6013 test-login-tables \
6014 test-login-shared
6015
6016 if HAVE_PAM
6017 pam_systemd_la_SOURCES = \
6018 src/login/pam_systemd.sym \
6019 src/login/pam_systemd.c
6020
6021 pam_systemd_la_CFLAGS = \
6022 $(AM_CFLAGS) \
6023 $(PAM_CFLAGS)
6024
6025 pam_systemd_la_LDFLAGS = \
6026 $(AM_LDFLAGS) \
6027 -module \
6028 -export-dynamic \
6029 -avoid-version \
6030 -shared \
6031 -Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
6032
6033 pam_systemd_la_LIBADD = \
6034 libshared.la \
6035 $(PAM_LIBS)
6036
6037 pamlib_LTLIBRARIES = \
6038 pam_systemd.la
6039
6040 if ENABLE_PAM_CONFIG
6041 dist_pamconf_DATA = \
6042 src/login/systemd-user
6043 endif
6044
6045 EXTRA_DIST += \
6046 src/login/systemd-user.m4
6047 endif
6048
6049 nodist_systemunit_DATA += \
6050 units/systemd-logind.service
6051
6052 dist_systemunit_DATA += \
6053 units/user.slice
6054
6055 dist_systemunit_DATA_busnames += \
6056 units/org.freedesktop.login1.busname
6057
6058 dist_dbussystemservice_DATA += \
6059 src/login/org.freedesktop.login1.service
6060
6061 dist_dbuspolicy_DATA += \
6062 src/login/org.freedesktop.login1.conf
6063
6064 nodist_pkgsysconf_DATA += \
6065 src/login/logind.conf
6066
6067 polkitpolicy_files += \
6068 src/login/org.freedesktop.login1.policy
6069
6070 INSTALL_DIRS += \
6071 $(systemdstatedir)
6072
6073 MULTI_USER_TARGET_WANTS += \
6074 systemd-logind.service
6075
6076 SYSTEM_UNIT_ALIASES += \
6077 systemd-logind.service dbus-org.freedesktop.login1.service
6078
6079 BUSNAMES_TARGET_WANTS += \
6080 org.freedesktop.login1.busname
6081
6082 dist_udevrules_DATA += \
6083 src/login/70-uaccess.rules \
6084 src/login/70-power-switch.rules
6085
6086 nodist_udevrules_DATA += \
6087 src/login/71-seat.rules \
6088 src/login/73-seat-late.rules
6089
6090 endif
6091
6092 polkitpolicy_in_files += \
6093 src/login/org.freedesktop.login1.policy.in
6094
6095 gperf_gperf_sources += \
6096 src/login/logind-gperf.gperf
6097
6098 EXTRA_DIST += \
6099 src/login/71-seat.rules.in \
6100 src/login/73-seat-late.rules.in \
6101 units/systemd-logind.service.in \
6102 src/login/logind.conf.in
6103
6104 # ------------------------------------------------------------------------------
6105 if HAVE_PAM
6106
6107 systemd_user_sessions_SOURCES = \
6108 src/user-sessions/user-sessions.c
6109
6110 systemd_user_sessions_LDADD = \
6111 libsystemd-shared.la
6112
6113 rootlibexec_PROGRAMS += \
6114 systemd-user-sessions
6115
6116 nodist_systemunit_DATA += \
6117 units/systemd-user-sessions.service
6118
6119 MULTI_USER_TARGET_WANTS += \
6120 systemd-user-sessions.service
6121
6122 endif
6123
6124 EXTRA_DIST += \
6125 units/systemd-user-sessions.service.in
6126
6127 # ------------------------------------------------------------------------------
6128 EXTRA_DIST += \
6129 test/Makefile \
6130 test/README.testsuite \
6131 test/TEST-01-BASIC \
6132 test/TEST-01-BASIC/Makefile \
6133 test/TEST-01-BASIC/test.sh \
6134 test/TEST-02-CRYPTSETUP \
6135 test/TEST-02-CRYPTSETUP/Makefile \
6136 test/TEST-02-CRYPTSETUP/test.sh \
6137 test/TEST-03-JOBS \
6138 test/TEST-03-JOBS/Makefile \
6139 test/TEST-03-JOBS/test-jobs.sh \
6140 test/TEST-03-JOBS/test.sh \
6141 test/TEST-04-JOURNAL/Makefile \
6142 test/TEST-04-JOURNAL/test-journal.sh \
6143 test/TEST-04-JOURNAL/test.sh \
6144 test/TEST-05-RLIMITS/Makefile \
6145 test/TEST-05-RLIMITS/test-rlimits.sh \
6146 test/TEST-05-RLIMITS/test.sh \
6147 test/TEST-06-SELINUX/Makefile \
6148 test/TEST-06-SELINUX/test-selinux-checks.sh \
6149 test/TEST-06-SELINUX/test.sh \
6150 test/TEST-06-SELINUX/systemd_test.te \
6151 test/TEST-06-SELINUX/systemd_test.if \
6152 test/TEST-07-ISSUE-1981/Makefile \
6153 test/TEST-07-ISSUE-1981/test-segfault.sh \
6154 test/TEST-07-ISSUE-1981/test.sh \
6155 test/TEST-08-ISSUE-2730/Makefile \
6156 test/TEST-08-ISSUE-2730/test.sh \
6157 test/TEST-09-ISSUE-2691/Makefile \
6158 test/TEST-09-ISSUE-2691/test.sh \
6159 test/TEST-10-ISSUE-2467/Makefile \
6160 test/TEST-10-ISSUE-2467/test.sh \
6161 test/TEST-11-ISSUE-3166/Makefile \
6162 test/TEST-11-ISSUE-3166/test.sh \
6163 test/TEST-12-ISSUE-3171/Makefile \
6164 test/TEST-12-ISSUE-3171/test.sh \
6165 test/TEST-13-NSPAWN-SMOKE/Makefile \
6166 test/TEST-13-NSPAWN-SMOKE/create-busybox-container \
6167 test/TEST-13-NSPAWN-SMOKE/test.sh \
6168 test/TEST-14-MACHINE-ID/Makefile \
6169 test/TEST-14-MACHINE-ID/test.sh \
6170 test/test-functions
6171
6172 EXTRA_DIST += \
6173 test/loopy2.service \
6174 test/loopy3.service \
6175 test/loopy4.service \
6176 test/loopy.service \
6177 test/loopy.service.d \
6178 test/loopy.service.d/compat.conf
6179
6180 # ------------------------------------------------------------------------------
6181 substitutions = \
6182 '|rootlibdir=$(rootlibdir)|' \
6183 '|rootlibexecdir=$(rootlibexecdir)|' \
6184 '|rootbindir=$(rootbindir)|' \
6185 '|bindir=$(bindir)|' \
6186 '|SYSTEMCTL=$(rootbindir)/systemctl|' \
6187 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
6188 '|pkgsysconfdir=$(pkgsysconfdir)|' \
6189 '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
6190 '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
6191 '|pkgdatadir=$(pkgdatadir)|' \
6192 '|systemunitdir=$(systemunitdir)|' \
6193 '|userunitdir=$(userunitdir)|' \
6194 '|systempresetdir=$(systempresetdir)|' \
6195 '|userpresetdir=$(userpresetdir)|' \
6196 '|udevhwdbdir=$(udevhwdbdir)|' \
6197 '|udevrulesdir=$(udevrulesdir)|' \
6198 '|catalogdir=$(catalogdir)|' \
6199 '|tmpfilesdir=$(tmpfilesdir)|' \
6200 '|sysusersdir=$(sysusersdir)|' \
6201 '|sysctldir=$(sysctldir)|' \
6202 '|systemgeneratordir=$(systemgeneratordir)|' \
6203 '|usergeneratordir=$(usergeneratordir)|' \
6204 '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
6205 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
6206 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
6207 '|PACKAGE_URL=$(PACKAGE_URL)|' \
6208 '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
6209 '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
6210 '|prefix=$(prefix)|' \
6211 '|exec_prefix=$(exec_prefix)|' \
6212 '|libdir=$(libdir)|' \
6213 '|includedir=$(includedir)|' \
6214 '|VERSION=$(VERSION)|' \
6215 '|rootprefix=$(rootprefix)|' \
6216 '|udevlibexecdir=$(udevlibexecdir)|' \
6217 '|SUSHELL=$(SUSHELL)|' \
6218 '|SULOGIN=$(SULOGIN)|' \
6219 '|DEBUGTTY=$(DEBUGTTY)|' \
6220 '|KILL=$(KILL)|' \
6221 '|KMOD=$(KMOD)|' \
6222 '|MOUNT_PATH=$(MOUNT_PATH)|' \
6223 '|UMOUNT_PATH=$(UMOUNT_PATH)|' \
6224 '|MKDIR_P=$(MKDIR_P)|' \
6225 '|QUOTAON=$(QUOTAON)|' \
6226 '|QUOTACHECK=$(QUOTACHECK)|' \
6227 '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
6228 '|VARLOGDIR=$(varlogdir)|' \
6229 '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
6230 '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
6231 '|PYTHON=$(PYTHON)|' \
6232 '|NTP_SERVERS=$(NTP_SERVERS)|' \
6233 '|DNS_SERVERS=$(DNS_SERVERS)|' \
6234 '|DEFAULT_DNSSEC_MODE=$(DEFAULT_DNSSEC_MODE)|' \
6235 '|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \
6236 '|systemuidmax=$(SYSTEM_UID_MAX)|' \
6237 '|systemgidmax=$(SYSTEM_GID_MAX)|' \
6238 '|TTY_GID=$(TTY_GID)|' \
6239 '|systemsleepdir=$(systemsleepdir)|' \
6240 '|systemshutdowndir=$(systemshutdowndir)|' \
6241 '|binfmtdir=$(binfmtdir)|' \
6242 '|modulesloaddir=$(modulesloaddir)|'
6243
6244 SED_PROCESS = \
6245 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
6246 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
6247 < $< > $@
6248
6249 units/%: units/%.in
6250 $(SED_PROCESS)
6251
6252 man/%: man/%.in
6253 $(SED_PROCESS)
6254
6255 sysctl.d/%: sysctl.d/%.in
6256 $(SED_PROCESS)
6257
6258 %.pc: %.pc.in
6259 $(SED_PROCESS)
6260
6261 %.conf: %.conf.in
6262 $(SED_PROCESS)
6263
6264 src/core/%.systemd: src/core/%.systemd.in
6265 $(SED_PROCESS)
6266
6267 src/%.policy.in: src/%.policy.in.in
6268 $(SED_PROCESS)
6269
6270 shell-completion/%: shell-completion/%.in
6271 $(SED_PROCESS)
6272
6273 %.rules: %.rules.in
6274 $(SED_PROCESS)
6275
6276 %.conf: %.conf.in
6277 $(SED_PROCESS)
6278
6279 %.sh: %.sh.in
6280 $(SED_PROCESS)
6281 $(AM_V_GEN)chmod +x $@
6282
6283 src/%.c: src/%.gperf
6284 $(AM_V_at)$(MKDIR_P) $(dir $@)
6285 $(AM_V_GPERF)$(GPERF) < $< > $@
6286
6287 src/%: src/%.m4 $(top_builddir)/config.status
6288 $(AM_V_at)$(MKDIR_P) $(dir $@)
6289 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6290
6291 sysusers.d/%: sysusers.d/%.m4 $(top_builddir)/config.status
6292 $(AM_V_at)$(MKDIR_P) $(dir $@)
6293 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6294
6295 tmpfiles.d/%: tmpfiles.d/%.m4 $(top_builddir)/config.status
6296 $(AM_V_at)$(MKDIR_P) $(dir $@)
6297 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6298
6299
6300 units/%: units/%.m4 $(top_builddir)/config.status
6301 $(AM_V_at)$(MKDIR_P) $(dir $@)
6302 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
6303
6304 units/user/%: units/user/%.m4 $(top_builddir)/config.status
6305 $(AM_V_at)$(MKDIR_P) $(dir $@)
6306 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
6307
6308 if ENABLE_POLKIT
6309 nodist_polkitpolicy_DATA = \
6310 $(polkitpolicy_files) \
6311 $(polkitpolicy_in_in_files:.policy.in.in=.policy)
6312 polkitrules_DATA = $(polkitrules_files)
6313 polkitpkla_DATA = $(polkitpkla_files)
6314 endif
6315
6316 EXTRA_DIST += \
6317 $(polkitpolicy_in_files) \
6318 $(polkitpolicy_in_in_files)
6319
6320 # ------------------------------------------------------------------------------
6321 man/custom-entities.ent: configure.ac
6322 $(AM_V_GEN)$(MKDIR_P) $(dir $@)
6323 $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
6324 printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
6325 > $@ # '
6326
6327 CLEANFILES += \
6328 man/custom-entities.ent
6329
6330 XSLTPROC_FLAGS = \
6331 --nonet \
6332 --xinclude \
6333 --stringparam man.output.quietly 1 \
6334 --stringparam funcsynopsis.style ansi \
6335 --stringparam man.authors.section.enabled 0 \
6336 --stringparam man.copyright.section.enabled 0 \
6337 --stringparam systemd.version $(VERSION) \
6338 --path '$(builddir)/man:$(srcdir)/man'
6339
6340 XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc)
6341 XSLTPROC_PROCESS_MAN = \
6342 $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
6343
6344 XSLTPROC_PROCESS_HTML = \
6345 $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
6346
6347 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
6348 $(XSLTPROC_PROCESS_MAN)
6349
6350 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
6351 $(XSLTPROC_PROCESS_MAN)
6352
6353 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
6354 $(XSLTPROC_PROCESS_MAN)
6355
6356 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
6357 $(XSLTPROC_PROCESS_MAN)
6358
6359 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
6360 $(XSLTPROC_PROCESS_MAN)
6361
6362 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
6363 $(XSLTPROC_PROCESS_HTML)
6364
6365 define html-alias
6366 $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
6367 endef
6368
6369 EXTRA_DIST += \
6370 man/custom-html.xsl \
6371 man/custom-man.xsl
6372
6373 # ------------------------------------------------------------------------------
6374 if HAVE_SYSV_COMPAT
6375 sysvinit_DATA = \
6376 docs/sysvinit/README
6377
6378 varlog_DATA = \
6379 docs/var-log/README
6380
6381 docs/sysvinit/README: docs/sysvinit/README.in
6382 $(SED_PROCESS)
6383
6384 docs/var-log/README: docs/var-log/README.in
6385 $(SED_PROCESS)
6386
6387 CLEANFILES += \
6388 docs/sysvinit/README \
6389 docs/var-log/README
6390 endif
6391
6392 EXTRA_DIST += \
6393 docs/sysvinit/README.in \
6394 docs/var-log/README.in
6395
6396 SOCKETS_TARGET_WANTS += \
6397 systemd-initctl.socket
6398
6399 if HAVE_UTMP
6400 if HAVE_SYSV_COMPAT
6401 MULTI_USER_TARGET_WANTS += \
6402 systemd-update-utmp-runlevel.service
6403 GRAPHICAL_TARGET_WANTS += \
6404 systemd-update-utmp-runlevel.service
6405 RESCUE_TARGET_WANTS += \
6406 systemd-update-utmp-runlevel.service
6407 endif
6408
6409 SYSINIT_TARGET_WANTS += \
6410 systemd-update-utmp.service
6411 endif
6412
6413 SYSINIT_TARGET_WANTS += \
6414 systemd-update-done.service
6415
6416 LOCAL_FS_TARGET_WANTS += \
6417 systemd-remount-fs.service \
6418 tmp.mount \
6419 var-lib-machines.mount
6420
6421 MULTI_USER_TARGET_WANTS += \
6422 getty.target \
6423 systemd-ask-password-wall.path
6424
6425 SYSINIT_TARGET_WANTS += \
6426 dev-hugepages.mount \
6427 dev-mqueue.mount \
6428 sys-kernel-config.mount \
6429 sys-kernel-debug.mount \
6430 sys-fs-fuse-connections.mount \
6431 systemd-sysctl.service \
6432 systemd-ask-password-console.path
6433
6434 if HAVE_SYSV_COMPAT
6435 SYSTEM_UNIT_ALIASES += \
6436 poweroff.target runlevel0.target \
6437 rescue.target runlevel1.target \
6438 multi-user.target runlevel2.target \
6439 multi-user.target runlevel3.target \
6440 multi-user.target runlevel4.target \
6441 graphical.target runlevel5.target \
6442 reboot.target runlevel6.target
6443 endif
6444
6445 SYSTEM_UNIT_ALIASES += \
6446 graphical.target default.target \
6447 reboot.target ctrl-alt-del.target \
6448 getty@.service autovt@.service
6449
6450 GENERAL_ALIASES += \
6451 $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
6452 $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
6453 $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
6454 $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
6455
6456 if HAVE_SYSV_COMPAT
6457 INSTALL_DIRS += \
6458 $(systemunitdir)/runlevel1.target.wants \
6459 $(systemunitdir)/runlevel2.target.wants \
6460 $(systemunitdir)/runlevel3.target.wants \
6461 $(systemunitdir)/runlevel4.target.wants \
6462 $(systemunitdir)/runlevel5.target.wants
6463 endif
6464
6465 INSTALL_DIRS += \
6466 $(prefix)/lib/modules-load.d \
6467 $(sysconfdir)/modules-load.d \
6468 $(prefix)/lib/systemd/network \
6469 $(sysconfdir)/systemd/network \
6470 $(prefix)/lib/sysctl.d \
6471 $(sysconfdir)/sysctl.d \
6472 $(prefix)/lib/kernel/install.d \
6473 $(sysconfdir)/kernel/install.d \
6474 $(systemshutdowndir) \
6475 $(systemsleepdir) \
6476 $(systemgeneratordir) \
6477 $(usergeneratordir) \
6478 \
6479 $(userunitdir) \
6480 $(pkgsysconfdir)/system \
6481 $(pkgsysconfdir)/system/multi-user.target.wants \
6482 $(pkgsysconfdir)/system/getty.target.wants \
6483 $(pkgsysconfdir)/user \
6484 $(dbussessionservicedir) \
6485 $(sysconfdir)/xdg/systemd
6486
6487 install-exec-hook: $(INSTALL_EXEC_HOOKS)
6488
6489 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
6490
6491 install-data-hook: $(INSTALL_DATA_HOOKS)
6492
6493 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
6494
6495 clean-local: $(CLEAN_LOCAL_HOOKS)
6496 rm -rf $(abs_srcdir)/install-tree
6497 rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
6498 $(abs_srcdir)/hwdb/iab.txt
6499
6500 DISTCHECK_CONFIGURE_FLAGS = \
6501 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
6502 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
6503 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
6504 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
6505 --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
6506 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
6507 --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
6508 --with-rootprefix=$$dc_install_base \
6509 --enable-compat-libs
6510
6511 if HAVE_SYSV_COMPAT
6512 DISTCHECK_CONFIGURE_FLAGS += \
6513 --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
6514 --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
6515 else
6516 DISTCHECK_CONFIGURE_FLAGS += \
6517 --with-sysvinit-path= \
6518 --with-sysvrcnd-path=
6519 endif
6520
6521 if ENABLE_SPLIT_USR
6522 DISTCHECK_CONFIGURE_FLAGS += \
6523 --enable-split-usr
6524 else
6525 DISTCHECK_CONFIGURE_FLAGS += \
6526 --disable-split-usr
6527 endif
6528
6529 .PHONY: dist-check-help
6530 dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
6531 for i in $(abspath $^); do \
6532 if $$i --help | grep -v 'default:' | grep -E -q '.{80}.' ; then \
6533 echo "$(basename $$i) --help output is too wide:"; \
6534 $$i --help | awk 'length > 80' | grep -E --color=yes '.{80}'; \
6535 exit 1; \
6536 fi; done
6537
6538 include_compilers = "$(CC)" "$(CC) -ansi" "$(CC) -std=iso9899:1990"
6539 public_headers = $(filter-out src/systemd/_sd-common.h, $(pkginclude_HEADERS) $(include_HEADERS))
6540 .PHONY: dist-check-includes
6541 dist-check-includes: $(public_headers)
6542 @res=0; \
6543 for i in $(abspath $^); do \
6544 for cc in $(include_compilers); do \
6545 echo "$$cc -o/dev/null -c -x c -include "$$i" - </dev/null"; \
6546 $$cc -o/dev/null -c -x c -include "$$i" - </dev/null || res=1; \
6547 done; \
6548 done; exit $$res
6549
6550 .PHONY: hwdb-update
6551 hwdb-update:
6552 ( cd $(top_srcdir)/hwdb && \
6553 wget -O usb.ids 'http://www.linux-usb.org/usb.ids' && \
6554 wget -O pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids' && \
6555 wget -O ma-large.txt 'http://standards.ieee.org/develop/regauth/oui/oui.txt' && \
6556 wget -O ma-medium.txt 'http://standards.ieee.org/develop/regauth/oui28/mam.txt' && \
6557 wget -O ma-small.txt 'http://standards.ieee.org/develop/regauth/oui36/oui36.txt' && \
6558 wget -O pnp_id_registry.html 'http://www.uefi.org/uefi-pnp-export' && \
6559 wget -O acpi_id_registry.html 'http://www.uefi.org/uefi-acpi-export' && \
6560 ./ids-update.pl && \
6561 ./acpi-update.py > 20-acpi-vendor.hwdb.base && \
6562 patch -p0 -o- 20-acpi-vendor.hwdb.base < 20-acpi-vendor.hwdb.patch > 20-acpi-vendor.hwdb )
6563
6564 .PHONY: built-sources
6565 built-sources: $(BUILT_SOURCES)
6566
6567 .PHONY: git-tag
6568 git-tag:
6569 git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
6570
6571 .PHONY: git-tar
6572 git-tar:
6573 git archive --format=tar --prefix=systemd-$(VERSION)/ HEAD | gzip > systemd-$(VERSION).tar.gz
6574
6575 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
6576
6577 .PHONY: doc-sync
6578 doc-sync: all
6579 rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
6580
6581 .PHONY: install-tree
6582 install-tree: all
6583 rm -rf $(abs_srcdir)/install-tree
6584 $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
6585 tree $(abs_srcdir)/install-tree
6586
6587 # Let's run all tests of the test suite, but under valgrind. Let's
6588 # exclude perl/python/shell scripts we have in there
6589 .PHONY: valgrind-tests
6590 valgrind-tests: $(TESTS)
6591 $(AM_V_GEN)for f in $(filter-out %.pl %.py, $^); do \
6592 if $(LIBTOOL) --mode=execute file $$f | grep -q shell; then \
6593 echo -e "$${x}Skipping non-binary $$f"; else \
6594 echo -e "$${x}Running $$f"; \
6595 $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
6596 x="\n\n"; \
6597 done
6598
6599 exported-%: %
6600 $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
6601
6602 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
6603 $(AM_V_GEN)sort -u $^ > $@
6604
6605 .PHONY: check-api-docs
6606 check-api-docs: exported man
6607 $(AM_V_GEN)for symbol in `cat exported` ; do \
6608 if test -f $(builddir)/man/$$symbol.html ; then \
6609 echo " Symbol $$symbol() is documented." ; \
6610 else \
6611 echo "‣ Symbol $$symbol() lacks documentation." ; \
6612 fi ; \
6613 done
6614
6615 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
6616 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
6617
6618 undefined defined: $(ALL_OBJECTS)
6619 $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
6620 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
6621 done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
6622
6623 CLEANFILES += \
6624 defined \
6625 undefined
6626
6627 .PHONY: check-api-unused
6628 check-api-unused: defined undefined exported
6629 ( cat exported undefined ) | sort -u | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
6630
6631 .PHONY: check-includes
6632 check-includes: $(top_srcdir)/tools/check-includes.pl
6633 $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
6634 | xargs $(top_srcdir)/tools/check-includes.pl
6635
6636 EXTRA_DIST += \
6637 $(top_srcdir)/tools/check-includes.pl
6638
6639 # Stupid test that everything purported to be exported really is
6640 define generate-sym-test
6641 $(AM_V_at)$(MKDIR_P) $(dir $@)
6642 $(AM_V_at)printf '#include <stdio.h>\n' > $@
6643 $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
6644 $(AM_V_at)printf 'void* functions[] = {\n' >> $@
6645 $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
6646 $(AM_V_at)printf '};\nint main(void) {\n' >> $@
6647 $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
6648 $(AM_V_at)printf 'return 0; }\n' >> $@
6649 endef
6650
6651 test-libsystemd-sym.c: \
6652 $(top_builddir)/src/libsystemd/libsystemd.sym \
6653 src/systemd/sd-journal.h \
6654 src/systemd/sd-daemon.h \
6655 src/systemd/sd-login.h \
6656 src/systemd/sd-bus.h \
6657 src/systemd/sd-utf8.h \
6658 src/systemd/sd-resolve.h \
6659 src/systemd/sd-path.h \
6660 src/systemd/sd-event.h
6661 $(generate-sym-test)
6662
6663 test-libudev-sym.c: \
6664 src/libudev/libudev.sym \
6665 src/udev/udev.h
6666 $(generate-sym-test)
6667
6668 nodist_test_libsystemd_sym_SOURCES = \
6669 test-libsystemd-sym.c
6670 test_libsystemd_sym_LDADD = \
6671 libsystemd.la
6672
6673 nodist_test_libudev_sym_SOURCES = \
6674 test-libudev-sym.c
6675 test_libudev_sym_CFLAGS = \
6676 $(AM_CFLAGS) \
6677 -Wno-deprecated-declarations
6678 test_libudev_sym_LDADD = \
6679 libudev.la
6680
6681 BUILT_SOURCES += \
6682 test-libsystemd-sym.c \
6683 test-libudev-sym.c
6684
6685 CLEANFILES += \
6686 test-libsystemd-sym.c \
6687 test-libudev-sym.c
6688
6689 tests += \
6690 test-libsystemd-sym \
6691 test-libudev-sym
6692
6693 .PHONY: cppcheck
6694 cppcheck:
6695 cppcheck --enable=all -q $(top_srcdir)
6696
6697 # Used to extract compile flags for YCM.
6698 print-%:
6699 @echo $($*)
6700
6701 git-contrib:
6702 @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | sed 's/ / /g' | awk '{ print $$0 "," }' | sort -u
6703
6704 EXTRA_DIST += \
6705 tools/gdb-sd_dump_hashmaps.py
6706
6707 list-keys:
6708 gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --list-keys
6709
6710 add-key:
6711 gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import -