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