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