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