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