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