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