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