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