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