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