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