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