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