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