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