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