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