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