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