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