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