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