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