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