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