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