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