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