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