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