]> git.ipfire.org Git - thirdparty/systemd.git/blob - Makefile.am
log: pass the correct length to vsnprintf (#6168)
[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 if HAVE_REMOTE
2696 nodist_tmpfiles_DATA += \
2697 tmpfiles.d/systemd-remote.conf
2698 endif
2699
2700 SYSINIT_TARGET_WANTS += \
2701 systemd-tmpfiles-setup-dev.service \
2702 systemd-tmpfiles-setup.service
2703
2704 dist_zshcompletion_data += \
2705 shell-completion/zsh/_systemd-tmpfiles
2706
2707 TIMERS_TARGET_WANTS += \
2708 systemd-tmpfiles-clean.timer
2709
2710 INSTALL_DIRS += \
2711 $(tmpfilesdir) \
2712 $(sysconfdir)/tmpfiles.d
2713 endif
2714
2715 EXTRA_DIST += \
2716 tmpfiles.d/systemd.conf.m4 \
2717 tmpfiles.d/systemd-remote.conf.m4 \
2718 tmpfiles.d/etc.conf.m4 \
2719 tmpfiles.d/var.conf.m4 \
2720 units/systemd-tmpfiles-setup-dev.service.in \
2721 units/systemd-tmpfiles-setup.service.in \
2722 units/systemd-tmpfiles-clean.service.in
2723
2724 # ------------------------------------------------------------------------------
2725 if ENABLE_SYSUSERS
2726 systemd_sysusers_SOURCES = \
2727 src/sysusers/sysusers.c
2728
2729 systemd_sysusers_LDADD = \
2730 libsystemd-shared.la
2731
2732 rootbin_PROGRAMS += \
2733 systemd-sysusers
2734
2735 nodist_systemunit_DATA += \
2736 units/systemd-sysusers.service
2737
2738 SYSINIT_TARGET_WANTS += \
2739 systemd-sysusers.service
2740
2741 nodist_sysusers_DATA = \
2742 sysusers.d/systemd.conf \
2743 sysusers.d/basic.conf
2744
2745 if HAVE_REMOTE
2746 nodist_sysusers_DATA += \
2747 sysusers.d/systemd-remote.conf
2748 endif
2749
2750 INSTALL_DIRS += \
2751 $(sysusersdir)
2752 endif
2753
2754 EXTRA_DIST += \
2755 units/systemd-sysusers.service.in \
2756 sysusers.d/systemd.conf.m4 \
2757 sysusers.d/systemd-remote.conf.m4 \
2758 sysusers.d/basic.conf.in
2759
2760 # ------------------------------------------------------------------------------
2761 dist_factory_etc_DATA = \
2762 factory/etc/nsswitch.conf
2763
2764 if HAVE_PAM
2765 dist_factory_pam_DATA = \
2766 factory/etc/pam.d/system-auth \
2767 factory/etc/pam.d/other
2768 endif
2769
2770 # ------------------------------------------------------------------------------
2771 if ENABLE_FIRSTBOOT
2772 systemd_firstboot_SOURCES = \
2773 src/firstboot/firstboot.c
2774
2775 systemd_firstboot_LDADD = \
2776 libsystemd-shared.la \
2777 -lcrypt
2778
2779 rootbin_PROGRAMS += \
2780 systemd-firstboot
2781
2782 nodist_systemunit_DATA += \
2783 units/systemd-firstboot.service
2784
2785 SYSINIT_TARGET_WANTS += \
2786 systemd-firstboot.service
2787 endif
2788
2789 EXTRA_DIST += \
2790 units/systemd-firstboot.service.in
2791
2792 # ------------------------------------------------------------------------------
2793 systemd_machine_id_setup_SOURCES = \
2794 src/machine-id-setup/machine-id-setup-main.c \
2795 src/core/machine-id-setup.c \
2796 src/core/machine-id-setup.h
2797
2798 systemd_machine_id_setup_LDADD = \
2799 libsystemd-shared.la
2800
2801 SYSINIT_TARGET_WANTS += \
2802 systemd-machine-id-commit.service
2803
2804 # ------------------------------------------------------------------------------
2805 systemd_sysctl_SOURCES = \
2806 src/sysctl/sysctl.c
2807
2808 systemd_sysctl_LDADD = \
2809 libsystemd-shared.la
2810
2811 # ------------------------------------------------------------------------------
2812 systemd_sleep_SOURCES = \
2813 src/sleep/sleep.c
2814
2815 systemd_sleep_LDADD = \
2816 libsystemd-shared.la
2817
2818 # ------------------------------------------------------------------------------
2819 systemd_fsck_SOURCES = \
2820 src/fsck/fsck.c
2821
2822 systemd_fsck_LDADD = \
2823 libsystemd-shared.la
2824
2825 # ------------------------------------------------------------------------------
2826 systemd_ac_power_SOURCES = \
2827 src/ac-power/ac-power.c
2828
2829 systemd_ac_power_LDADD = \
2830 libsystemd-shared.la
2831
2832 # ------------------------------------------------------------------------------
2833 systemd_detect_virt_SOURCES = \
2834 src/detect-virt/detect-virt.c
2835
2836 systemd_detect_virt_LDADD = \
2837 libsystemd-shared.la
2838
2839 # ------------------------------------------------------------------------------
2840 systemd_delta_SOURCES = \
2841 src/delta/delta.c
2842
2843 systemd_delta_LDADD = \
2844 libsystemd-shared.la
2845
2846 # ------------------------------------------------------------------------------
2847 systemd_getty_generator_SOURCES = \
2848 src/getty-generator/getty-generator.c
2849
2850 systemd_getty_generator_LDADD = \
2851 libsystemd-shared.la
2852
2853 # ------------------------------------------------------------------------------
2854 systemd_debug_generator_SOURCES = \
2855 src/debug-generator/debug-generator.c
2856
2857 systemd_debug_generator_LDADD = \
2858 libsystemd-shared.la
2859
2860 # ------------------------------------------------------------------------------
2861 systemd_fstab_generator_SOURCES = \
2862 src/fstab-generator/fstab-generator.c \
2863 src/core/mount-setup.c
2864
2865 systemd_fstab_generator_LDADD = \
2866 libsystemd-shared.la
2867
2868 # ------------------------------------------------------------------------------
2869 systemd_system_update_generator_SOURCES = \
2870 src/system-update-generator/system-update-generator.c
2871
2872 systemd_system_update_generator_LDADD = \
2873 libsystemd-shared.la
2874
2875 # ------------------------------------------------------------------------------
2876 30_systemd_environment_d_generator_SOURCES = \
2877 src/environment-d-generator/environment-d-generator.c
2878
2879 30_systemd_environment_d_generator_LDADD = \
2880 libsystemd-shared.la
2881
2882 # ------------------------------------------------------------------------------
2883 if ENABLE_HIBERNATE
2884 systemgenerator_PROGRAMS += \
2885 systemd-hibernate-resume-generator
2886
2887 rootlibexec_PROGRAMS += \
2888 systemd-hibernate-resume
2889
2890 systemd_hibernate_resume_SOURCES = \
2891 src/hibernate-resume/hibernate-resume.c
2892
2893 systemd_hibernate_resume_LDADD = \
2894 libsystemd-shared.la
2895
2896 systemd_hibernate_resume_generator_SOURCES = \
2897 src/hibernate-resume/hibernate-resume-generator.c
2898
2899 systemd_hibernate_resume_generator_LDADD = \
2900 libsystemd-shared.la
2901
2902 dist_systemunit_DATA += \
2903 units/hibernate.target \
2904 units/hybrid-sleep.target
2905
2906 nodist_systemunit_DATA += \
2907 units/systemd-hibernate.service \
2908 units/systemd-hibernate-resume@.service \
2909 units/systemd-hybrid-sleep.service
2910 endif
2911
2912 EXTRA_DIST += \
2913 units/systemd-hibernate.service.in \
2914 units/systemd-hibernate-resume@.service.in \
2915 units/systemd-hybrid-sleep.service.in
2916
2917 # ------------------------------------------------------------------------------
2918 if ENABLE_EFI
2919 if HAVE_BLKID
2920 bootctl_SOURCES = \
2921 src/boot/bootctl.c
2922
2923 bootctl_CPPFLAGS = \
2924 $(AM_CPPFLAGS) \
2925 -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\" \
2926 -DBOOTLIBDIR=\"$(bootlibdir)\"
2927
2928 bootctl_CFLAGS = \
2929 $(AM_CFLAGS) \
2930 $(BLKID_CFLAGS)
2931
2932 bootctl_LDADD = \
2933 libsystemd-shared.la \
2934 $(BLKID_LIBS)
2935
2936 bin_PROGRAMS += \
2937 bootctl
2938
2939 dist_bashcompletion_data += \
2940 shell-completion/bash/bootctl
2941
2942 dist_zshcompletion_data += \
2943 shell-completion/zsh/_bootctl
2944 endif
2945
2946 # ------------------------------------------------------------------------------
2947 if HAVE_GNUEFI
2948 efi_cppflags = \
2949 $(EFI_CPPFLAGS) \
2950 -I$(top_builddir) -include config.h \
2951 -I$(EFI_INC_DIR)/efi \
2952 -I$(EFI_INC_DIR)/efi/$(EFI_ARCH) \
2953 -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\"
2954
2955 efi_cflags = \
2956 $(EFI_CFLAGS) \
2957 -Wall \
2958 -Wextra \
2959 -std=gnu90 \
2960 -nostdinc \
2961 -ggdb -O0 \
2962 -fpic \
2963 -fshort-wchar \
2964 -nostdinc \
2965 -ffreestanding \
2966 -fno-strict-aliasing \
2967 -fno-stack-protector \
2968 -Wsign-compare \
2969 -Wno-missing-field-initializers
2970
2971 if ARCH_X86_64
2972 efi_cflags += \
2973 -mno-red-zone \
2974 -mno-sse \
2975 -mno-mmx \
2976 -DEFI_FUNCTION_WRAPPER \
2977 -DGNU_EFI_USE_MS_ABI
2978 endif
2979
2980 if ARCH_IA32
2981 efi_cflags += \
2982 -mno-sse \
2983 -mno-mmx
2984 endif
2985
2986 efi_ldflags = \
2987 $(EFI_LDFLAGS) \
2988 -T $(EFI_LDS_DIR)/elf_$(EFI_ARCH)_efi.lds \
2989 -shared \
2990 -Bsymbolic \
2991 -nostdlib \
2992 -znocombreloc \
2993 -L $(EFI_LIB_DIR) \
2994 $(EFI_LDS_DIR)/crt0-efi-$(EFI_ARCH).o
2995
2996 # Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary' instead,
2997 # and add required symbols manually.
2998 if ARCH_AARCH64
2999 efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
3000 EFI_FORMAT = -O binary
3001 else
3002 if ARCH_ARM
3003 efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
3004 EFI_FORMAT = -O binary
3005 else
3006 EFI_FORMAT = --target=efi-app-$(EFI_ARCH)
3007 endif
3008 endif
3009 endif
3010 endif
3011
3012 # ------------------------------------------------------------------------------
3013 efi_headers = \
3014 src/boot/efi/console.h \
3015 src/boot/efi/disk.h \
3016 src/boot/efi/graphics.h \
3017 src/boot/efi/linux.h \
3018 src/boot/efi/measure.h \
3019 src/boot/efi/pefile.h \
3020 src/boot/efi/splash.h \
3021 src/boot/efi/util.h \
3022 src/boot/efi/shim.h
3023
3024 systemd_boot_sources = \
3025 src/boot/efi/boot.c \
3026 src/boot/efi/console.c \
3027 src/boot/efi/disk.c \
3028 src/boot/efi/graphics.c \
3029 src/boot/efi/measure.c \
3030 src/boot/efi/pefile.c \
3031 src/boot/efi/util.c \
3032 src/boot/efi/shim.c
3033
3034 EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
3035
3036 systemd_boot_objects = $(addprefix $(top_builddir)/,$(systemd_boot_sources:.c=.o))
3037 systemd_boot_solib = $(top_builddir)/src/boot/efi/systemd_boot.so
3038 systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi
3039
3040 if ENABLE_EFI
3041 if HAVE_GNUEFI
3042 bootlib_DATA = $(systemd_boot)
3043
3044 $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(efi_headers))
3045 @$(MKDIR_P) $(top_builddir)/src/boot/efi/
3046 $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
3047
3048 $(systemd_boot_solib): $(systemd_boot_objects)
3049 $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \
3050 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
3051 nm -D -u $@ | grep ' U ' && exit 1 || :
3052
3053 $(systemd_boot): $(systemd_boot_solib)
3054 $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
3055 -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
3056 endif
3057 endif
3058
3059 CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
3060
3061 # ------------------------------------------------------------------------------
3062 stub_sources = \
3063 src/boot/efi/disk.c \
3064 src/boot/efi/graphics.c \
3065 src/boot/efi/linux.c \
3066 src/boot/efi/measure.c \
3067 src/boot/efi/pefile.c \
3068 src/boot/efi/splash.c \
3069 src/boot/efi/stub.c \
3070 src/boot/efi/util.c
3071
3072 EXTRA_DIST += \
3073 $(stub_sources) \
3074 $(stub_headers) \
3075 test/splash.bmp
3076
3077 stub_objects = $(addprefix $(top_builddir)/,$(stub_sources:.c=.o))
3078 stub_solib = $(top_builddir)/src/boot/efi/stub.so
3079 stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub
3080
3081 if ENABLE_EFI
3082 if HAVE_GNUEFI
3083 bootlib_DATA += $(stub)
3084
3085 $(stub_solib): $(stub_objects)
3086 $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
3087 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
3088 nm -D -u $@ | grep ' U ' && exit 1 || :
3089
3090 $(stub): $(stub_solib)
3091 $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
3092 -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
3093 endif
3094 endif
3095
3096 CLEANFILES += $(stub_objects) $(stub_solib) $(stub)
3097
3098
3099 # ------------------------------------------------------------------------------
3100 CLEANFILES += test-efi-disk.img
3101
3102 test-efi-disk.img: $(systemd_boot) $(stub) test/splash.bmp test/test-efi-create-disk.sh
3103 $(AM_V_GEN)test/test-efi-create-disk.sh $@ $(systemd_boot) $(stub) test/splash.bmp
3104
3105 test-efi: test-efi-disk.img
3106 $(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img
3107
3108 EXTRA_DIST += test/test-efi-create-disk.sh
3109
3110 # ------------------------------------------------------------------------------
3111 if HAVE_BLKID
3112 systemgenerator_PROGRAMS += \
3113 systemd-gpt-auto-generator
3114
3115 systemd_gpt_auto_generator_SOURCES = \
3116 src/gpt-auto-generator/gpt-auto-generator.c \
3117 src/basic/blkid-util.h
3118
3119 systemd_gpt_auto_generator_LDADD = \
3120 libsystemd-shared.la \
3121 $(BLKID_LIBS)
3122
3123 systemd_gpt_auto_generator_CFLAGS = \
3124 $(AM_CFLAGS) \
3125 $(BLKID_CFLAGS)
3126 endif
3127
3128 # ------------------------------------------------------------------------------
3129 dist_xinitrc_SCRIPTS = \
3130 xorg/50-systemd-user.sh
3131
3132 # ------------------------------------------------------------------------------
3133 systemd_sysv_generator_SOURCES = \
3134 src/sysv-generator/sysv-generator.c
3135
3136 systemd_sysv_generator_LDADD = \
3137 libcore.la
3138
3139 # ------------------------------------------------------------------------------
3140 systemd_rc_local_generator_SOURCES = \
3141 src/rc-local-generator/rc-local-generator.c
3142
3143 systemd_rc_local_generator_LDADD = \
3144 libsystemd-shared.la
3145
3146 # ------------------------------------------------------------------------------
3147 systemd_remount_fs_SOURCES = \
3148 src/remount-fs/remount-fs.c \
3149 src/core/mount-setup.c \
3150 src/core/mount-setup.h
3151
3152 systemd_remount_fs_LDADD = \
3153 libsystemd-shared.la
3154
3155 # ------------------------------------------------------------------------------
3156 systemd_volatile_root_SOURCES = \
3157 src/volatile-root/volatile-root.c
3158
3159 systemd_volatile_root_LDADD = \
3160 libsystemd-shared.la
3161
3162 # ------------------------------------------------------------------------------
3163 systemd_cgroups_agent_SOURCES = \
3164 src/cgroups-agent/cgroups-agent.c
3165
3166 systemd_cgroups_agent_LDADD = \
3167 libsystemd-shared.la
3168
3169 # ------------------------------------------------------------------------------
3170 systemd_escape_SOURCES = \
3171 src/escape/escape.c
3172
3173 systemd_escape_LDADD = \
3174 libsystemd-shared.la
3175
3176 # -----------------------------------------------------------------------------
3177 systemctl_SOURCES = \
3178 src/systemctl/systemctl.c
3179
3180 systemctl_LDADD = \
3181 libsystemd-shared.la
3182
3183 # ------------------------------------------------------------------------------
3184 systemd_notify_SOURCES = \
3185 src/notify/notify.c
3186
3187 systemd_notify_LDADD = \
3188 libsystemd-shared.la
3189
3190 # ------------------------------------------------------------------------------
3191 systemd_dissect_SOURCES = \
3192 src/dissect/dissect.c
3193
3194 systemd_dissect_LDADD = \
3195 libsystemd-shared.la
3196
3197 # ------------------------------------------------------------------------------
3198 systemd_path_SOURCES = \
3199 src/path/path.c
3200
3201 systemd_path_LDADD = \
3202 libsystemd-shared.la
3203
3204 # ------------------------------------------------------------------------------
3205 systemd_ask_password_SOURCES = \
3206 src/ask-password/ask-password.c
3207
3208 systemd_ask_password_LDADD = \
3209 libsystemd-shared.la
3210
3211 # ------------------------------------------------------------------------------
3212 systemd_reply_password_SOURCES = \
3213 src/reply-password/reply-password.c
3214
3215 systemd_reply_password_LDADD = \
3216 libsystemd-shared.la
3217
3218 # ------------------------------------------------------------------------------
3219 systemd_cgls_SOURCES = \
3220 src/cgls/cgls.c
3221
3222 systemd_cgls_LDADD = \
3223 libsystemd-shared.la
3224
3225 # ------------------------------------------------------------------------------
3226 systemd_cgtop_SOURCES = \
3227 src/cgtop/cgtop.c
3228
3229 systemd_cgtop_LDADD = \
3230 libsystemd-shared.la
3231
3232 # ------------------------------------------------------------------------------
3233 systemd_nspawn_SOURCES = \
3234 src/nspawn/nspawn.c \
3235 src/nspawn/nspawn-settings.c \
3236 src/nspawn/nspawn-settings.h \
3237 src/nspawn/nspawn-mount.c \
3238 src/nspawn/nspawn-mount.h \
3239 src/nspawn/nspawn-network.c \
3240 src/nspawn/nspawn-network.h \
3241 src/nspawn/nspawn-expose-ports.c \
3242 src/nspawn/nspawn-expose-ports.h \
3243 src/nspawn/nspawn-cgroup.c \
3244 src/nspawn/nspawn-cgroup.h \
3245 src/nspawn/nspawn-seccomp.c \
3246 src/nspawn/nspawn-seccomp.h \
3247 src/nspawn/nspawn-register.c \
3248 src/nspawn/nspawn-register.h \
3249 src/nspawn/nspawn-setuid.c \
3250 src/nspawn/nspawn-setuid.h \
3251 src/nspawn/nspawn-stub-pid1.c \
3252 src/nspawn/nspawn-stub-pid1.h \
3253 src/nspawn/nspawn-patch-uid.c \
3254 src/nspawn/nspawn-patch-uid.h \
3255 src/core/mount-setup.c \
3256 src/core/mount-setup.h \
3257 src/core/loopback-setup.c \
3258 src/core/loopback-setup.h
3259
3260 nodist_systemd_nspawn_SOURCES = \
3261 src/nspawn/nspawn-gperf.c
3262
3263 gperf_gperf_sources += \
3264 src/nspawn/nspawn-gperf.gperf
3265
3266 systemd_nspawn_CFLAGS = \
3267 $(AM_CFLAGS) \
3268 $(ACL_CFLAGS) \
3269 $(BLKID_CFLAGS) \
3270 $(SECCOMP_CFLAGS) \
3271 $(SELINUX_CFLAGS)
3272
3273 systemd_nspawn_LDADD = \
3274 libsystemd-shared.la \
3275 $(ACL_LIBS) \
3276 $(BLKID_LIBS) \
3277 $(SECCOMP_LIBS) \
3278 $(SELINUX_LIBS)
3279
3280 if HAVE_LIBIPTC
3281 systemd_nspawn_LDADD += \
3282 libfirewall.la
3283 endif
3284
3285 test_patch_uid_SOURCES = \
3286 src/nspawn/nspawn-patch-uid.c \
3287 src/nspawn/nspawn-patch-uid.h \
3288 src/nspawn/test-patch-uid.c
3289
3290 test_patch_uid_CFLAGS = \
3291 $(AM_CFLAGS) \
3292 $(ACL_CFLAGS)
3293
3294 test_patch_uid_LDADD = \
3295 libsystemd-shared.la \
3296 $(ACL_LIBS)
3297
3298 manual_tests += \
3299 test-patch-uid
3300
3301 # ------------------------------------------------------------------------------
3302 systemd_run_SOURCES = \
3303 src/run/run.c
3304
3305 systemd_run_LDADD = \
3306 libsystemd-shared.la
3307
3308 # ------------------------------------------------------------------------------
3309 systemd_mount_SOURCES = \
3310 src/mount/mount-tool.c
3311
3312 systemd_mount_LDADD = \
3313 libsystemd-shared.la
3314
3315 # ------------------------------------------------------------------------------
3316 systemd_stdio_bridge_SOURCES = \
3317 src/stdio-bridge/stdio-bridge.c
3318
3319 systemd_stdio_bridge_LDADD = \
3320 libsystemd-shared.la
3321
3322 # ------------------------------------------------------------------------------
3323 systemd_tty_ask_password_agent_SOURCES = \
3324 src/tty-ask-password-agent/tty-ask-password-agent.c
3325
3326 systemd_tty_ask_password_agent_LDADD = \
3327 libsystemd-shared.la
3328
3329 # ------------------------------------------------------------------------------
3330 libsystemd_internal_la_SOURCES = \
3331 src/systemd/sd-bus.h \
3332 src/systemd/sd-bus-protocol.h \
3333 src/systemd/sd-bus-vtable.h \
3334 src/systemd/sd-utf8.h \
3335 src/systemd/sd-event.h \
3336 src/systemd/sd-netlink.h \
3337 src/systemd/sd-resolve.h \
3338 src/systemd/sd-login.h \
3339 src/systemd/sd-id128.h \
3340 src/systemd/sd-daemon.h \
3341 src/systemd/sd-path.h \
3342 src/systemd/sd-network.h \
3343 src/systemd/sd-hwdb.h \
3344 src/systemd/sd-device.h \
3345 src/libsystemd/libsystemd.sym \
3346 src/libsystemd/sd-bus/sd-bus.c \
3347 src/libsystemd/sd-bus/bus-control.c \
3348 src/libsystemd/sd-bus/bus-control.h \
3349 src/libsystemd/sd-bus/bus-error.c \
3350 src/libsystemd/sd-bus/bus-error.h \
3351 src/libsystemd/sd-bus/bus-common-errors.h \
3352 src/libsystemd/sd-bus/bus-common-errors.c \
3353 src/libsystemd/sd-bus/bus-internal.c \
3354 src/libsystemd/sd-bus/bus-internal.h \
3355 src/libsystemd/sd-bus/bus-socket.c \
3356 src/libsystemd/sd-bus/bus-socket.h \
3357 src/libsystemd/sd-bus/bus-kernel.c \
3358 src/libsystemd/sd-bus/bus-kernel.h \
3359 src/libsystemd/sd-bus/bus-container.c \
3360 src/libsystemd/sd-bus/bus-container.h \
3361 src/libsystemd/sd-bus/bus-message.c \
3362 src/libsystemd/sd-bus/bus-message.h \
3363 src/libsystemd/sd-bus/bus-creds.c \
3364 src/libsystemd/sd-bus/bus-creds.h \
3365 src/libsystemd/sd-bus/bus-signature.c \
3366 src/libsystemd/sd-bus/bus-signature.h \
3367 src/libsystemd/sd-bus/bus-type.c \
3368 src/libsystemd/sd-bus/bus-type.h \
3369 src/libsystemd/sd-bus/bus-match.c \
3370 src/libsystemd/sd-bus/bus-match.h \
3371 src/libsystemd/sd-bus/bus-bloom.c \
3372 src/libsystemd/sd-bus/bus-bloom.h \
3373 src/libsystemd/sd-bus/bus-introspect.c \
3374 src/libsystemd/sd-bus/bus-introspect.h \
3375 src/libsystemd/sd-bus/bus-objects.c \
3376 src/libsystemd/sd-bus/bus-objects.h \
3377 src/libsystemd/sd-bus/bus-gvariant.c \
3378 src/libsystemd/sd-bus/bus-gvariant.h \
3379 src/libsystemd/sd-bus/bus-convenience.c \
3380 src/libsystemd/sd-bus/bus-track.c \
3381 src/libsystemd/sd-bus/bus-track.h \
3382 src/libsystemd/sd-bus/bus-slot.c \
3383 src/libsystemd/sd-bus/bus-slot.h \
3384 src/libsystemd/sd-bus/bus-protocol.h \
3385 src/libsystemd/sd-bus/kdbus.h \
3386 src/libsystemd/sd-bus/bus-dump.c \
3387 src/libsystemd/sd-bus/bus-dump.h \
3388 src/libsystemd/sd-utf8/sd-utf8.c \
3389 src/libsystemd/sd-event/sd-event.c \
3390 src/libsystemd/sd-netlink/sd-netlink.c \
3391 src/libsystemd/sd-netlink/netlink-internal.h \
3392 src/libsystemd/sd-netlink/netlink-message.c \
3393 src/libsystemd/sd-netlink/netlink-socket.c \
3394 src/libsystemd/sd-netlink/rtnl-message.c \
3395 src/libsystemd/sd-netlink/netlink-types.h \
3396 src/libsystemd/sd-netlink/netlink-types.c \
3397 src/libsystemd/sd-netlink/netlink-util.h \
3398 src/libsystemd/sd-netlink/netlink-util.c \
3399 src/libsystemd/sd-netlink/local-addresses.h \
3400 src/libsystemd/sd-netlink/local-addresses.c \
3401 src/libsystemd/sd-id128/sd-id128.c \
3402 src/libsystemd/sd-id128/id128-util.h \
3403 src/libsystemd/sd-id128/id128-util.c \
3404 src/libsystemd/sd-daemon/sd-daemon.c \
3405 src/libsystemd/sd-login/sd-login.c \
3406 src/libsystemd/sd-path/sd-path.c \
3407 src/libsystemd/sd-network/sd-network.c \
3408 src/libsystemd/sd-network/network-util.h \
3409 src/libsystemd/sd-network/network-util.c \
3410 src/libsystemd/sd-hwdb/sd-hwdb.c \
3411 src/libsystemd/sd-hwdb/hwdb-util.h \
3412 src/libsystemd/sd-hwdb/hwdb-internal.h \
3413 src/libsystemd/sd-device/device-internal.h \
3414 src/libsystemd/sd-device/device-util.h \
3415 src/libsystemd/sd-device/device-enumerator.c \
3416 src/libsystemd/sd-device/device-enumerator-private.h \
3417 src/libsystemd/sd-device/sd-device.c \
3418 src/libsystemd/sd-device/device-private.c \
3419 src/libsystemd/sd-device/device-private.h \
3420 src/libsystemd/sd-resolve/sd-resolve.c
3421
3422 libsystemd_internal_la_LIBADD = \
3423 -lresolv
3424
3425 noinst_LTLIBRARIES += \
3426 libsystemd-internal.la
3427
3428 EXTRA_DIST += \
3429 src/libsystemd/libsystemd.pc.in \
3430 src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
3431
3432 libsystemd_la_SOURCES =
3433
3434 libsystemd_la_LDFLAGS = \
3435 $(AM_LDFLAGS) \
3436 -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
3437 -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
3438
3439 libsystemd_la_LIBADD = \
3440 libsystemd-internal.la \
3441 libbasic.la \
3442 libsystemd-journal-internal.la
3443
3444 pkgconfiglib_DATA += \
3445 src/libsystemd/libsystemd.pc
3446
3447 pkginclude_HEADERS += \
3448 src/systemd/sd-bus.h \
3449 src/systemd/sd-bus-protocol.h \
3450 src/systemd/sd-bus-vtable.h \
3451 src/systemd/sd-event.h \
3452 src/systemd/sd-login.h \
3453 src/systemd/sd-id128.h \
3454 src/systemd/sd-daemon.h
3455
3456 rootlib_LTLIBRARIES += \
3457 libsystemd.la
3458
3459 tests += \
3460 test-bus-marshal \
3461 test-bus-signature \
3462 test-bus-benchmark \
3463 test-bus-chat \
3464 test-bus-cleanup \
3465 test-bus-server \
3466 test-bus-match \
3467 test-bus-kernel \
3468 test-bus-kernel-bloom \
3469 test-bus-zero-copy \
3470 test-bus-introspect \
3471 test-bus-objects \
3472 test-bus-vtable \
3473 test-bus-error \
3474 test-bus-creds \
3475 test-bus-gvariant \
3476 test-bus-track \
3477 test-event \
3478 test-netlink \
3479 test-local-addresses \
3480 test-resolve
3481
3482 bin_PROGRAMS += \
3483 busctl
3484
3485 test_bus_marshal_SOURCES = \
3486 src/libsystemd/sd-bus/test-bus-marshal.c
3487
3488 test_bus_marshal_LDADD = \
3489 libsystemd-shared.la \
3490 $(GLIB_LIBS) \
3491 $(DBUS_LIBS)
3492
3493 test_bus_marshal_CFLAGS = \
3494 $(AM_CFLAGS) \
3495 $(GLIB_CFLAGS) \
3496 $(DBUS_CFLAGS)
3497
3498 test_bus_signature_SOURCES = \
3499 src/libsystemd/sd-bus/test-bus-signature.c
3500
3501 test_bus_signature_LDADD = \
3502 libsystemd-shared.la
3503
3504 test_bus_chat_SOURCES = \
3505 src/libsystemd/sd-bus/test-bus-chat.c
3506
3507 test_bus_chat_LDADD = \
3508 libsystemd-shared.la
3509
3510 test_bus_cleanup_SOURCES = \
3511 src/libsystemd/sd-bus/test-bus-cleanup.c
3512
3513 test_bus_cleanup_CFLAGS = \
3514 $(AM_CFLAGS) \
3515 $(SECCOMP_CFLAGS)
3516
3517 test_bus_cleanup_LDADD = \
3518 libsystemd-shared.la
3519
3520 test_bus_track_SOURCES = \
3521 src/libsystemd/sd-bus/test-bus-track.c
3522
3523 test_bus_track_CFLAGS = \
3524 $(AM_CFLAGS) \
3525 $(SECCOMP_CFLAGS)
3526
3527 test_bus_track_LDADD = \
3528 libsystemd-shared.la
3529
3530 test_bus_server_SOURCES = \
3531 src/libsystemd/sd-bus/test-bus-server.c
3532
3533 test_bus_server_LDADD = \
3534 libsystemd-shared.la
3535
3536 test_bus_objects_SOURCES = \
3537 src/libsystemd/sd-bus/test-bus-objects.c
3538
3539 test_bus_objects_LDADD = \
3540 libsystemd-shared.la
3541
3542 test_bus_vtable_SOURCES = \
3543 src/libsystemd/sd-bus/test-bus-vtable.c
3544
3545 test_bus_vtable_LDADD = \
3546 libsystemd-shared.la
3547
3548 test_bus_error_SOURCES = \
3549 src/libsystemd/sd-bus/test-bus-error.c
3550
3551 # Link statically because this test uses BUS_ERROR_MAP_ELF_REGISTER
3552 test_bus_error_LDADD = \
3553 libshared.la
3554
3555 test_bus_gvariant_SOURCES = \
3556 src/libsystemd/sd-bus/test-bus-gvariant.c
3557
3558 test_bus_gvariant_LDADD = \
3559 libsystemd-shared.la \
3560 $(GLIB_LIBS)
3561
3562 test_bus_gvariant_CFLAGS = \
3563 $(AM_CFLAGS) \
3564 $(GLIB_CFLAGS)
3565
3566 test_bus_creds_SOURCES = \
3567 src/libsystemd/sd-bus/test-bus-creds.c
3568
3569 test_bus_creds_LDADD = \
3570 libsystemd-shared.la
3571
3572 test_bus_match_SOURCES = \
3573 src/libsystemd/sd-bus/test-bus-match.c
3574
3575 test_bus_match_LDADD = \
3576 libsystemd-shared.la
3577
3578 test_bus_kernel_SOURCES = \
3579 src/libsystemd/sd-bus/test-bus-kernel.c
3580
3581 test_bus_kernel_LDADD = \
3582 libsystemd-shared.la
3583
3584 test_bus_kernel_bloom_SOURCES = \
3585 src/libsystemd/sd-bus/test-bus-kernel-bloom.c
3586
3587 test_bus_kernel_bloom_LDADD = \
3588 libsystemd-shared.la
3589
3590 test_bus_benchmark_SOURCES = \
3591 src/libsystemd/sd-bus/test-bus-benchmark.c
3592
3593 test_bus_benchmark_LDADD = \
3594 libsystemd-shared.la
3595
3596 test_bus_zero_copy_SOURCES = \
3597 src/libsystemd/sd-bus/test-bus-zero-copy.c
3598
3599 test_bus_zero_copy_LDADD = \
3600 libsystemd-shared.la
3601
3602 test_bus_introspect_SOURCES = \
3603 src/libsystemd/sd-bus/test-bus-introspect.c
3604
3605 test_bus_introspect_LDADD = \
3606 libsystemd-shared.la
3607
3608 test_event_SOURCES = \
3609 src/libsystemd/sd-event/test-event.c
3610
3611 test_event_LDADD = \
3612 libsystemd-shared.la
3613
3614 test_netlink_SOURCES = \
3615 src/libsystemd/sd-netlink/test-netlink.c
3616
3617 test_netlink_LDADD = \
3618 libsystemd-shared.la
3619
3620 test_local_addresses_SOURCES = \
3621 src/libsystemd/sd-netlink/test-local-addresses.c
3622
3623 test_local_addresses_LDADD = \
3624 libsystemd-shared.la
3625
3626 test_resolve_SOURCES = \
3627 src/libsystemd/sd-resolve/test-resolve.c
3628
3629 test_resolve_LDADD = \
3630 libsystemd-shared.la
3631
3632 busctl_SOURCES = \
3633 src/busctl/busctl.c \
3634 src/busctl/busctl-introspect.c \
3635 src/busctl/busctl-introspect.h
3636
3637 busctl_LDADD = \
3638 libsystemd-shared.la
3639
3640 # ------------------------------------------------------------------------------
3641 noinst_LTLIBRARIES += \
3642 libsystemd-network.la
3643
3644 libsystemd_network_la_CFLAGS = \
3645 $(AM_CFLAGS) \
3646 $(KMOD_CFLAGS)
3647
3648 libsystemd_network_la_SOURCES = \
3649 src/systemd/sd-dhcp-client.h \
3650 src/systemd/sd-dhcp-server.h \
3651 src/systemd/sd-dhcp-lease.h \
3652 src/systemd/sd-ipv4ll.h \
3653 src/systemd/sd-ipv4acd.h \
3654 src/systemd/sd-ndisc.h \
3655 src/systemd/sd-radv.h \
3656 src/systemd/sd-dhcp6-client.h \
3657 src/systemd/sd-dhcp6-lease.h \
3658 src/systemd/sd-lldp.h \
3659 src/libsystemd-network/sd-dhcp-client.c \
3660 src/libsystemd-network/sd-dhcp-server.c \
3661 src/libsystemd-network/dhcp-network.c \
3662 src/libsystemd-network/dhcp-option.c \
3663 src/libsystemd-network/dhcp-packet.c \
3664 src/libsystemd-network/dhcp-internal.h \
3665 src/libsystemd-network/dhcp-server-internal.h \
3666 src/libsystemd-network/dhcp-protocol.h \
3667 src/libsystemd-network/dhcp-lease-internal.h \
3668 src/libsystemd-network/sd-dhcp-lease.c \
3669 src/libsystemd-network/sd-ipv4ll.c \
3670 src/libsystemd-network/sd-ipv4acd.c \
3671 src/libsystemd-network/arp-util.h \
3672 src/libsystemd-network/arp-util.c \
3673 src/libsystemd-network/network-internal.c \
3674 src/libsystemd-network/network-internal.h \
3675 src/libsystemd-network/sd-ndisc.c \
3676 src/libsystemd-network/ndisc-internal.h \
3677 src/libsystemd-network/ndisc-router.h \
3678 src/libsystemd-network/ndisc-router.c \
3679 src/libsystemd-network/sd-radv.c \
3680 src/libsystemd-network/radv-internal.h \
3681 src/libsystemd-network/icmp6-util.h \
3682 src/libsystemd-network/icmp6-util.c \
3683 src/libsystemd-network/sd-dhcp6-client.c \
3684 src/libsystemd-network/dhcp6-internal.h \
3685 src/libsystemd-network/dhcp6-protocol.h \
3686 src/libsystemd-network/dhcp6-network.c \
3687 src/libsystemd-network/dhcp6-option.c \
3688 src/libsystemd-network/dhcp6-lease-internal.h \
3689 src/libsystemd-network/sd-dhcp6-lease.c \
3690 src/libsystemd-network/dhcp-identifier.h \
3691 src/libsystemd-network/dhcp-identifier.c \
3692 src/libsystemd-network/lldp-internal.h \
3693 src/libsystemd-network/lldp-network.h \
3694 src/libsystemd-network/lldp-network.c \
3695 src/libsystemd-network/lldp-neighbor.h \
3696 src/libsystemd-network/lldp-neighbor.c \
3697 src/libsystemd-network/sd-lldp.c
3698
3699 libsystemd_network_la_LIBADD = \
3700 $(KMOD_LIBS)
3701
3702 test_dhcp_option_SOURCES = \
3703 src/libsystemd-network/dhcp-protocol.h \
3704 src/libsystemd-network/dhcp-internal.h \
3705 src/libsystemd-network/test-dhcp-option.c
3706
3707 test_dhcp_option_LDADD = \
3708 libsystemd-network.la \
3709 libsystemd-shared.la
3710
3711 test_sd_dhcp_lease_SOURCES = \
3712 src/libsystemd-network/dhcp-lease-internal.h \
3713 src/libsystemd-network/test-sd-dhcp-lease.c
3714
3715 test_sd_dhcp_lease_LDADD = \
3716 libsystemd-network.la \
3717 libsystemd-shared.la
3718
3719 test_dhcp_client_SOURCES = \
3720 src/systemd/sd-dhcp-client.h \
3721 src/libsystemd-network/dhcp-protocol.h \
3722 src/libsystemd-network/dhcp-internal.h \
3723 src/libsystemd-network/test-dhcp-client.c
3724
3725 test_dhcp_client_LDADD = \
3726 libsystemd-network.la \
3727 libsystemd-shared.la
3728
3729 test_dhcp_server_SOURCES = \
3730 src/libsystemd-network/test-dhcp-server.c
3731
3732 test_dhcp_server_LDADD = \
3733 libsystemd-network.la \
3734 libsystemd-shared.la
3735
3736 test_ipv4ll_SOURCES = \
3737 src/systemd/sd-ipv4ll.h \
3738 src/libsystemd-network/arp-util.h \
3739 src/libsystemd-network/test-ipv4ll.c
3740
3741 test_ipv4ll_LDADD = \
3742 libsystemd-network.la \
3743 libsystemd-shared.la
3744
3745 test_ipv4ll_manual_SOURCES = \
3746 src/systemd/sd-ipv4ll.h \
3747 src/libsystemd-network/test-ipv4ll-manual.c
3748
3749 test_ipv4ll_manual_LDADD = \
3750 libsystemd-network.la \
3751 libsystemd-shared.la
3752
3753 test_acd_SOURCES = \
3754 src/systemd/sd-ipv4acd.h \
3755 src/libsystemd-network/test-acd.c
3756
3757 test_acd_LDADD = \
3758 libsystemd-network.la \
3759 libsystemd-shared.la
3760
3761 test_ndisc_rs_SOURCES = \
3762 src/systemd/sd-dhcp6-client.h \
3763 src/systemd/sd-ndisc.h \
3764 src/libsystemd-network/icmp6-util.h \
3765 src/libsystemd-network/test-ndisc-rs.c \
3766 src/libsystemd-network/dhcp-identifier.h \
3767 src/libsystemd-network/dhcp-identifier.c
3768
3769 test_ndisc_rs_LDADD = \
3770 libsystemd-network.la \
3771 libudev.la \
3772 libsystemd-shared.la
3773
3774 test_ndisc_ra_SOURCES = \
3775 src/systemd/sd-ndisc.h \
3776 src/libsystemd-network/icmp6-util.h \
3777 src/libsystemd-network/test-ndisc-ra.c
3778
3779 test_ndisc_ra_LDADD = \
3780 libsystemd-network.la \
3781 libudev.la \
3782 libsystemd-shared.la
3783
3784 test_dhcp6_client_SOURCES = \
3785 src/systemd/sd-dhcp6-client.h \
3786 src/libsystemd-network/dhcp6-internal.h \
3787 src/libsystemd-network/test-dhcp6-client.c \
3788 src/libsystemd-network/dhcp-identifier.h \
3789 src/libsystemd-network/dhcp-identifier.c
3790
3791 test_dhcp6_client_LDADD = \
3792 libsystemd-network.la \
3793 libudev.la \
3794 libsystemd-shared.la
3795
3796 test_lldp_SOURCES = \
3797 src/libsystemd-network/test-lldp.c
3798
3799 test_lldp_LDADD = \
3800 libsystemd-network.la \
3801 libsystemd-shared.la
3802
3803 tests += \
3804 test-dhcp-option \
3805 test-dhcp-client \
3806 test-dhcp-server \
3807 test-sd-dhcp-lease \
3808 test-ipv4ll \
3809 test-ndisc-rs \
3810 test-ndisc-ra \
3811 test-dhcp6-client \
3812 test-lldp
3813
3814 # ------------------------------------------------------------------------------
3815 include_HEADERS += \
3816 src/libudev/libudev.h
3817
3818 rootlib_LTLIBRARIES += \
3819 libudev.la
3820
3821 libudev_la_SOURCES =\
3822 src/libudev/libudev.sym \
3823 src/libudev/libudev-private.h \
3824 src/libudev/libudev-device-internal.h \
3825 src/libudev/libudev.c \
3826 src/libudev/libudev-list.c \
3827 src/libudev/libudev-util.c \
3828 src/libudev/libudev-device.c \
3829 src/libudev/libudev-device-private.c \
3830 src/libudev/libudev-enumerate.c \
3831 src/libudev/libudev-monitor.c \
3832 src/libudev/libudev-queue.c \
3833 src/libudev/libudev-hwdb.c
3834
3835 libudev_la_LDFLAGS = \
3836 $(AM_LDFLAGS) \
3837 -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3838 -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3839
3840 libudev_la_LIBADD = \
3841 libsystemd-internal.la \
3842 libbasic.la
3843
3844 pkgconfiglib_DATA += \
3845 src/libudev/libudev.pc
3846
3847 EXTRA_DIST += \
3848 src/libudev/libudev.pc.in
3849
3850 # ------------------------------------------------------------------------------
3851 noinst_LTLIBRARIES += \
3852 libudev-internal.la
3853
3854 libudev_internal_la_SOURCES =\
3855 $(libudev_la_SOURCES)
3856
3857 # ------------------------------------------------------------------------------
3858 INSTALL_DIRS += \
3859 $(sysconfdir)/udev/rules.d
3860
3861 dist_network_DATA = \
3862 network/99-default.link \
3863 network/80-container-host0.network \
3864 network/80-container-ve.network \
3865 network/80-container-vz.network
3866
3867 dist_udevrules_DATA += \
3868 rules/60-block.rules \
3869 rules/60-drm.rules \
3870 rules/60-evdev.rules \
3871 rules/60-persistent-storage-tape.rules \
3872 rules/60-persistent-input.rules \
3873 rules/60-persistent-alsa.rules \
3874 rules/60-persistent-storage.rules \
3875 rules/60-sensor.rules \
3876 rules/60-serial.rules \
3877 rules/64-btrfs.rules \
3878 rules/70-mouse.rules \
3879 rules/70-touchpad.rules \
3880 rules/75-net-description.rules \
3881 rules/78-sound-card.rules \
3882 rules/80-net-setup-link.rules
3883
3884 nodist_udevrules_DATA += \
3885 rules/50-udev-default.rules \
3886 rules/99-systemd.rules
3887
3888 udevconfdir = $(sysconfdir)/udev
3889 dist_udevconf_DATA = \
3890 src/udev/udev.conf
3891
3892 pkgconfigdata_DATA += \
3893 src/udev/udev.pc
3894
3895 EXTRA_DIST += \
3896 rules/50-udev-default.rules.in \
3897 rules/99-systemd.rules.in \
3898 src/udev/udev.pc.in
3899
3900 EXTRA_DIST += \
3901 units/systemd-udevd.service.in \
3902 units/systemd-udev-trigger.service.in \
3903 units/systemd-udev-settle.service.in
3904
3905 SOCKETS_TARGET_WANTS += \
3906 systemd-udevd-control.socket \
3907 systemd-udevd-kernel.socket
3908
3909 SYSINIT_TARGET_WANTS += \
3910 systemd-udevd.service \
3911 systemd-udev-trigger.service
3912
3913 rootbin_PROGRAMS += \
3914 udevadm
3915
3916 rootlibexec_PROGRAMS += \
3917 systemd-udevd
3918
3919 noinst_LTLIBRARIES += \
3920 libudev-core.la
3921
3922 src/udev/keyboard-keys-list.txt:
3923 $(AM_V_at)$(MKDIR_P) $(dir $@)
3924 $(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 } }' > $@
3925
3926 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt
3927 $(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 }' < $< > $@
3928
3929 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3930 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3931
3932 gperf_txt_sources += \
3933 src/udev/keyboard-keys-list.txt
3934
3935 libudev_core_la_SOURCES = \
3936 src/udev/udev.h \
3937 src/udev/udev-event.c \
3938 src/udev/udev-watch.c \
3939 src/udev/udev-node.c \
3940 src/udev/udev-rules.c \
3941 src/udev/udev-ctrl.c \
3942 src/udev/udev-builtin.c \
3943 src/udev/udev-builtin-btrfs.c \
3944 src/udev/udev-builtin-hwdb.c \
3945 src/udev/udev-builtin-input_id.c \
3946 src/udev/udev-builtin-keyboard.c \
3947 src/udev/udev-builtin-net_id.c \
3948 src/udev/udev-builtin-net_setup_link.c \
3949 src/udev/udev-builtin-path_id.c \
3950 src/udev/udev-builtin-usb_id.c \
3951 src/udev/net/link-config.h \
3952 src/udev/net/link-config.c \
3953 src/udev/net/ethtool-util.h \
3954 src/udev/net/ethtool-util.c
3955
3956 nodist_libudev_core_la_SOURCES = \
3957 src/udev/keyboard-keys-from-name.h \
3958 src/udev/net/link-config-gperf.c
3959
3960 gperf_gperf_sources += \
3961 src/udev/net/link-config-gperf.gperf
3962
3963 libudev_core_la_CFLAGS = \
3964 $(AM_CFLAGS) \
3965 $(BLKID_CFLAGS) \
3966 $(KMOD_CFLAGS) \
3967 -DLOG_REALM=LOG_REALM_UDEV
3968
3969 libudev_core_la_LIBADD = \
3970 libsystemd-network.la \
3971 libshared.la \
3972 $(BLKID_LIBS) \
3973 $(KMOD_LIBS)
3974
3975 if HAVE_KMOD
3976 libudev_core_la_SOURCES += \
3977 src/udev/udev-builtin-kmod.c
3978
3979 dist_udevrules_DATA += \
3980 rules/80-drivers.rules
3981 endif
3982
3983 if HAVE_BLKID
3984 libudev_core_la_SOURCES += \
3985 src/udev/udev-builtin-blkid.c
3986 endif
3987
3988 if HAVE_ACL
3989 libudev_core_la_SOURCES += \
3990 src/udev/udev-builtin-uaccess.c \
3991 src/login/logind-acl.c \
3992 src/libsystemd/sd-login/sd-login.c \
3993 src/systemd/sd-login.h
3994 endif
3995
3996 systemd_udevd_SOURCES = \
3997 src/udev/udevd.c
3998
3999 systemd_udevd_CFLAGS = \
4000 $(AM_CFLAGS) \
4001 -DLOG_REALM=LOG_REALM_UDEV
4002
4003 systemd_udevd_LDADD = \
4004 libudev-core.la \
4005 libbasic.la
4006
4007 udevadm_SOURCES = \
4008 src/udev/udevadm.c \
4009 src/udev/udevadm-info.c \
4010 src/udev/udevadm-control.c \
4011 src/udev/udevadm-monitor.c \
4012 src/udev/udevadm-hwdb.c \
4013 src/udev/udevadm-settle.c \
4014 src/udev/udevadm-trigger.c \
4015 src/udev/udevadm-test.c \
4016 src/udev/udevadm-test-builtin.c \
4017 src/udev/udevadm-util.c \
4018 src/udev/udevadm-util.h
4019
4020 udevadm_LDADD = \
4021 libudev-core.la \
4022 libbasic.la
4023
4024 # ------------------------------------------------------------------------------
4025 if ENABLE_HWDB
4026 INSTALL_DIRS += \
4027 $(sysconfdir)/udev/hwdb.d
4028
4029 systemd_hwdb_SOURCES = \
4030 src/libsystemd/sd-hwdb/hwdb-internal.h \
4031 src/hwdb/hwdb.c
4032
4033 systemd_hwdb_LDADD = \
4034 libshared.la
4035
4036 rootbin_PROGRAMS += \
4037 systemd-hwdb
4038
4039 dist_udevhwdb_DATA = \
4040 hwdb/20-pci-vendor-model.hwdb \
4041 hwdb/20-pci-classes.hwdb \
4042 hwdb/20-usb-vendor-model.hwdb \
4043 hwdb/20-usb-classes.hwdb \
4044 hwdb/20-sdio-vendor-model.hwdb \
4045 hwdb/20-sdio-classes.hwdb \
4046 hwdb/20-bluetooth-vendor-product.hwdb \
4047 hwdb/20-acpi-vendor.hwdb \
4048 hwdb/20-OUI.hwdb \
4049 hwdb/20-net-ifname.hwdb \
4050 hwdb/60-evdev.hwdb \
4051 hwdb/60-keyboard.hwdb \
4052 hwdb/60-sensor.hwdb \
4053 hwdb/70-mouse.hwdb \
4054 hwdb/70-pointingstick.hwdb \
4055 hwdb/70-touchpad.hwdb
4056
4057 SYSINIT_TARGET_WANTS += \
4058 systemd-hwdb-update.service
4059
4060 # Update hwdb on installation. Do not bother if installing
4061 # in DESTDIR, since this is likely for packaging purposes.
4062 hwdb-update-hook:
4063 -test -n "$(DESTDIR)" || $(rootbindir)/systemd-hwdb update
4064
4065 INSTALL_DATA_HOOKS += \
4066 hwdb-update-hook
4067
4068 hwdb-remove-hook:
4069 -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
4070 endif
4071
4072 EXTRA_DIST += \
4073 units/systemd-hwdb-update.service.in \
4074 hwdb/ids-update.pl \
4075 hwdb/sdio.ids
4076
4077 # ------------------------------------------------------------------------------
4078 if ENABLE_TESTS
4079 TESTS += \
4080 test/udev-test.pl \
4081 test/hwdb-test.sh
4082
4083 if HAVE_PYTHON
4084 TESTS += \
4085 test/rule-syntax-check.py \
4086 hwdb/parse_hwdb.py
4087
4088 if HAVE_SYSV_COMPAT
4089 TESTS += \
4090 test/sysv-generator-test.py
4091 endif
4092 endif
4093 endif
4094
4095 tests += \
4096 test-libudev
4097
4098 manual_tests += \
4099 test-udev
4100
4101 test_libudev_SOURCES = \
4102 src/test/test-libudev.c
4103
4104 test_libudev_LDADD = \
4105 libsystemd-shared.la
4106
4107 test_udev_SOURCES = \
4108 src/test/test-udev.c
4109
4110 test_udev_LDADD = \
4111 libudev-core.la \
4112 libsystemd-shared.la \
4113 $(BLKID_LIBS) \
4114 $(KMOD_LIBS) \
4115 -lrt
4116
4117 if ENABLE_TESTS
4118 check_DATA += \
4119 test/sys
4120 endif
4121
4122 # sysfs test tree
4123 test/sys: test/sys-script.py
4124 -rm -rf $@
4125 $(AM_V_at)$(MKDIR_P) $(dir $@)
4126 $(AM_V_GEN)$(top_srcdir)/test/sys-script.py $(dir $@)
4127 -touch $@
4128
4129 test-sys-distclean:
4130 -rm -rf test/sys
4131 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
4132
4133 EXTRA_DIST += \
4134 test/sys-script.py \
4135 test/udev-test.pl \
4136 test/hwdb-test.sh \
4137 test/rule-syntax-check.py \
4138 test/sysv-generator-test.py \
4139 test/mocks/fsck \
4140 hwdb/parse_hwdb.py
4141
4142 # ------------------------------------------------------------------------------
4143 ata_id_SOURCES = \
4144 src/udev/ata_id/ata_id.c
4145
4146 ata_id_CFLAGS = \
4147 $(AM_CFLAGS) \
4148 -DLOG_REALM=LOG_REALM_UDEV
4149
4150 ata_id_LDADD = \
4151 libshared.la
4152
4153 udevlibexec_PROGRAMS += \
4154 ata_id
4155
4156 # ------------------------------------------------------------------------------
4157 cdrom_id_SOURCES = \
4158 src/udev/cdrom_id/cdrom_id.c
4159
4160 cdrom_id_CFLAGS = \
4161 $(AM_CFLAGS) \
4162 -DLOG_REALM=LOG_REALM_UDEV
4163
4164 cdrom_id_LDADD = \
4165 libshared.la
4166
4167 udevlibexec_PROGRAMS += \
4168 cdrom_id
4169
4170 dist_udevrules_DATA += \
4171 rules/60-cdrom_id.rules
4172
4173 # ------------------------------------------------------------------------------
4174 collect_SOURCES = \
4175 src/udev/collect/collect.c
4176
4177 collect_CFLAGS = \
4178 $(AM_CFLAGS) \
4179 -DLOG_REALM=LOG_REALM_UDEV
4180
4181 collect_LDADD = \
4182 libshared.la
4183
4184 udevlibexec_PROGRAMS += \
4185 collect
4186
4187 # ------------------------------------------------------------------------------
4188 scsi_id_SOURCES =\
4189 src/udev/scsi_id/scsi_id.c \
4190 src/udev/scsi_id/scsi_serial.c \
4191 src/udev/scsi_id/scsi.h \
4192 src/udev/scsi_id/scsi_id.h
4193
4194 scsi_id_CFLAGS = \
4195 $(AM_CFLAGS) \
4196 -DLOG_REALM=LOG_REALM_UDEV
4197
4198 scsi_id_LDADD = \
4199 libshared.la
4200
4201 udevlibexec_PROGRAMS += \
4202 scsi_id
4203
4204 EXTRA_DIST += \
4205 src/udev/scsi_id/README
4206
4207 # ------------------------------------------------------------------------------
4208 v4l_id_SOURCES = \
4209 src/udev/v4l_id/v4l_id.c
4210
4211 v4l_id_CFLAGS = \
4212 $(AM_CFLAGS) \
4213 -DLOG_REALM=LOG_REALM_UDEV
4214
4215 v4l_id_LDADD = \
4216 libshared.la
4217
4218 udevlibexec_PROGRAMS += \
4219 v4l_id
4220
4221 dist_udevrules_DATA += \
4222 rules/60-persistent-v4l.rules
4223
4224 # ------------------------------------------------------------------------------
4225 mtd_probe_SOURCES = \
4226 src/udev/mtd_probe/mtd_probe.c \
4227 src/udev/mtd_probe/mtd_probe.h \
4228 src/udev/mtd_probe/probe_smartmedia.c
4229
4230 mtd_probe_CFLAGS = \
4231 $(AM_CFLAGS) \
4232 -DLOG_REALM=LOG_REALM_UDEV
4233
4234 dist_udevrules_DATA += \
4235 rules/75-probe_mtd.rules
4236
4237 udevlibexec_PROGRAMS += \
4238 mtd_probe
4239
4240 # ------------------------------------------------------------------------------
4241 test_id128_SOURCES = \
4242 src/test/test-id128.c
4243
4244 test_id128_LDADD = \
4245 libsystemd-shared.la
4246
4247 tests += \
4248 test-id128
4249
4250 # ------------------------------------------------------------------------------
4251 test_hash_SOURCES = \
4252 src/test/test-hash.c
4253
4254 test_hash_LDADD = \
4255 libsystemd-shared.la
4256
4257 tests += \
4258 test-hash
4259
4260 # ------------------------------------------------------------------------------
4261
4262 bin_PROGRAMS += \
4263 systemd-socket-activate
4264
4265 systemd_socket_activate_SOURCES = \
4266 src/activate/activate.c
4267
4268 systemd_socket_activate_LDADD = \
4269 libsystemd-shared.la
4270
4271 # ------------------------------------------------------------------------------
4272 systemd_journald_SOURCES = \
4273 src/journal/journald.c \
4274 src/journal/journald-server.h
4275
4276 systemd_journald_LDADD = \
4277 libjournal-core.la \
4278 libsystemd-shared.la
4279
4280 systemd_cat_SOURCES = \
4281 src/journal/cat.c
4282
4283 systemd_cat_LDADD = \
4284 libjournal-core.la
4285
4286 if HAVE_LIBCURL
4287 rootlibexec_PROGRAMS += \
4288 systemd-journal-upload
4289
4290 systemd_journal_upload_SOURCES = \
4291 src/journal-remote/journal-upload.h \
4292 src/journal-remote/journal-upload.c \
4293 src/journal-remote/journal-upload-journal.c
4294
4295 systemd_journal_upload_CFLAGS = \
4296 $(AM_CFLAGS) \
4297 $(LIBCURL_CFLAGS)
4298
4299 systemd_journal_upload_LDADD = \
4300 libsystemd-shared.la \
4301 $(LIBCURL_LIBS)
4302
4303 nodist_systemunit_DATA += \
4304 units/systemd-journal-upload.service
4305
4306 nodist_pkgsysconf_DATA += \
4307 src/journal-remote/journal-upload.conf
4308 endif
4309
4310 EXTRA_DIST += \
4311 units/systemd-journal-upload.service.in \
4312 src/journal-remote/journal-upload.conf.in
4313
4314 if HAVE_MICROHTTPD
4315 rootlibexec_PROGRAMS += \
4316 systemd-journal-remote
4317
4318 systemd_journal_remote_SOURCES = \
4319 src/journal-remote/journal-remote-parse.h \
4320 src/journal-remote/journal-remote-parse.c \
4321 src/journal-remote/journal-remote-write.h \
4322 src/journal-remote/journal-remote-write.c \
4323 src/journal-remote/journal-remote.h \
4324 src/journal-remote/journal-remote.c
4325
4326 systemd_journal_remote_LDADD = \
4327 libjournal-core.la
4328
4329 systemd_journal_remote_SOURCES += \
4330 src/journal-remote/microhttpd-util.h \
4331 src/journal-remote/microhttpd-util.c
4332
4333 systemd_journal_remote_CFLAGS = \
4334 $(AM_CFLAGS) \
4335 $(MICROHTTPD_CFLAGS)
4336
4337 systemd_journal_remote_LDADD += \
4338 $(MICROHTTPD_LIBS)
4339
4340 if HAVE_GNUTLS
4341 systemd_journal_remote_LDADD += \
4342 $(GNUTLS_LIBS)
4343 endif
4344
4345 # systemd-journal-remote make sense mostly with full crypto stack
4346 dist_systemunit_DATA += \
4347 units/systemd-journal-remote.socket
4348
4349 nodist_systemunit_DATA += \
4350 units/systemd-journal-remote.service
4351
4352 journal-remote-install-hook: journal-install-hook
4353 -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
4354 -chown 0:0 $(DESTDIR)/var/log/journal/remote
4355 -chmod 755 $(DESTDIR)/var/log/journal/remote
4356
4357 INSTALL_EXEC_HOOKS += journal-remote-install-hook
4358
4359 nodist_pkgsysconf_DATA += \
4360 src/journal-remote/journal-remote.conf
4361
4362 EXTRA_DIST += \
4363 units/systemd-journal-remote.service.in \
4364 src/journal-remote/journal-remote.conf.in \
4365 src/journal-remote/log-generator.py
4366 endif
4367
4368 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4369 journalctl_CFLAGS = \
4370 $(AM_CFLAGS)
4371
4372 journalctl_SOURCES = \
4373 src/journal/journalctl.c
4374
4375 journalctl_LDADD = \
4376 libsystemd-shared.la \
4377 libudev-core.la
4378
4379 if HAVE_QRENCODE
4380 journalctl_SOURCES += \
4381 src/journal/journal-qrcode.c \
4382 src/journal/journal-qrcode.h
4383
4384 journalctl_CFLAGS += \
4385 $(QRENCODE_CFLAGS)
4386
4387 journalctl_LDADD += \
4388 $(QRENCODE_LIBS)
4389 endif
4390
4391 test_journal_SOURCES = \
4392 src/journal/test-journal.c
4393
4394 test_journal_LDADD = \
4395 libjournal-core.la
4396
4397 test_journal_send_SOURCES = \
4398 src/journal/test-journal-send.c
4399
4400 test_journal_send_LDADD = \
4401 libjournal-core.la
4402
4403 test_journal_syslog_SOURCES = \
4404 src/journal/test-journal-syslog.c
4405
4406 test_journal_syslog_LDADD = \
4407 libjournal-core.la
4408
4409 test_journal_match_SOURCES = \
4410 src/journal/test-journal-match.c
4411
4412 test_journal_match_LDADD = \
4413 libjournal-core.la
4414
4415 test_journal_enum_SOURCES = \
4416 src/journal/test-journal-enum.c
4417
4418 test_journal_enum_LDADD = \
4419 libjournal-core.la
4420
4421 test_journal_stream_SOURCES = \
4422 src/journal/test-journal-stream.c
4423
4424 test_journal_stream_LDADD = \
4425 libjournal-core.la
4426
4427 test_journal_flush_SOURCES = \
4428 src/journal/test-journal-flush.c
4429
4430 test_journal_flush_LDADD = \
4431 libjournal-core.la
4432
4433 test_journal_init_SOURCES = \
4434 src/journal/test-journal-init.c
4435
4436 test_journal_init_LDADD = \
4437 libjournal-core.la
4438
4439 test_journal_verify_SOURCES = \
4440 src/journal/test-journal-verify.c
4441
4442 test_journal_verify_LDADD = \
4443 libjournal-core.la
4444
4445 test_journal_interleaving_SOURCES = \
4446 src/journal/test-journal-interleaving.c
4447
4448 test_journal_interleaving_LDADD = \
4449 libjournal-core.la
4450
4451 test_mmap_cache_SOURCES = \
4452 src/journal/test-mmap-cache.c
4453
4454 test_mmap_cache_LDADD = \
4455 libjournal-core.la
4456
4457 test_catalog_SOURCES = \
4458 src/journal/test-catalog.c
4459
4460 test_catalog_CPPFLAGS = \
4461 $(AM_CPPFLAGS) \
4462 -DCATALOG_DIR=\"$(abs_top_builddir)/catalog\"
4463
4464 test_catalog_LDADD = \
4465 libjournal-core.la
4466
4467 test_compress_SOURCES = \
4468 src/journal/test-compress.c
4469
4470 test_compress_LDADD = \
4471 libsystemd-shared.la
4472
4473 if HAVE_LZ4
4474 test_compress_LDADD += \
4475 -llz4
4476 endif
4477
4478 test_compress_benchmark_SOURCES = \
4479 src/journal/test-compress-benchmark.c
4480
4481 test_compress_benchmark_LDADD = \
4482 libsystemd-shared.la
4483
4484 test_audit_type_SOURCES = \
4485 src/journal/test-audit-type.c
4486
4487 test_audit_type_LDADD = \
4488 libjournal-core.la
4489
4490 libjournal_core_la_SOURCES = \
4491 src/journal/journald-kmsg.c \
4492 src/journal/journald-kmsg.h \
4493 src/journal/journald-syslog.c \
4494 src/journal/journald-syslog.h \
4495 src/journal/journald-stream.c \
4496 src/journal/journald-stream.h \
4497 src/journal/journald-server.c \
4498 src/journal/journald-server.h \
4499 src/journal/journald-console.c \
4500 src/journal/journald-console.h \
4501 src/journal/journald-wall.c \
4502 src/journal/journald-wall.h \
4503 src/journal/journald-native.c \
4504 src/journal/journald-native.h \
4505 src/journal/journald-audit.c \
4506 src/journal/journald-audit.h \
4507 src/journal/journald-rate-limit.c \
4508 src/journal/journald-rate-limit.h \
4509 src/journal/journal-internal.h
4510
4511 nodist_libjournal_core_la_SOURCES = \
4512 src/journal/journald-gperf.c
4513
4514 libjournal_core_la_LIBADD = \
4515 libsystemd-shared.la
4516
4517 noinst_LTLIBRARIES += \
4518 libjournal-core.la
4519
4520 journal-install-hook:
4521 -$(MKDIR_P) $(DESTDIR)/var/log/journal
4522 -chown 0:0 $(DESTDIR)/var/log/journal
4523 -chmod 755 $(DESTDIR)/var/log/journal
4524 -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4525 -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4526
4527 journal-uninstall-hook:
4528 -rmdir $(DESTDIR)/var/log/journal/remote
4529 -rmdir $(DESTDIR)/var/log/journal/
4530
4531 INSTALL_EXEC_HOOKS += journal-install-hook
4532 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4533
4534 # ------------------------------------------------------------------------------
4535 # Update catalog on installation. Do not bother if installing
4536 # in DESTDIR, since this is likely for packaging purposes.
4537 catalog-update-hook:
4538 -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4539
4540 INSTALL_DATA_HOOKS += \
4541 catalog-update-hook
4542
4543 catalog-remove-hook:
4544 -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4545
4546 UNINSTALL_DATA_HOOKS += \
4547 catalog-remove-hook
4548
4549 tests += \
4550 test-journal \
4551 test-journal-enum \
4552 test-journal-send \
4553 test-journal-syslog \
4554 test-journal-match \
4555 test-journal-stream \
4556 test-journal-init \
4557 test-journal-verify \
4558 test-journal-interleaving \
4559 test-journal-flush \
4560 test-mmap-cache \
4561 test-catalog \
4562 test-audit-type
4563
4564 if HAVE_COMPRESSION
4565 tests += \
4566 test-compress \
4567 test-compress-benchmark
4568 endif
4569
4570 pkginclude_HEADERS += \
4571 src/systemd/sd-journal.h \
4572 src/systemd/sd-messages.h \
4573 src/systemd/_sd-common.h
4574
4575 libsystemd_journal_internal_la_SOURCES = \
4576 src/journal/sd-journal.c \
4577 src/systemd/sd-journal.h \
4578 src/systemd/_sd-common.h \
4579 src/journal/journal-file.c \
4580 src/journal/journal-file.h \
4581 src/journal/journal-vacuum.c \
4582 src/journal/journal-vacuum.h \
4583 src/journal/journal-verify.c \
4584 src/journal/journal-verify.h \
4585 src/journal/lookup3.c \
4586 src/journal/lookup3.h \
4587 src/journal/journal-send.c \
4588 src/journal/journal-def.h \
4589 src/journal/compress.h \
4590 src/journal/catalog.c \
4591 src/journal/catalog.h \
4592 src/journal/mmap-cache.c \
4593 src/journal/mmap-cache.h \
4594 src/journal/compress.c \
4595 src/journal/audit-type.h \
4596 src/journal/audit-type.c \
4597 src/shared/gcrypt-util.h \
4598 src/shared/gcrypt-util.c
4599
4600 nodist_libsystemd_journal_internal_la_SOURCES = \
4601 src/journal/audit_type-to-name.h
4602
4603 gperf_txt_sources += \
4604 src/journal/audit_type-list.txt
4605
4606 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4607 libsystemd_journal_internal_la_CFLAGS = \
4608 $(AM_CFLAGS)
4609
4610 libsystemd_journal_internal_la_LIBADD =
4611
4612 if HAVE_XZ
4613 libsystemd_journal_internal_la_CFLAGS += \
4614 $(XZ_CFLAGS)
4615
4616 libsystemd_journal_internal_la_LIBADD += \
4617 $(XZ_LIBS)
4618 endif
4619
4620 if HAVE_LZ4
4621 libsystemd_journal_internal_la_LIBADD += \
4622 -llz4
4623 endif
4624
4625 if HAVE_GCRYPT
4626 libsystemd_journal_internal_la_SOURCES += \
4627 src/journal/journal-authenticate.c \
4628 src/journal/journal-authenticate.h \
4629 src/journal/fsprg.c \
4630 src/journal/fsprg.h
4631
4632 libsystemd_journal_internal_la_LIBADD += \
4633 $(GCRYPT_LIBS)
4634
4635 libsystemd_journal_internal_la_CFLAGS += \
4636 $(GCRYPT_CFLAGS)
4637 endif
4638
4639 noinst_LTLIBRARIES += \
4640 libsystemd-journal-internal.la
4641
4642 rootlibexec_PROGRAMS += \
4643 systemd-journald
4644
4645 rootbin_PROGRAMS += \
4646 journalctl
4647
4648 bin_PROGRAMS += \
4649 systemd-cat
4650
4651 dist_systemunit_DATA += \
4652 units/systemd-journald.socket \
4653 units/systemd-journald-dev-log.socket \
4654 units/systemd-journald-audit.socket
4655
4656 nodist_systemunit_DATA += \
4657 units/systemd-journald.service \
4658 units/systemd-journal-flush.service \
4659 units/systemd-journal-catalog-update.service
4660
4661 dist_pkgsysconf_DATA += \
4662 src/journal/journald.conf
4663
4664 nodist_catalog_DATA = \
4665 catalog/systemd.bg.catalog \
4666 catalog/systemd.be.catalog \
4667 catalog/systemd.be@latin.catalog \
4668 catalog/systemd.fr.catalog \
4669 catalog/systemd.it.catalog \
4670 catalog/systemd.pl.catalog \
4671 catalog/systemd.pt_BR.catalog \
4672 catalog/systemd.ru.catalog \
4673 catalog/systemd.zh_CN.catalog \
4674 catalog/systemd.zh_TW.catalog \
4675 catalog/systemd.catalog
4676
4677 EXTRA_DIST += \
4678 $(nodist_catalog_DATA:.catalog=.catalog.in)
4679
4680 # Note that we don't use @@ for replacement markers here, but %%. This is
4681 # because the catalog uses @@ already for its runtime replacement handling and
4682 # we don't want to conflict with that.
4683 catalog/%.catalog: catalog/%.catalog.in
4684 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4685 $(SED) -e 's~%SUPPORT_URL%~$(SUPPORT_URL)~' < $< > $@
4686
4687 SOCKETS_TARGET_WANTS += \
4688 systemd-journald.socket \
4689 systemd-journald-dev-log.socket \
4690 systemd-journald-audit.socket
4691
4692 SYSINIT_TARGET_WANTS += \
4693 systemd-journald.service \
4694 systemd-journal-flush.service \
4695 systemd-journal-catalog-update.service
4696
4697 EXTRA_DIST += \
4698 units/systemd-journald.service.in \
4699 units/systemd-journal-flush.service.in \
4700 units/systemd-journal-catalog-update.service.in
4701
4702 gperf_gperf_sources += \
4703 src/journal/journald-gperf.gperf
4704
4705 # ------------------------------------------------------------------------------
4706 if HAVE_MICROHTTPD
4707 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4708
4709 rootlibexec_PROGRAMS += \
4710 systemd-journal-gatewayd
4711
4712 systemd_journal_gatewayd_SOURCES = \
4713 src/journal-remote/journal-gatewayd.c \
4714 src/journal-remote/microhttpd-util.h \
4715 src/journal-remote/microhttpd-util.c
4716
4717 systemd_journal_gatewayd_LDADD = \
4718 libsystemd-shared.la \
4719 $(MICROHTTPD_LIBS)
4720
4721 if HAVE_GNUTLS
4722 systemd_journal_gatewayd_LDADD += \
4723 $(GNUTLS_LIBS)
4724 endif
4725
4726 systemd_journal_gatewayd_CFLAGS = \
4727 $(AM_CFLAGS) \
4728 $(MICROHTTPD_CFLAGS)
4729
4730 systemd_journal_gatewayd_CPPFLAGS = \
4731 $(AM_CPPFLAGS) \
4732 -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4733
4734 dist_systemunit_DATA += \
4735 units/systemd-journal-gatewayd.socket
4736
4737 nodist_systemunit_DATA += \
4738 units/systemd-journal-gatewayd.service
4739
4740 dist_gatewayddocumentroot_DATA = \
4741 src/journal-remote/browse.html
4742
4743 endif
4744
4745 EXTRA_DIST += \
4746 units/systemd-journal-gatewayd.service.in
4747
4748 # ------------------------------------------------------------------------------
4749
4750 systemd_socket_proxyd_SOURCES = \
4751 src/socket-proxy/socket-proxyd.c
4752
4753 systemd_socket_proxyd_LDADD = \
4754 libsystemd-shared.la
4755
4756 # ------------------------------------------------------------------------------
4757 if ENABLE_COREDUMP
4758 systemd_coredump_SOURCES = \
4759 src/coredump/coredump.c \
4760 src/coredump/coredump-vacuum.c \
4761 src/coredump/coredump-vacuum.h
4762
4763 systemd_coredump_CFLAGS = \
4764 $(AM_CFLAGS) \
4765 $(ACL_CFLAGS)
4766
4767 systemd_coredump_LDADD = \
4768 libsystemd-shared.la \
4769 $(ACL_LIBS)
4770
4771 if HAVE_ELFUTILS
4772 systemd_coredump_SOURCES += \
4773 src/coredump/stacktrace.c \
4774 src/coredump/stacktrace.h
4775
4776 systemd_coredump_LDADD += \
4777 $(ELFUTILS_LIBS)
4778 endif
4779
4780 nodist_systemunit_DATA += \
4781 units/systemd-coredump@.service
4782
4783 dist_systemunit_DATA += \
4784 units/systemd-coredump.socket
4785
4786 SOCKETS_TARGET_WANTS += \
4787 systemd-coredump.socket
4788
4789 rootlibexec_PROGRAMS += \
4790 systemd-coredump
4791
4792 dist_pkgsysconf_DATA += \
4793 src/coredump/coredump.conf
4794
4795 coredumpctl_SOURCES = \
4796 src/coredump/coredumpctl.c
4797
4798 coredumpctl_LDADD = \
4799 libsystemd-shared.la
4800
4801 bin_PROGRAMS += \
4802 coredumpctl
4803
4804 manual_tests += \
4805 test-coredump-vacuum
4806
4807 test_coredump_vacuum_SOURCES = \
4808 src/coredump/test-coredump-vacuum.c \
4809 src/coredump/coredump-vacuum.c \
4810 src/coredump/coredump-vacuum.h
4811
4812 test_coredump_vacuum_LDADD = \
4813 libsystemd-shared.la
4814
4815 dist_bashcompletion_data += \
4816 shell-completion/bash/coredumpctl
4817
4818 dist_zshcompletion_data += \
4819 shell-completion/zsh/_coredumpctl
4820
4821 nodist_sysctl_DATA = \
4822 sysctl.d/50-coredump.conf
4823
4824 CLEANFILES += \
4825 sysctl.d/50-coredump.conf
4826 endif
4827
4828 EXTRA_DIST += \
4829 sysctl.d/50-coredump.conf.in \
4830 units/systemd-coredump@.service.in
4831
4832 # ------------------------------------------------------------------------------
4833 if ENABLE_BINFMT
4834 systemd_binfmt_SOURCES = \
4835 src/binfmt/binfmt.c
4836
4837 systemd_binfmt_LDADD = \
4838 libsystemd-shared.la
4839
4840 rootlibexec_PROGRAMS += \
4841 systemd-binfmt
4842
4843 dist_systemunit_DATA += \
4844 units/proc-sys-fs-binfmt_misc.automount \
4845 units/proc-sys-fs-binfmt_misc.mount
4846
4847 nodist_systemunit_DATA += \
4848 units/systemd-binfmt.service
4849
4850 INSTALL_DIRS += \
4851 $(prefix)/lib/binfmt.d \
4852 $(sysconfdir)/binfmt.d
4853
4854 SYSINIT_TARGET_WANTS += \
4855 systemd-binfmt.service \
4856 proc-sys-fs-binfmt_misc.automount
4857
4858 endif
4859
4860 EXTRA_DIST += \
4861 units/systemd-binfmt.service.in
4862
4863 # ------------------------------------------------------------------------------
4864 if ENABLE_VCONSOLE
4865 systemd_vconsole_setup_SOURCES = \
4866 src/vconsole/vconsole-setup.c
4867
4868 systemd_vconsole_setup_LDADD = \
4869 libsystemd-shared.la
4870
4871 rootlibexec_PROGRAMS += \
4872 systemd-vconsole-setup
4873
4874 nodist_udevrules_DATA += \
4875 src/vconsole/90-vconsole.rules
4876
4877 nodist_systemunit_DATA += \
4878 units/systemd-vconsole-setup.service
4879 endif
4880
4881 EXTRA_DIST += \
4882 src/vconsole/90-vconsole.rules.in \
4883 units/systemd-vconsole-setup.service.in
4884
4885 # ------------------------------------------------------------------------------
4886 if ENABLE_QUOTACHECK
4887 rootlibexec_PROGRAMS += \
4888 systemd-quotacheck
4889
4890 nodist_systemunit_DATA += \
4891 units/systemd-quotacheck.service
4892
4893 systemd_quotacheck_SOURCES = \
4894 src/quotacheck/quotacheck.c
4895
4896 systemd_quotacheck_LDADD = \
4897 libsystemd-shared.la
4898 endif
4899
4900 EXTRA_DIST += \
4901 units/systemd-quotacheck.service.in
4902
4903 nodist_systemunit_DATA += \
4904 units/quotaon.service
4905
4906 # ------------------------------------------------------------------------------
4907 if ENABLE_RANDOMSEED
4908 rootlibexec_PROGRAMS += \
4909 systemd-random-seed
4910
4911 nodist_systemunit_DATA += \
4912 units/systemd-random-seed.service
4913
4914 systemd_random_seed_SOURCES = \
4915 src/random-seed/random-seed.c
4916
4917 systemd_random_seed_LDADD = \
4918 libsystemd-shared.la
4919
4920 SYSINIT_TARGET_WANTS += \
4921 systemd-random-seed.service
4922
4923 endif
4924
4925 EXTRA_DIST += \
4926 units/systemd-random-seed.service.in
4927
4928 # ------------------------------------------------------------------------------
4929 if ENABLE_BACKLIGHT
4930 rootlibexec_PROGRAMS += \
4931 systemd-backlight
4932
4933 nodist_systemunit_DATA += \
4934 units/systemd-backlight@.service
4935
4936 systemd_backlight_SOURCES = \
4937 src/backlight/backlight.c
4938
4939 systemd_backlight_LDADD = \
4940 libsystemd-shared.la
4941 endif
4942
4943 EXTRA_DIST += \
4944 units/systemd-backlight@.service.in
4945
4946 # ------------------------------------------------------------------------------
4947 if ENABLE_RFKILL
4948 rootlibexec_PROGRAMS += \
4949 systemd-rfkill
4950
4951 nodist_systemunit_DATA += \
4952 units/systemd-rfkill.service
4953
4954 dist_systemunit_DATA += \
4955 units/systemd-rfkill.socket
4956
4957 systemd_rfkill_SOURCES = \
4958 src/rfkill/rfkill.c
4959
4960 systemd_rfkill_LDADD = \
4961 libsystemd-shared.la
4962 endif
4963
4964 EXTRA_DIST += \
4965 units/systemd-rfkill.service.in
4966
4967 # ------------------------------------------------------------------------------
4968 if HAVE_LIBCRYPTSETUP
4969 rootlibexec_PROGRAMS += \
4970 systemd-cryptsetup \
4971 systemd-veritysetup
4972
4973 systemgenerator_PROGRAMS += \
4974 systemd-cryptsetup-generator \
4975 systemd-veritysetup-generator
4976
4977 dist_systemunit_DATA += \
4978 units/cryptsetup.target \
4979 units/cryptsetup-pre.target
4980
4981 systemd_cryptsetup_SOURCES = \
4982 src/cryptsetup/cryptsetup.c
4983
4984 systemd_cryptsetup_CFLAGS = \
4985 $(AM_CFLAGS) \
4986 $(LIBCRYPTSETUP_CFLAGS)
4987
4988 systemd_cryptsetup_LDADD = \
4989 libsystemd-shared.la \
4990 $(LIBCRYPTSETUP_LIBS)
4991
4992 systemd_cryptsetup_generator_SOURCES = \
4993 src/cryptsetup/cryptsetup-generator.c
4994
4995 systemd_cryptsetup_generator_LDADD = \
4996 libsystemd-shared.la
4997
4998 systemd_veritysetup_SOURCES = \
4999 src/veritysetup/veritysetup.c
5000
5001 systemd_veritysetup_CFLAGS = \
5002 $(AM_CFLAGS) \
5003 $(LIBCRYPTSETUP_CFLAGS)
5004
5005 systemd_veritysetup_LDADD = \
5006 libsystemd-shared.la \
5007 $(LIBCRYPTSETUP_LIBS)
5008
5009 systemd_veritysetup_generator_SOURCES = \
5010 src/veritysetup/veritysetup-generator.c
5011
5012 systemd_veritysetup_generator_LDADD = \
5013 libsystemd-shared.la
5014
5015 SYSINIT_TARGET_WANTS += \
5016 cryptsetup.target
5017
5018 endif
5019
5020 # ------------------------------------------------------------------------------
5021 if ENABLE_HOSTNAMED
5022 systemd_hostnamed_SOURCES = \
5023 src/hostname/hostnamed.c
5024
5025 systemd_hostnamed_LDADD = \
5026 libsystemd-shared.la
5027
5028 rootlibexec_PROGRAMS += \
5029 systemd-hostnamed
5030
5031 nodist_systemunit_DATA += \
5032 units/systemd-hostnamed.service
5033
5034 dist_systemunit_DATA_busnames += \
5035 units/org.freedesktop.hostname1.busname
5036
5037 dist_dbuspolicy_DATA += \
5038 src/hostname/org.freedesktop.hostname1.conf
5039
5040 dist_dbussystemservice_DATA += \
5041 src/hostname/org.freedesktop.hostname1.service
5042
5043 polkitpolicy_files += \
5044 src/hostname/org.freedesktop.hostname1.policy
5045
5046 SYSTEM_UNIT_ALIASES += \
5047 systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
5048
5049 BUSNAMES_TARGET_WANTS += \
5050 org.freedesktop.hostname1.busname
5051
5052 hostnamectl_SOURCES = \
5053 src/hostname/hostnamectl.c
5054
5055 hostnamectl_LDADD = \
5056 libsystemd-shared.la
5057
5058 bin_PROGRAMS += \
5059 hostnamectl
5060
5061 dist_bashcompletion_data += \
5062 shell-completion/bash/hostnamectl
5063
5064 dist_zshcompletion_data += \
5065 shell-completion/zsh/_hostnamectl
5066 endif
5067
5068 polkitpolicy_in_files += \
5069 src/hostname/org.freedesktop.hostname1.policy.in
5070
5071 EXTRA_DIST += \
5072 units/systemd-hostnamed.service.in
5073
5074 # ------------------------------------------------------------------------------
5075 dist_systemunit_DATA_busnames += \
5076 units/org.freedesktop.systemd1.busname
5077
5078 BUSNAMES_TARGET_WANTS += \
5079 org.freedesktop.systemd1.busname
5080
5081 # ------------------------------------------------------------------------------
5082 if ENABLE_LOCALED
5083 systemd_localed_SOURCES = \
5084 src/locale/localed.c \
5085 src/locale/keymap-util.c \
5086 src/locale/keymap-util.h
5087
5088 systemd_localed_LDADD = \
5089 libsystemd-shared.la \
5090 -ldl
5091
5092 nodist_systemunit_DATA += \
5093 units/systemd-localed.service
5094
5095 dist_systemunit_DATA_busnames += \
5096 units/org.freedesktop.locale1.busname
5097
5098 rootlibexec_PROGRAMS += \
5099 systemd-localed
5100
5101 dist_dbuspolicy_DATA += \
5102 src/locale/org.freedesktop.locale1.conf
5103
5104 dist_dbussystemservice_DATA += \
5105 src/locale/org.freedesktop.locale1.service
5106
5107 polkitpolicy_files += \
5108 src/locale/org.freedesktop.locale1.policy
5109
5110 SYSTEM_UNIT_ALIASES += \
5111 systemd-localed.service dbus-org.freedesktop.locale1.service
5112
5113 BUSNAMES_TARGET_WANTS += \
5114 org.freedesktop.locale1.busname
5115
5116 dist_pkgdata_DATA = \
5117 src/locale/kbd-model-map \
5118 src/locale/language-fallback-map
5119
5120 test_keymap_util_SOURCES = \
5121 src/locale/test-keymap-util.c \
5122 src/locale/keymap-util.c \
5123 src/locale/keymap-util.h
5124
5125 test_keymap_util_LDADD = \
5126 libsystemd-shared.la \
5127 -ldl
5128
5129 tests += \
5130 test-keymap-util
5131
5132 localectl_SOURCES = \
5133 src/locale/localectl.c
5134
5135 localectl_LDADD = \
5136 libsystemd-shared.la
5137
5138 bin_PROGRAMS += \
5139 localectl
5140
5141 dist_bashcompletion_data += \
5142 shell-completion/bash/localectl
5143
5144 dist_zshcompletion_data += \
5145 shell-completion/zsh/_localectl
5146 endif
5147
5148 polkitpolicy_in_files += \
5149 src/locale/org.freedesktop.locale1.policy.in
5150
5151 EXTRA_DIST += \
5152 units/systemd-localed.service.in
5153
5154 # ------------------------------------------------------------------------------
5155 if ENABLE_TIMEDATED
5156 systemd_timedated_SOURCES = \
5157 src/timedate/timedated.c
5158
5159 systemd_timedated_LDADD = \
5160 libsystemd-shared.la
5161
5162 rootlibexec_PROGRAMS += \
5163 systemd-timedated
5164
5165 dist_dbussystemservice_DATA += \
5166 src/timedate/org.freedesktop.timedate1.service
5167
5168 dist_dbuspolicy_DATA += \
5169 src/timedate/org.freedesktop.timedate1.conf
5170
5171 nodist_systemunit_DATA += \
5172 units/systemd-timedated.service
5173
5174 dist_systemunit_DATA_busnames += \
5175 units/org.freedesktop.timedate1.busname
5176
5177 polkitpolicy_files += \
5178 src/timedate/org.freedesktop.timedate1.policy
5179
5180 SYSTEM_UNIT_ALIASES += \
5181 systemd-timedated.service dbus-org.freedesktop.timedate1.service
5182
5183 BUSNAMES_TARGET_WANTS += \
5184 org.freedesktop.timedate1.busname
5185
5186 timedatectl_SOURCES = \
5187 src/timedate/timedatectl.c
5188
5189 timedatectl_LDADD = \
5190 libsystemd-shared.la
5191
5192 bin_PROGRAMS += \
5193 timedatectl
5194
5195 dist_bashcompletion_data += \
5196 shell-completion/bash/timedatectl
5197
5198 dist_zshcompletion_data += \
5199 shell-completion/zsh/_timedatectl
5200 endif
5201
5202 polkitpolicy_in_files += \
5203 src/timedate/org.freedesktop.timedate1.policy.in
5204
5205 EXTRA_DIST += \
5206 units/systemd-timedated.service.in
5207
5208 # ------------------------------------------------------------------------------
5209 if ENABLE_TIMESYNCD
5210 systemd_timesyncd_SOURCES = \
5211 src/timesync/timesyncd.c \
5212 src/timesync/timesyncd-manager.c \
5213 src/timesync/timesyncd-manager.h \
5214 src/timesync/timesyncd-conf.c \
5215 src/timesync/timesyncd-conf.h \
5216 src/timesync/timesyncd-server.c \
5217 src/timesync/timesyncd-server.h
5218
5219 nodist_systemd_timesyncd_SOURCES = \
5220 src/timesync/timesyncd-gperf.c
5221
5222 systemd_timesyncd_LDADD = \
5223 libsystemd-network.la \
5224 libsystemd-shared.la \
5225 -lm
5226
5227 test_timesync_SOURCES = \
5228 src/timesync/test-timesync.c \
5229 src/timesync/timesyncd-manager.c \
5230 src/timesync/timesyncd-manager.h \
5231 src/timesync/timesyncd-conf.c \
5232 src/timesync/timesyncd-conf.h \
5233 src/timesync/timesyncd-server.c \
5234 src/timesync/timesyncd-server.h
5235
5236 nodist_test_timesync_SOURCES = \
5237 src/timesync/timesyncd-gperf.c
5238
5239 test_timesync_LDADD = \
5240 libsystemd-shared.la \
5241 -lm
5242
5243 tests += \
5244 test-timesync
5245
5246 rootlibexec_PROGRAMS += \
5247 systemd-timesyncd
5248
5249 nodist_systemunit_DATA += \
5250 units/systemd-timesyncd.service
5251
5252 GENERAL_ALIASES += \
5253 $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
5254
5255 nodist_pkgsysconf_DATA += \
5256 src/timesync/timesyncd.conf
5257
5258 endif
5259
5260 gperf_gperf_sources += \
5261 src/timesync/timesyncd-gperf.gperf
5262
5263 EXTRA_DIST += \
5264 units/systemd-timesyncd.service.in \
5265 src/timesync/timesyncd.conf.in
5266
5267 # ------------------------------------------------------------------------------
5268 test_nss_SOURCES = \
5269 src/test/test-nss.c
5270
5271 test_nss_LDADD = \
5272 libsystemd-internal.la \
5273 libbasic.la \
5274 -ldl
5275
5276 manual_tests += \
5277 test-nss
5278
5279 # ------------------------------------------------------------------------------
5280 libnss_systemd_la_SOURCES = \
5281 src/nss-systemd/nss-systemd.sym \
5282 src/nss-systemd/nss-systemd.c
5283
5284 libnss_systemd_la_LDFLAGS = \
5285 $(AM_LDFLAGS) \
5286 -module \
5287 -export-dynamic \
5288 -avoid-version \
5289 -shared \
5290 -shrext .so.2 \
5291 -Wl,--version-script=$(top_srcdir)/src/nss-systemd/nss-systemd.sym
5292
5293 libnss_systemd_la_LIBADD = \
5294 libsystemd-internal.la \
5295 libbasic.la
5296
5297 rootlib_LTLIBRARIES += \
5298 libnss_systemd.la
5299
5300 # ------------------------------------------------------------------------------
5301 if HAVE_MYHOSTNAME
5302 libnss_myhostname_la_SOURCES = \
5303 src/nss-myhostname/nss-myhostname.sym \
5304 src/nss-myhostname/nss-myhostname.c
5305
5306 libnss_myhostname_la_LDFLAGS = \
5307 $(AM_LDFLAGS) \
5308 -module \
5309 -export-dynamic \
5310 -avoid-version \
5311 -shared \
5312 -shrext .so.2 \
5313 -Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
5314
5315 libnss_myhostname_la_LIBADD = \
5316 libsystemd-internal.la \
5317 libbasic.la
5318
5319 rootlib_LTLIBRARIES += \
5320 libnss_myhostname.la
5321 endif
5322
5323 # ------------------------------------------------------------------------------
5324 if ENABLE_MACHINED
5325 systemd_machined_SOURCES = \
5326 src/machine/machined.c \
5327 src/machine/machined.h
5328
5329 systemd_machined_LDADD = \
5330 libmachine-core.la
5331
5332 rootlibexec_PROGRAMS += \
5333 systemd-machined
5334
5335 libmachine_core_la_SOURCES = \
5336 src/machine/machine.c \
5337 src/machine/machine.h \
5338 src/machine/machined-dbus.c \
5339 src/machine/machine-dbus.c \
5340 src/machine/machine-dbus.h \
5341 src/machine/image-dbus.c \
5342 src/machine/image-dbus.h \
5343 src/machine/operation.c \
5344 src/machine/operation.h
5345
5346 libmachine_core_la_LIBADD = \
5347 libsystemd-shared.la
5348
5349 noinst_LTLIBRARIES += \
5350 libmachine-core.la
5351
5352 machinectl_SOURCES = \
5353 src/machine/machinectl.c
5354
5355 machinectl_LDADD = \
5356 libsystemd-shared.la
5357
5358 rootbin_PROGRAMS += \
5359 machinectl
5360
5361 test_machine_tables_SOURCES = \
5362 src/machine/test-machine-tables.c
5363
5364 test_machine_tables_LDADD = \
5365 libmachine-core.la
5366
5367 tests += \
5368 test-machine-tables
5369
5370 nodist_systemunit_DATA += \
5371 units/systemd-machined.service
5372
5373 dist_systemunit_DATA += \
5374 units/machine.slice
5375
5376 dist_systemunit_DATA_busnames += \
5377 units/org.freedesktop.machine1.busname
5378
5379 dist_dbussystemservice_DATA += \
5380 src/machine/org.freedesktop.machine1.service
5381
5382 dist_dbuspolicy_DATA += \
5383 src/machine/org.freedesktop.machine1.conf
5384
5385 polkitpolicy_files += \
5386 src/machine/org.freedesktop.machine1.policy
5387
5388 dist_bashcompletion_data += \
5389 shell-completion/bash/machinectl
5390
5391 dist_zshcompletion_data += \
5392 shell-completion/zsh/_machinectl \
5393 shell-completion/zsh/_sd_machines
5394
5395 SYSTEM_UNIT_ALIASES += \
5396 systemd-machined.service dbus-org.freedesktop.machine1.service
5397
5398 BUSNAMES_TARGET_WANTS += \
5399 org.freedesktop.machine1.busname
5400
5401 libnss_mymachines_la_SOURCES = \
5402 src/nss-mymachines/nss-mymachines.sym \
5403 src/nss-mymachines/nss-mymachines.c
5404
5405 libnss_mymachines_la_LDFLAGS = \
5406 $(AM_LDFLAGS) \
5407 -module \
5408 -export-dynamic \
5409 -avoid-version \
5410 -shared \
5411 -shrext .so.2 \
5412 -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
5413
5414 libnss_mymachines_la_LIBADD = \
5415 libsystemd-internal.la \
5416 libbasic.la
5417
5418 rootlib_LTLIBRARIES += \
5419 libnss_mymachines.la
5420
5421 endif
5422
5423 polkitpolicy_in_files += \
5424 src/machine/org.freedesktop.machine1.policy.in
5425
5426 EXTRA_DIST += \
5427 units/systemd-machined.service.in
5428
5429 # ------------------------------------------------------------------------------
5430 if ENABLE_IMPORTD
5431
5432 if HAVE_LIBCURL
5433 if HAVE_XZ
5434 if HAVE_ZLIB
5435 if HAVE_BZIP2
5436 if HAVE_GCRYPT
5437
5438 rootlibexec_PROGRAMS += \
5439 systemd-importd \
5440 systemd-pull \
5441 systemd-import \
5442 systemd-export
5443
5444 systemd_importd_SOURCES = \
5445 src/import/importd.c
5446
5447 systemd_importd_CFLAGS = \
5448 $(AM_CFLAGS) \
5449 -D SYSTEMD_PULL_PATH=\"$(rootlibexecdir)/systemd-pull\" \
5450 -D SYSTEMD_IMPORT_PATH=\"$(rootlibexecdir)/systemd-import\" \
5451 -D SYSTEMD_EXPORT_PATH=\"$(rootlibexecdir)/systemd-export\"
5452
5453 systemd_importd_LDADD = \
5454 libsystemd-shared.la
5455
5456 systemd_pull_SOURCES = \
5457 src/import/pull.c \
5458 src/import/pull-raw.c \
5459 src/import/pull-raw.h \
5460 src/import/pull-tar.c \
5461 src/import/pull-tar.h \
5462 src/import/pull-job.c \
5463 src/import/pull-job.h \
5464 src/import/pull-common.c \
5465 src/import/pull-common.h \
5466 src/import/import-common.c \
5467 src/import/import-common.h \
5468 src/import/import-compress.c \
5469 src/import/import-compress.h \
5470 src/import/curl-util.c \
5471 src/import/curl-util.h \
5472 src/import/qcow2-util.c \
5473 src/import/qcow2-util.h
5474
5475 systemd_pull_CFLAGS = \
5476 $(AM_CFLAGS) \
5477 $(LIBCURL_CFLAGS) \
5478 $(XZ_CFLAGS) \
5479 $(ZLIB_CFLAGS) \
5480 $(GCRYPT_CFLAGS) \
5481 -D VENDOR_KEYRING_PATH=\"$(rootlibexecdir)/import-pubring.gpg\" \
5482 -D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\"
5483
5484 systemd_pull_LDADD = \
5485 libsystemd-shared.la \
5486 $(LIBCURL_LIBS) \
5487 $(XZ_LIBS) \
5488 $(ZLIB_LIBS) \
5489 -lbz2 \
5490 $(GCRYPT_LIBS)
5491
5492 systemd_import_SOURCES = \
5493 src/import/import.c \
5494 src/import/import-raw.c \
5495 src/import/import-raw.h \
5496 src/import/import-tar.c \
5497 src/import/import-tar.h \
5498 src/import/import-common.c \
5499 src/import/import-common.h \
5500 src/import/import-compress.c \
5501 src/import/import-compress.h \
5502 src/import/qcow2-util.c \
5503 src/import/qcow2-util.h
5504
5505 systemd_import_CFLAGS = \
5506 $(AM_CFLAGS) \
5507 $(XZ_CFLAGS) \
5508 $(ZLIB_CFLAGS)
5509
5510 systemd_import_LDADD = \
5511 libsystemd-shared.la \
5512 $(XZ_LIBS) \
5513 $(ZLIB_LIBS) \
5514 -lbz2
5515
5516 systemd_export_SOURCES = \
5517 src/import/export.c \
5518 src/import/export-tar.c \
5519 src/import/export-tar.h \
5520 src/import/export-raw.c \
5521 src/import/export-raw.h \
5522 src/import/import-common.c \
5523 src/import/import-common.h \
5524 src/import/import-compress.c \
5525 src/import/import-compress.h
5526
5527 systemd_export_CFLAGS = \
5528 $(AM_CFLAGS) \
5529 $(XZ_CFLAGS) \
5530 $(ZLIB_CFLAGS)
5531
5532 systemd_export_LDADD = \
5533 libsystemd-shared.la \
5534 $(XZ_LIBS) \
5535 $(ZLIB_LIBS) \
5536 -lbz2
5537
5538 dist_rootlibexec_DATA += \
5539 src/import/import-pubring.gpg
5540
5541 nodist_systemunit_DATA += \
5542 units/systemd-importd.service
5543
5544 dist_systemunit_DATA_busnames += \
5545 units/org.freedesktop.import1.busname
5546
5547 BUSNAMES_TARGET_WANTS += \
5548 org.freedesktop.import1.busname
5549
5550 SYSTEM_UNIT_ALIASES += \
5551 systemd-importd.service dbus-org.freedesktop.import1.service
5552
5553 dist_dbussystemservice_DATA += \
5554 src/import/org.freedesktop.import1.service
5555
5556 dist_dbuspolicy_DATA += \
5557 src/import/org.freedesktop.import1.conf
5558
5559 polkitpolicy_files += \
5560 src/import/org.freedesktop.import1.policy
5561
5562 manual_tests += \
5563 test-qcow2
5564
5565 test_qcow2_SOURCES = \
5566 src/import/test-qcow2.c \
5567 src/import/qcow2-util.c \
5568 src/import/qcow2-util.h
5569
5570 test_qcow2_CFLAGS = \
5571 $(AM_CFLAGS) \
5572 $(ZLIB_CFLAGS)
5573
5574 test_qcow2_LDADD = \
5575 libsystemd-shared.la \
5576 $(ZLIB_LIBS)
5577
5578 endif
5579 endif
5580 endif
5581 endif
5582 endif
5583
5584 endif
5585
5586 polkitpolicy_in_files += \
5587 src/import/org.freedesktop.import1.policy.in
5588
5589 EXTRA_DIST += \
5590 units/systemd-importd.service.in
5591
5592
5593 # ------------------------------------------------------------------------------
5594 if ENABLE_RESOLVED
5595
5596 basic_dns_sources = \
5597 src/resolve/resolved-dns-dnssec.c \
5598 src/resolve/resolved-dns-dnssec.h \
5599 src/resolve/resolved-dns-packet.c \
5600 src/resolve/resolved-dns-packet.h \
5601 src/resolve/resolved-dns-rr.c \
5602 src/resolve/resolved-dns-rr.h \
5603 src/resolve/resolved-dns-answer.c \
5604 src/resolve/resolved-dns-answer.h \
5605 src/resolve/resolved-dns-question.c \
5606 src/resolve/resolved-dns-question.h \
5607 src/resolve/dns-type.c \
5608 src/resolve/dns-type.h
5609
5610 systemd_resolved_SOURCES = \
5611 src/resolve/resolved.c \
5612 src/resolve/resolved-manager.c \
5613 src/resolve/resolved-manager.h \
5614 src/resolve/resolved-conf.c \
5615 src/resolve/resolved-conf.h \
5616 src/resolve/resolved-resolv-conf.c \
5617 src/resolve/resolved-resolv-conf.h \
5618 src/resolve/resolved-bus.c \
5619 src/resolve/resolved-bus.h \
5620 src/resolve/resolved-link.h \
5621 src/resolve/resolved-link.c \
5622 src/resolve/resolved-link-bus.c \
5623 src/resolve/resolved-link-bus.h \
5624 src/resolve/resolved-llmnr.h \
5625 src/resolve/resolved-llmnr.c \
5626 src/resolve/resolved-mdns.h \
5627 src/resolve/resolved-mdns.c \
5628 src/resolve/resolved-def.h \
5629 $(basic_dns_sources) \
5630 src/resolve/resolved-dns-query.h \
5631 src/resolve/resolved-dns-query.c \
5632 src/resolve/resolved-dns-synthesize.h \
5633 src/resolve/resolved-dns-synthesize.c \
5634 src/resolve/resolved-dns-transaction.h \
5635 src/resolve/resolved-dns-transaction.c \
5636 src/resolve/resolved-dns-scope.h \
5637 src/resolve/resolved-dns-scope.c \
5638 src/resolve/resolved-dns-server.h \
5639 src/resolve/resolved-dns-server.c \
5640 src/resolve/resolved-dns-search-domain.h \
5641 src/resolve/resolved-dns-search-domain.c \
5642 src/resolve/resolved-dns-cache.h \
5643 src/resolve/resolved-dns-cache.c \
5644 src/resolve/resolved-dns-zone.h \
5645 src/resolve/resolved-dns-zone.c \
5646 src/resolve/resolved-dns-stream.h \
5647 src/resolve/resolved-dns-stream.c \
5648 src/resolve/resolved-dns-trust-anchor.h \
5649 src/resolve/resolved-dns-trust-anchor.c \
5650 src/resolve/resolved-dns-stub.h \
5651 src/resolve/resolved-dns-stub.c \
5652 src/resolve/resolved-etc-hosts.h \
5653 src/resolve/resolved-etc-hosts.c \
5654 src/shared/gcrypt-util.c \
5655 src/shared/gcrypt-util.h
5656
5657 nodist_systemd_resolved_SOURCES = \
5658 src/resolve/dns_type-from-name.h \
5659 src/resolve/dns_type-to-name.h \
5660 src/resolve/resolved-gperf.c
5661
5662 systemd_resolved_CFLAGS = \
5663 $(AM_CFLAGS) \
5664 $(GCRYPT_CFLAGS)
5665
5666 systemd_resolved_LDADD = \
5667 libsystemd-network.la \
5668 libsystemd-shared.la \
5669 $(GCRYPT_LIBS) \
5670 -lm
5671
5672 rootlibexec_PROGRAMS += \
5673 systemd-resolved
5674
5675 nodist_systemunit_DATA += \
5676 units/systemd-resolved.service
5677
5678 dist_systemunit_DATA_busnames += \
5679 units/org.freedesktop.resolve1.busname
5680
5681 dist_dbuspolicy_DATA += \
5682 src/resolve/org.freedesktop.resolve1.conf
5683
5684 dist_dbussystemservice_DATA += \
5685 src/resolve/org.freedesktop.resolve1.service
5686
5687 BUSNAMES_TARGET_WANTS += \
5688 org.freedesktop.resolve1.busname
5689
5690 GENERAL_ALIASES += \
5691 $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service \
5692 $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/dbus-org.freedesktop.resolve1.service
5693
5694 nodist_pkgsysconf_DATA += \
5695 src/resolve/resolved.conf
5696
5697 dist_rootlibexec_DATA += \
5698 src/resolve/resolv.conf
5699
5700 libnss_resolve_la_SOURCES = \
5701 src/nss-resolve/nss-resolve.sym \
5702 src/nss-resolve/nss-resolve.c
5703
5704 libnss_resolve_la_LDFLAGS = \
5705 $(AM_LDFLAGS) \
5706 -module \
5707 -export-dynamic \
5708 -avoid-version \
5709 -shared \
5710 -shrext .so.2 \
5711 -Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
5712
5713 libnss_resolve_la_LIBADD = \
5714 libsystemd-internal.la \
5715 libbasic.la
5716
5717 rootlib_LTLIBRARIES += \
5718 libnss_resolve.la
5719
5720 systemd_resolve_SOURCES = \
5721 src/resolve/resolve-tool.c \
5722 $(basic_dns_sources) \
5723 src/shared/gcrypt-util.c \
5724 src/shared/gcrypt-util.h
5725
5726 nodist_systemd_resolve_SOURCES = \
5727 src/resolve/dns_type-from-name.h \
5728 src/resolve/dns_type-to-name.h
5729
5730 systemd_resolve_CFLAGS = \
5731 $(AM_CFLAGS) \
5732 $(GCRYPT_CFLAGS)
5733
5734 systemd_resolve_LDADD = \
5735 libsystemd-shared.la \
5736 $(GCRYPT_LIBS) \
5737 -lm
5738
5739 bin_PROGRAMS += \
5740 systemd-resolve
5741
5742 dist_bashcompletion_data += \
5743 shell-completion/bash/systemd-resolve
5744
5745 dist_zshcompletion_data += \
5746 shell-completion/zsh/_systemd-resolve
5747
5748 tests += \
5749 test-dns-packet \
5750 test-resolve-tables \
5751 test-dnssec
5752
5753 manual_tests += \
5754 test-dnssec-complex
5755
5756 test_resolve_tables_SOURCES = \
5757 src/resolve/test-resolve-tables.c \
5758 src/resolve/dns_type-from-name.h \
5759 src/resolve/dns_type-to-name.h \
5760 $(basic_dns_sources) \
5761 src/shared/test-tables.h
5762
5763 test_resolve_tables_CFLAGS = \
5764 $(AM_CFLAGS) \
5765 $(GCRYPT_CFLAGS)
5766
5767 test_resolve_tables_LDADD = \
5768 libsystemd-shared.la \
5769 $(GCRYPT_LIBS) \
5770 -lm
5771
5772 test_dns_packet_SOURCES = \
5773 src/resolve/test-dns-packet.c \
5774 $(basic_dns_sources)
5775
5776 test_dns_packet_CPPFLAGS = \
5777 $(AM_CPPFLAGS) \
5778 -I $(top_srcdir)/src/test
5779
5780 test_dns_packet_CFLAGS = \
5781 $(AM_CFLAGS) \
5782 $(GCRYPT_CFLAGS)
5783
5784 test_dns_packet_LDADD = \
5785 libsystemd-shared.la \
5786 $(GCRYPT_LIBS) \
5787 -lm
5788
5789 TEST_DATA_FILES += \
5790 test/test-resolve/_openpgpkey.fedoraproject.org.pkts \
5791 test/test-resolve/fedoraproject.org.pkts \
5792 test/test-resolve/gandi.net.pkts \
5793 test/test-resolve/google.com.pkts \
5794 test/test-resolve/root.pkts \
5795 test/test-resolve/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
5796 test/test-resolve/teamits.com.pkts \
5797 test/test-resolve/zbyszek@fedoraproject.org.pkts \
5798 test/test-resolve/_443._tcp.fedoraproject.org.pkts \
5799 test/test-resolve/kyhwana.org.pkts \
5800 test/test-resolve/fake-caa.pkts
5801
5802 EXTRA_DIST += $(TEST_DATA_FILES)
5803
5804 test_dnssec_SOURCES = \
5805 src/resolve/test-dnssec.c \
5806 $(basic_dns_sources)
5807
5808 test_dnssec_CFLAGS = \
5809 $(AM_CFLAGS) \
5810 $(GCRYPT_CFLAGS)
5811
5812 test_dnssec_LDADD = \
5813 libsystemd-shared.la \
5814 $(GCRYPT_LIBS) \
5815 -lm
5816
5817 test_dnssec_complex_SOURCES = \
5818 src/resolve/test-dnssec-complex.c \
5819 src/resolve/dns-type.c \
5820 src/resolve/dns-type.h
5821
5822 test_dnssec_complex_LDADD = \
5823 libsystemd-shared.la
5824
5825 endif
5826
5827 gperf_txt_sources += \
5828 src/resolve/dns_type-list.txt
5829
5830 gperf_gperf_sources += \
5831 src/resolve/resolved-gperf.gperf
5832
5833 EXTRA_DIST += \
5834 units/systemd-resolved.service.m4.in \
5835 src/resolve/resolved.conf.in
5836
5837 # ------------------------------------------------------------------------------
5838 if ENABLE_NETWORKD
5839 rootlibexec_PROGRAMS += \
5840 systemd-networkd
5841
5842 systemd_networkd_SOURCES = \
5843 src/network/networkd.c
5844
5845 systemd_networkd_LDADD = \
5846 libnetworkd-core.la
5847
5848 if HAVE_LIBIPTC
5849 systemd_networkd_LDADD += \
5850 libfirewall.la
5851 endif
5852
5853 noinst_LTLIBRARIES += \
5854 libnetworkd-core.la
5855
5856 libnetworkd_core_la_CFLAGS = \
5857 $(AM_CFLAGS)
5858
5859 libnetworkd_core_la_SOURCES = \
5860 src/libsystemd-network/network-internal.h \
5861 src/network/netdev/netdev.h \
5862 src/network/netdev/netdev.c \
5863 src/network/netdev/vrf.h \
5864 src/network/netdev/vrf.c \
5865 src/network/netdev/tunnel.h \
5866 src/network/netdev/tunnel.c \
5867 src/network/netdev/veth.h \
5868 src/network/netdev/veth.c \
5869 src/network/netdev/vxlan.h \
5870 src/network/netdev/vxlan.c \
5871 src/network/netdev/geneve.h \
5872 src/network/netdev/geneve.c \
5873 src/network/netdev/vlan.h \
5874 src/network/netdev/vlan.c \
5875 src/network/netdev/macvlan.h \
5876 src/network/netdev/macvlan.c \
5877 src/network/netdev/ipvlan.h \
5878 src/network/netdev/ipvlan.c \
5879 src/network/netdev/dummy.h \
5880 src/network/netdev/dummy.c \
5881 src/network/netdev/tuntap.h \
5882 src/network/netdev/tuntap.c \
5883 src/network/netdev/bond.h \
5884 src/network/netdev/bond.c \
5885 src/network/netdev/bridge.h \
5886 src/network/netdev/bridge.c \
5887 src/network/netdev/vcan.h \
5888 src/network/netdev/vcan.c \
5889 src/network/networkd-manager.h \
5890 src/network/networkd-manager.c \
5891 src/network/networkd-manager-bus.c \
5892 src/network/networkd-conf.h \
5893 src/network/networkd-conf.c \
5894 src/network/networkd-link.h \
5895 src/network/networkd-link.c \
5896 src/network/networkd-link-bus.c \
5897 src/network/networkd-ipv4ll.c \
5898 src/network/networkd-ipv6-proxy-ndp.h \
5899 src/network/networkd-ipv6-proxy-ndp.c \
5900 src/network/networkd-dhcp4.c \
5901 src/network/networkd-dhcp6.c \
5902 src/network/networkd-ndisc.h \
5903 src/network/networkd-radv.c \
5904 src/network/networkd-radv.h \
5905 src/network/networkd-ndisc.c \
5906 src/network/networkd-network.h \
5907 src/network/networkd-network.c \
5908 src/network/networkd-network-bus.c \
5909 src/network/networkd-address.h \
5910 src/network/networkd-address.c \
5911 src/network/networkd-address-label.h \
5912 src/network/networkd-address-label.c \
5913 src/network/networkd-route.h \
5914 src/network/networkd-route.c \
5915 src/network/networkd-fdb.h \
5916 src/network/networkd-fdb.c \
5917 src/network/networkd-brvlan.h \
5918 src/network/networkd-brvlan.c \
5919 src/network/networkd-address-pool.h \
5920 src/network/networkd-address-pool.c \
5921 src/network/networkd-util.h \
5922 src/network/networkd-util.c \
5923 src/network/networkd-lldp-tx.h \
5924 src/network/networkd-lldp-tx.c
5925
5926 nodist_libnetworkd_core_la_SOURCES = \
5927 src/network/networkd-gperf.c \
5928 src/network/networkd-network-gperf.c \
5929 src/network/netdev/netdev-gperf.c
5930
5931 libnetworkd_core_la_LIBADD = \
5932 libsystemd-network.la \
5933 libsystemd-shared.la
5934
5935 rootlibexec_PROGRAMS += \
5936 systemd-networkd-wait-online
5937
5938 systemd_networkd_wait_online_CFLAGS = \
5939 $(AM_CFLAGS)
5940
5941 systemd_networkd_wait_online_SOURCES = \
5942 src/libsystemd-network/network-internal.h \
5943 src/network/wait-online/link.h \
5944 src/network/wait-online/link.c \
5945 src/network/wait-online/manager.h \
5946 src/network/wait-online/manager.c \
5947 src/network/wait-online/wait-online.c
5948
5949 systemd_networkd_wait_online_LDADD = \
5950 libsystemd-network.la \
5951 libsystemd-shared.la
5952
5953 rootbin_PROGRAMS += \
5954 networkctl
5955
5956 networkctl_SOURCES = \
5957 src/network/networkctl.c
5958
5959 networkctl_LDADD = \
5960 libsystemd-shared.la \
5961 libsystemd-network.la
5962
5963 dist_bashcompletion_data += \
5964 shell-completion/bash/networkctl
5965
5966 dist_zshcompletion_data += \
5967 shell-completion/zsh/_networkctl
5968
5969 test_networkd_conf_SOURCES = \
5970 src/network/test-networkd-conf.c
5971
5972 test_networkd_conf_LDADD = \
5973 libnetworkd-core.la
5974
5975 test_network_SOURCES = \
5976 src/network/test-network.c
5977
5978 test_network_LDADD = \
5979 libnetworkd-core.la
5980
5981 if HAVE_LIBIPTC
5982 test_network_LDADD += \
5983 libfirewall.la
5984 endif
5985
5986 test_network_tables_SOURCES = \
5987 src/network/test-network-tables.c \
5988 src/shared/test-tables.h
5989
5990 test_network_tables_LDADD = \
5991 libnetworkd-core.la \
5992 libudev-core.la
5993
5994 if HAVE_LIBIPTC
5995 test_network_tables_LDADD += \
5996 libfirewall.la
5997 endif
5998
5999 tests += \
6000 test-networkd-conf \
6001 test-network \
6002 test-network-tables
6003
6004 dist_systemunit_DATA += \
6005 units/systemd-networkd.socket
6006
6007 nodist_systemunit_DATA += \
6008 units/systemd-networkd.service \
6009 units/systemd-networkd-wait-online.service
6010
6011 dist_systemunit_DATA_busnames += \
6012 units/org.freedesktop.network1.busname
6013
6014 dist_dbussystemservice_DATA += \
6015 src/network/org.freedesktop.network1.service
6016
6017 dist_dbuspolicy_DATA += \
6018 src/network/org.freedesktop.network1.conf
6019
6020 GENERAL_ALIASES += \
6021 $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \
6022 $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
6023 $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service \
6024 $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/dbus-org.freedesktop.network1.service
6025
6026 BUSNAMES_TARGET_WANTS += \
6027 org.freedesktop.network1.busname
6028
6029 polkitrules_files += \
6030 src/network/systemd-networkd.rules
6031
6032 polkitpkla_files += \
6033 src/network/systemd-networkd.pkla
6034
6035 endif
6036
6037 gperf_gperf_sources += \
6038 src/network/networkd-gperf.gperf \
6039 src/network/networkd-network-gperf.gperf \
6040 src/network/netdev/netdev-gperf.gperf
6041
6042 EXTRA_DIST += \
6043 src/network/systemd-networkd.rules \
6044 src/network/systemd-networkd.pkla \
6045 units/systemd-networkd.service.m4.in \
6046 units/systemd-networkd-wait-online.service.in \
6047 test/networkd-test.py \
6048 test/test-exec-deserialization.py
6049
6050 # ------------------------------------------------------------------------------
6051 if ENABLE_LOGIND
6052 systemd_logind_SOURCES = \
6053 src/login/logind.c \
6054 src/login/logind.h
6055
6056 nodist_systemd_logind_SOURCES = \
6057 src/login/logind-gperf.c
6058
6059 systemd_logind_LDADD = \
6060 liblogind-core.la
6061
6062 liblogind_core_la_SOURCES = \
6063 src/login/logind-core.c \
6064 src/login/logind-device.c \
6065 src/login/logind-device.h \
6066 src/login/logind-button.c \
6067 src/login/logind-button.h \
6068 src/login/logind-action.c \
6069 src/login/logind-action.h \
6070 src/login/logind-seat.c \
6071 src/login/logind-seat.h \
6072 src/login/logind-session.c \
6073 src/login/logind-session.h \
6074 src/login/logind-session-device.c \
6075 src/login/logind-session-device.h \
6076 src/login/logind-user.c \
6077 src/login/logind-user.h \
6078 src/login/logind-inhibit.c \
6079 src/login/logind-inhibit.h \
6080 src/login/logind-dbus.c \
6081 src/login/logind-session-dbus.c \
6082 src/login/logind-seat-dbus.c \
6083 src/login/logind-user-dbus.c \
6084 src/login/logind-utmp.c \
6085 src/login/logind-acl.h
6086
6087 liblogind_core_la_LIBADD = \
6088 libsystemd-shared.la
6089
6090 if HAVE_ACL
6091 liblogind_core_la_SOURCES += \
6092 src/login/logind-acl.c
6093 endif
6094
6095 noinst_LTLIBRARIES += \
6096 liblogind-core.la
6097
6098 rootlibexec_PROGRAMS += \
6099 systemd-logind
6100
6101 loginctl_SOURCES = \
6102 src/login/loginctl.c \
6103 src/login/sysfs-show.h \
6104 src/login/sysfs-show.c
6105
6106 loginctl_LDADD = \
6107 libsystemd-shared.la
6108
6109 rootbin_PROGRAMS += \
6110 loginctl
6111
6112 dist_bashcompletion_data += \
6113 shell-completion/bash/loginctl
6114
6115 dist_zshcompletion_data += \
6116 shell-completion/zsh/_loginctl \
6117 shell-completion/zsh/_systemd-inhibit
6118
6119 systemd_inhibit_SOURCES = \
6120 src/login/inhibit.c
6121
6122 systemd_inhibit_LDADD = \
6123 libsystemd-shared.la
6124
6125 rootbin_PROGRAMS += \
6126 systemd-inhibit
6127
6128 test_login_SOURCES = \
6129 src/libsystemd/sd-login/test-login.c
6130
6131 test_login_LDADD = \
6132 libsystemd-shared.la
6133
6134 test_login_shared_SOURCES = \
6135 src/login/test-login-shared.c
6136
6137 test_login_shared_LDADD = \
6138 libsystemd-shared.la
6139
6140 test_inhibit_SOURCES = \
6141 src/login/test-inhibit.c
6142
6143 test_inhibit_LDADD = \
6144 libsystemd-shared.la
6145
6146 test_login_tables_SOURCES = \
6147 src/login/test-login-tables.c
6148
6149 test_login_tables_LDADD = \
6150 liblogind-core.la
6151
6152 manual_tests += \
6153 test-inhibit
6154
6155 tests += \
6156 test-login \
6157 test-login-tables \
6158 test-login-shared
6159
6160 if HAVE_PAM
6161 pam_systemd_la_SOURCES = \
6162 src/login/pam_systemd.sym \
6163 src/login/pam_systemd.c
6164
6165 pam_systemd_la_CFLAGS = \
6166 $(AM_CFLAGS) \
6167 $(PAM_CFLAGS)
6168
6169 pam_systemd_la_LDFLAGS = \
6170 $(AM_LDFLAGS) \
6171 -module \
6172 -export-dynamic \
6173 -avoid-version \
6174 -shared \
6175 -Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
6176
6177 pam_systemd_la_LIBADD = \
6178 libshared.la \
6179 $(PAM_LIBS)
6180
6181 pamlib_LTLIBRARIES = \
6182 pam_systemd.la
6183
6184 if ENABLE_PAM_CONFIG
6185 dist_pamconf_DATA = \
6186 src/login/systemd-user
6187 endif
6188
6189 EXTRA_DIST += \
6190 src/login/systemd-user.m4
6191 endif
6192
6193 nodist_systemunit_DATA += \
6194 units/systemd-logind.service
6195
6196 dist_systemunit_DATA += \
6197 units/user.slice
6198
6199 dist_systemunit_DATA_busnames += \
6200 units/org.freedesktop.login1.busname
6201
6202 dist_dbussystemservice_DATA += \
6203 src/login/org.freedesktop.login1.service
6204
6205 dist_dbuspolicy_DATA += \
6206 src/login/org.freedesktop.login1.conf
6207
6208 nodist_pkgsysconf_DATA += \
6209 src/login/logind.conf
6210
6211 polkitpolicy_files += \
6212 src/login/org.freedesktop.login1.policy
6213
6214 INSTALL_DIRS += \
6215 $(systemdstatedir)
6216
6217 MULTI_USER_TARGET_WANTS += \
6218 systemd-logind.service
6219
6220 SYSTEM_UNIT_ALIASES += \
6221 systemd-logind.service dbus-org.freedesktop.login1.service
6222
6223 BUSNAMES_TARGET_WANTS += \
6224 org.freedesktop.login1.busname
6225
6226 dist_udevrules_DATA += \
6227 src/login/70-uaccess.rules \
6228 src/login/70-power-switch.rules
6229
6230 nodist_udevrules_DATA += \
6231 src/login/71-seat.rules \
6232 src/login/73-seat-late.rules
6233
6234 endif
6235
6236 polkitpolicy_in_files += \
6237 src/login/org.freedesktop.login1.policy.in
6238
6239 gperf_gperf_sources += \
6240 src/login/logind-gperf.gperf
6241
6242 EXTRA_DIST += \
6243 src/login/71-seat.rules.in \
6244 src/login/73-seat-late.rules.in \
6245 units/systemd-logind.service.in \
6246 src/login/logind.conf.in
6247
6248 # ------------------------------------------------------------------------------
6249 if HAVE_PAM
6250
6251 systemd_user_sessions_SOURCES = \
6252 src/user-sessions/user-sessions.c
6253
6254 systemd_user_sessions_LDADD = \
6255 libsystemd-shared.la
6256
6257 rootlibexec_PROGRAMS += \
6258 systemd-user-sessions
6259
6260 nodist_systemunit_DATA += \
6261 units/systemd-user-sessions.service
6262
6263 MULTI_USER_TARGET_WANTS += \
6264 systemd-user-sessions.service
6265
6266 endif
6267
6268 EXTRA_DIST += \
6269 units/systemd-user-sessions.service.in
6270
6271 # ------------------------------------------------------------------------------
6272 EXTRA_DIST += \
6273 test/Makefile \
6274 test/README.testsuite \
6275 test/TEST-01-BASIC \
6276 test/TEST-01-BASIC/Makefile \
6277 test/TEST-01-BASIC/test.sh \
6278 test/TEST-02-CRYPTSETUP \
6279 test/TEST-02-CRYPTSETUP/Makefile \
6280 test/TEST-02-CRYPTSETUP/test.sh \
6281 test/TEST-03-JOBS \
6282 test/TEST-03-JOBS/Makefile \
6283 test/TEST-03-JOBS/test-jobs.sh \
6284 test/TEST-03-JOBS/test.sh \
6285 test/TEST-04-JOURNAL/Makefile \
6286 test/TEST-04-JOURNAL/test-journal.sh \
6287 test/TEST-04-JOURNAL/test.sh \
6288 test/TEST-05-RLIMITS/Makefile \
6289 test/TEST-05-RLIMITS/test-rlimits.sh \
6290 test/TEST-05-RLIMITS/test.sh \
6291 test/TEST-06-SELINUX/Makefile \
6292 test/TEST-06-SELINUX/test-selinux-checks.sh \
6293 test/TEST-06-SELINUX/test.sh \
6294 test/TEST-06-SELINUX/systemd_test.te \
6295 test/TEST-06-SELINUX/systemd_test.if \
6296 test/TEST-07-ISSUE-1981/Makefile \
6297 test/TEST-07-ISSUE-1981/test-segfault.sh \
6298 test/TEST-07-ISSUE-1981/test.sh \
6299 test/TEST-08-ISSUE-2730/Makefile \
6300 test/TEST-08-ISSUE-2730/test.sh \
6301 test/TEST-09-ISSUE-2691/Makefile \
6302 test/TEST-09-ISSUE-2691/test.sh \
6303 test/TEST-10-ISSUE-2467/Makefile \
6304 test/TEST-10-ISSUE-2467/test.sh \
6305 test/TEST-11-ISSUE-3166/Makefile \
6306 test/TEST-11-ISSUE-3166/test.sh \
6307 test/TEST-12-ISSUE-3171/Makefile \
6308 test/TEST-12-ISSUE-3171/test.sh \
6309 test/TEST-13-NSPAWN-SMOKE/Makefile \
6310 test/TEST-13-NSPAWN-SMOKE/create-busybox-container \
6311 test/TEST-13-NSPAWN-SMOKE/test.sh \
6312 test/TEST-14-MACHINE-ID/Makefile \
6313 test/TEST-14-MACHINE-ID/test.sh \
6314 test/test-functions
6315
6316 EXTRA_DIST += \
6317 test/loopy2.service \
6318 test/loopy3.service \
6319 test/loopy4.service \
6320 test/loopy.service \
6321 test/loopy.service.d \
6322 test/loopy.service.d/compat.conf
6323
6324 # ------------------------------------------------------------------------------
6325 substitutions = \
6326 '|rootlibdir=$(rootlibdir)|' \
6327 '|rootlibexecdir=$(rootlibexecdir)|' \
6328 '|rootbindir=$(rootbindir)|' \
6329 '|bindir=$(bindir)|' \
6330 '|SYSTEMCTL=$(rootbindir)/systemctl|' \
6331 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
6332 '|pkgsysconfdir=$(pkgsysconfdir)|' \
6333 '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
6334 '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
6335 '|pkgdatadir=$(pkgdatadir)|' \
6336 '|systemunitdir=$(systemunitdir)|' \
6337 '|userunitdir=$(userunitdir)|' \
6338 '|systempresetdir=$(systempresetdir)|' \
6339 '|userpresetdir=$(userpresetdir)|' \
6340 '|udevhwdbdir=$(udevhwdbdir)|' \
6341 '|udevrulesdir=$(udevrulesdir)|' \
6342 '|catalogdir=$(catalogdir)|' \
6343 '|tmpfilesdir=$(tmpfilesdir)|' \
6344 '|sysusersdir=$(sysusersdir)|' \
6345 '|sysctldir=$(sysctldir)|' \
6346 '|systemgeneratordir=$(systemgeneratordir)|' \
6347 '|usergeneratordir=$(usergeneratordir)|' \
6348 '|systemenvgeneratordir=$(systemenvgeneratordir)|' \
6349 '|userenvgeneratordir=$(userenvgeneratordir)|' \
6350 '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
6351 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
6352 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
6353 '|PACKAGE_URL=$(PACKAGE_URL)|' \
6354 '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
6355 '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
6356 '|prefix=$(prefix)|' \
6357 '|exec_prefix=$(exec_prefix)|' \
6358 '|libdir=$(libdir)|' \
6359 '|includedir=$(includedir)|' \
6360 '|rootprefix=$(rootprefix)|' \
6361 '|udevlibexecdir=$(udevlibexecdir)|' \
6362 '|SUSHELL=$(SUSHELL)|' \
6363 '|SULOGIN=$(SULOGIN)|' \
6364 '|DEBUGTTY=$(DEBUGTTY)|' \
6365 '|KILL=$(KILL)|' \
6366 '|KMOD=$(KMOD)|' \
6367 '|MOUNT_PATH=$(MOUNT_PATH)|' \
6368 '|UMOUNT_PATH=$(UMOUNT_PATH)|' \
6369 '|MKDIR_P=$(MKDIR_P)|' \
6370 '|QUOTAON=$(QUOTAON)|' \
6371 '|QUOTACHECK=$(QUOTACHECK)|' \
6372 '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
6373 '|VARLOGDIR=$(varlogdir)|' \
6374 '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
6375 '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
6376 '|PYTHON=$(PYTHON)|' \
6377 '|NTP_SERVERS=$(NTP_SERVERS)|' \
6378 '|DNS_SERVERS=$(DNS_SERVERS)|' \
6379 '|DEFAULT_DNSSEC_MODE=$(DEFAULT_DNSSEC_MODE)|' \
6380 '|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \
6381 '|systemuidmax=$(SYSTEM_UID_MAX)|' \
6382 '|systemgidmax=$(SYSTEM_GID_MAX)|' \
6383 '|DEV_KVM_MODE=$(DEV_KVM_MODE)|' \
6384 '|TTY_GID=$(TTY_GID)|' \
6385 '|systemsleepdir=$(systemsleepdir)|' \
6386 '|systemshutdowndir=$(systemshutdowndir)|' \
6387 '|binfmtdir=$(binfmtdir)|' \
6388 '|modulesloaddir=$(modulesloaddir)|'
6389
6390 SED_PROCESS = \
6391 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
6392 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
6393 -e '/^\#\# /d' \
6394 < $< > $@
6395
6396 units/%: units/%.in
6397 $(SED_PROCESS)
6398
6399 man/%: man/%.in
6400 $(SED_PROCESS)
6401
6402 sysctl.d/%: sysctl.d/%.in
6403 $(SED_PROCESS)
6404
6405 %.pc: %.pc.in
6406 $(SED_PROCESS)
6407
6408 %.conf: %.conf.in
6409 $(SED_PROCESS)
6410
6411 src/core/%.systemd: src/core/%.systemd.in
6412 $(SED_PROCESS)
6413
6414 src/%.policy.in: src/%.policy.in.in
6415 $(SED_PROCESS)
6416
6417 src/sulogin-shell/%: src/sulogin-shell/%.in
6418 $(SED_PROCESS)
6419 $(AM_V_GEN)chmod +x $@
6420
6421 shell-completion/%: shell-completion/%.in
6422 $(SED_PROCESS)
6423
6424 %.rules: %.rules.in
6425 $(SED_PROCESS)
6426
6427 %.conf: %.conf.in
6428 $(SED_PROCESS)
6429
6430 %.sh: %.sh.in
6431 $(SED_PROCESS)
6432 $(AM_V_GEN)chmod +x $@
6433
6434 src/%.c: src/%.gperf
6435 $(AM_V_at)$(MKDIR_P) $(dir $@)
6436 $(AM_V_GPERF)$(GPERF) < $< > $@
6437
6438 src/%: src/%.m4 $(top_builddir)/config.status
6439 $(AM_V_at)$(MKDIR_P) $(dir $@)
6440 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6441
6442 sysusers.d/%: sysusers.d/%.m4 $(top_builddir)/config.status
6443 $(AM_V_at)$(MKDIR_P) $(dir $@)
6444 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6445
6446 tmpfiles.d/%: tmpfiles.d/%.m4 $(top_builddir)/config.status
6447 $(AM_V_at)$(MKDIR_P) $(dir $@)
6448 $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
6449
6450
6451 units/%: units/%.m4 $(top_builddir)/config.status
6452 $(AM_V_at)$(MKDIR_P) $(dir $@)
6453 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
6454
6455 units/user/%: units/user/%.m4 $(top_builddir)/config.status
6456 $(AM_V_at)$(MKDIR_P) $(dir $@)
6457 $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
6458
6459 if ENABLE_POLKIT
6460 nodist_polkitpolicy_DATA = \
6461 $(polkitpolicy_files) \
6462 $(polkitpolicy_in_in_files:.policy.in.in=.policy)
6463 polkitrules_DATA = $(polkitrules_files)
6464 if ENABLE_POLKIT_PKLA
6465 polkitpkla_DATA = $(polkitpkla_files)
6466 endif
6467 endif
6468
6469 EXTRA_DIST += \
6470 $(polkitpolicy_in_files) \
6471 $(polkitpolicy_in_in_files)
6472
6473 # ------------------------------------------------------------------------------
6474 man/custom-entities.ent: configure.ac
6475 $(AM_V_GEN)$(MKDIR_P) $(dir $@)
6476 $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
6477 printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
6478 > $@ # '
6479
6480 CLEANFILES += \
6481 man/custom-entities.ent
6482
6483 XSLTPROC_FLAGS = \
6484 --nonet \
6485 --xinclude \
6486 --stringparam man.output.quietly 1 \
6487 --stringparam funcsynopsis.style ansi \
6488 --stringparam man.authors.section.enabled 0 \
6489 --stringparam man.copyright.section.enabled 0 \
6490 --stringparam systemd.version $(PACKAGE_VERSION) \
6491 --path '$(builddir)/man:$(srcdir)/man'
6492
6493 XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc)
6494 XSLTPROC_PROCESS_MAN = \
6495 $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
6496
6497 XSLTPROC_PROCESS_HTML = \
6498 $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
6499
6500 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
6501 $(XSLTPROC_PROCESS_MAN)
6502
6503 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
6504 $(XSLTPROC_PROCESS_MAN)
6505
6506 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
6507 $(XSLTPROC_PROCESS_MAN)
6508
6509 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
6510 $(XSLTPROC_PROCESS_MAN)
6511
6512 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
6513 $(XSLTPROC_PROCESS_MAN)
6514
6515 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
6516 $(XSLTPROC_PROCESS_HTML)
6517
6518 define html-alias
6519 $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
6520 endef
6521
6522 EXTRA_DIST += \
6523 man/custom-html.xsl \
6524 man/custom-man.xsl
6525
6526 # ------------------------------------------------------------------------------
6527 if HAVE_SYSV_COMPAT
6528 sysvinit_DATA = \
6529 docs/sysvinit/README
6530
6531 varlog_DATA = \
6532 docs/var-log/README
6533
6534 docs/sysvinit/README: docs/sysvinit/README.in
6535 $(SED_PROCESS)
6536
6537 docs/var-log/README: docs/var-log/README.in
6538 $(SED_PROCESS)
6539
6540 CLEANFILES += \
6541 docs/sysvinit/README \
6542 docs/var-log/README
6543 endif
6544
6545 EXTRA_DIST += \
6546 docs/sysvinit/README.in \
6547 docs/var-log/README.in
6548
6549 SOCKETS_TARGET_WANTS += \
6550 systemd-initctl.socket
6551
6552 if HAVE_UTMP
6553 if HAVE_SYSV_COMPAT
6554 MULTI_USER_TARGET_WANTS += \
6555 systemd-update-utmp-runlevel.service
6556 GRAPHICAL_TARGET_WANTS += \
6557 systemd-update-utmp-runlevel.service
6558 RESCUE_TARGET_WANTS += \
6559 systemd-update-utmp-runlevel.service
6560 endif
6561
6562 SYSINIT_TARGET_WANTS += \
6563 systemd-update-utmp.service
6564 endif
6565
6566 SYSINIT_TARGET_WANTS += \
6567 systemd-update-done.service
6568
6569 LOCAL_FS_TARGET_WANTS += \
6570 systemd-remount-fs.service \
6571 tmp.mount \
6572 var-lib-machines.mount
6573
6574 MULTI_USER_TARGET_WANTS += \
6575 getty.target \
6576 systemd-ask-password-wall.path
6577
6578 SYSINIT_TARGET_WANTS += \
6579 dev-hugepages.mount \
6580 dev-mqueue.mount \
6581 sys-kernel-config.mount \
6582 sys-kernel-debug.mount \
6583 sys-fs-fuse-connections.mount \
6584 systemd-sysctl.service \
6585 systemd-ask-password-console.path
6586
6587 if HAVE_SYSV_COMPAT
6588 SYSTEM_UNIT_ALIASES += \
6589 poweroff.target runlevel0.target \
6590 rescue.target runlevel1.target \
6591 multi-user.target runlevel2.target \
6592 multi-user.target runlevel3.target \
6593 multi-user.target runlevel4.target \
6594 graphical.target runlevel5.target \
6595 reboot.target runlevel6.target
6596 endif
6597
6598 SYSTEM_UNIT_ALIASES += \
6599 graphical.target default.target \
6600 reboot.target ctrl-alt-del.target \
6601 getty@.service autovt@.service
6602
6603 GENERAL_ALIASES += \
6604 $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
6605 $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
6606 $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
6607 $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
6608
6609 if HAVE_SYSV_COMPAT
6610 INSTALL_DIRS += \
6611 $(systemunitdir)/runlevel1.target.wants \
6612 $(systemunitdir)/runlevel2.target.wants \
6613 $(systemunitdir)/runlevel3.target.wants \
6614 $(systemunitdir)/runlevel4.target.wants \
6615 $(systemunitdir)/runlevel5.target.wants
6616 endif
6617
6618 INSTALL_DIRS += \
6619 $(environmentdir) \
6620 $(prefix)/lib/modules-load.d \
6621 $(sysconfdir)/modules-load.d \
6622 $(prefix)/lib/systemd/network \
6623 $(sysconfdir)/systemd/network \
6624 $(prefix)/lib/sysctl.d \
6625 $(sysconfdir)/sysctl.d \
6626 $(prefix)/lib/kernel/install.d \
6627 $(sysconfdir)/kernel/install.d \
6628 $(systemshutdowndir) \
6629 $(systemsleepdir) \
6630 $(systemgeneratordir) \
6631 $(usergeneratordir) \
6632 \
6633 $(userunitdir) \
6634 $(pkgsysconfdir)/system \
6635 $(pkgsysconfdir)/system/multi-user.target.wants \
6636 $(pkgsysconfdir)/system/getty.target.wants \
6637 $(pkgsysconfdir)/user \
6638 $(dbussessionservicedir) \
6639 $(sysconfdir)/xdg/systemd
6640
6641 install-exec-hook: $(INSTALL_EXEC_HOOKS)
6642
6643 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
6644
6645 install-data-hook: $(INSTALL_DATA_HOOKS)
6646
6647 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
6648
6649 clean-local: $(CLEAN_LOCAL_HOOKS)
6650 rm -rf $(abs_srcdir)/install-tree
6651 rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
6652 $(abs_srcdir)/hwdb/iab.txt
6653
6654 DISTCHECK_CONFIGURE_FLAGS = \
6655 --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
6656 --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
6657 --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
6658 --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
6659 --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
6660 --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
6661 --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
6662 --with-rpmmacrosdir=$$dc_install_base/$(rpmmacrosdir) \
6663 --with-rootprefix=$$dc_install_base \
6664 --enable-compat-libs
6665
6666 if HAVE_SYSV_COMPAT
6667 DISTCHECK_CONFIGURE_FLAGS += \
6668 --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
6669 --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
6670 else
6671 DISTCHECK_CONFIGURE_FLAGS += \
6672 --with-sysvinit-path= \
6673 --with-sysvrcnd-path=
6674 endif
6675
6676 if ENABLE_SPLIT_USR
6677 DISTCHECK_CONFIGURE_FLAGS += \
6678 --enable-split-usr
6679 else
6680 DISTCHECK_CONFIGURE_FLAGS += \
6681 --disable-split-usr
6682 endif
6683
6684 .PHONY: dist-check-help
6685 dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
6686 for i in $(abspath $^); do \
6687 if $$i --help | grep -v 'default:' | grep -E -q '.{80}.' ; then \
6688 echo "$(basename $$i) --help output is too wide:"; \
6689 $$i --help | awk 'length > 80' | grep -E --color=yes '.{80}'; \
6690 exit 1; \
6691 fi; done
6692
6693 include_compilers = "$(CC)" "$(CC) -ansi" "$(CC) -std=iso9899:1990"
6694 public_headers = $(filter-out src/systemd/_sd-common.h, $(pkginclude_HEADERS) $(include_HEADERS))
6695 .PHONY: dist-check-includes
6696 dist-check-includes: $(public_headers)
6697 @res=0; \
6698 for i in $(abspath $^); do \
6699 for cc in $(include_compilers); do \
6700 echo "$$cc -o/dev/null -c -x c -include "$$i" - </dev/null"; \
6701 $$cc -o/dev/null -c -x c -include "$$i" - </dev/null || res=1; \
6702 done; \
6703 done; exit $$res
6704
6705 .PHONY: hwdb-update
6706 hwdb-update: tools/meson-hwdb-update.sh
6707 $< $(top_srcdir)/hwdb
6708
6709 .PHONY: built-sources
6710 built-sources: $(BUILT_SOURCES)
6711
6712 .PHONY: git-tag
6713 git-tag:
6714 git tag -s "v$(PACKAGE_VERSION)" -m "systemd $(PACKAGE_VERSION)"
6715
6716 .PHONY: git-tar
6717 git-tar:
6718 git archive -o systemd-$(PACKAGE_VERSION).tar.gz --prefix=systemd-$(PACKAGE_VERSION)/ HEAD
6719
6720 %.asc: %
6721 gpg2 --detach-sign -a -o $@ $<
6722
6723 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
6724
6725 .PHONY: doc-sync
6726 doc-sync: man
6727 rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
6728
6729 .PHONY: install-tree
6730 install-tree: all
6731 rm -rf $(abs_srcdir)/install-tree
6732 $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
6733 tree $(abs_srcdir)/install-tree
6734
6735 # Let's run all tests of the test suite, but under valgrind. Let's
6736 # exclude perl/python/shell scripts we have in there
6737 .PHONY: valgrind-tests
6738 valgrind-tests: $(TESTS)
6739 $(AM_V_GEN)for f in $(filter-out %.pl %.py, $^); do \
6740 if $(LIBTOOL) --mode=execute file $$f | grep -q shell; then \
6741 echo -e "$${x}Skipping non-binary $$f"; else \
6742 echo -e "$${x}Running $$f"; \
6743 $(AM_TESTS_ENVIRONMENT) $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
6744 x="\n\n"; \
6745 done
6746
6747 exported-%: %
6748 $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
6749
6750 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
6751 $(AM_V_GEN)sort -u $^ > $@
6752
6753 .PHONY: check-api-docs
6754 check-api-docs: exported man
6755 $(AM_V_GEN)for symbol in `cat exported` ; do \
6756 if test -f $(builddir)/man/$$symbol.html ; then \
6757 echo " Symbol $$symbol() is documented." ; \
6758 else \
6759 echo "‣ Symbol $$symbol() lacks documentation." ; \
6760 fi ; \
6761 done
6762
6763 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
6764 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
6765
6766 undefined defined: $(ALL_OBJECTS)
6767 $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
6768 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
6769 done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
6770
6771 CLEANFILES += \
6772 defined \
6773 undefined
6774
6775 .PHONY: check-api-unused
6776 check-api-unused: defined undefined exported
6777 ( cat exported undefined ) | sort -u | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
6778
6779 .PHONY: check-includes
6780 check-includes: $(top_srcdir)/tools/check-includes.pl
6781 $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
6782 | xargs $(top_srcdir)/tools/check-includes.pl
6783
6784 EXTRA_DIST += \
6785 $(top_srcdir)/tools/check-includes.pl
6786
6787 # Stupid test that everything purported to be exported really is
6788 define generate-sym-test
6789 $(AM_V_at)$(MKDIR_P) $(dir $@)
6790 $(AM_V_at)printf '#include <stdio.h>\n' > $@
6791 $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
6792 $(AM_V_at)printf 'void* functions[] = {\n' >> $@
6793 $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
6794 $(AM_V_at)printf '};\nint main(void) {\n' >> $@
6795 $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
6796 $(AM_V_at)printf 'return 0; }\n' >> $@
6797 endef
6798
6799 test-libsystemd-sym.c: \
6800 $(top_builddir)/src/libsystemd/libsystemd.sym \
6801 src/systemd/sd-journal.h \
6802 src/systemd/sd-daemon.h \
6803 src/systemd/sd-login.h \
6804 src/systemd/sd-bus.h \
6805 src/systemd/sd-utf8.h \
6806 src/systemd/sd-resolve.h \
6807 src/systemd/sd-path.h \
6808 src/systemd/sd-event.h
6809 $(generate-sym-test)
6810
6811 test-libudev-sym.c: \
6812 src/libudev/libudev.sym \
6813 src/udev/udev.h
6814 $(generate-sym-test)
6815
6816 nodist_test_libsystemd_sym_SOURCES = \
6817 test-libsystemd-sym.c
6818 test_libsystemd_sym_LDADD = \
6819 libsystemd.la
6820
6821 nodist_test_libudev_sym_SOURCES = \
6822 test-libudev-sym.c
6823 test_libudev_sym_CFLAGS = \
6824 $(AM_CFLAGS) \
6825 -Wno-deprecated-declarations
6826 test_libudev_sym_LDADD = \
6827 libudev.la
6828
6829 BUILT_SOURCES += \
6830 test-libsystemd-sym.c \
6831 test-libudev-sym.c
6832
6833 CLEANFILES += \
6834 test-libsystemd-sym.c \
6835 test-libudev-sym.c
6836
6837 tests += \
6838 test-libsystemd-sym \
6839 test-libudev-sym
6840
6841 .PHONY: install-tests
6842 install-tests: $(tests) $(TEST_DATA_FILES)
6843 for f in $(tests); do \
6844 if [ -x $(top_builddir)/.libs/$$f ]; then \
6845 install -D -m 755 $(top_builddir)/.libs/$$f $(DESTDIR)/$(testsdir)/$$f; \
6846 else \
6847 install -D -m 755 $(top_builddir)/$$f $(DESTDIR)/$(testsdir)/$$f; \
6848 fi; \
6849 done
6850 for f in $(TEST_DATA_FILES); do \
6851 install -D -m 644 $(top_srcdir)/$$f $(DESTDIR)/$(testsdir)/testdata/$${f#test/}; \
6852 done
6853
6854
6855 .PHONY: cppcheck
6856 cppcheck:
6857 cppcheck --enable=all -q $(top_srcdir)
6858
6859 # Used to extract compile flags for YCM.
6860 print-%:
6861 @echo $($*)
6862
6863 .PHONY: git-contrib
6864 git-contrib:
6865 @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | sed 's/ / /g' | awk '{ print $$0 "," }' | sort -u
6866
6867 EXTRA_DIST += \
6868 tools/gdb-sd_dump_hashmaps.py
6869
6870 .PHONY: list-keys
6871 list-keys:
6872 gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --list-keys
6873
6874 .PHONY: add-key
6875 add-key:
6876 gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import -