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