]> git.ipfire.org Git - thirdparty/systemd.git/blob - Makefile.am
test-execute: Add tests for new PassEnvironment= directive
[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/device.c \
1142 src/core/device.h \
1143 src/core/mount.c \
1144 src/core/mount.h \
1145 src/core/automount.c \
1146 src/core/automount.h \
1147 src/core/swap.c \
1148 src/core/swap.h \
1149 src/core/timer.c \
1150 src/core/timer.h \
1151 src/core/path.c \
1152 src/core/path.h \
1153 src/core/slice.c \
1154 src/core/slice.h \
1155 src/core/scope.c \
1156 src/core/scope.h \
1157 src/core/load-dropin.c \
1158 src/core/load-dropin.h \
1159 src/core/execute.c \
1160 src/core/execute.h \
1161 src/core/kill.c \
1162 src/core/kill.h \
1163 src/core/dbus.c \
1164 src/core/dbus.h \
1165 src/core/dbus-manager.c \
1166 src/core/dbus-manager.h \
1167 src/core/dbus-unit.c \
1168 src/core/dbus-unit.h \
1169 src/core/dbus-job.c \
1170 src/core/dbus-job.h \
1171 src/core/dbus-service.c \
1172 src/core/dbus-service.h \
1173 src/core/dbus-socket.c \
1174 src/core/dbus-socket.h \
1175 src/core/dbus-busname.c \
1176 src/core/dbus-busname.h \
1177 src/core/dbus-target.c \
1178 src/core/dbus-target.h \
1179 src/core/dbus-device.c \
1180 src/core/dbus-device.h \
1181 src/core/dbus-mount.c \
1182 src/core/dbus-mount.h \
1183 src/core/dbus-automount.c \
1184 src/core/dbus-automount.h \
1185 src/core/dbus-swap.c \
1186 src/core/dbus-swap.h \
1187 src/core/dbus-timer.c \
1188 src/core/dbus-timer.h \
1189 src/core/dbus-path.c \
1190 src/core/dbus-path.h \
1191 src/core/dbus-slice.c \
1192 src/core/dbus-slice.h \
1193 src/core/dbus-scope.c \
1194 src/core/dbus-scope.h \
1195 src/core/dbus-execute.c \
1196 src/core/dbus-execute.h \
1197 src/core/dbus-kill.c \
1198 src/core/dbus-kill.h \
1199 src/core/dbus-cgroup.c \
1200 src/core/dbus-cgroup.h \
1201 src/core/cgroup.c \
1202 src/core/cgroup.h \
1203 src/core/selinux-access.c \
1204 src/core/selinux-access.h \
1205 src/core/selinux-setup.c \
1206 src/core/selinux-setup.h \
1207 src/core/smack-setup.c \
1208 src/core/smack-setup.h \
1209 src/core/ima-setup.c \
1210 src/core/ima-setup.h \
1211 src/core/locale-setup.h \
1212 src/core/locale-setup.c \
1213 src/core/hostname-setup.c \
1214 src/core/hostname-setup.h \
1215 src/core/machine-id-setup.c \
1216 src/core/machine-id-setup.h \
1217 src/core/mount-setup.c \
1218 src/core/mount-setup.h \
1219 src/core/kmod-setup.c \
1220 src/core/kmod-setup.h \
1221 src/core/loopback-setup.h \
1222 src/core/loopback-setup.c \
1223 src/core/namespace.c \
1224 src/core/namespace.h \
1225 src/core/killall.h \
1226 src/core/killall.c \
1227 src/core/audit-fd.c \
1228 src/core/audit-fd.h \
1229 src/core/show-status.c \
1230 src/core/show-status.h \
1231 src/core/failure-action.c \
1232 src/core/failure-action.h
1233
1234 nodist_libcore_la_SOURCES = \
1235 src/core/load-fragment-gperf.c \
1236 src/core/load-fragment-gperf-nulstr.c
1237
1238 libcore_la_CFLAGS = \
1239 $(AM_CFLAGS) \
1240 $(PAM_CFLAGS) \
1241 $(AUDIT_CFLAGS) \
1242 $(KMOD_CFLAGS) \
1243 $(APPARMOR_CFLAGS) \
1244 $(MOUNT_CFLAGS) \
1245 $(SECCOMP_CFLAGS)
1246
1247 libcore_la_LIBADD = \
1248 libshared.la \
1249 $(PAM_LIBS) \
1250 $(AUDIT_LIBS) \
1251 $(KMOD_LIBS) \
1252 $(APPARMOR_LIBS) \
1253 $(MOUNT_LIBS)
1254
1255 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1256 $(AM_V_at)$(MKDIR_P) $(dir $@)
1257 $(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 ";" }' < $< > $@
1258
1259 gperf_gperf_m4_sources = \
1260 src/core/load-fragment-gperf.gperf.m4
1261
1262 gperf_txt_sources = \
1263 src/basic/errno-list.txt \
1264 src/basic/af-list.txt \
1265 src/basic/arphrd-list.txt \
1266 src/basic/cap-list.txt
1267
1268 BUILT_SOURCES += \
1269 $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf.c) \
1270 $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf-nulstr.c) \
1271 $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
1272 $(gperf_txt_sources:-list.txt=-from-name.h) \
1273 $(filter-out %keyboard-keys-to-name.h,$(gperf_txt_sources:-list.txt=-to-name.h))
1274
1275 CLEANFILES += \
1276 $(gperf_txt_sources:-list.txt=-from-name.gperf)
1277 DISTCLEANFILES = \
1278 $(gperf_txt_sources)
1279
1280 EXTRA_DIST += \
1281 $(gperf_gperf_m4_sources) \
1282 $(gperf_gperf_sources)
1283
1284 CLEANFILES += \
1285 $(gperf_txt_sources)
1286
1287 %-from-name.gperf: %-list.txt
1288 $(AM_V_at)$(MKDIR_P) $(dir $@)
1289 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1290
1291 %-from-name.h: %-from-name.gperf
1292 $(AM_V_at)$(MKDIR_P) $(dir $@)
1293 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
1294
1295
1296 src/basic/errno-list.txt:
1297 $(AM_V_at)$(MKDIR_P) $(dir $@)
1298 $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
1299
1300 src/basic/errno-to-name.h: src/basic/errno-list.txt
1301 $(AM_V_at)$(MKDIR_P) $(dir $@)
1302 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1303
1304
1305 src/basic/af-list.txt:
1306 $(AM_V_at)$(MKDIR_P) $(dir $@)
1307 $(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; }' >$@
1308
1309 src/basic/af-to-name.h: src/basic/af-list.txt
1310 $(AM_V_at)$(MKDIR_P) $(dir $@)
1311 $(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 "};"}' <$< >$@
1312
1313
1314 src/basic/arphrd-list.txt:
1315 $(AM_V_at)$(MKDIR_P) $(dir $@)
1316 $(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_//' >$@
1317
1318 src/basic/arphrd-to-name.h: src/basic/arphrd-list.txt
1319 $(AM_V_at)$(MKDIR_P) $(dir $@)
1320 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1321
1322 src/basic/arphrd-from-name.gperf: src/basic/arphrd-list.txt
1323 $(AM_V_at)$(MKDIR_P) $(dir $@)
1324 $(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 }' <$< >$@
1325
1326
1327 src/basic/cap-list.txt:
1328 $(AM_V_at)$(MKDIR_P) $(dir $@)
1329 $(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 >$@
1330
1331 src/basic/cap-to-name.h: src/basic/cap-list.txt
1332 $(AM_V_at)$(MKDIR_P) $(dir $@)
1333 $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
1334
1335 src/basic/cap-from-name.gperf: src/basic/cap-list.txt
1336 $(AM_V_at)$(MKDIR_P) $(dir $@)
1337 $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1338
1339 src/basic/cap-from-name.h: src/basic/cap-from-name.gperf
1340 $(AM_V_at)$(MKDIR_P) $(dir $@)
1341 $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
1342
1343 audit_list_includes = -include linux/audit.h -include missing.h
1344 if HAVE_AUDIT
1345 audit_list_includes += -include libaudit.h
1346 endif
1347
1348 src/journal/audit_type-list.txt:
1349 $(AM_V_at)$(MKDIR_P) $(dir $@)
1350 $(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 >$@
1351
1352 src/journal/audit_type-to-name.h: src/journal/audit_type-list.txt
1353 $(AM_V_at)$(MKDIR_P) $(dir $@)
1354 $(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" }' <$< >$@
1355
1356
1357 src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1358 $(AM_V_at)$(MKDIR_P) $(dir $@)
1359 $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1360
1361 src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
1362 $(AM_V_at)$(MKDIR_P) $(dir $@)
1363 $(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" }' <$< >$@
1364
1365 src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
1366 $(AM_V_at)$(MKDIR_P) $(dir $@)
1367 $(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 }' <$< >$@
1368
1369 # ------------------------------------------------------------------------------
1370 systemd_SOURCES = \
1371 src/core/main.c
1372
1373 systemd_CFLAGS = \
1374 $(AM_CFLAGS) \
1375 $(SECCOMP_CFLAGS) \
1376 $(MOUNT_CFLAGS)
1377
1378 systemd_LDADD = \
1379 libcore.la
1380
1381 dist_pkgsysconf_DATA += \
1382 src/core/system.conf \
1383 src/core/user.conf
1384
1385 dist_dbuspolicy_DATA += \
1386 src/core/org.freedesktop.systemd1.conf
1387
1388 dist_dbussystemservice_DATA += \
1389 src/core/org.freedesktop.systemd1.service
1390
1391 polkitpolicy_in_in_files += \
1392 src/core/org.freedesktop.systemd1.policy.in.in
1393
1394 pkgconfigdata_DATA += \
1395 src/core/systemd.pc
1396
1397 nodist_rpmmacros_DATA = \
1398 src/core/macros.systemd
1399
1400 EXTRA_DIST += \
1401 src/core/systemd.pc.in \
1402 src/core/macros.systemd.in
1403
1404 # ------------------------------------------------------------------------------
1405
1406 manual_tests += \
1407 test-ns \
1408 test-loopback \
1409 test-hostname \
1410 test-daemon \
1411 test-cgroup \
1412 test-install \
1413 test-watchdog \
1414 test-log \
1415 test-ipcrm \
1416 test-btrfs \
1417 test-acd \
1418 test-ipv4ll-manual
1419
1420 if HAVE_LIBIPTC
1421 manual_tests += \
1422 test-firewall-util
1423 endif
1424
1425 if HAVE_KMOD
1426 manual_tests += \
1427 test-netlink-manual
1428 endif
1429
1430 tests += \
1431 test-engine \
1432 test-cgroup-mask \
1433 test-job-type \
1434 test-env-replace \
1435 test-strbuf \
1436 test-strv \
1437 test-path \
1438 test-path-util \
1439 test-strxcpyx \
1440 test-siphash24 \
1441 test-unit-name \
1442 test-unit-file \
1443 test-utf8 \
1444 test-ellipsize \
1445 test-util \
1446 test-string-util \
1447 test-extract-word \
1448 test-parse-util \
1449 test-user-util \
1450 test-hostname-util \
1451 test-process-util \
1452 test-terminal-util \
1453 test-path-lookup \
1454 test-barrier \
1455 test-tmpfiles \
1456 test-namespace \
1457 test-date \
1458 test-sleep \
1459 test-replace-var \
1460 test-sched-prio \
1461 test-calendarspec \
1462 test-strip-tab-ansi \
1463 test-cgroup-util \
1464 test-fstab-util \
1465 test-prioq \
1466 test-fileio \
1467 test-time \
1468 test-hashmap \
1469 test-set \
1470 test-bitmap \
1471 test-list \
1472 test-unaligned \
1473 test-tables \
1474 test-device-nodes \
1475 test-xml \
1476 test-json \
1477 test-architecture \
1478 test-socket-util \
1479 test-fdset \
1480 test-conf-files \
1481 test-conf-parser \
1482 test-capability \
1483 test-async \
1484 test-ratelimit \
1485 test-condition \
1486 test-uid-range \
1487 test-bus-policy \
1488 test-locale-util \
1489 test-execute \
1490 test-copy \
1491 test-cap-list \
1492 test-sigbus \
1493 test-verbs \
1494 test-af-list \
1495 test-arphrd-list \
1496 test-dns-domain
1497
1498 EXTRA_DIST += \
1499 test/a.service \
1500 test/basic.target \
1501 test/b.service \
1502 test/c.service \
1503 test/daughter.service \
1504 test/d.service \
1505 test/end.service \
1506 test/e.service \
1507 test/f.service \
1508 test/grandchild.service \
1509 test/g.service \
1510 test/hello-after-sleep.target \
1511 test/hello.service \
1512 test/h.service \
1513 test/parent-deep.slice \
1514 test/parent.slice \
1515 test/sched_idle_bad.service \
1516 test/sched_idle_ok.service \
1517 test/sched_rr_bad.service \
1518 test/sched_rr_change.service \
1519 test/sched_rr_ok.service \
1520 test/shutdown.target \
1521 test/sleep.service \
1522 test/sockets.target \
1523 test/son.service \
1524 test/sysinit.target \
1525 test/testsuite.target \
1526 test/timers.target \
1527 test/unstoppable.service \
1528 test/test-path/paths.target \
1529 test/test-path/basic.target \
1530 test/test-path/sysinit.target \
1531 test/test-path/path-changed.service \
1532 test/test-path/path-directorynotempty.service \
1533 test/test-path/path-existsglob.service \
1534 test/test-path/path-exists.service \
1535 test/test-path/path-makedirectory.service \
1536 test/test-path/path-modified.service \
1537 test/test-path/path-mycustomunit.service \
1538 test/test-path/path-service.service \
1539 test/test-path/path-changed.path \
1540 test/test-path/path-directorynotempty.path \
1541 test/test-path/path-existsglob.path \
1542 test/test-path/path-exists.path \
1543 test/test-path/path-makedirectory.path \
1544 test/test-path/path-modified.path \
1545 test/test-path/path-unit.path \
1546 test/test-execute/exec-environment-empty.service \
1547 test/test-execute/exec-environment-multiple.service \
1548 test/test-execute/exec-environment.service \
1549 test/test-execute/exec-passenvironment-absent.service \
1550 test/test-execute/exec-passenvironment-empty.service \
1551 test/test-execute/exec-passenvironment-repeated.service \
1552 test/test-execute/exec-passenvironment.service \
1553 test/test-execute/exec-group.service \
1554 test/test-execute/exec-ignoresigpipe-no.service \
1555 test/test-execute/exec-ignoresigpipe-yes.service \
1556 test/test-execute/exec-personality-x86-64.service \
1557 test/test-execute/exec-personality-x86.service \
1558 test/test-execute/exec-personality-s390.service \
1559 test/test-execute/exec-privatedevices-no.service \
1560 test/test-execute/exec-privatedevices-yes.service \
1561 test/test-execute/exec-privatetmp-no.service \
1562 test/test-execute/exec-privatetmp-yes.service \
1563 test/test-execute/exec-systemcallerrornumber.service \
1564 test/test-execute/exec-systemcallfilter-failing2.service \
1565 test/test-execute/exec-systemcallfilter-failing.service \
1566 test/test-execute/exec-systemcallfilter-not-failing2.service \
1567 test/test-execute/exec-systemcallfilter-not-failing.service \
1568 test/test-execute/exec-user.service \
1569 test/test-execute/exec-workingdirectory.service \
1570 test/test-execute/exec-umask-0177.service \
1571 test/test-execute/exec-umask-default.service \
1572 test/test-execute/exec-privatenetwork-yes.service \
1573 test/test-execute/exec-environmentfile.service \
1574 test/test-execute/exec-oomscoreadjust-positive.service \
1575 test/test-execute/exec-oomscoreadjust-negative.service \
1576 test/test-execute/exec-ioschedulingclass-best-effort.service \
1577 test/test-execute/exec-ioschedulingclass-idle.service \
1578 test/test-execute/exec-ioschedulingclass-none.service \
1579 test/test-execute/exec-ioschedulingclass-realtime.service \
1580 test/test-execute/exec-capabilityboundingset-invert.service \
1581 test/test-execute/exec-capabilityboundingset-merge.service \
1582 test/test-execute/exec-capabilityboundingset-reset.service \
1583 test/test-execute/exec-capabilityboundingset-simple.service \
1584 test/bus-policy/hello.conf \
1585 test/bus-policy/methods.conf \
1586 test/bus-policy/ownerships.conf \
1587 test/bus-policy/signals.conf \
1588 test/bus-policy/check-own-rules.conf \
1589 test/bus-policy/many-rules.conf \
1590 test/bus-policy/test.conf
1591
1592
1593 EXTRA_DIST += \
1594 src/test/test-helper.h
1595
1596 test_device_nodes_SOURCES = \
1597 src/test/test-device-nodes.c
1598
1599 test_device_nodes_LDADD = \
1600 libshared.la
1601
1602 test_engine_SOURCES = \
1603 src/test/test-engine.c
1604
1605 test_engine_CFLAGS = \
1606 $(AM_CFLAGS) \
1607 $(SECCOMP_CFLAGS) \
1608 $(MOUNT_CFLAGS)
1609
1610 test_engine_LDADD = \
1611 libcore.la
1612
1613 test_job_type_SOURCES = \
1614 src/test/test-job-type.c
1615
1616 test_job_type_CFLAGS = \
1617 $(AM_CFLAGS) \
1618 $(SECCOMP_CFLAGS) \
1619 $(MOUNT_CFLAGS)
1620
1621 test_job_type_LDADD = \
1622 libcore.la
1623
1624 test_ns_SOURCES = \
1625 src/test/test-ns.c
1626
1627 test_ns_CFLAGS = \
1628 $(AM_CFLAGS) \
1629 $(SECCOMP_CFLAGS)
1630
1631 test_ns_LDADD = \
1632 libcore.la
1633
1634 test_loopback_SOURCES = \
1635 src/test/test-loopback.c
1636
1637 test_loopback_LDADD = \
1638 libcore.la
1639
1640 test_hostname_SOURCES = \
1641 src/test/test-hostname.c
1642
1643 test_hostname_LDADD = \
1644 libcore.la
1645
1646 test_dns_domain_SOURCES = \
1647 src/test/test-dns-domain.c
1648
1649 test_dns_domain_LDADD = \
1650 libsystemd-network.la \
1651 libshared.la
1652
1653 if ENABLE_EFI
1654 manual_tests += \
1655 test-boot-timestamp
1656
1657 test_boot_timestamp_SOURCES = \
1658 src/test/test-boot-timestamps.c
1659
1660 test_boot_timestamp_LDADD = \
1661 libshared.la
1662 endif
1663
1664 test_unit_name_SOURCES = \
1665 src/test/test-unit-name.c
1666
1667 test_unit_name_CFLAGS = \
1668 $(AM_CFLAGS) \
1669 $(SECCOMP_CFLAGS) \
1670 $(MOUNT_CFLAGS)
1671
1672 test_unit_name_LDADD = \
1673 libcore.la
1674
1675 test_unit_file_SOURCES = \
1676 src/test/test-unit-file.c
1677
1678 test_unit_file_CFLAGS = \
1679 $(AM_CFLAGS) \
1680 $(SECCOMP_CFLAGS) \
1681 $(MOUNT_CFLAGS)
1682
1683 test_unit_file_LDADD = \
1684 libcore.la
1685
1686 test_utf8_SOURCES = \
1687 src/test/test-utf8.c
1688
1689 test_utf8_LDADD = \
1690 libshared.la
1691
1692 test_capability_SOURCES = \
1693 src/test/test-capability.c
1694
1695 test_capability_LDADD = \
1696 libshared.la
1697
1698 test_async_SOURCES = \
1699 src/test/test-async.c
1700
1701 test_async_LDADD = \
1702 libshared.la
1703
1704 test_locale_util_SOURCES = \
1705 src/test/test-locale-util.c
1706
1707 test_locale_util_LDADD = \
1708 libshared.la
1709
1710 test_copy_SOURCES = \
1711 src/test/test-copy.c
1712
1713 test_copy_LDADD = \
1714 libshared.la
1715
1716 test_sigbus_SOURCES = \
1717 src/test/test-sigbus.c
1718
1719 test_sigbus_LDADD = \
1720 libshared.la
1721
1722 test_condition_SOURCES = \
1723 src/test/test-condition.c
1724
1725 test_condition_LDADD = \
1726 libshared.la
1727
1728 test_fdset_SOURCES = \
1729 src/test/test-fdset.c
1730
1731 test_fdset_LDADD = \
1732 libshared.la
1733
1734 test_fstab_util_SOURCES = \
1735 src/test/test-fstab-util.c
1736
1737 test_fstab_util_LDADD = \
1738 libshared.la
1739
1740 test_ratelimit_SOURCES = \
1741 src/test/test-ratelimit.c
1742
1743 test_ratelimit_LDADD = \
1744 libshared.la
1745
1746 test_util_SOURCES = \
1747 src/test/test-util.c
1748
1749 test_util_LDADD = \
1750 libshared.la
1751
1752 test_string_util_SOURCES = \
1753 src/test/test-string-util.c
1754
1755 test_string_util_LDADD = \
1756 libshared.la
1757
1758 test_extract_word_SOURCES = \
1759 src/test/test-extract-word.c
1760
1761 test_extract_word_LDADD = \
1762 libshared.la
1763
1764 test_parse_util_SOURCES = \
1765 src/test/test-parse-util.c
1766
1767 test_parse_util_LDADD = \
1768 libshared.la
1769
1770 test_user_util_SOURCES = \
1771 src/test/test-user-util.c
1772
1773 test_user_util_LDADD = \
1774 libshared.la
1775
1776 test_hostname_util_SOURCES = \
1777 src/test/test-hostname-util.c
1778
1779 test_hostname_util_LDADD = \
1780 libshared.la
1781
1782 test_process_util_SOURCES = \
1783 src/test/test-process-util.c
1784
1785 test_process_util_LDADD = \
1786 libshared.la
1787
1788 test_terminal_util_SOURCES = \
1789 src/test/test-terminal-util.c
1790
1791 test_terminal_util_LDADD = \
1792 libshared.la
1793
1794 test_path_lookup_SOURCES = \
1795 src/test/test-path-lookup.c
1796
1797 test_path_lookup_LDADD = \
1798 libshared.la
1799
1800 test_uid_range_SOURCES = \
1801 src/test/test-uid-range.c
1802
1803 test_uid_range_LDADD = \
1804 libshared.la
1805
1806 test_cap_list_SOURCES = \
1807 src/test/test-cap-list.c
1808
1809 test_cap_list_LDADD = \
1810 libshared.la
1811
1812 test_socket_util_SOURCES = \
1813 src/test/test-socket-util.c
1814
1815 test_socket_util_LDADD = \
1816 libshared.la
1817
1818 test_barrier_SOURCES = \
1819 src/test/test-barrier.c
1820
1821 test_barrier_LDADD = \
1822 libshared.la
1823
1824 test_tmpfiles_SOURCES = \
1825 src/test/test-tmpfiles.c
1826
1827 test_tmpfiles_LDADD = \
1828 libshared.la
1829
1830 test_namespace_SOURCES = \
1831 src/test/test-namespace.c
1832
1833 test_verbs_SOURCES = \
1834 src/test/test-verbs.c
1835
1836 test_verbs_LDADD = \
1837 libshared.la
1838
1839 test_namespace_LDADD = \
1840 libcore.la
1841
1842 BUILT_SOURCES += \
1843 src/test/test-hashmap-ordered.c
1844
1845 src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
1846 $(AM_V_at)$(MKDIR_P) $(dir $@)
1847 $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
1848 { if (!match($$0, "^#include")) \
1849 gsub(/hashmap/, "ordered_hashmap"); \
1850 gsub(/HASHMAP/, "ORDERED_HASHMAP"); \
1851 gsub(/Hashmap/, "OrderedHashmap"); \
1852 print }' <$< >$@
1853
1854 nodist_test_hashmap_SOURCES = \
1855 src/test/test-hashmap-ordered.c
1856
1857 test_hashmap_SOURCES = \
1858 src/test/test-hashmap.c \
1859 src/test/test-hashmap-plain.c
1860
1861 test_hashmap_LDADD = \
1862 libshared.la
1863
1864 test_set_SOURCES = \
1865 src/test/test-set.c
1866
1867 test_set_LDADD = \
1868 libshared.la
1869
1870 test_bitmap_SOURCES = \
1871 src/test/test-bitmap.c
1872
1873 test_bitmap_LDADD = \
1874 libshared.la
1875
1876 test_xml_SOURCES = \
1877 src/test/test-xml.c
1878
1879 test_xml_LDADD = \
1880 libshared.la
1881
1882 test_json_SOURCES = \
1883 src/test/test-json.c
1884
1885 test_json_LDADD = \
1886 libshared.la
1887
1888 test_list_SOURCES = \
1889 src/test/test-list.c
1890
1891 test_list_LDADD = \
1892 libshared.la
1893
1894 test_unaligned_LDADD = \
1895 libshared.la
1896
1897 test_unaligned_SOURCES = \
1898 src/test/test-unaligned.c
1899
1900 test_tables_SOURCES = \
1901 src/test/test-tables.c \
1902 src/shared/test-tables.h \
1903 src/bus-proxyd/bus-xml-policy.c \
1904 src/bus-proxyd/bus-xml-policy.h \
1905 src/journal/journald-server.c \
1906 src/journal/journald-server.h
1907
1908 test_tables_CPPFLAGS = \
1909 $(AM_CPPFLAGS) \
1910 -I$(top_srcdir)/src/bus-proxyd
1911
1912 test_tables_CFLAGS = \
1913 $(AM_CFLAGS) \
1914 $(SECCOMP_CFLAGS) \
1915 $(MOUNT_CFLAGS)
1916
1917 test_tables_LDADD = \
1918 libjournal-core.la \
1919 libcore.la \
1920 libudev-core.la
1921
1922 test_prioq_SOURCES = \
1923 src/test/test-prioq.c
1924
1925 test_prioq_LDADD = \
1926 libshared.la
1927
1928 test_fileio_SOURCES = \
1929 src/test/test-fileio.c
1930
1931 test_fileio_LDADD = \
1932 libshared.la
1933
1934 test_time_SOURCES = \
1935 src/test/test-time.c
1936
1937 test_time_LDADD = \
1938 libshared.la
1939
1940 test_architecture_SOURCES = \
1941 src/test/test-architecture.c
1942
1943 test_architecture_LDADD = \
1944 libshared.la
1945
1946 test_log_SOURCES = \
1947 src/test/test-log.c
1948
1949 test_log_LDADD = \
1950 libshared.la
1951
1952 test_ipcrm_SOURCES = \
1953 src/test/test-ipcrm.c
1954
1955 test_ipcrm_LDADD = \
1956 libshared.la
1957
1958 test_btrfs_SOURCES = \
1959 src/test/test-btrfs.c
1960
1961 test_btrfs_LDADD = \
1962 libshared.la
1963
1964 if HAVE_LIBIPTC
1965 test_firewall_util_SOURCES = \
1966 src/test/test-firewall-util.c
1967
1968 test_firewall_util_CFLAGS = \
1969 $(AM_CFLAGS) \
1970 $(LIBIPTC_CFLAGS)
1971
1972 test_firewall_util_LDADD = \
1973 libfirewall.la \
1974 libshared.la \
1975 $(LIBIPTC_LIBS)
1976 endif
1977
1978 test_netlink_manual_SOURCES = \
1979 src/test/test-netlink-manual.c
1980
1981 test_netlink_manual_CFLAGS = \
1982 $(AM_CFLAGS) \
1983 $(KMOD_CFLAGS)
1984
1985 test_netlink_manual_LDADD = \
1986 libshared.la \
1987 $(KMOD_LIBS)
1988
1989 test_ellipsize_SOURCES = \
1990 src/test/test-ellipsize.c
1991
1992 test_ellipsize_LDADD = \
1993 libshared.la
1994
1995 test_date_SOURCES = \
1996 src/test/test-date.c
1997
1998 test_date_LDADD = \
1999 libshared.la
2000
2001 test_sleep_SOURCES = \
2002 src/test/test-sleep.c
2003
2004 test_sleep_LDADD = \
2005 libcore.la
2006
2007 test_replace_var_SOURCES = \
2008 src/test/test-replace-var.c
2009
2010 test_replace_var_LDADD = \
2011 libshared.la
2012
2013 test_calendarspec_SOURCES = \
2014 src/test/test-calendarspec.c
2015
2016 test_calendarspec_LDADD = \
2017 libshared.la
2018
2019 test_strip_tab_ansi_SOURCES = \
2020 src/test/test-strip-tab-ansi.c
2021
2022 test_strip_tab_ansi_LDADD = \
2023 libshared.la
2024
2025 test_daemon_SOURCES = \
2026 src/test/test-daemon.c
2027
2028 test_daemon_LDADD = \
2029 libshared.la
2030
2031 test_cgroup_SOURCES = \
2032 src/test/test-cgroup.c
2033
2034 test_cgroup_LDADD = \
2035 libshared.la
2036
2037 test_cgroup_mask_SOURCES = \
2038 src/test/test-cgroup-mask.c
2039
2040 test_cgroup_mask_CPPFLAGS = \
2041 $(AM_CPPFLAGS) \
2042 $(MOUNT_CFLAGS)
2043
2044 test_cgroup_mask_CFLAGS = \
2045 $(AM_CFLAGS) \
2046 $(SECCOMP_CFLAGS)
2047
2048 test_cgroup_mask_LDADD = \
2049 libcore.la
2050
2051 test_cgroup_util_SOURCES = \
2052 src/test/test-cgroup-util.c
2053
2054 test_cgroup_util_LDADD = \
2055 libshared.la
2056
2057 test_env_replace_SOURCES = \
2058 src/test/test-env-replace.c
2059
2060 test_env_replace_LDADD = \
2061 libshared.la
2062
2063 test_strbuf_SOURCES = \
2064 src/test/test-strbuf.c
2065
2066 test_strbuf_LDADD = \
2067 libshared.la
2068
2069 test_strv_SOURCES = \
2070 src/test/test-strv.c
2071
2072 test_strv_LDADD = \
2073 libshared.la
2074
2075 test_path_util_SOURCES = \
2076 src/test/test-path-util.c
2077
2078 test_path_util_LDADD = \
2079 libshared.la
2080
2081 test_path_SOURCES = \
2082 src/test/test-path.c
2083
2084 test_path_CFLAGS = \
2085 $(AM_CFLAGS) \
2086 $(MOUNT_CFLAGS)
2087
2088 test_path_LDADD = \
2089 libcore.la
2090
2091 test_execute_SOURCES = \
2092 src/test/test-execute.c
2093
2094 test_execute_CFLAGS = \
2095 $(AM_CFLAGS) \
2096 $(MOUNT_CFLAGS)
2097
2098 test_execute_LDADD = \
2099 libcore.la
2100
2101 test_siphash24_SOURCES = \
2102 src/test/test-siphash24.c
2103
2104 test_siphash24_LDADD = \
2105 libshared.la
2106
2107 test_strxcpyx_SOURCES = \
2108 src/test/test-strxcpyx.c
2109
2110 test_strxcpyx_LDADD = \
2111 libshared.la
2112
2113 test_install_SOURCES = \
2114 src/test/test-install.c
2115
2116 test_install_LDADD = \
2117 libshared.la
2118
2119 test_watchdog_SOURCES = \
2120 src/test/test-watchdog.c
2121
2122 test_watchdog_LDADD = \
2123 libshared.la
2124
2125 test_sched_prio_SOURCES = \
2126 src/test/test-sched-prio.c
2127
2128 test_sched_prio_CPPFLAGS = \
2129 $(AM_CPPFLAGS) \
2130 $(MOUNT_CFLAGS)
2131
2132 test_sched_prio_CFLAGS = \
2133 $(AM_CFLAGS) \
2134 $(SECCOMP_CFLAGS)
2135
2136 test_sched_prio_LDADD = \
2137 libcore.la
2138
2139 test_conf_files_SOURCES = \
2140 src/test/test-conf-files.c
2141
2142 test_conf_files_LDADD = \
2143 libshared.la
2144
2145 test_conf_parser_SOURCES = \
2146 src/test/test-conf-parser.c
2147
2148 test_conf_parser_LDADD = \
2149 libshared.la
2150
2151 test_bus_policy_SOURCES = \
2152 src/bus-proxyd/test-bus-xml-policy.c
2153
2154 test_bus_policy_LDADD = \
2155 libbus-proxy-core.la \
2156 libshared.la
2157
2158 test_af_list_SOURCES = \
2159 src/test/test-af-list.c
2160
2161 test_af_list_LDADD = \
2162 libbasic.la
2163
2164 test_arphrd_list_SOURCES = \
2165 src/test/test-arphrd-list.c
2166
2167 test_arphrd_list_LDADD = \
2168 libbasic.la
2169
2170 # ------------------------------------------------------------------------------
2171 ## .PHONY so it always rebuilds it
2172 .PHONY: coverage lcov-run lcov-report coverage-sync
2173
2174 # run lcov from scratch, always
2175 coverage: all
2176 $(MAKE) lcov-run
2177 $(MAKE) lcov-report
2178
2179 coverage_dir = coverage
2180 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
2181
2182 if ENABLE_COVERAGE
2183 # reset run coverage tests
2184 lcov-run:
2185 @rm -rf $(coverage_dir)
2186 lcov $(coverage_opts) --zerocounters
2187 -$(MAKE) check
2188
2189 # generate report based on current coverage data
2190 lcov-report:
2191 $(MKDIR_P) $(coverage_dir)
2192 lcov $(coverage_opts) --compat-libtool --capture --no-external \
2193 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
2194 lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
2195 genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
2196 @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
2197
2198 # lcov doesn't work properly with vpath builds, make sure that bad
2199 # output is not uploaded by mistake.
2200 coverage-sync: coverage
2201 test "$(builddir)" = "$(srcdir)"
2202 rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
2203
2204 else
2205 lcov-run lcov-report:
2206 echo "Need to reconfigure with --enable-coverage"
2207 endif
2208
2209 # ------------------------------------------------------------------------------
2210 systemd_analyze_SOURCES = \
2211 src/analyze/analyze.c \
2212 src/analyze/analyze-verify.c \
2213 src/analyze/analyze-verify.h
2214
2215 systemd_analyze_CFLAGS = \
2216 $(AM_CFLAGS) \
2217 $(SECCOMP_CFLAGS) \
2218 $(MOUNT_CFLAGS)
2219
2220 systemd_analyze_LDADD = \
2221 libcore.la
2222
2223 # ------------------------------------------------------------------------------
2224 systemd_initctl_SOURCES = \
2225 src/initctl/initctl.c
2226
2227 systemd_initctl_LDADD = \
2228 libshared.la
2229
2230 # ------------------------------------------------------------------------------
2231 systemd_update_utmp_SOURCES = \
2232 src/update-utmp/update-utmp.c
2233
2234 systemd_update_utmp_CFLAGS = \
2235 $(AM_CFLAGS) \
2236 $(AUDIT_CFLAGS)
2237
2238 systemd_update_utmp_LDADD = \
2239 libshared.la \
2240 $(AUDIT_LIBS)
2241
2242 # ------------------------------------------------------------------------------
2243 systemd_update_done_SOURCES = \
2244 src/update-done/update-done.c
2245
2246 systemd_update_done_LDADD = \
2247 libshared.la
2248
2249 # ------------------------------------------------------------------------------
2250 systemd_shutdown_SOURCES = \
2251 src/core/umount.c \
2252 src/core/umount.h \
2253 src/core/shutdown.c \
2254 src/core/mount-setup.c \
2255 src/core/mount-setup.h \
2256 src/core/killall.h \
2257 src/core/killall.c
2258
2259 systemd_shutdown_LDADD = \
2260 libshared.la
2261
2262 # ------------------------------------------------------------------------------
2263 if HAVE_KMOD
2264 systemd_modules_load_SOURCES = \
2265 src/modules-load/modules-load.c
2266
2267 systemd_modules_load_CFLAGS = \
2268 $(AM_CFLAGS) \
2269 $(KMOD_CFLAGS)
2270
2271 systemd_modules_load_LDADD = \
2272 libshared.la \
2273 $(KMOD_LIBS)
2274
2275 rootlibexec_PROGRAMS += \
2276 systemd-modules-load
2277
2278 nodist_systemunit_DATA += \
2279 units/systemd-modules-load.service
2280
2281 SYSINIT_TARGET_WANTS += \
2282 systemd-modules-load.service
2283
2284 if ENABLE_TMPFILES
2285 nodist_systemunit_DATA += \
2286 units/kmod-static-nodes.service
2287
2288 SYSINIT_TARGET_WANTS += \
2289 kmod-static-nodes.service
2290 endif
2291 endif
2292
2293 EXTRA_DIST += \
2294 units/systemd-modules-load.service.in \
2295 units/kmod-static-nodes.service.in
2296
2297 # ------------------------------------------------------------------------------
2298 if ENABLE_TMPFILES
2299 systemd_tmpfiles_SOURCES = \
2300 src/tmpfiles/tmpfiles.c
2301
2302 systemd_tmpfiles_LDADD = \
2303 libshared.la
2304
2305 rootbin_PROGRAMS += \
2306 systemd-tmpfiles
2307
2308 dist_systemunit_DATA += \
2309 units/systemd-tmpfiles-clean.timer
2310
2311 nodist_systemunit_DATA += \
2312 units/systemd-tmpfiles-setup-dev.service \
2313 units/systemd-tmpfiles-setup.service \
2314 units/systemd-tmpfiles-clean.service
2315
2316 nodist_tmpfiles_DATA = \
2317 tmpfiles.d/systemd.conf \
2318 tmpfiles.d/etc.conf
2319
2320 dist_tmpfiles_DATA = \
2321 tmpfiles.d/systemd-nologin.conf \
2322 tmpfiles.d/tmp.conf \
2323 tmpfiles.d/x11.conf \
2324 tmpfiles.d/var.conf \
2325 tmpfiles.d/home.conf \
2326 tmpfiles.d/systemd-nspawn.conf \
2327 tmpfiles.d/journal-nocow.conf
2328
2329 if HAVE_SYSV_COMPAT
2330 dist_tmpfiles_DATA += \
2331 tmpfiles.d/legacy.conf
2332 endif
2333
2334 SYSINIT_TARGET_WANTS += \
2335 systemd-tmpfiles-setup-dev.service \
2336 systemd-tmpfiles-setup.service
2337
2338 if ENABLE_ZSH_COMPLETION
2339 dist_zshcompletion_DATA += \
2340 shell-completion/zsh/_systemd-tmpfiles
2341 endif
2342
2343 TIMERS_TARGET_WANTS += \
2344 systemd-tmpfiles-clean.timer
2345
2346 INSTALL_DIRS += \
2347 $(tmpfilesdir) \
2348 $(sysconfdir)/tmpfiles.d
2349 endif
2350
2351 EXTRA_DIST += \
2352 tmpfiles.d/systemd.conf.m4 \
2353 tmpfiles.d/etc.conf.m4 \
2354 units/systemd-tmpfiles-setup-dev.service.in \
2355 units/systemd-tmpfiles-setup.service.in \
2356 units/systemd-tmpfiles-clean.service.in
2357
2358 # ------------------------------------------------------------------------------
2359 if ENABLE_SYSUSERS
2360 systemd_sysusers_SOURCES = \
2361 src/sysusers/sysusers.c
2362
2363 systemd_sysusers_LDADD = \
2364 libshared.la
2365
2366 rootbin_PROGRAMS += \
2367 systemd-sysusers
2368
2369 nodist_systemunit_DATA += \
2370 units/systemd-sysusers.service
2371
2372 SYSINIT_TARGET_WANTS += \
2373 systemd-sysusers.service
2374
2375 nodist_sysusers_DATA = \
2376 sysusers.d/systemd.conf \
2377 sysusers.d/basic.conf
2378
2379 INSTALL_DIRS += \
2380 $(sysusersdir)
2381 endif
2382
2383 EXTRA_DIST += \
2384 units/systemd-sysusers.service.in \
2385 sysusers.d/systemd.conf.m4 \
2386 sysusers.d/basic.conf.in
2387
2388 # ------------------------------------------------------------------------------
2389 dist_factory_etc_DATA = \
2390 factory/etc/nsswitch.conf
2391
2392 if HAVE_PAM
2393 dist_factory_pam_DATA = \
2394 factory/etc/pam.d/system-auth \
2395 factory/etc/pam.d/other
2396 endif
2397
2398 # ------------------------------------------------------------------------------
2399 if ENABLE_FIRSTBOOT
2400 systemd_firstboot_SOURCES = \
2401 src/firstboot/firstboot.c
2402
2403 systemd_firstboot_LDADD = \
2404 libshared.la \
2405 -lcrypt
2406
2407 rootbin_PROGRAMS += \
2408 systemd-firstboot
2409
2410 nodist_systemunit_DATA += \
2411 units/systemd-firstboot.service
2412
2413 SYSINIT_TARGET_WANTS += \
2414 systemd-firstboot.service
2415 endif
2416
2417 EXTRA_DIST += \
2418 units/systemd-firstboot.service.in
2419
2420 # ------------------------------------------------------------------------------
2421 systemd_machine_id_setup_SOURCES = \
2422 src/machine-id-setup/machine-id-setup-main.c \
2423 src/core/machine-id-setup.c \
2424 src/core/machine-id-setup.h
2425
2426 systemd_machine_id_setup_LDADD = \
2427 libshared.la
2428
2429 SYSINIT_TARGET_WANTS += \
2430 systemd-machine-id-commit.service
2431
2432 # ------------------------------------------------------------------------------
2433 systemd_sysctl_SOURCES = \
2434 src/sysctl/sysctl.c
2435
2436 systemd_sysctl_LDADD = \
2437 libshared.la
2438
2439 # ------------------------------------------------------------------------------
2440 systemd_sleep_SOURCES = \
2441 src/sleep/sleep.c
2442
2443 systemd_sleep_LDADD = \
2444 libshared.la
2445
2446 # ------------------------------------------------------------------------------
2447 systemd_fsck_SOURCES = \
2448 src/fsck/fsck.c
2449
2450 systemd_fsck_LDADD = \
2451 libshared.la
2452
2453 # ------------------------------------------------------------------------------
2454 systemd_ac_power_SOURCES = \
2455 src/ac-power/ac-power.c
2456
2457 systemd_ac_power_LDADD = \
2458 libshared.la
2459
2460 # ------------------------------------------------------------------------------
2461 systemd_detect_virt_SOURCES = \
2462 src/detect-virt/detect-virt.c
2463
2464 systemd_detect_virt_LDADD = \
2465 libshared.la
2466
2467 INSTALL_EXEC_HOOKS += \
2468 systemd-detect-virt-install-hook
2469
2470 # ------------------------------------------------------------------------------
2471 systemd_delta_SOURCES = \
2472 src/delta/delta.c
2473
2474 systemd_delta_LDADD = \
2475 libshared.la
2476
2477 # ------------------------------------------------------------------------------
2478 systemd_getty_generator_SOURCES = \
2479 src/getty-generator/getty-generator.c
2480
2481 systemd_getty_generator_LDADD = \
2482 libshared.la
2483
2484 # ------------------------------------------------------------------------------
2485 systemd_debug_generator_SOURCES = \
2486 src/debug-generator/debug-generator.c
2487
2488 systemd_debug_generator_LDADD = \
2489 libshared.la
2490
2491 # ------------------------------------------------------------------------------
2492 systemd_fstab_generator_SOURCES = \
2493 src/fstab-generator/fstab-generator.c \
2494 src/core/mount-setup.c
2495
2496 systemd_fstab_generator_LDADD = \
2497 libshared.la
2498
2499 # ------------------------------------------------------------------------------
2500 systemd_system_update_generator_SOURCES = \
2501 src/system-update-generator/system-update-generator.c
2502
2503 systemd_system_update_generator_LDADD = \
2504 libshared.la
2505
2506 # ------------------------------------------------------------------------------
2507 if ENABLE_HIBERNATE
2508 systemgenerator_PROGRAMS += \
2509 systemd-hibernate-resume-generator
2510
2511 rootlibexec_PROGRAMS += \
2512 systemd-hibernate-resume
2513
2514 systemd_hibernate_resume_SOURCES = \
2515 src/hibernate-resume/hibernate-resume.c
2516
2517 systemd_hibernate_resume_LDADD = \
2518 libshared.la
2519
2520 systemd_hibernate_resume_generator_SOURCES = \
2521 src/hibernate-resume/hibernate-resume-generator.c
2522
2523 systemd_hibernate_resume_generator_LDADD = \
2524 libshared.la
2525
2526 dist_systemunit_DATA += \
2527 units/hibernate.target \
2528 units/hybrid-sleep.target
2529
2530 nodist_systemunit_DATA += \
2531 units/systemd-hibernate.service \
2532 units/systemd-hibernate-resume@.service \
2533 units/systemd-hybrid-sleep.service
2534 endif
2535
2536 EXTRA_DIST += \
2537 units/systemd-hibernate.service.in \
2538 units/systemd-hibernate-resume@.service.in \
2539 units/systemd-hybrid-sleep.service.in
2540
2541 # ------------------------------------------------------------------------------
2542 if ENABLE_EFI
2543 if HAVE_BLKID
2544 bootctl_SOURCES = \
2545 src/boot/bootctl.c
2546
2547 bootctl_CPPFLAGS = \
2548 $(AM_CPPFLAGS) \
2549 -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\" \
2550 -DBOOTLIBDIR=\"$(bootlibdir)\"
2551
2552 bootctl_CFLAGS = \
2553 $(AM_CFLAGS) \
2554 $(BLKID_CFLAGS)
2555
2556 bootctl_LDADD = \
2557 libshared.la \
2558 $(BLKID_LIBS)
2559
2560 bin_PROGRAMS += \
2561 bootctl
2562
2563 if ENABLE_BASH_COMPLETION
2564 dist_bashcompletion_DATA += \
2565 shell-completion/bash/bootctl
2566 endif
2567
2568 if ENABLE_ZSH_COMPLETION
2569 dist_zshcompletion_DATA += \
2570 shell-completion/zsh/_bootctl
2571 endif
2572 endif
2573
2574 # ------------------------------------------------------------------------------
2575 if HAVE_GNUEFI
2576 efi_cppflags = \
2577 $(EFI_CPPFLAGS) \
2578 -I$(top_builddir) -include config.h \
2579 -I$(EFI_INC_DIR)/efi \
2580 -I$(EFI_INC_DIR)/efi/$(EFI_ARCH) \
2581 -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\"
2582
2583 efi_cflags = \
2584 $(EFI_CFLAGS) \
2585 -Wall \
2586 -Wextra \
2587 -std=gnu90 \
2588 -nostdinc \
2589 -ggdb -O0 \
2590 -fpic \
2591 -fshort-wchar \
2592 -nostdinc \
2593 -ffreestanding \
2594 -fno-strict-aliasing \
2595 -fno-stack-protector \
2596 -Wsign-compare \
2597 -Wno-missing-field-initializers
2598
2599 if ARCH_X86_64
2600 efi_cflags += \
2601 -mno-red-zone \
2602 -mno-sse \
2603 -mno-mmx \
2604 -DEFI_FUNCTION_WRAPPER \
2605 -DGNU_EFI_USE_MS_ABI
2606 endif
2607
2608 if ARCH_IA32
2609 efi_cflags += \
2610 -mno-sse \
2611 -mno-mmx
2612 endif
2613
2614 efi_ldflags = \
2615 $(EFI_LDFLAGS) \
2616 -T $(EFI_LDS_DIR)/elf_$(EFI_ARCH)_efi.lds \
2617 -shared \
2618 -Bsymbolic \
2619 -nostdlib \
2620 -znocombreloc \
2621 -L $(EFI_LIB_DIR) \
2622 $(EFI_LDS_DIR)/crt0-efi-$(EFI_ARCH).o
2623
2624 # Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary' instead,
2625 # and add required symbols manually.
2626 if ARCH_AARCH64
2627 efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
2628 EFI_FORMAT = -O binary
2629 else
2630 EFI_FORMAT = --target=efi-app-$(EFI_ARCH)
2631 endif
2632 endif
2633 endif
2634
2635 # ------------------------------------------------------------------------------
2636 systemd_boot_headers = \
2637 src/boot/efi/util.h \
2638 src/boot/efi/console.h \
2639 src/boot/efi/graphics.h \
2640 src/boot/efi/pefile.h \
2641 src/boot/efi/disk.h
2642
2643 systemd_boot_sources = \
2644 src/boot/efi/util.c \
2645 src/boot/efi/console.c \
2646 src/boot/efi/graphics.c \
2647 src/boot/efi/pefile.c \
2648 src/boot/efi/disk.c \
2649 src/boot/efi/boot.c
2650
2651 EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
2652
2653 if ENABLE_EFI
2654 if HAVE_GNUEFI
2655 systemd_boot_objects = $(addprefix $(top_builddir)/,$(systemd_boot_sources:.c=.o))
2656 systemd_boot_solib = $(top_builddir)/src/boot/efi/systemd_boot.so
2657 systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi
2658
2659 bootlib_DATA = $(systemd_boot)
2660 CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
2661
2662 $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers))
2663 @$(MKDIR_P) $(top_builddir)/src/boot/efi/
2664 $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
2665
2666 $(systemd_boot_solib): $(systemd_boot_objects)
2667 $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \
2668 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
2669 nm -D -u $@ | grep ' U ' && exit 1 || :
2670
2671 $(systemd_boot): $(systemd_boot_solib)
2672 $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
2673 -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
2674 endif
2675 endif
2676
2677 # ------------------------------------------------------------------------------
2678 stub_headers = \
2679 src/boot/efi/util.h \
2680 src/boot/efi/pefile.h \
2681 src/boot/efi/disk.h \
2682 src/boot/efi/graphics.h \
2683 src/boot/efi/splash.h \
2684 src/boot/efi/linux.h
2685
2686 stub_sources = \
2687 src/boot/efi/util.c \
2688 src/boot/efi/pefile.c \
2689 src/boot/efi/disk.c \
2690 src/boot/efi/graphics.c \
2691 src/boot/efi/splash.c \
2692 src/boot/efi/linux.c \
2693 src/boot/efi/stub.c
2694
2695 EXTRA_DIST += \
2696 $(stub_sources) \
2697 $(stub_headers) \
2698 test/splash.bmp
2699
2700 if ENABLE_EFI
2701 if HAVE_GNUEFI
2702 stub_objects = $(addprefix $(top_builddir)/,$(stub_sources:.c=.o))
2703 stub_solib = $(top_builddir)/src/boot/efi/stub.so
2704 stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub
2705
2706 bootlib_DATA += $(stub)
2707 CLEANFILES += $(stub_objects) $(stub_solib) $(stub)
2708
2709 $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(stub_headers))
2710 @$(MKDIR_P) $(top_builddir)/src/boot/efi/
2711 $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
2712
2713 $(stub_solib): $(stub_objects)
2714 $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
2715 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
2716 nm -D -u $@ | grep ' U ' && exit 1 || :
2717
2718 $(stub): $(stub_solib)
2719 $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
2720 -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
2721
2722 # ------------------------------------------------------------------------------
2723 CLEANFILES += test-efi-disk.img
2724
2725 test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh
2726 $(AM_V_GEN)test/test-efi-create-disk.sh
2727
2728 test-efi: test-efi-disk.img
2729 $(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img
2730 endif
2731 endif
2732
2733 EXTRA_DIST += test/test-efi-create-disk.sh
2734
2735 # ------------------------------------------------------------------------------
2736 if HAVE_BLKID
2737 systemgenerator_PROGRAMS += \
2738 systemd-gpt-auto-generator
2739
2740 systemd_gpt_auto_generator_SOURCES = \
2741 src/gpt-auto-generator/gpt-auto-generator.c \
2742 src/basic/blkid-util.h
2743
2744 systemd_gpt_auto_generator_LDADD = \
2745 libshared.la \
2746 $(BLKID_LIBS)
2747
2748 systemd_gpt_auto_generator_CFLAGS = \
2749 $(AM_CFLAGS) \
2750 $(BLKID_CFLAGS)
2751 endif
2752
2753 # ------------------------------------------------------------------------------
2754 systemgenerator_PROGRAMS += \
2755 systemd-dbus1-generator
2756
2757 systemd_dbus1_generator_SOURCES = \
2758 src/dbus1-generator/dbus1-generator.c
2759
2760 systemd_dbus1_generator_LDADD = \
2761 libshared.la
2762
2763 dbus1-generator-install-hook:
2764 $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2765 $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2766 $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2767
2768 dbus1-generator-uninstall-hook:
2769 rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2770
2771 dist_xinitrc_SCRIPTS = \
2772 xorg/50-systemd-user.sh
2773
2774 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2775 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2776
2777 # ------------------------------------------------------------------------------
2778 systemd_sysv_generator_SOURCES = \
2779 src/sysv-generator/sysv-generator.c
2780
2781 systemd_sysv_generator_LDADD = \
2782 libcore.la
2783
2784 # ------------------------------------------------------------------------------
2785 systemd_rc_local_generator_SOURCES = \
2786 src/rc-local-generator/rc-local-generator.c
2787
2788 systemd_rc_local_generator_LDADD = \
2789 libshared.la
2790
2791 # ------------------------------------------------------------------------------
2792 systemd_remount_fs_SOURCES = \
2793 src/remount-fs/remount-fs.c \
2794 src/core/mount-setup.c \
2795 src/core/mount-setup.h
2796
2797 systemd_remount_fs_LDADD = \
2798 libshared.la
2799
2800 # ------------------------------------------------------------------------------
2801 systemd_cgroups_agent_SOURCES = \
2802 src/cgroups-agent/cgroups-agent.c
2803
2804 systemd_cgroups_agent_LDADD = \
2805 libshared.la
2806
2807 # ------------------------------------------------------------------------------
2808 systemd_escape_SOURCES = \
2809 src/escape/escape.c
2810
2811 systemd_escape_LDADD = \
2812 libshared.la
2813
2814 # -----------------------------------------------------------------------------
2815 systemctl_SOURCES = \
2816 src/systemctl/systemctl.c
2817
2818 systemctl_LDADD = \
2819 libshared.la
2820
2821 # ------------------------------------------------------------------------------
2822 systemd_notify_SOURCES = \
2823 src/notify/notify.c
2824
2825 systemd_notify_LDADD = \
2826 libshared.la
2827
2828 # ------------------------------------------------------------------------------
2829 systemd_path_SOURCES = \
2830 src/path/path.c
2831
2832 systemd_path_LDADD = \
2833 libshared.la
2834
2835 # ------------------------------------------------------------------------------
2836 systemd_ask_password_SOURCES = \
2837 src/ask-password/ask-password.c
2838
2839 systemd_ask_password_LDADD = \
2840 libshared.la
2841
2842 # ------------------------------------------------------------------------------
2843 systemd_reply_password_SOURCES = \
2844 src/reply-password/reply-password.c
2845
2846 systemd_reply_password_LDADD = \
2847 libshared.la
2848
2849 # ------------------------------------------------------------------------------
2850 systemd_cgls_SOURCES = \
2851 src/cgls/cgls.c
2852
2853 systemd_cgls_LDADD = \
2854 libshared.la
2855
2856 # ------------------------------------------------------------------------------
2857 systemd_cgtop_SOURCES = \
2858 src/cgtop/cgtop.c
2859
2860 systemd_cgtop_LDADD = \
2861 libshared.la
2862
2863 # ------------------------------------------------------------------------------
2864 systemd_nspawn_SOURCES = \
2865 src/nspawn/nspawn.c \
2866 src/nspawn/nspawn-settings.c \
2867 src/nspawn/nspawn-settings.h \
2868 src/nspawn/nspawn-mount.c \
2869 src/nspawn/nspawn-mount.h \
2870 src/nspawn/nspawn-network.c \
2871 src/nspawn/nspawn-network.h \
2872 src/nspawn/nspawn-expose-ports.c \
2873 src/nspawn/nspawn-expose-ports.h \
2874 src/nspawn/nspawn-cgroup.c \
2875 src/nspawn/nspawn-cgroup.h \
2876 src/nspawn/nspawn-register.c \
2877 src/nspawn/nspawn-register.h \
2878 src/nspawn/nspawn-setuid.c \
2879 src/nspawn/nspawn-setuid.h \
2880 src/core/mount-setup.c \
2881 src/core/mount-setup.h \
2882 src/core/loopback-setup.c \
2883 src/core/loopback-setup.h
2884
2885 nodist_systemd_nspawn_SOURCES = \
2886 src/nspawn/nspawn-gperf.c
2887
2888 gperf_gperf_sources += \
2889 src/nspawn/nspawn-gperf.gperf
2890
2891 systemd_nspawn_CFLAGS = \
2892 $(AM_CFLAGS) \
2893 $(BLKID_CFLAGS) \
2894 $(SECCOMP_CFLAGS)
2895
2896 systemd_nspawn_LDADD = \
2897 libshared.la \
2898 $(BLKID_LIBS)
2899
2900 if HAVE_LIBIPTC
2901 systemd_nspawn_LDADD += \
2902 libfirewall.la
2903 endif
2904
2905 # ------------------------------------------------------------------------------
2906 systemd_run_SOURCES = \
2907 src/run/run.c
2908
2909 systemd_run_LDADD = \
2910 libshared.la
2911
2912 # ------------------------------------------------------------------------------
2913 noinst_LTLIBRARIES += \
2914 libbus-proxy-core.la
2915
2916 libbus_proxy_core_la_SOURCES = \
2917 src/bus-proxyd/bus-xml-policy.c \
2918 src/bus-proxyd/bus-xml-policy.h \
2919 src/bus-proxyd/driver.c \
2920 src/bus-proxyd/driver.h \
2921 src/bus-proxyd/proxy.c \
2922 src/bus-proxyd/proxy.h \
2923 src/bus-proxyd/synthesize.c \
2924 src/bus-proxyd/synthesize.h
2925
2926 libbus_proxy_core_la_LIBADD = \
2927 libshared.la
2928
2929 systemd_bus_proxyd_SOURCES = \
2930 src/bus-proxyd/bus-proxyd.c
2931
2932 systemd_bus_proxyd_LDADD = \
2933 libbus-proxy-core.la \
2934 libshared.la
2935
2936 systemd_stdio_bridge_SOURCES = \
2937 src/bus-proxyd/stdio-bridge.c
2938
2939 systemd_stdio_bridge_LDADD = \
2940 libbus-proxy-core.la \
2941 libshared.la
2942
2943 nodist_systemunit_DATA += \
2944 units/systemd-bus-proxyd.service
2945
2946 dist_systemunit_DATA += \
2947 units/systemd-bus-proxyd.socket
2948
2949 nodist_userunit_DATA += \
2950 units/user/systemd-bus-proxyd.service
2951
2952 dist_userunit_DATA += \
2953 units/user/systemd-bus-proxyd.socket
2954
2955 EXTRA_DIST += \
2956 units/systemd-bus-proxyd.service.m4.in \
2957 units/user/systemd-bus-proxyd.service.in
2958
2959 if HAVE_SMACK
2960 bus-proxyd-set-cap-hook:
2961 -$(SETCAP) cap_mac_admin+ei $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd
2962
2963 INSTALL_EXEC_HOOKS += bus-proxyd-set-cap-hook
2964 endif
2965
2966 # ------------------------------------------------------------------------------
2967 systemd_tty_ask_password_agent_SOURCES = \
2968 src/tty-ask-password-agent/tty-ask-password-agent.c
2969
2970 systemd_tty_ask_password_agent_LDADD = \
2971 libshared.la
2972
2973 # ------------------------------------------------------------------------------
2974 libsystemd_internal_la_SOURCES = \
2975 src/systemd/sd-bus.h \
2976 src/systemd/sd-bus-protocol.h \
2977 src/systemd/sd-bus-vtable.h \
2978 src/systemd/sd-utf8.h \
2979 src/systemd/sd-event.h \
2980 src/systemd/sd-netlink.h \
2981 src/systemd/sd-resolve.h \
2982 src/systemd/sd-login.h \
2983 src/systemd/sd-id128.h \
2984 src/systemd/sd-daemon.h \
2985 src/systemd/sd-path.h \
2986 src/systemd/sd-network.h \
2987 src/systemd/sd-hwdb.h \
2988 src/systemd/sd-device.h \
2989 src/libsystemd/libsystemd.sym \
2990 src/libsystemd/sd-bus/sd-bus.c \
2991 src/libsystemd/sd-bus/bus-control.c \
2992 src/libsystemd/sd-bus/bus-control.h \
2993 src/libsystemd/sd-bus/bus-error.c \
2994 src/libsystemd/sd-bus/bus-error.h \
2995 src/libsystemd/sd-bus/bus-common-errors.h \
2996 src/libsystemd/sd-bus/bus-common-errors.c \
2997 src/libsystemd/sd-bus/bus-internal.c \
2998 src/libsystemd/sd-bus/bus-internal.h \
2999 src/libsystemd/sd-bus/bus-socket.c \
3000 src/libsystemd/sd-bus/bus-socket.h \
3001 src/libsystemd/sd-bus/bus-kernel.c \
3002 src/libsystemd/sd-bus/bus-kernel.h \
3003 src/libsystemd/sd-bus/bus-container.c \
3004 src/libsystemd/sd-bus/bus-container.h \
3005 src/libsystemd/sd-bus/bus-message.c \
3006 src/libsystemd/sd-bus/bus-message.h \
3007 src/libsystemd/sd-bus/bus-creds.c \
3008 src/libsystemd/sd-bus/bus-creds.h \
3009 src/libsystemd/sd-bus/bus-signature.c \
3010 src/libsystemd/sd-bus/bus-signature.h \
3011 src/libsystemd/sd-bus/bus-type.c \
3012 src/libsystemd/sd-bus/bus-type.h \
3013 src/libsystemd/sd-bus/bus-match.c \
3014 src/libsystemd/sd-bus/bus-match.h \
3015 src/libsystemd/sd-bus/bus-bloom.c \
3016 src/libsystemd/sd-bus/bus-bloom.h \
3017 src/libsystemd/sd-bus/bus-introspect.c \
3018 src/libsystemd/sd-bus/bus-introspect.h \
3019 src/libsystemd/sd-bus/bus-objects.c \
3020 src/libsystemd/sd-bus/bus-objects.h \
3021 src/libsystemd/sd-bus/bus-gvariant.c \
3022 src/libsystemd/sd-bus/bus-gvariant.h \
3023 src/libsystemd/sd-bus/bus-convenience.c \
3024 src/libsystemd/sd-bus/bus-track.c \
3025 src/libsystemd/sd-bus/bus-track.h \
3026 src/libsystemd/sd-bus/bus-slot.c \
3027 src/libsystemd/sd-bus/bus-slot.h \
3028 src/libsystemd/sd-bus/bus-protocol.h \
3029 src/libsystemd/sd-bus/kdbus.h \
3030 src/libsystemd/sd-bus/bus-dump.c \
3031 src/libsystemd/sd-bus/bus-dump.h \
3032 src/libsystemd/sd-utf8/sd-utf8.c \
3033 src/libsystemd/sd-event/sd-event.c \
3034 src/libsystemd/sd-event/event-util.h \
3035 src/libsystemd/sd-netlink/sd-netlink.c \
3036 src/libsystemd/sd-netlink/netlink-internal.h \
3037 src/libsystemd/sd-netlink/netlink-message.c \
3038 src/libsystemd/sd-netlink/netlink-socket.c \
3039 src/libsystemd/sd-netlink/rtnl-message.c \
3040 src/libsystemd/sd-netlink/netlink-types.h \
3041 src/libsystemd/sd-netlink/netlink-types.c \
3042 src/libsystemd/sd-netlink/netlink-util.h \
3043 src/libsystemd/sd-netlink/netlink-util.c \
3044 src/libsystemd/sd-netlink/local-addresses.h \
3045 src/libsystemd/sd-netlink/local-addresses.c \
3046 src/libsystemd/sd-id128/sd-id128.c \
3047 src/libsystemd/sd-daemon/sd-daemon.c \
3048 src/libsystemd/sd-login/sd-login.c \
3049 src/libsystemd/sd-path/sd-path.c \
3050 src/libsystemd/sd-network/sd-network.c \
3051 src/libsystemd/sd-network/network-util.h \
3052 src/libsystemd/sd-network/network-util.c \
3053 src/libsystemd/sd-hwdb/sd-hwdb.c \
3054 src/libsystemd/sd-hwdb/hwdb-util.h \
3055 src/libsystemd/sd-hwdb/hwdb-internal.h \
3056 src/libsystemd/sd-device/device-internal.h \
3057 src/libsystemd/sd-device/device-util.h \
3058 src/libsystemd/sd-device/device-enumerator.c \
3059 src/libsystemd/sd-device/device-enumerator-private.h \
3060 src/libsystemd/sd-device/sd-device.c \
3061 src/libsystemd/sd-device/device-private.c \
3062 src/libsystemd/sd-device/device-private.h \
3063 src/libsystemd/sd-resolve/sd-resolve.c \
3064 src/libsystemd/sd-resolve/resolve-util.h
3065
3066 libsystemd_internal_la_LIBADD = \
3067 libbasic.la \
3068 -lresolv
3069
3070 noinst_LTLIBRARIES += \
3071 libsystemd-internal.la
3072
3073 EXTRA_DIST += \
3074 src/libsystemd/libsystemd.pc.in \
3075 src/libsystemd/sd-bus/DIFFERENCES \
3076 src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
3077
3078 libsystemd_la_SOURCES = \
3079 $(libsystemd_internal_la_SOURCES) \
3080 $(libsystemd_journal_internal_la_SOURCES)
3081
3082 nodist_libsystemd_la_SOURCES = \
3083 $(nodist_libsystemd_internal_la_SOURCES)
3084
3085 libsystemd_la_CFLAGS = \
3086 $(libsystemd_internal_la_CFLAGS) \
3087 $(libsystemd_journal_internal_la_CFLAGS)
3088
3089 libsystemd_la_LDFLAGS = \
3090 $(AM_LDFLAGS) \
3091 -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
3092 -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
3093
3094 libsystemd_la_LIBADD = \
3095 $(libsystemd_internal_la_LIBADD) \
3096 $(libsystemd_journal_internal_la_LIBADD)
3097
3098 libsystemd-install-hook:
3099 libname=libsystemd.so && $(move-to-rootlibdir)
3100
3101 libsystemd-uninstall-hook:
3102 rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
3103
3104 INSTALL_EXEC_HOOKS += libsystemd-install-hook
3105 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
3106
3107 pkgconfiglib_DATA += \
3108 src/libsystemd/libsystemd.pc
3109
3110 pkginclude_HEADERS += \
3111 src/systemd/sd-bus.h \
3112 src/systemd/sd-bus-protocol.h \
3113 src/systemd/sd-bus-vtable.h \
3114 src/systemd/sd-event.h \
3115 src/systemd/sd-login.h \
3116 src/systemd/sd-id128.h \
3117 src/systemd/sd-daemon.h
3118
3119 lib_LTLIBRARIES += \
3120 libsystemd.la
3121
3122 tests += \
3123 test-bus-marshal \
3124 test-bus-signature \
3125 test-bus-benchmark \
3126 test-bus-chat \
3127 test-bus-cleanup \
3128 test-bus-server \
3129 test-bus-match \
3130 test-bus-proxy \
3131 test-bus-kernel \
3132 test-bus-kernel-bloom \
3133 test-bus-zero-copy \
3134 test-bus-introspect \
3135 test-bus-objects \
3136 test-bus-error \
3137 test-bus-creds \
3138 test-bus-gvariant \
3139 test-event \
3140 test-netlink \
3141 test-local-addresses \
3142 test-resolve
3143
3144 bin_PROGRAMS += \
3145 busctl
3146
3147 test_bus_marshal_SOURCES = \
3148 src/libsystemd/sd-bus/test-bus-marshal.c
3149
3150 test_bus_marshal_LDADD = \
3151 libshared.la \
3152 $(GLIB_LIBS) \
3153 $(DBUS_LIBS)
3154
3155 test_bus_marshal_CFLAGS = \
3156 $(AM_CFLAGS) \
3157 $(GLIB_CFLAGS) \
3158 $(DBUS_CFLAGS)
3159
3160 test_bus_signature_SOURCES = \
3161 src/libsystemd/sd-bus/test-bus-signature.c
3162
3163 test_bus_signature_LDADD = \
3164 libshared.la
3165
3166 test_bus_chat_SOURCES = \
3167 src/libsystemd/sd-bus/test-bus-chat.c
3168
3169 test_bus_chat_LDADD = \
3170 libshared.la
3171
3172 test_bus_cleanup_SOURCES = \
3173 src/libsystemd/sd-bus/test-bus-cleanup.c
3174
3175 test_bus_cleanup_CFLAGS = \
3176 $(AM_CFLAGS) \
3177 $(SECCOMP_CFLAGS)
3178
3179 test_bus_cleanup_LDADD = \
3180 libshared.la
3181
3182 test_bus_server_SOURCES = \
3183 src/libsystemd/sd-bus/test-bus-server.c
3184
3185 test_bus_server_LDADD = \
3186 libshared.la
3187
3188 test_bus_objects_SOURCES = \
3189 src/libsystemd/sd-bus/test-bus-objects.c
3190
3191 test_bus_objects_LDADD = \
3192 libshared.la
3193
3194 test_bus_error_SOURCES = \
3195 src/libsystemd/sd-bus/test-bus-error.c
3196
3197 test_bus_error_LDADD = \
3198 libshared.la
3199
3200 test_bus_gvariant_SOURCES = \
3201 src/libsystemd/sd-bus/test-bus-gvariant.c
3202
3203 test_bus_gvariant_LDADD = \
3204 libshared.la \
3205 $(GLIB_LIBS)
3206
3207 test_bus_gvariant_CFLAGS = \
3208 $(AM_CFLAGS) \
3209 $(GLIB_CFLAGS)
3210
3211 test_bus_creds_SOURCES = \
3212 src/libsystemd/sd-bus/test-bus-creds.c
3213
3214 test_bus_creds_LDADD = \
3215 libshared.la
3216
3217 test_bus_match_SOURCES = \
3218 src/libsystemd/sd-bus/test-bus-match.c
3219
3220 test_bus_match_LDADD = \
3221 libshared.la
3222
3223 test_bus_proxy_SOURCES = \
3224 src/libsystemd/sd-bus/test-bus-proxy.c
3225
3226 test_bus_proxy_LDADD = \
3227 libshared.la
3228
3229 test_bus_kernel_SOURCES = \
3230 src/libsystemd/sd-bus/test-bus-kernel.c
3231
3232 test_bus_kernel_LDADD = \
3233 libshared.la
3234
3235 test_bus_kernel_bloom_SOURCES = \
3236 src/libsystemd/sd-bus/test-bus-kernel-bloom.c
3237
3238 test_bus_kernel_bloom_LDADD = \
3239 libshared.la
3240
3241 test_bus_benchmark_SOURCES = \
3242 src/libsystemd/sd-bus/test-bus-benchmark.c
3243
3244 test_bus_benchmark_LDADD = \
3245 libshared.la
3246
3247 test_bus_zero_copy_SOURCES = \
3248 src/libsystemd/sd-bus/test-bus-zero-copy.c
3249
3250 test_bus_zero_copy_LDADD = \
3251 libshared.la
3252
3253 test_bus_introspect_SOURCES = \
3254 src/libsystemd/sd-bus/test-bus-introspect.c
3255
3256 test_bus_introspect_LDADD = \
3257 libshared.la
3258
3259 test_event_SOURCES = \
3260 src/libsystemd/sd-event/test-event.c
3261
3262 test_event_LDADD = \
3263 libshared.la
3264
3265 test_netlink_SOURCES = \
3266 src/libsystemd/sd-netlink/test-netlink.c
3267
3268 test_netlink_LDADD = \
3269 libshared.la
3270
3271 test_local_addresses_SOURCES = \
3272 src/libsystemd/sd-netlink/test-local-addresses.c
3273
3274 test_local_addresses_LDADD = \
3275 libshared.la
3276
3277 test_resolve_SOURCES = \
3278 src/libsystemd/sd-resolve/test-resolve.c
3279
3280 test_resolve_LDADD = \
3281 libshared.la
3282
3283 busctl_SOURCES = \
3284 src/libsystemd/sd-bus/busctl.c \
3285 src/libsystemd/sd-bus/busctl-introspect.c \
3286 src/libsystemd/sd-bus/busctl-introspect.h
3287
3288 busctl_LDADD = \
3289 libshared.la
3290
3291 # ------------------------------------------------------------------------------
3292 noinst_LTLIBRARIES += \
3293 libsystemd-network.la
3294
3295 libsystemd_network_la_CFLAGS = \
3296 $(AM_CFLAGS) \
3297 $(KMOD_CFLAGS)
3298
3299 libsystemd_network_la_SOURCES = \
3300 src/systemd/sd-dhcp-client.h \
3301 src/systemd/sd-dhcp-server.h \
3302 src/systemd/sd-dhcp-lease.h \
3303 src/systemd/sd-ipv4ll.h \
3304 src/systemd/sd-ipv4acd.h \
3305 src/systemd/sd-ndisc.h \
3306 src/systemd/sd-dhcp6-client.h \
3307 src/systemd/sd-dhcp6-lease.h \
3308 src/systemd/sd-lldp.h \
3309 src/libsystemd-network/sd-dhcp-client.c \
3310 src/libsystemd-network/sd-dhcp-server.c \
3311 src/libsystemd-network/dhcp-network.c \
3312 src/libsystemd-network/dhcp-option.c \
3313 src/libsystemd-network/dhcp-packet.c \
3314 src/libsystemd-network/dhcp-internal.h \
3315 src/libsystemd-network/dhcp-server-internal.h \
3316 src/libsystemd-network/dhcp-protocol.h \
3317 src/libsystemd-network/dhcp-lease-internal.h \
3318 src/libsystemd-network/sd-dhcp-lease.c \
3319 src/libsystemd-network/sd-ipv4ll.c \
3320 src/libsystemd-network/sd-ipv4acd.c \
3321 src/libsystemd-network/arp-util.h \
3322 src/libsystemd-network/arp-util.c \
3323 src/libsystemd-network/network-internal.c \
3324 src/libsystemd-network/network-internal.h \
3325 src/libsystemd-network/sd-ndisc.c \
3326 src/libsystemd-network/icmp6-util.h \
3327 src/libsystemd-network/icmp6-util.c \
3328 src/libsystemd-network/sd-dhcp6-client.c \
3329 src/libsystemd-network/dhcp6-internal.h \
3330 src/libsystemd-network/dhcp6-protocol.h \
3331 src/libsystemd-network/dhcp6-network.c \
3332 src/libsystemd-network/dhcp6-option.c \
3333 src/libsystemd-network/dhcp6-lease-internal.h \
3334 src/libsystemd-network/sd-dhcp6-lease.c \
3335 src/libsystemd-network/dhcp-identifier.h \
3336 src/libsystemd-network/dhcp-identifier.c \
3337 src/libsystemd-network/lldp.h \
3338 src/libsystemd-network/lldp-tlv.h \
3339 src/libsystemd-network/lldp-tlv.c \
3340 src/libsystemd-network/lldp-network.h \
3341 src/libsystemd-network/lldp-network.c \
3342 src/libsystemd-network/lldp-port.h \
3343 src/libsystemd-network/lldp-port.c \
3344 src/libsystemd-network/lldp-internal.h \
3345 src/libsystemd-network/lldp-internal.c \
3346 src/libsystemd-network/lldp-util.h \
3347 src/libsystemd-network/sd-lldp.c
3348
3349 libsystemd_network_la_LIBADD = \
3350 $(KMOD_LIBS)
3351
3352 test_dhcp_option_SOURCES = \
3353 src/libsystemd-network/dhcp-protocol.h \
3354 src/libsystemd-network/dhcp-internal.h \
3355 src/libsystemd-network/test-dhcp-option.c
3356
3357 test_dhcp_option_LDADD = \
3358 libsystemd-network.la \
3359 libshared.la
3360
3361 test_dhcp_client_SOURCES = \
3362 src/systemd/sd-dhcp-client.h \
3363 src/libsystemd-network/dhcp-protocol.h \
3364 src/libsystemd-network/dhcp-internal.h \
3365 src/libsystemd-network/test-dhcp-client.c
3366
3367 test_dhcp_client_LDADD = \
3368 libsystemd-network.la \
3369 libshared.la
3370
3371 test_dhcp_server_SOURCES = \
3372 src/libsystemd-network/test-dhcp-server.c
3373
3374 test_dhcp_server_LDADD = \
3375 libsystemd-network.la \
3376 libshared.la
3377
3378 test_ipv4ll_SOURCES = \
3379 src/systemd/sd-ipv4ll.h \
3380 src/libsystemd-network/arp-util.h \
3381 src/libsystemd-network/test-ipv4ll.c
3382
3383 test_ipv4ll_LDADD = \
3384 libsystemd-network.la \
3385 libshared.la
3386
3387 test_ipv4ll_manual_SOURCES = \
3388 src/systemd/sd-ipv4ll.h \
3389 src/libsystemd-network/test-ipv4ll-manual.c
3390
3391 test_ipv4ll_manual_LDADD = \
3392 libsystemd-network.la \
3393 libshared.la
3394
3395 test_acd_SOURCES = \
3396 src/systemd/sd-ipv4acd.h \
3397 src/libsystemd-network/test-acd.c
3398
3399 test_acd_LDADD = \
3400 libsystemd-network.la \
3401 libshared.la
3402
3403 test_ndisc_rs_SOURCES = \
3404 src/systemd/sd-dhcp6-client.h \
3405 src/systemd/sd-ndisc.h \
3406 src/libsystemd-network/icmp6-util.h \
3407 src/libsystemd-network/test-ndisc-rs.c \
3408 src/libsystemd-network/dhcp-identifier.h \
3409 src/libsystemd-network/dhcp-identifier.c
3410
3411 test_ndisc_rs_LDADD = \
3412 libsystemd-network.la \
3413 libudev.la \
3414 libshared.la
3415
3416 test_dhcp6_client_SOURCES = \
3417 src/systemd/sd-dhcp6-client.h \
3418 src/libsystemd-network/dhcp6-internal.h \
3419 src/libsystemd-network/test-dhcp6-client.c \
3420 src/libsystemd-network/dhcp-identifier.h \
3421 src/libsystemd-network/dhcp-identifier.c
3422
3423 test_dhcp6_client_LDADD = \
3424 libsystemd-network.la \
3425 libudev.la \
3426 libshared.la
3427
3428 test_lldp_SOURCES = \
3429 src/libsystemd-network/lldp.h \
3430 src/libsystemd-network/lldp-tlv.h \
3431 src/libsystemd-network/lldp-tlv.c \
3432 src/libsystemd-network/test-lldp.c
3433
3434 test_lldp_LDADD = \
3435 libsystemd-network.la \
3436 libshared.la
3437
3438 tests += \
3439 test-dhcp-option \
3440 test-dhcp-client \
3441 test-dhcp-server \
3442 test-ipv4ll \
3443 test-ndisc-rs \
3444 test-dhcp6-client \
3445 test-lldp
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 -