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