chiark / gitweb /
d93b05a5e6264c8956f94189a8f5966f2b7a4868
[elogind.git] / Makefile.am
1 #  -*- Mode: makefile; indent-tabs-mode: t -*-
2 #
3 #  This file is part of systemd.
4 #
5 #  Copyright 2010-2012 Lennart Poettering
6 #  Copyright 2010-2012 Kay Sievers
7 #  Copyright 2013 Zbigniew JÄ™drzejewski-Szmek
8 #  Copyright 2013 David Strauss
9 #
10 #  systemd is free software; you can redistribute it and/or modify it
11 #  under the terms of the GNU Lesser General Public License as published by
12 #  the Free Software Foundation; either version 2.1 of the License, or
13 #  (at your option) any later version.
14 #
15 #  systemd is distributed in the hope that it will be useful, but
16 #  WITHOUT ANY WARRANTY; without even the implied warranty of
17 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 #  Lesser General Public License for more details.
19 #
20 #  You should have received a copy of the GNU Lesser General Public License
21 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
22
23 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
24 AM_MAKEFLAGS = --no-print-directory
25 AUTOMAKE_OPTIONS = color-tests parallel-tests
26
27 SUBDIRS = . po
28
29 # remove targets if the command fails
30 .DELETE_ON_ERROR:
31
32 # keep intermediate files
33 .SECONDARY:
34
35 # Keep the test-suite.log
36 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
37
38 LIBUDEV_CURRENT=5
39 LIBUDEV_REVISION=0
40 LIBUDEV_AGE=4
41
42 LIBGUDEV_CURRENT=1
43 LIBGUDEV_REVISION=3
44 LIBGUDEV_AGE=1
45
46 LIBSYSTEMD_LOGIN_CURRENT=9
47 LIBSYSTEMD_LOGIN_REVISION=2
48 LIBSYSTEMD_LOGIN_AGE=9
49
50 LIBSYSTEMD_DAEMON_CURRENT=0
51 LIBSYSTEMD_DAEMON_REVISION=11
52 LIBSYSTEMD_DAEMON_AGE=0
53
54 LIBSYSTEMD_ID128_CURRENT=0
55 LIBSYSTEMD_ID128_REVISION=27
56 LIBSYSTEMD_ID128_AGE=0
57
58 LIBSYSTEMD_JOURNAL_CURRENT=11
59 LIBSYSTEMD_JOURNAL_REVISION=4
60 LIBSYSTEMD_JOURNAL_AGE=11
61
62 LIBSYSTEMD_CURRENT=0
63 LIBSYSTEMD_REVISION=0
64 LIBSYSTEMD_AGE=0
65
66 # Dirs of external packages
67 dbuspolicydir=@dbuspolicydir@
68 dbussessionservicedir=@dbussessionservicedir@
69 dbussystemservicedir=@dbussystemservicedir@
70 pamlibdir=@pamlibdir@
71 pamconfdir=@pamconfdir@
72 pkgconfigdatadir=$(datadir)/pkgconfig
73 pkgconfiglibdir=$(libdir)/pkgconfig
74 polkitpolicydir=$(datadir)/polkit-1/actions
75 bashcompletiondir=@bashcompletiondir@
76 zshcompletiondir=@zshcompletiondir@
77 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
78 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
79 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
80 varlogdir=$(localstatedir)/log
81 systemdstatedir=$(localstatedir)/lib/systemd
82 catalogstatedir=$(systemdstatedir)/catalog
83
84 # Our own, non-special dirs
85 pkgsysconfdir=$(sysconfdir)/systemd
86 userunitdir=$(prefix)/lib/systemd/user
87 userpresetdir=$(prefix)/lib/systemd/user-preset
88 tmpfilesdir=$(prefix)/lib/tmpfiles.d
89 sysctldir=$(prefix)/lib/sysctl.d
90 networkdir=$(prefix)/lib/systemd/network
91 pkgincludedir=$(includedir)/systemd
92 systemgeneratordir=$(rootlibexecdir)/system-generators
93 usergeneratordir=$(prefix)/lib/systemd/user-generators
94 systemshutdowndir=$(rootlibexecdir)/system-shutdown
95 systemsleepdir=$(rootlibexecdir)/system-sleep
96 systemunitdir=$(rootprefix)/lib/systemd/system
97 systempresetdir=$(rootprefix)/lib/systemd/system-preset
98 udevlibexecdir=$(rootprefix)/lib/udev
99 udevhomedir=$(udevlibexecdir)
100 udevrulesdir=$(udevlibexecdir)/rules.d
101 udevhwdbdir=$(udevlibexecdir)/hwdb.d
102 catalogdir=$(prefix)/lib/systemd/catalog
103 kernelinstalldir = $(prefix)/lib/kernel/install.d
104
105 # And these are the special ones for /
106 rootprefix=@rootprefix@
107 rootbindir=$(rootprefix)/bin
108 rootlibexecdir=$(rootprefix)/lib/systemd
109
110 CLEANFILES = $(BUILT_SOURCES)
111 DISTCLEANFILES =
112 EXTRA_DIST =
113 BUILT_SOURCES =
114 INSTALL_EXEC_HOOKS =
115 UNINSTALL_EXEC_HOOKS =
116 INSTALL_DATA_HOOKS =
117 UNINSTALL_DATA_HOOKS =
118 DISTCLEAN_LOCAL_HOOKS =
119 CLEAN_LOCAL_HOOKS =
120 pkginclude_HEADERS =
121 noinst_LTLIBRARIES =
122 lib_LTLIBRARIES =
123 include_HEADERS =
124 noinst_DATA =
125 pkgconfiglib_DATA =
126 polkitpolicy_in_in_files =
127 polkitpolicy_in_files =
128 polkitpolicy_files =
129 dist_udevrules_DATA =
130 nodist_udevrules_DATA =
131 dist_pkgsysconf_DATA =
132 dist_pkgdata_DATA =
133 dist_dbuspolicy_DATA =
134 dist_dbussystemservice_DATA =
135 check_PROGRAMS =
136 check_DATA =
137 tests=
138 manual_tests =
139 if ENABLE_TESTS
140 noinst_PROGRAMS = $(manual_tests) $(tests)
141 TESTS = $(tests)
142 else
143 noinst_PROGRAMS =
144 TESTS =
145 endif
146 udevlibexec_PROGRAMS =
147
148 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
149         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
150         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
151
152 AM_CPPFLAGS = \
153         -include $(top_builddir)/config.h \
154         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
155         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
156         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
157         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
158         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
159         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
160         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
161         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
162         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
163         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
164         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
165         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
166         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
167         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
168         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
169         -DROOTPREFIX=\"$(rootprefix)\" \
170         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
171         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
172         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
173         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
174         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
175         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
176         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
177         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
178         -DX_SERVER=\"$(bindir)/X\" \
179         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
180         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
181         -DQUOTACHECK=\"$(QUOTACHECK)\" \
182         -DKEXEC=\"$(KEXEC)\" \
183         -I $(top_srcdir)/src \
184         -I $(top_builddir)/src/shared \
185         -I $(top_srcdir)/src/shared \
186         -I $(top_srcdir)/src/network \
187         -I $(top_srcdir)/src/login \
188         -I $(top_srcdir)/src/journal \
189         -I $(top_srcdir)/src/systemd \
190         -I $(top_builddir)/src/core \
191         -I $(top_srcdir)/src/core \
192         -I $(top_srcdir)/src/libudev \
193         -I $(top_srcdir)/src/udev \
194         -I $(top_srcdir)/src/udev/net \
195         -I $(top_builddir)/src/udev \
196         -I $(top_srcdir)/src/libsystemd/sd-bus \
197         -I $(top_srcdir)/src/libsystemd/sd-event \
198         -I $(top_srcdir)/src/libsystemd/sd-rtnl \
199         $(OUR_CPPFLAGS)
200
201 AM_CFLAGS = $(OUR_CFLAGS)
202 AM_LDFLAGS = $(OUR_LDFLAGS)
203
204 # ------------------------------------------------------------------------------
205 define move-to-rootlibdir
206         if test "$(libdir)" != "$(rootlibdir)"; then \
207                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
208                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
209                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
210                 $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
211                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
212         fi
213 endef
214
215 INSTALL_DIRS =
216
217 RUNLEVEL1_TARGET_WANTS =
218 RUNLEVEL2_TARGET_WANTS =
219 RUNLEVEL3_TARGET_WANTS =
220 RUNLEVEL4_TARGET_WANTS =
221 RUNLEVEL5_TARGET_WANTS =
222 SHUTDOWN_TARGET_WANTS =
223 LOCAL_FS_TARGET_WANTS =
224 MULTI_USER_TARGET_WANTS =
225 SYSINIT_TARGET_WANTS =
226 SOCKETS_TARGET_WANTS =
227 BUSNAMES_TARGET_WANTS =
228 TIMERS_TARGET_WANTS =
229 USER_SOCKETS_TARGET_WANTS =
230 USER_BUSNAMES_TARGET_WANTS =
231
232 SYSTEM_UNIT_ALIASES =
233 USER_UNIT_ALIASES =
234
235 GENERAL_ALIASES =
236
237 install-target-wants-hook:
238         what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
239         what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
240         what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
241         what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
242         what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
243         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
244         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
245         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
246         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
247         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
248         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
249         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
250         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
251         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
252         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
253
254 define add-wants
255         [ -z "$$what" ] || ( \
256           dir=$(DESTDIR)$$dir/$$wants.wants && \
257           $(MKDIR_P) -m 0755 $$dir && \
258           cd $$dir && \
259           rm -f $$what && \
260           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
261 endef
262
263 install-directories-hook:
264         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
265
266 install-aliases-hook:
267         set -- $(SYSTEM_UNIT_ALIASES) && \
268                 dir=$(systemunitdir) && $(install-aliases)
269         set -- $(USER_UNIT_ALIASES) && \
270                 dir=$(userunitdir) && $(install-aliases)
271         set -- $(GENERAL_ALIASES) && \
272                 dir= && $(install-aliases)
273
274 define install-aliases
275         while [ -n "$$1" ]; do \
276                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
277                 rm -f $(DESTDIR)$$dir/$$2 && \
278                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
279                 shift 2 || exit $$?; \
280         done
281 endef
282
283 INSTALL_EXEC_HOOKS += \
284         install-target-wants-hook \
285         install-directories-hook \
286         install-aliases-hook
287
288 # ------------------------------------------------------------------------------
289 AM_V_M4 = $(AM_V_M4_$(V))
290 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
291 AM_V_M4_0 = @echo "  M4      " $@;
292
293 AM_V_XSLT = $(AM_V_XSLT_$(V))
294 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
295 AM_V_XSLT_0 = @echo "  XSLT    " $@;
296
297 AM_V_GPERF = $(AM_V_GPERF_$(V))
298 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
299 AM_V_GPERF_0 = @echo "  GPERF   " $@;
300
301 AM_V_LN = $(AM_V_LN_$(V))
302 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
303 AM_V_LN_0 = @echo "  LN      " $@;
304
305 # ------------------------------------------------------------------------------
306 rootbin_PROGRAMS = \
307         systemctl \
308         systemd-notify \
309         systemd-ask-password \
310         systemd-tty-ask-password-agent \
311         systemd-machine-id-setup
312
313 bin_PROGRAMS = \
314         systemd-cgls \
315         systemd-cgtop \
316         systemd-nspawn \
317         systemd-detect-virt \
318         systemd-delta \
319         systemd-analyze \
320         systemd-run
321
322 dist_bin_SCRIPTS = \
323         src/kernel-install/kernel-install
324
325 dist_kernelinstall_SCRIPTS = \
326         src/kernel-install/50-depmod.install \
327         src/kernel-install/90-loaderentry.install
328
329 rootlibexec_PROGRAMS = \
330         systemd \
331         systemd-cgroups-agent \
332         systemd-initctl \
333         systemd-update-utmp \
334         systemd-shutdownd \
335         systemd-shutdown \
336         systemd-remount-fs \
337         systemd-reply-password \
338         systemd-fsck \
339         systemd-ac-power \
340         systemd-sysctl \
341         systemd-sleep \
342         systemd-bus-proxyd \
343         systemd-socket-proxyd
344
345 systemgenerator_PROGRAMS = \
346         systemd-getty-generator \
347         systemd-fstab-generator \
348         systemd-system-update-generator
349
350 dist_bashcompletion_DATA = \
351         shell-completion/bash/busctl \
352         shell-completion/bash/journalctl \
353         shell-completion/bash/systemctl \
354         shell-completion/bash/systemd-analyze \
355         shell-completion/bash/systemd-delta \
356         shell-completion/bash/systemd-run \
357         shell-completion/bash/udevadm \
358         shell-completion/bash/kernel-install
359
360 dist_zshcompletion_DATA = \
361         shell-completion/zsh/_systemctl \
362         shell-completion/zsh/_journalctl \
363         shell-completion/zsh/_udevadm \
364         shell-completion/zsh/_kernel-install \
365         shell-completion/zsh/_systemd-nspawn \
366         shell-completion/zsh/_systemd-analyze \
367         shell-completion/zsh/_systemd-run \
368         shell-completion/zsh/_sd_hosts_or_user_at_host \
369         shell-completion/zsh/_systemd-delta \
370         shell-completion/zsh/_systemd
371
372 dist_sysctl_DATA = \
373         sysctl.d/50-default.conf
374
375 dist_systemunit_DATA = \
376         units/graphical.target \
377         units/multi-user.target \
378         units/emergency.service \
379         units/emergency.target \
380         units/sysinit.target \
381         units/basic.target \
382         units/getty.target \
383         units/halt.target \
384         units/kexec.target \
385         units/local-fs.target \
386         units/local-fs-pre.target \
387         units/initrd.target \
388         units/initrd-fs.target \
389         units/initrd-root-fs.target \
390         units/remote-fs.target \
391         units/remote-fs-pre.target \
392         units/network.target \
393         units/network-online.target \
394         units/nss-lookup.target \
395         units/nss-user-lookup.target \
396         units/hibernate.target \
397         units/hybrid-sleep.target \
398         units/poweroff.target \
399         units/reboot.target \
400         units/rescue.target \
401         units/rpcbind.target \
402         units/time-sync.target \
403         units/shutdown.target \
404         units/final.target \
405         units/umount.target \
406         units/sigpwr.target \
407         units/sleep.target \
408         units/sockets.target \
409         units/busnames.target \
410         units/timers.target \
411         units/paths.target \
412         units/suspend.target \
413         units/swap.target \
414         units/slices.target \
415         units/system.slice \
416         units/x-.slice \
417         units/systemd-initctl.socket \
418         units/systemd-shutdownd.socket \
419         units/syslog.socket \
420         units/dev-hugepages.mount \
421         units/dev-mqueue.mount \
422         units/sys-kernel-config.mount \
423         units/sys-kernel-debug.mount \
424         units/sys-fs-fuse-connections.mount \
425         units/tmp.mount \
426         units/printer.target \
427         units/sound.target \
428         units/bluetooth.target \
429         units/smartcard.target \
430         units/systemd-ask-password-wall.path \
431         units/systemd-ask-password-console.path \
432         units/systemd-udevd-control.socket \
433         units/systemd-udevd-kernel.socket \
434         units/system-update.target \
435         units/initrd-switch-root.target
436
437 nodist_systemunit_DATA = \
438         units/getty@.service \
439         units/serial-getty@.service \
440         units/console-shell.service \
441         units/console-getty.service \
442         units/container-getty@.service \
443         units/systemd-initctl.service \
444         units/systemd-shutdownd.service \
445         units/systemd-remount-fs.service \
446         units/systemd-update-utmp.service \
447         units/systemd-update-utmp-runlevel.service \
448         units/systemd-ask-password-wall.service \
449         units/systemd-ask-password-console.service \
450         units/systemd-sysctl.service \
451         units/emergency.service \
452         units/rescue.service \
453         units/user@.service \
454         units/systemd-hibernate.service \
455         units/systemd-hybrid-sleep.service \
456         units/systemd-suspend.service \
457         units/systemd-halt.service \
458         units/systemd-poweroff.service \
459         units/systemd-reboot.service \
460         units/systemd-kexec.service \
461         units/systemd-fsck@.service \
462         units/systemd-fsck-root.service \
463         units/systemd-udevd.service \
464         units/systemd-udev-trigger.service \
465         units/systemd-udev-settle.service \
466         units/debug-shell.service \
467         units/initrd-parse-etc.service \
468         units/initrd-cleanup.service \
469         units/initrd-udevadm-cleanup-db.service \
470         units/initrd-switch-root.service \
471         units/systemd-nspawn@.service
472
473 dist_userunit_DATA = \
474         units/user/basic.target \
475         units/user/default.target \
476         units/user/exit.target
477
478 nodist_userunit_DATA = \
479         units/user/systemd-exit.service
480
481 EXTRA_DIST += \
482         units/getty@.service.m4 \
483         units/serial-getty@.service.m4 \
484         units/console-shell.service.m4.in \
485         units/console-getty.service.m4.in \
486         units/container-getty@.service.m4.in \
487         units/rescue.service.m4.in \
488         units/systemd-initctl.service.in \
489         units/systemd-shutdownd.service.in \
490         units/systemd-remount-fs.service.in \
491         units/systemd-update-utmp.service.in \
492         units/systemd-update-utmp-runlevel.service.in \
493         units/systemd-ask-password-wall.service.in \
494         units/systemd-ask-password-console.service.in \
495         units/systemd-sysctl.service.in \
496         units/emergency.service.in \
497         units/systemd-halt.service.in \
498         units/systemd-poweroff.service.in \
499         units/systemd-reboot.service.in \
500         units/systemd-kexec.service.in \
501         units/user/systemd-exit.service.in \
502         units/systemd-fsck@.service.in \
503         units/systemd-fsck-root.service.in \
504         units/user@.service.in \
505         units/systemd-udevd.service \
506         units/systemd-udev-trigger.service \
507         units/systemd-udev-settle.service \
508         units/debug-shell.service.in \
509         units/systemd-hibernate.service.in \
510         units/systemd-hybrid-sleep.service.in \
511         units/systemd-suspend.service.in \
512         units/quotaon.service.in \
513         units/initrd-parse-etc.service.in \
514         units/initrd-cleanup.service.in \
515         units/initrd-udevadm-cleanup-db.service.in \
516         units/initrd-switch-root.service.in \
517         units/systemd-nspawn@.service.in
518
519 CLEANFILES += \
520         units/console-shell.service.m4 \
521         units/console-getty.service.m4 \
522         units/container-getty@.service.m4 \
523         units/rescue.service.m4 \
524         units/user@.service.m4
525
526 if HAVE_SYSV_COMPAT
527 nodist_systemunit_DATA += \
528         units/rc-local.service \
529         units/halt-local.service
530
531 systemgenerator_PROGRAMS += \
532         systemd-rc-local-generator
533 endif
534
535 EXTRA_DIST += \
536         units/rc-local.service.in \
537         units/halt-local.service.in
538
539 # automake is broken and can't handle files with a dash in front
540 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
541 units-install-hook:
542         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
543
544 units-uninstall-hook:
545         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
546
547 INSTALL_DATA_HOOKS += units-install-hook
548 UNINSTALL_DATA_HOOKS += units-uninstall-hook
549
550 dist_doc_DATA = \
551         README \
552         NEWS \
553         LICENSE.LGPL2.1 \
554         LICENSE.GPL2 \
555         LICENSE.MIT \
556         DISTRO_PORTING
557
558 @INTLTOOL_POLICY_RULE@
559
560 # ------------------------------------------------------------------------------
561
562 MANPAGES =
563 MANPAGES_ALIAS =
564
565 include Makefile-man.am
566
567 .PHONY: man update-man-list
568 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
569
570 XML_FILES = \
571         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
572 HTML_FILES = \
573         ${XML_FILES:.xml=.html}
574 HTML_ALIAS = \
575         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
576
577 if ENABLE_MANPAGES
578 man_MANS = \
579         $(MANPAGES) \
580         $(MANPAGES_ALIAS)
581
582 noinst_DATA += \
583         $(HTML_FILES) \
584         $(HTML_ALIAS)
585
586 CLEANFILES += \
587         $(man_MANS) \
588         $(HTML_FILES) \
589         $(HTML_ALIAS)
590
591 docs/html/man:
592         $(AM_V_at)$(MKDIR_P) $(dir $@)
593         $(AM_V_LN)$(LN_S) -f ../../man $@
594
595 noinst_DATA += \
596         docs/html/man
597
598 CLEANFILES += \
599         docs/html/man
600
601 if HAVE_PYTHON
602 man/index.html: man/systemd.index.html
603         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
604
605 noinst_DATA += \
606         man/index.html
607
608 CLEANFILES += \
609         man/index.html
610
611 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
612 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
613 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
614
615 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
616         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
617         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
618         @echo "Makefile-man.am has been regenerated"
619
620 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
621         $(AM_V_at)$(MKDIR_P) $(dir $@)
622         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
623
624 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
625         $(AM_V_at)$(MKDIR_P) $(dir $@)
626         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
627
628 EXTRA_DIST += \
629         man/systemd.index.xml \
630         man/index.html \
631         man/systemd.directives.xml
632
633 CLEANFILES += \
634         man/systemd.index.xml \
635         man/systemd.directives.xml
636
637 endif
638
639 endif
640
641 EXTRA_DIST += \
642         $(XML_FILES) \
643         $(HTML_FILES) \
644         $(HTML_ALIAS) \
645         $(man_MANS) \
646         tools/make-man-index.py \
647         tools/make-directive-index.py \
648         tools/make-man-rules.py \
649         tools/xml_helper.py \
650         man/less-variables.xml
651
652 # ------------------------------------------------------------------------------
653 noinst_LTLIBRARIES += \
654         libsystemd-shared.la
655
656 libsystemd_shared_la_SOURCES = \
657         src/shared/linux/auto_dev-ioctl.h \
658         src/shared/linux/fanotify.h \
659         src/shared/ioprio.h \
660         src/shared/missing.h \
661         src/shared/initreq.h \
662         src/shared/securebits.h \
663         src/shared/special.h \
664         src/shared/list.h \
665         src/shared/macro.h \
666         src/shared/def.h \
667         src/shared/sparse-endian.h \
668         src/shared/refcnt.h \
669         src/shared/udev-util.h \
670         src/shared/bus-errors.h \
671         src/shared/device-nodes.c \
672         src/shared/device-nodes.h \
673         src/shared/util.c \
674         src/shared/util.h \
675         src/shared/virt.c \
676         src/shared/virt.h \
677         src/shared/efivars.c \
678         src/shared/efivars.h \
679         src/shared/path-util.c \
680         src/shared/path-util.h \
681         src/shared/time-util.c \
682         src/shared/time-util.h \
683         src/shared/hashmap.c \
684         src/shared/hashmap.h \
685         src/shared/siphash24.c \
686         src/shared/siphash24.h \
687         src/shared/set.c \
688         src/shared/set.h \
689         src/shared/fdset.c \
690         src/shared/fdset.h \
691         src/shared/prioq.c \
692         src/shared/prioq.h \
693         src/shared/sleep-config.c \
694         src/shared/sleep-config.h \
695         src/shared/strv.c \
696         src/shared/strv.h \
697         src/shared/env-util.c \
698         src/shared/env-util.h \
699         src/shared/strbuf.c \
700         src/shared/strbuf.h \
701         src/shared/strxcpyx.c \
702         src/shared/strxcpyx.h \
703         src/shared/conf-parser.c \
704         src/shared/conf-parser.h \
705         src/shared/log.c \
706         src/shared/log.h \
707         src/shared/ratelimit.h \
708         src/shared/ratelimit.c \
709         src/shared/exit-status.c \
710         src/shared/exit-status.h \
711         src/shared/utf8.c \
712         src/shared/utf8.h \
713         src/shared/gunicode.c \
714         src/shared/gunicode.h \
715         src/shared/pager.c \
716         src/shared/pager.h \
717         src/shared/socket-util.c \
718         src/shared/socket-util.h \
719         src/shared/conf-files.c \
720         src/shared/conf-files.h \
721         src/shared/cgroup-util.c \
722         src/shared/cgroup-util.h \
723         src/shared/cgroup-show.c \
724         src/shared/cgroup-show.h \
725         src/shared/unit-name.c \
726         src/shared/unit-name.h \
727         src/shared/utmp-wtmp.c \
728         src/shared/utmp-wtmp.h \
729         src/shared/watchdog.c \
730         src/shared/watchdog.h \
731         src/shared/spawn-ask-password-agent.c \
732         src/shared/spawn-ask-password-agent.h \
733         src/shared/replace-var.c \
734         src/shared/replace-var.h \
735         src/shared/spawn-polkit-agent.c \
736         src/shared/spawn-polkit-agent.h \
737         src/shared/hwclock.c \
738         src/shared/hwclock.h \
739         src/shared/time-dst.c \
740         src/shared/time-dst.h \
741         src/shared/calendarspec.c \
742         src/shared/calendarspec.h \
743         src/shared/fileio.c \
744         src/shared/fileio.h \
745         src/shared/output-mode.h \
746         src/shared/MurmurHash2.c \
747         src/shared/MurmurHash2.h \
748         src/shared/acpi-fpdt.h \
749         src/shared/acpi-fpdt.c \
750         src/shared/boot-timestamps.h \
751         src/shared/boot-timestamps.c \
752         src/shared/mkdir.c \
753         src/shared/mkdir.h \
754         src/shared/smack-util.c \
755         src/shared/smack-util.h \
756         src/shared/apparmor-util.c \
757         src/shared/apparmor-util.h \
758         src/shared/ima-util.c \
759         src/shared/ima-util.h \
760         src/shared/ptyfwd.c \
761         src/shared/ptyfwd.h \
762         src/shared/net-util.c \
763         src/shared/net-util.h \
764         src/shared/errno-list.c \
765         src/shared/errno-list.h \
766         src/shared/audit.c \
767         src/shared/audit.h \
768         src/shared/xml.c \
769         src/shared/xml.h
770
771 nodist_libsystemd_shared_la_SOURCES = \
772         src/shared/errno-from-name.h \
773         src/shared/errno-to-name.h
774
775 # ------------------------------------------------------------------------------
776 noinst_LTLIBRARIES += \
777         libsystemd-units.la
778
779 libsystemd_units_la_SOURCES = \
780         src/shared/install.c \
781         src/shared/install.h \
782         src/shared/install-printf.c \
783         src/shared/install-printf.h \
784         src/shared/path-lookup.c \
785         src/shared/path-lookup.h \
786         src/shared/specifier.c \
787         src/shared/specifier.h
788
789 # ------------------------------------------------------------------------------
790 noinst_LTLIBRARIES += \
791         libsystemd-label.la
792
793 libsystemd_label_la_SOURCES = \
794         src/shared/socket-label.c \
795         src/shared/label.c \
796         src/shared/label.h \
797         src/shared/selinux-util.c \
798         src/shared/selinux-util.h \
799         src/shared/mkdir-label.c \
800         src/shared/ask-password-api.c \
801         src/shared/ask-password-api.h \
802         src/shared/fileio-label.c \
803         src/shared/fileio-label.h \
804         src/shared/dev-setup.c \
805         src/shared/dev-setup.h
806
807 libsystemd_label_la_CFLAGS = \
808         $(AM_CFLAGS) \
809         $(SELINUX_CFLAGS)
810
811 libsystemd_label_la_LIBADD = \
812         $(SELINUX_LIBS)
813
814 # ------------------------------------------------------------------------------
815
816 if HAVE_SECCOMP
817
818 noinst_LTLIBRARIES += \
819         libsystemd-seccomp.la
820
821 libsystemd_seccomp_la_SOURCES = \
822         src/shared/seccomp-util.h \
823         src/shared/seccomp-util.c
824
825 libsystemd_seccomp_la_CFLAGS = \
826         $(AM_CFLAGS) \
827         $(SECCOMP_CFLAGS)
828
829 libsystemd_seccomp_la_LIBADD = \
830         $(SECCOMP_LIBS)
831
832 endif
833
834 # ------------------------------------------------------------------------------
835 noinst_LTLIBRARIES += \
836         libsystemd-logs.la
837
838 libsystemd_logs_la_SOURCES = \
839         src/shared/logs-show.c \
840         src/shared/logs-show.h
841
842 # ------------------------------------------------------------------------------
843 noinst_LTLIBRARIES += \
844         libsystemd-capability.la
845
846 libsystemd_capability_la_SOURCES = \
847         src/shared/capability.c \
848         src/shared/capability.h
849
850 libsystemd_capability_la_CFLAGS = \
851         $(AM_CFLAGS) \
852         $(CAP_CFLAGS)
853
854 libsystemd_capability_la_LIBADD = \
855         $(CAP_LIBS)
856
857 # ------------------------------------------------------------------------------
858 if HAVE_ACL
859 noinst_LTLIBRARIES += \
860         libsystemd-acl.la
861
862 libsystemd_acl_la_SOURCES = \
863         src/shared/acl-util.c \
864         src/shared/acl-util.h
865
866 libsystemd_acl_la_CFLAGS = \
867         $(AM_CFLAGS) \
868         $(ACL_CFLAGS)
869
870 libsystemd_acl_la_LIBADD = \
871         $(ACL_LIBS)
872 endif
873
874 # ------------------------------------------------------------------------------
875 noinst_LTLIBRARIES += \
876         libsystemd-core.la
877
878 libsystemd_core_la_SOURCES = \
879         src/core/unit.c \
880         src/core/unit.h \
881         src/core/unit-printf.c \
882         src/core/unit-printf.h \
883         src/core/job.c \
884         src/core/job.h \
885         src/core/manager.c \
886         src/core/manager.h \
887         src/core/transaction.c \
888         src/core/transaction.h \
889         src/core/load-fragment.c \
890         src/core/load-fragment.h \
891         src/core/service.c \
892         src/core/service.h \
893         src/core/socket.c \
894         src/core/socket.h \
895         src/core/busname.c \
896         src/core/busname.h \
897         src/core/target.c \
898         src/core/target.h \
899         src/core/snapshot.c \
900         src/core/snapshot.h \
901         src/core/device.c \
902         src/core/device.h \
903         src/core/mount.c \
904         src/core/mount.h \
905         src/core/automount.c \
906         src/core/automount.h \
907         src/core/swap.c \
908         src/core/swap.h \
909         src/core/timer.c \
910         src/core/timer.h \
911         src/core/path.c \
912         src/core/path.h \
913         src/core/slice.c \
914         src/core/slice.h \
915         src/core/scope.c \
916         src/core/scope.h \
917         src/core/load-dropin.c \
918         src/core/load-dropin.h \
919         src/core/execute.c \
920         src/core/execute.h \
921         src/core/kill.c \
922         src/core/kill.h \
923         src/core/dbus.c \
924         src/core/dbus.h \
925         src/core/dbus-manager.c \
926         src/core/dbus-manager.h \
927         src/core/dbus-unit.c \
928         src/core/dbus-unit.h \
929         src/core/dbus-job.c \
930         src/core/dbus-job.h \
931         src/core/dbus-service.c \
932         src/core/dbus-service.h \
933         src/core/dbus-socket.c \
934         src/core/dbus-socket.h \
935         src/core/dbus-busname.c \
936         src/core/dbus-busname.h \
937         src/core/dbus-target.c \
938         src/core/dbus-target.h \
939         src/core/dbus-snapshot.c \
940         src/core/dbus-snapshot.h \
941         src/core/dbus-device.c \
942         src/core/dbus-device.h \
943         src/core/dbus-mount.c \
944         src/core/dbus-mount.h \
945         src/core/dbus-automount.c \
946         src/core/dbus-automount.h \
947         src/core/dbus-swap.c \
948         src/core/dbus-swap.h \
949         src/core/dbus-timer.c \
950         src/core/dbus-timer.h \
951         src/core/dbus-path.c \
952         src/core/dbus-path.h \
953         src/core/dbus-slice.c \
954         src/core/dbus-slice.h \
955         src/core/dbus-scope.c \
956         src/core/dbus-scope.h \
957         src/core/dbus-execute.c \
958         src/core/dbus-execute.h \
959         src/core/dbus-kill.c \
960         src/core/dbus-kill.h \
961         src/core/dbus-cgroup.c \
962         src/core/dbus-cgroup.h \
963         src/core/dbus-client-track.c \
964         src/core/dbus-client-track.h \
965         src/core/cgroup.c \
966         src/core/cgroup.h \
967         src/core/selinux-access.c \
968         src/core/selinux-access.h \
969         src/core/selinux-setup.c \
970         src/core/selinux-setup.h \
971         src/core/smack-setup.c \
972         src/core/smack-setup.h \
973         src/core/ima-setup.c \
974         src/core/ima-setup.h \
975         src/core/locale-setup.h \
976         src/core/locale-setup.c \
977         src/core/hostname-setup.c \
978         src/core/hostname-setup.h \
979         src/core/machine-id-setup.c \
980         src/core/machine-id-setup.h \
981         src/core/mount-setup.c \
982         src/core/mount-setup.h \
983         src/core/loopback-setup.h \
984         src/core/loopback-setup.c \
985         src/core/condition.c \
986         src/core/condition.h \
987         src/core/namespace.c \
988         src/core/namespace.h \
989         src/core/tcpwrap.c \
990         src/core/tcpwrap.h \
991         src/core/build.h \
992         src/core/sysfs-show.h \
993         src/core/switch-root.h \
994         src/core/switch-root.c \
995         src/core/killall.h \
996         src/core/killall.c \
997         src/core/audit-fd.c \
998         src/core/audit-fd.h \
999         src/core/async.c \
1000         src/core/async.h
1001
1002 if HAVE_KMOD
1003 libsystemd_core_la_SOURCES += \
1004         src/core/kmod-setup.c \
1005         src/core/kmod-setup.h
1006 endif
1007
1008 nodist_libsystemd_core_la_SOURCES = \
1009         src/core/load-fragment-gperf.c \
1010         src/core/load-fragment-gperf-nulstr.c
1011
1012 libsystemd_core_la_CFLAGS = \
1013         $(AM_CFLAGS) \
1014         $(LIBWRAP_CFLAGS) \
1015         $(PAM_CFLAGS) \
1016         $(AUDIT_CFLAGS) \
1017         $(CAP_CFLAGS) \
1018         $(KMOD_CFLAGS) \
1019         $(SECCOMP_CFLAGS) \
1020         -pthread
1021
1022 libsystemd_core_la_LIBADD = \
1023         libsystemd-capability.la \
1024         libsystemd-units.la \
1025         libsystemd-label.la \
1026         libudev-internal.la \
1027         libsystemd-shared.la \
1028         libsystemd-internal.la \
1029         $(LIBWRAP_LIBS) \
1030         $(PAM_LIBS) \
1031         $(AUDIT_LIBS) \
1032         $(CAP_LIBS) \
1033         $(KMOD_LIBS) \
1034         $(SECCOMP_LIBS)
1035
1036 if HAVE_SECCOMP
1037 libsystemd_core_la_LIBADD += \
1038         libsystemd-seccomp.la
1039 endif
1040
1041 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1042         $(AM_V_at)$(MKDIR_P) $(dir $@)
1043         $(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 ";" }' < $< > $@
1044
1045 EXTRA_DIST += \
1046         src/core/load-fragment-gperf.gperf.m4
1047
1048 CLEANFILES += \
1049         src/core/load-fragment-gperf.gperf \
1050         src/core/load-fragment-gperf.c \
1051         src/core/load-fragment-gperf-nulstr.c \
1052         src/shared/errno-list.txt \
1053         src/shared/errno-from-name.gperf
1054
1055 BUILT_SOURCES += \
1056         src/shared/errno-from-name.h \
1057         src/shared/errno-to-name.h
1058
1059 src/shared/errno-list.txt:
1060         $(AM_V_at)$(MKDIR_P) $(dir $@)
1061         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+[0-9]/ { print $$2; }'  > $@
1062
1063 src/shared/errno-from-name.gperf: src/shared/errno-list.txt
1064         $(AM_V_at)$(MKDIR_P) $(dir $@)
1065         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
1066
1067 src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
1068         $(AM_V_at)$(MKDIR_P) $(dir $@)
1069         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
1070
1071 src/shared/errno-to-name.h: src/shared/errno-list.txt
1072         $(AM_V_at)$(MKDIR_P) $(dir $@)
1073         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
1074
1075 # ------------------------------------------------------------------------------
1076 systemd_SOURCES = \
1077         src/core/main.c
1078
1079 systemd_LDADD = \
1080         libsystemd-core.la \
1081         $(RT_LIBS)
1082
1083 dist_pkgsysconf_DATA += \
1084         src/core/system.conf \
1085         src/core/user.conf
1086
1087 dist_dbuspolicy_DATA += \
1088         src/core/org.freedesktop.systemd1.conf
1089
1090 dist_dbussystemservice_DATA += \
1091         src/core/org.freedesktop.systemd1.service
1092
1093 polkitpolicy_in_in_files += \
1094         src/core/org.freedesktop.systemd1.policy.in.in
1095
1096 pkgconfigdata_DATA = \
1097         src/core/systemd.pc
1098
1099 nodist_rpmmacros_DATA = \
1100         src/core/macros.systemd
1101
1102 EXTRA_DIST += \
1103         src/core/systemd.pc.in \
1104         src/core/macros.systemd.in
1105
1106 CLEANFILES += \
1107         src/core/macros.systemd \
1108         src/core/org.freedesktop.systemd1.policy.in
1109
1110 # ------------------------------------------------------------------------------
1111 manual_tests += \
1112         test-engine \
1113         test-ns \
1114         test-loopback \
1115         test-hostname \
1116         test-daemon \
1117         test-cgroup \
1118         test-install \
1119         test-watchdog \
1120         test-log
1121
1122 tests += \
1123         test-job-type \
1124         test-env-replace \
1125         test-strbuf \
1126         test-strv \
1127         test-path-util \
1128         test-strxcpyx \
1129         test-unit-name \
1130         test-unit-file \
1131         test-utf8 \
1132         test-ellipsize \
1133         test-util \
1134         test-tmpfiles \
1135         test-namespace \
1136         test-date \
1137         test-sleep \
1138         test-replace-var \
1139         test-sched-prio \
1140         test-calendarspec \
1141         test-strip-tab-ansi \
1142         test-cgroup-util \
1143         test-cgroup-mask \
1144         test-prioq \
1145         test-fileio \
1146         test-time \
1147         test-hashmap \
1148         test-list \
1149         test-tables \
1150         test-device-nodes \
1151         test-xml
1152
1153 EXTRA_DIST += \
1154         test/sched_idle_bad.service \
1155         test/sched_idle_ok.service \
1156         test/sched_rr_bad.service \
1157         test/sched_rr_ok.service \
1158         test/sched_rr_change.service \
1159         test/son.service \
1160         test/daughter.service \
1161         test/parent.slice
1162
1163 EXTRA_DIST += \
1164         src/test/test-helper.h
1165
1166 test_device_nodes_SOURCES = \
1167         src/test/test-device-nodes.c
1168
1169 test_device_nodes_LDADD = \
1170         libsystemd-shared.la
1171
1172 test_engine_SOURCES = \
1173         src/test/test-engine.c
1174
1175 test_engine_LDADD = \
1176         libsystemd-core.la \
1177         $(RT_LIBS)
1178
1179 test_job_type_SOURCES = \
1180         src/test/test-job-type.c
1181
1182 test_job_type_LDADD = \
1183         libsystemd-core.la \
1184         $(RT_LIBS)
1185
1186 test_ns_SOURCES = \
1187         src/test/test-ns.c
1188
1189 test_ns_LDADD = \
1190         libsystemd-core.la
1191
1192 test_loopback_SOURCES = \
1193         src/test/test-loopback.c
1194
1195 test_loopback_LDADD = \
1196         libsystemd-core.la
1197
1198 test_hostname_SOURCES = \
1199         src/test/test-hostname.c
1200
1201 test_hostname_LDADD = \
1202         libsystemd-core.la
1203
1204 if ENABLE_EFI
1205 manual_tests += \
1206         test-boot-timestamp
1207
1208 test_boot_timestamp_SOURCES = \
1209         src/test/test-boot-timestamps.c
1210
1211 test_boot_timestamp_LDADD = \
1212         libsystemd-shared.la
1213 endif
1214
1215 test_unit_name_SOURCES = \
1216         src/test/test-unit-name.c
1217
1218 test_unit_name_LDADD = \
1219         libsystemd-core.la \
1220         $(RT_LIBS)
1221
1222 test_unit_file_SOURCES = \
1223         src/test/test-unit-file.c
1224
1225 test_unit_file_LDADD = \
1226         libsystemd-core.la \
1227         $(RT_LIBS)
1228
1229 test_utf8_SOURCES = \
1230         src/test/test-utf8.c
1231
1232 test_utf8_LDADD = \
1233         libsystemd-shared.la
1234
1235 test_util_SOURCES = \
1236         src/test/test-util.c
1237
1238 test_util_LDADD = \
1239         libsystemd-core.la
1240
1241 test_tmpfiles_SOURCES = \
1242         src/test/test-tmpfiles.c
1243
1244 test_tmpfiles_LDADD = \
1245         libsystemd-shared.la
1246
1247 test_namespace_SOURCES = \
1248         src/test/test-namespace.c
1249
1250 test_namespace_LDADD = \
1251         libsystemd-core.la
1252
1253 test_hashmap_SOURCES = \
1254         src/test/test-hashmap.c
1255
1256 test_hashmap_LDADD = \
1257         libsystemd-core.la
1258
1259 test_xml_SOURCES = \
1260         src/test/test-xml.c
1261
1262 test_xml_LDADD = \
1263         libsystemd-shared.la
1264
1265 test_list_SOURCES = \
1266         src/test/test-list.c
1267
1268 test_list_LDADD = \
1269         libsystemd-core.la
1270
1271 test_tables_SOURCES = \
1272         src/test/test-tables.c \
1273         src/shared/test-tables.h
1274
1275 test_tables_LDADD = \
1276         libsystemd-logs.la \
1277         libsystemd-journal-internal.la \
1278         libsystemd-core.la \
1279         $(RT_LIBS)
1280
1281 test_prioq_SOURCES = \
1282         src/test/test-prioq.c
1283
1284 test_prioq_LDADD = \
1285         libsystemd-core.la
1286
1287 test_fileio_SOURCES = \
1288         src/test/test-fileio.c
1289
1290 test_fileio_LDADD = \
1291         libsystemd-core.la
1292
1293 test_time_SOURCES = \
1294         src/test/test-time.c
1295
1296 test_time_LDADD = \
1297         libsystemd-core.la
1298
1299 test_log_SOURCES = \
1300         src/test/test-log.c
1301
1302 test_log_LDADD = \
1303         libsystemd-core.la
1304
1305 test_ellipsize_SOURCES = \
1306         src/test/test-ellipsize.c
1307
1308 test_ellipsize_LDADD = \
1309         libsystemd-core.la
1310
1311 test_date_SOURCES = \
1312         src/test/test-date.c
1313
1314 test_date_LDADD = \
1315         libsystemd-core.la
1316
1317 test_sleep_SOURCES = \
1318         src/test/test-sleep.c
1319
1320 test_sleep_LDADD = \
1321         libsystemd-core.la
1322
1323 test_replace_var_SOURCES = \
1324         src/test/test-replace-var.c
1325
1326 test_replace_var_LDADD = \
1327         libsystemd-shared.la
1328
1329 test_calendarspec_SOURCES = \
1330         src/test/test-calendarspec.c
1331
1332 test_calendarspec_LDADD = \
1333         libsystemd-shared.la
1334
1335 test_strip_tab_ansi_SOURCES = \
1336         src/test/test-strip-tab-ansi.c
1337
1338 test_strip_tab_ansi_LDADD = \
1339         libsystemd-shared.la
1340
1341 test_daemon_SOURCES = \
1342         src/test/test-daemon.c
1343
1344 test_daemon_LDADD = \
1345         libsystemd-internal.la \
1346         libsystemd-shared.la
1347
1348 test_cgroup_SOURCES = \
1349         src/test/test-cgroup.c
1350
1351 test_cgroup_LDADD = \
1352         libsystemd-label.la \
1353         libsystemd-shared.la
1354
1355 test_cgroup_mask_SOURCES = \
1356         src/test/test-cgroup-mask.c
1357
1358 test_cgroup_mask_CPPFLAGS = \
1359         $(AM_CPPFLAGS) \
1360         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1361
1362 test_cgroup_mask_LDADD = \
1363         libsystemd-core.la \
1364         $(RT_LIBS)
1365
1366 test_cgroup_util_SOURCES = \
1367         src/test/test-cgroup-util.c
1368
1369 test_cgroup_util_LDADD = \
1370         libsystemd-label.la \
1371         libsystemd-internal.la \
1372         libsystemd-shared.la
1373
1374 test_env_replace_SOURCES = \
1375         src/test/test-env-replace.c
1376
1377 test_env_replace_LDADD = \
1378         libsystemd-shared.la
1379
1380 test_strbuf_SOURCES = \
1381         src/test/test-strbuf.c
1382
1383 test_strbuf_LDADD = \
1384         libsystemd-shared.la
1385
1386 test_strv_SOURCES = \
1387         src/test/test-strv.c
1388
1389 test_strv_LDADD = \
1390         libsystemd-units.la \
1391         libsystemd-internal.la \
1392         libsystemd-shared.la
1393
1394 test_path_util_SOURCES = \
1395         src/test/test-path-util.c
1396
1397 test_path_util_LDADD = \
1398         libsystemd-shared.la
1399
1400 test_strxcpyx_SOURCES = \
1401         src/test/test-strxcpyx.c
1402
1403 test_strxcpyx_LDADD = \
1404         libsystemd-shared.la
1405
1406 test_install_SOURCES = \
1407         src/test/test-install.c
1408
1409 test_install_LDADD = \
1410         libsystemd-units.la \
1411         libsystemd-label.la \
1412         libsystemd-internal.la \
1413         libsystemd-shared.la
1414
1415 test_watchdog_SOURCES = \
1416         src/test/test-watchdog.c
1417
1418 test_watchdog_LDADD = \
1419         libsystemd-shared.la
1420
1421 test_sched_prio_SOURCES = \
1422         src/test/test-sched-prio.c
1423
1424 test_sched_prio_CPPFLAGS = \
1425         $(AM_CPPFLAGS) \
1426         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1427
1428 test_sched_prio_LDADD = \
1429         libsystemd-core.la \
1430         $(RT_LIBS)
1431
1432 # ------------------------------------------------------------------------------
1433 ## .PHONY so it always rebuilds it
1434 .PHONY: coverage lcov-run lcov-report coverage-sync
1435
1436 # run lcov from scratch, always
1437 coverage:
1438         $(MAKE) lcov-run
1439         $(MAKE) lcov-report
1440
1441 coverage_dir = coverage
1442 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1443
1444 if ENABLE_COVERAGE
1445 # reset run coverage tests
1446 lcov-run:
1447         @rm -rf $(coverage_dir)
1448         lcov $(coverage_opts) --zerocounters
1449         -$(MAKE) check
1450
1451 # generate report based on current coverage data
1452 lcov-report:
1453         $(MKDIR_P) $(coverage_dir)
1454         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1455                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1456         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1457         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1458
1459 # lcov doesn't work properly with vpath builds, make sure that bad
1460 # output is not uploaded by mistake.
1461 coverage-sync: coverage
1462         test "$(builddir)" = "$(srcdir)"
1463         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1464
1465 else
1466 lcov-run lcov-report:
1467         echo "Need to reconfigure with --enable-coverage"
1468 endif
1469
1470 # ------------------------------------------------------------------------------
1471 systemd_analyze_SOURCES = \
1472         src/analyze/analyze.c
1473
1474 systemd_analyze_LDADD = \
1475         libsystemd-internal.la \
1476         libsystemd-shared.la
1477
1478 # ------------------------------------------------------------------------------
1479 systemd_initctl_SOURCES = \
1480         src/initctl/initctl.c
1481
1482 systemd_initctl_LDADD = \
1483         libsystemd-internal.la \
1484         libsystemd-shared.la
1485
1486 # ------------------------------------------------------------------------------
1487 systemd_update_utmp_SOURCES = \
1488         src/update-utmp/update-utmp.c
1489
1490 systemd_update_utmp_CFLAGS = \
1491         $(AM_CFLAGS) \
1492         $(AUDIT_CFLAGS)
1493
1494 systemd_update_utmp_LDADD = \
1495         libsystemd-internal.la \
1496         libsystemd-shared.la \
1497         $(AUDIT_LIBS)
1498
1499 # ------------------------------------------------------------------------------
1500 systemd_shutdownd_SOURCES = \
1501         src/shutdownd/shutdownd.c
1502
1503 systemd_shutdownd_LDADD = \
1504         libsystemd-label.la \
1505         libsystemd-internal.la \
1506         libsystemd-shared.la
1507
1508 dist_doc_DATA += \
1509         src/systemd/sd-shutdown.h
1510
1511 # ------------------------------------------------------------------------------
1512 systemd_shutdown_SOURCES = \
1513         src/core/umount.c \
1514         src/core/umount.h \
1515         src/core/shutdown.c \
1516         src/core/mount-setup.c \
1517         src/core/mount-setup.h \
1518         src/core/killall.h \
1519         src/core/killall.c
1520
1521 systemd_shutdown_LDADD = \
1522         libsystemd-label.la \
1523         libudev-internal.la \
1524         libsystemd-shared.la
1525
1526 # ------------------------------------------------------------------------------
1527 if HAVE_KMOD
1528 systemd_modules_load_SOURCES = \
1529         src/modules-load/modules-load.c
1530
1531 systemd_modules_load_CFLAGS = \
1532         $(AM_CFLAGS) \
1533         $(KMOD_CFLAGS)
1534
1535 systemd_modules_load_LDADD = \
1536         libsystemd-shared.la \
1537         $(KMOD_LIBS)
1538
1539 rootlibexec_PROGRAMS += \
1540         systemd-modules-load
1541
1542 nodist_systemunit_DATA += \
1543         units/systemd-modules-load.service
1544
1545 SYSINIT_TARGET_WANTS += \
1546         systemd-modules-load.service
1547
1548 if ENABLE_TMPFILES
1549 nodist_systemunit_DATA += \
1550         units/kmod-static-nodes.service
1551
1552 SYSINIT_TARGET_WANTS += \
1553         kmod-static-nodes.service
1554 endif
1555 endif
1556
1557 EXTRA_DIST += \
1558         units/systemd-modules-load.service.in \
1559         units/kmod-static-nodes.service.in
1560
1561 # ------------------------------------------------------------------------------
1562 if ENABLE_TMPFILES
1563 systemd_tmpfiles_SOURCES = \
1564         src/tmpfiles/tmpfiles.c
1565
1566 systemd_tmpfiles_LDADD = \
1567         libsystemd-units.la \
1568         libsystemd-label.la \
1569         libsystemd-capability.la \
1570         libsystemd-internal.la \
1571         libsystemd-shared.la
1572
1573 rootbin_PROGRAMS += \
1574         systemd-tmpfiles
1575
1576 dist_systemunit_DATA += \
1577         units/systemd-tmpfiles-clean.timer
1578
1579 nodist_systemunit_DATA += \
1580         units/systemd-tmpfiles-setup-dev.service \
1581         units/systemd-tmpfiles-setup.service \
1582         units/systemd-tmpfiles-clean.service
1583
1584 dist_tmpfiles_DATA = \
1585         tmpfiles.d/systemd.conf \
1586         tmpfiles.d/systemd-nologin.conf \
1587         tmpfiles.d/tmp.conf \
1588         tmpfiles.d/x11.conf
1589
1590 if HAVE_SYSV_COMPAT
1591 dist_tmpfiles_DATA += \
1592         tmpfiles.d/legacy.conf
1593 endif
1594
1595 SYSINIT_TARGET_WANTS += \
1596         systemd-tmpfiles-setup-dev.service \
1597         systemd-tmpfiles-setup.service
1598
1599 dist_zshcompletion_DATA += \
1600         shell-completion/zsh/_systemd-tmpfiles
1601
1602 TIMERS_TARGET_WANTS += \
1603         systemd-tmpfiles-clean.timer
1604
1605 INSTALL_DIRS += \
1606         $(tmpfilesdir) \
1607         $(sysconfdir)/tmpfiles.d
1608 endif
1609
1610 EXTRA_DIST += \
1611         units/systemd-tmpfiles-setup-dev.service.in \
1612         units/systemd-tmpfiles-setup.service.in \
1613         units/systemd-tmpfiles-clean.service.in
1614
1615 # ------------------------------------------------------------------------------
1616 systemd_machine_id_setup_SOURCES = \
1617         src/machine-id-setup/machine-id-setup-main.c \
1618         src/core/machine-id-setup.c \
1619         src/core/machine-id-setup.h
1620
1621 systemd_machine_id_setup_LDADD = \
1622         libsystemd-label.la \
1623         libsystemd-internal.la \
1624         libsystemd-shared.la
1625
1626 # ------------------------------------------------------------------------------
1627 systemd_sysctl_SOURCES = \
1628         src/sysctl/sysctl.c
1629
1630 systemd_sysctl_LDADD = \
1631         libsystemd-shared.la
1632
1633 # ------------------------------------------------------------------------------
1634 systemd_sleep_SOURCES = \
1635         src/sleep/sleep.c
1636
1637 systemd_sleep_LDADD = \
1638         libsystemd-shared.la
1639
1640 # ------------------------------------------------------------------------------
1641 systemd_fsck_SOURCES = \
1642         src/fsck/fsck.c
1643
1644 systemd_fsck_LDADD = \
1645         libsystemd-internal.la \
1646         libudev-internal.la \
1647         libsystemd-shared.la
1648
1649 # ------------------------------------------------------------------------------
1650 systemd_ac_power_SOURCES = \
1651         src/ac-power/ac-power.c
1652
1653 systemd_ac_power_LDADD = \
1654         libudev-internal.la \
1655         libsystemd-shared.la
1656
1657 # ------------------------------------------------------------------------------
1658 systemd_detect_virt_SOURCES = \
1659         src/detect-virt/detect-virt.c
1660
1661 systemd_detect_virt_LDADD = \
1662         libsystemd-shared.la
1663
1664 systemd-detect-virt-install-hook:
1665         -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt
1666
1667 INSTALL_EXEC_HOOKS += \
1668         systemd-detect-virt-install-hook
1669
1670 # ------------------------------------------------------------------------------
1671 systemd_delta_SOURCES = \
1672         src/delta/delta.c
1673
1674 systemd_delta_LDADD = \
1675         libsystemd-shared.la
1676
1677 # ------------------------------------------------------------------------------
1678 systemd_getty_generator_SOURCES = \
1679         src/getty-generator/getty-generator.c
1680
1681 systemd_getty_generator_LDADD = \
1682         libsystemd-label.la \
1683         libsystemd-shared.la
1684
1685 # ------------------------------------------------------------------------------
1686 systemd_fstab_generator_SOURCES = \
1687         src/fstab-generator/fstab-generator.c \
1688         src/core/mount-setup.c
1689
1690 systemd_fstab_generator_LDADD = \
1691         libsystemd-label.la \
1692         libsystemd-shared.la
1693
1694 # ------------------------------------------------------------------------------
1695 systemd_system_update_generator_SOURCES = \
1696         src/system-update-generator/system-update-generator.c
1697
1698 systemd_system_update_generator_LDADD = \
1699         libsystemd-label.la \
1700         libsystemd-shared.la
1701
1702 if ENABLE_EFI
1703 # ------------------------------------------------------------------------------
1704 systemgenerator_PROGRAMS +=  \
1705         systemd-efi-boot-generator
1706
1707 systemd_efi_boot_generator_SOURCES = \
1708         src/efi-boot-generator/efi-boot-generator.c
1709
1710 systemd_efi_boot_generator_LDADD = \
1711         libsystemd-label.la \
1712         libsystemd-shared.la
1713
1714 # ------------------------------------------------------------------------------
1715 bootctl_SOURCES = \
1716         src/boot/boot.h \
1717         src/boot/boot-loader.h \
1718         src/boot/bootctl.c \
1719         src/boot/boot-loader.c \
1720         src/boot/boot-efi.c
1721
1722 bootctl_LDADD = \
1723         libsystemd-shared.la \
1724         libsystemd-internal.la
1725
1726 bin_PROGRAMS += \
1727         bootctl
1728
1729 dist_zshcompletion_DATA += \
1730         shell-completion/zsh/_bootctl
1731
1732 endif
1733
1734 # ------------------------------------------------------------------------------
1735 if HAVE_BLKID
1736 systemgenerator_PROGRAMS +=  \
1737         systemd-gpt-auto-generator
1738
1739 systemd_gpt_auto_generator_SOURCES = \
1740         src/gpt-auto-generator/gpt-auto-generator.c
1741
1742 systemd_gpt_auto_generator_LDADD = \
1743         libsystemd-label.la \
1744         libsystemd-internal.la \
1745         libudev-internal.la \
1746         libsystemd-shared.la \
1747         $(BLKID_LIBS)
1748
1749 systemd_gpt_auto_generator_CFLAGS = \
1750         $(AM_CFLAGS) \
1751         $(BLKID_CFLAGS)
1752 endif
1753
1754 # ------------------------------------------------------------------------------
1755 if ENABLE_KDBUS
1756 systemgenerator_PROGRAMS +=  \
1757         systemd-dbus1-generator
1758
1759 systemd_dbus1_generator_SOURCES = \
1760         src/dbus1-generator/dbus1-generator.c
1761
1762 systemd_dbus1_generator_LDADD = \
1763         libsystemd-label.la \
1764         libsystemd-shared.la \
1765         libsystemd-internal.la
1766
1767 dbus1-generator-install-hook:
1768         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
1769         $(AM_V_LN)$(LN_S) -f $(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1770
1771 dbus1-generator-uninstall-hook:
1772         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
1773
1774 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
1775 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
1776 endif
1777
1778 # ------------------------------------------------------------------------------
1779 systemd_rc_local_generator_SOURCES = \
1780         src/rc-local-generator/rc-local-generator.c
1781
1782 systemd_rc_local_generator_LDADD = \
1783         libsystemd-label.la \
1784         libsystemd-shared.la
1785
1786 # ------------------------------------------------------------------------------
1787 systemd_remount_fs_SOURCES = \
1788         src/remount-fs/remount-fs.c \
1789         src/core/mount-setup.c \
1790         src/core/mount-setup.h
1791
1792 systemd_remount_fs_LDADD = \
1793         libsystemd-label.la \
1794         libsystemd-shared.la
1795
1796 # ------------------------------------------------------------------------------
1797 systemd_cgroups_agent_SOURCES = \
1798         src/cgroups-agent/cgroups-agent.c
1799
1800 systemd_cgroups_agent_LDADD = \
1801         libsystemd-internal.la \
1802         libsystemd-shared.la
1803
1804 # ------------------------------------------------------------------------------
1805 systemctl_SOURCES = \
1806         src/systemctl/systemctl.c
1807
1808 systemctl_LDADD = \
1809         libsystemd-units.la \
1810         libsystemd-label.la \
1811         libsystemd-internal.la \
1812         libsystemd-logs.la \
1813         libsystemd-journal-internal.la \
1814         libsystemd-shared.la
1815
1816 # ------------------------------------------------------------------------------
1817 systemd_notify_SOURCES = \
1818         src/notify/notify.c \
1819         src/readahead/sd-readahead.c
1820
1821 systemd_notify_LDADD = \
1822         libsystemd-internal.la \
1823         libsystemd-shared.la
1824
1825 # ------------------------------------------------------------------------------
1826 systemd_ask_password_SOURCES = \
1827         src/ask-password/ask-password.c
1828
1829 systemd_ask_password_LDADD = \
1830         libsystemd-label.la \
1831         libsystemd-shared.la
1832
1833 # ------------------------------------------------------------------------------
1834 systemd_reply_password_SOURCES = \
1835         src/reply-password/reply-password.c
1836
1837 systemd_reply_password_LDADD = \
1838         libsystemd-shared.la
1839
1840 # ------------------------------------------------------------------------------
1841 systemd_cgls_SOURCES = \
1842         src/cgls/cgls.c
1843
1844 systemd_cgls_LDADD = \
1845         libsystemd-shared.la
1846
1847 # ------------------------------------------------------------------------------
1848 systemd_cgtop_SOURCES = \
1849         src/cgtop/cgtop.c
1850
1851 systemd_cgtop_LDADD = \
1852         libsystemd-shared.la
1853
1854 # ------------------------------------------------------------------------------
1855 systemd_nspawn_SOURCES = \
1856         src/nspawn/nspawn.c \
1857         src/core/mount-setup.c \
1858         src/core/mount-setup.h \
1859         src/core/loopback-setup.c \
1860         src/core/loopback-setup.h
1861
1862 systemd_nspawn_CFLAGS = \
1863         $(AM_CFLAGS) \
1864         $(SECCOMP_CFLAGS)
1865
1866 systemd_nspawn_LDADD = \
1867         libsystemd-label.la \
1868         libsystemd-capability.la \
1869         libsystemd-internal.la \
1870         libudev-internal.la \
1871         libsystemd-shared.la \
1872         libsystemd-seccomp.la \
1873         $(SECCOMP_LIBS)
1874
1875 # ------------------------------------------------------------------------------
1876 systemd_run_SOURCES = \
1877         src/run/run.c
1878
1879 systemd_run_LDADD = \
1880         libsystemd-label.la \
1881         libsystemd-capability.la \
1882         libsystemd-internal.la \
1883         libsystemd-shared.la
1884
1885 # ------------------------------------------------------------------------------
1886 systemd_bus_proxyd_SOURCES = \
1887         src/bus-proxyd/bus-proxyd.c
1888
1889 systemd_bus_proxyd_LDADD = \
1890         libsystemd-internal.la \
1891         libsystemd-shared.la
1892
1893 bus-proxyd-install-hook:
1894         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
1895         $(AM_V_LN)$(LN_S) -f ../lib/systemd/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
1896
1897 bus-proxyd-uninstall-hook:
1898         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
1899
1900 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
1901 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
1902
1903 if ENABLE_KDBUS
1904 nodist_systemunit_DATA += \
1905         units/systemd-bus-proxyd@.service
1906
1907 dist_systemunit_DATA += \
1908         units/systemd-bus-proxyd.socket
1909
1910 dist_userunit_DATA += \
1911         units/user/systemd-bus-proxyd.socket \
1912         units/user/systemd-bus-proxyd@.service
1913 endif
1914
1915 EXTRA_DIST += \
1916         units/systemd-bus-proxyd@.service.in
1917
1918 # ------------------------------------------------------------------------------
1919 systemd_tty_ask_password_agent_SOURCES = \
1920         src/tty-ask-password-agent/tty-ask-password-agent.c
1921
1922 systemd_tty_ask_password_agent_LDADD = \
1923         libsystemd-label.la \
1924         libsystemd-shared.la
1925
1926 # ------------------------------------------------------------------------------
1927 libsystemd_internal_la_SOURCES = \
1928         src/libsystemd/libsystemd.sym \
1929         src/systemd/sd-bus.h \
1930         src/systemd/sd-bus-protocol.h \
1931         src/systemd/sd-bus-vtable.h \
1932         src/systemd/sd-memfd.h \
1933         src/systemd/sd-utf8.h \
1934         src/systemd/sd-event.h \
1935         src/systemd/sd-rtnl.h \
1936         src/systemd/sd-resolve.h \
1937         src/systemd/sd-login.h \
1938         src/systemd/sd-id128.h \
1939         src/systemd/sd-daemon.h \
1940         src/libsystemd/sd-bus/sd-bus.c \
1941         src/libsystemd/sd-bus/bus-control.c \
1942         src/libsystemd/sd-bus/bus-control.h \
1943         src/libsystemd/sd-bus/bus-error.c \
1944         src/libsystemd/sd-bus/bus-error.h \
1945         src/libsystemd/sd-bus/bus-internal.c \
1946         src/libsystemd/sd-bus/bus-internal.h \
1947         src/libsystemd/sd-bus/bus-socket.c \
1948         src/libsystemd/sd-bus/bus-socket.h \
1949         src/libsystemd/sd-bus/bus-kernel.c \
1950         src/libsystemd/sd-bus/bus-kernel.h \
1951         src/libsystemd/sd-bus/bus-container.c \
1952         src/libsystemd/sd-bus/bus-container.h \
1953         src/libsystemd/sd-bus/bus-message.c \
1954         src/libsystemd/sd-bus/bus-message.h \
1955         src/libsystemd/sd-bus/bus-creds.c \
1956         src/libsystemd/sd-bus/bus-creds.h \
1957         src/libsystemd/sd-bus/bus-signature.c \
1958         src/libsystemd/sd-bus/bus-signature.h \
1959         src/libsystemd/sd-bus/bus-type.c \
1960         src/libsystemd/sd-bus/bus-type.h \
1961         src/libsystemd/sd-bus/bus-match.c \
1962         src/libsystemd/sd-bus/bus-match.h \
1963         src/libsystemd/sd-bus/bus-bloom.c \
1964         src/libsystemd/sd-bus/bus-bloom.h \
1965         src/libsystemd/sd-bus/bus-introspect.c \
1966         src/libsystemd/sd-bus/bus-introspect.h \
1967         src/libsystemd/sd-bus/bus-objects.c \
1968         src/libsystemd/sd-bus/bus-objects.h \
1969         src/libsystemd/sd-bus/bus-gvariant.c \
1970         src/libsystemd/sd-bus/bus-gvariant.h \
1971         src/libsystemd/sd-bus/bus-convenience.c \
1972         src/libsystemd/sd-bus/bus-util.c \
1973         src/libsystemd/sd-bus/bus-util.h \
1974         src/libsystemd/sd-bus/bus-protocol.h \
1975         src/libsystemd/sd-bus/kdbus.h \
1976         src/libsystemd/sd-bus/sd-memfd.c \
1977         src/libsystemd/sd-utf8/sd-utf8.c \
1978         src/libsystemd/sd-event/sd-event.c \
1979         src/libsystemd/sd-event/event-util.h \
1980         src/libsystemd/sd-rtnl/sd-rtnl.c \
1981         src/libsystemd/sd-rtnl/rtnl-internal.h \
1982         src/libsystemd/sd-rtnl/rtnl-message.c \
1983         src/libsystemd/sd-rtnl/rtnl-util.h \
1984         src/libsystemd/sd-rtnl/rtnl-util.c \
1985         src/libsystemd/sd-resolve/sd-resolve.c \
1986         src/libsystemd/sd-resolve/resolve-util.h \
1987         src/libsystemd/sd-id128/sd-id128.c \
1988         src/libsystemd/sd-daemon/sd-daemon.c \
1989         src/login/sd-login.c \
1990         src/login/login-shared.c \
1991         src/login/login-shared.h
1992
1993 nodist_libsystemd_internal_la_SOURCES = \
1994         src/libsystemd/sd-bus/bus-error-mapping.c
1995
1996 libsystemd_internal_la_CFLAGS = \
1997         $(AM_CFLAGS) \
1998         -pthread
1999
2000 noinst_LTLIBRARIES += \
2001         libsystemd-internal.la
2002
2003 libsystemd_dump_la_SOURCES = \
2004         src/libsystemd/sd-bus/bus-dump.c \
2005         src/libsystemd/sd-bus/bus-dump.h
2006
2007 libsystemd_dump_la_CFLAGS = \
2008         $(AM_CFLAGS) \
2009         $(CAP_CFLAGS)
2010
2011 noinst_LTLIBRARIES += \
2012         libsystemd-dump.la
2013
2014 EXTRA_DIST += \
2015         src/libsystemd/sd-bus/bus-error-mapping.gperf \
2016         src/libsystemd/sd-bus/DIFFERENCES \
2017         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION \
2018         src/libsystemd/libsystemd.pc.in
2019
2020 CLEANFILES += \
2021         src/libsystemd/sd-bus/bus-error-mapping.c
2022
2023 libsystemd_la_SOURCES = \
2024         $(libsystemd_internal_la_SOURCES) \
2025         $(libsystemd_journal_internal_la_SOURCES)
2026
2027 nodist_libsystemd_la_SOURCES = \
2028         $(nodist_libsystemd_internal_la_SOURCES)
2029
2030 libsystemd_la_CFLAGS = \
2031         $(libsystemd_internal_la_CFLAGS)
2032
2033 libsystemd_la_LDFLAGS = \
2034         $(AM_LDFLAGS) \
2035         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2036         -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
2037
2038 libsystemd_la_LIBADD = \
2039         libsystemd-shared.la \
2040         $(libsystemd_journal_internal_la_LIBADD) \
2041         $(RT_LIBS) \
2042         -lresolv
2043
2044 pkgconfiglib_DATA += \
2045         src/libsystemd/libsystemd.pc
2046
2047 pkginclude_HEADERS += \
2048         src/systemd/sd-login.h \
2049         src/systemd/sd-id128.h \
2050         src/systemd/sd-daemon.h
2051
2052 if ENABLE_KDBUS
2053 pkginclude_HEADERS += \
2054         src/systemd/sd-bus.h \
2055         src/systemd/sd-bus-protocol.h \
2056         src/systemd/sd-bus-vtable.h \
2057         src/systemd/sd-memfd.h \
2058         src/systemd/sd-utf8.h \
2059         src/systemd/sd-event.h \
2060         src/systemd/sd-rtnl.h \
2061         src/systemd/sd-resolve.h
2062 endif
2063
2064 lib_LTLIBRARIES += \
2065         libsystemd.la
2066
2067 tests += \
2068         test-bus-marshal \
2069         test-bus-signature \
2070         test-bus-chat \
2071         test-bus-cleanup \
2072         test-bus-server \
2073         test-bus-match \
2074         test-bus-kernel \
2075         test-bus-kernel-bloom \
2076         test-bus-kernel-benchmark \
2077         test-bus-memfd \
2078         test-bus-zero-copy \
2079         test-bus-introspect \
2080         test-bus-objects \
2081         test-bus-error \
2082         test-bus-creds \
2083         test-bus-gvariant \
2084         test-event \
2085         test-rtnl \
2086         test-resolve
2087
2088 bin_PROGRAMS += \
2089         busctl
2090
2091 test_bus_marshal_SOURCES = \
2092         src/libsystemd/sd-bus/test-bus-marshal.c
2093
2094 test_bus_marshal_LDADD = \
2095         libsystemd-internal.la \
2096         libsystemd-shared.la \
2097         libsystemd-dump.la \
2098         libsystemd-capability.la \
2099         $(GLIB_LIBS) \
2100         $(DBUS_LIBS) \
2101         $(CAP_LIBS)
2102
2103 test_bus_marshal_CFLAGS = \
2104         $(AM_CFLAGS) \
2105         $(GLIB_CFLAGS) \
2106         $(DBUS_CFLAGS) \
2107         $(CAP_CFLAGS)
2108
2109 test_bus_signature_SOURCES = \
2110         src/libsystemd/sd-bus/test-bus-signature.c
2111
2112 test_bus_signature_LDADD = \
2113         libsystemd-shared.la \
2114         libsystemd-internal.la
2115
2116 test_bus_chat_SOURCES = \
2117         src/libsystemd/sd-bus/test-bus-chat.c
2118
2119 test_bus_chat_CFLAGS = \
2120         $(AM_CFLAGS) \
2121         -pthread
2122
2123 test_bus_chat_LDADD = \
2124         libsystemd-internal.la \
2125         libsystemd-shared.la
2126
2127 test_bus_cleanup_SOURCES = \
2128         src/libsystemd/sd-bus/test-bus-cleanup.c
2129
2130 test_bus_cleanup_LDADD = \
2131         libsystemd-internal.la \
2132         libsystemd-shared.la
2133
2134 test_bus_server_SOURCES = \
2135         src/libsystemd/sd-bus/test-bus-server.c
2136
2137 test_bus_server_CFLAGS = \
2138         $(AM_CFLAGS) \
2139         -pthread
2140
2141 test_bus_server_LDADD = \
2142         libsystemd-internal.la \
2143         libsystemd-shared.la
2144
2145 test_bus_objects_SOURCES = \
2146         src/libsystemd/sd-bus/test-bus-objects.c
2147
2148 test_bus_objects_CFLAGS = \
2149         $(AM_CFLAGS) \
2150         $(CAP_CFLAGS) \
2151         -pthread
2152
2153 test_bus_objects_LDADD = \
2154         libsystemd-internal.la \
2155         libsystemd-shared.la \
2156         libsystemd-dump.la \
2157         libsystemd-capability.la \
2158         $(CAP_LIBS)
2159
2160 test_bus_error_SOURCES = \
2161         src/libsystemd/sd-bus/test-bus-error.c
2162
2163 test_bus_error_LDADD = \
2164         libsystemd-internal.la \
2165         libsystemd-shared.la
2166
2167 test_bus_gvariant_SOURCES = \
2168         src/libsystemd/sd-bus/test-bus-gvariant.c
2169
2170 test_bus_gvariant_LDADD = \
2171         libsystemd-internal.la \
2172         libsystemd-shared.la \
2173         libsystemd-dump.la \
2174         libsystemd-capability.la \
2175         $(GLIB_LIBS) \
2176         $(CAP_LIBS)
2177
2178 test_bus_gvariant_CFLAGS = \
2179         $(AM_CFLAGS) \
2180         $(GLIB_CFLAGS)
2181         $(CAP_CFLAGS)
2182
2183 test_bus_creds_SOURCES = \
2184         src/libsystemd/sd-bus/test-bus-creds.c
2185
2186 test_bus_creds_LDADD = \
2187         libsystemd-internal.la \
2188         libsystemd-shared.la \
2189         libsystemd-dump.la \
2190         libsystemd-capability.la
2191
2192 test_bus_match_SOURCES = \
2193         src/libsystemd/sd-bus/test-bus-match.c
2194
2195 test_bus_match_LDADD = \
2196         libsystemd-internal.la \
2197         libsystemd-shared.la
2198
2199 test_bus_kernel_SOURCES = \
2200         src/libsystemd/sd-bus/test-bus-kernel.c
2201
2202 test_bus_kernel_LDADD = \
2203         libsystemd-internal.la \
2204         libsystemd-shared.la \
2205         libsystemd-dump.la \
2206         libsystemd-capability.la \
2207         $(CAP_LIBS)
2208
2209 test_bus_kernel_CFLAGS = \
2210         $(AM_CFLAGS) \
2211         $(CAP_CFLAGS)
2212
2213 test_bus_kernel_bloom_SOURCES = \
2214         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2215
2216 test_bus_kernel_bloom_LDADD = \
2217         libsystemd-internal.la \
2218         libsystemd-shared.la
2219
2220 test_bus_kernel_benchmark_SOURCES = \
2221         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2222
2223 test_bus_kernel_benchmark_LDADD = \
2224         libsystemd-internal.la \
2225         libsystemd-shared.la
2226
2227 test_bus_memfd_SOURCES = \
2228         src/libsystemd/sd-bus/test-bus-memfd.c
2229
2230 test_bus_memfd_LDADD = \
2231         libsystemd-internal.la \
2232         libsystemd-shared.la
2233
2234 test_bus_zero_copy_SOURCES = \
2235         src/libsystemd/sd-bus/test-bus-zero-copy.c
2236
2237 test_bus_zero_copy_LDADD = \
2238         libsystemd-internal.la \
2239         libsystemd-shared.la \
2240         libsystemd-dump.la \
2241         libsystemd-capability.la \
2242         $(CAP_LIBS)
2243
2244 test_bus_zero_copy_CFLAGS = \
2245         $(AM_CFLAGS) \
2246         $(CAP_CFLAGS)
2247
2248 test_bus_introspect_SOURCES = \
2249         src/libsystemd/sd-bus/test-bus-introspect.c
2250
2251 test_bus_introspect_LDADD = \
2252         libsystemd-shared.la \
2253         libsystemd-internal.la
2254
2255 test_event_SOURCES = \
2256         src/libsystemd/sd-event/test-event.c
2257
2258 test_event_LDADD = \
2259         libsystemd-internal.la \
2260         libsystemd-shared.la
2261
2262 test_rtnl_SOURCES = \
2263         src/libsystemd/sd-rtnl/test-rtnl.c
2264
2265 test_rtnl_LDADD = \
2266         libsystemd-internal.la \
2267         libsystemd-shared.la
2268
2269 test_resolve_SOURCES = \
2270         src/systemd/sd-resolve.h \
2271         src/libsystemd/sd-resolve/test-resolve.c
2272
2273 test_resolve_LDADD = \
2274         libsystemd-internal.la \
2275         libsystemd-shared.la \
2276         -lresolv
2277
2278 test_resolve_CFLAGS = \
2279         $(AM_CFLAGS) \
2280         -pthread
2281
2282 busctl_SOURCES = \
2283         src/libsystemd/sd-bus/busctl.c
2284
2285 busctl_LDADD = \
2286         libsystemd-internal.la \
2287         libsystemd-shared.la \
2288         libsystemd-dump.la \
2289         libsystemd-capability.la \
2290         $(CAP_LIBS)
2291
2292 busctl_CFLAGS = \
2293         $(AM_CFLAGS) \
2294         $(CAP_CFLAGS)
2295
2296 # ------------------------------------------------------------------------------
2297 noinst_LTLIBRARIES += \
2298         libsystemd-dhcp.la
2299
2300 libsystemd_dhcp_la_SOURCES = \
2301         src/systemd/sd-dhcp-client.h \
2302         src/libsystemd-dhcp/sd-dhcp-client.c \
2303         src/libsystemd-dhcp/dhcp-lease.h \
2304         src/libsystemd-dhcp/dhcp-lease.c \
2305         src/libsystemd-dhcp/dhcp-network.c \
2306         src/libsystemd-dhcp/dhcp-option.c \
2307         src/libsystemd-dhcp/dhcp-packet.c \
2308         src/libsystemd-dhcp/dhcp-internal.h \
2309         src/libsystemd-dhcp/dhcp-protocol.h
2310
2311 libsystemd_dhcp_la_LIBADD = \
2312         libsystemd-internal.la \
2313         libsystemd-shared.la
2314
2315 test_dhcp_option_SOURCES = \
2316         src/libsystemd-dhcp/dhcp-protocol.h \
2317         src/libsystemd-dhcp/dhcp-internal.h \
2318         src/libsystemd-dhcp/test-dhcp-option.c
2319
2320 test_dhcp_option_LDADD = \
2321         libsystemd-dhcp.la \
2322         libsystemd-internal.la \
2323         libsystemd-shared.la
2324
2325 test_dhcp_client_SOURCES = \
2326         src/systemd/sd-dhcp-client.h \
2327         src/libsystemd-dhcp/dhcp-protocol.h \
2328         src/libsystemd-dhcp/dhcp-internal.h \
2329         src/libsystemd-dhcp/test-dhcp-client.c
2330
2331 test_dhcp_client_LDADD = \
2332         libsystemd-dhcp.la \
2333         libsystemd-internal.la \
2334         libsystemd-shared.la
2335
2336 tests += \
2337         test-dhcp-option \
2338         test-dhcp-client
2339
2340 # ------------------------------------------------------------------------------
2341 if ENABLE_GTK_DOC
2342 SUBDIRS += \
2343         docs/libudev
2344
2345 noinst_DATA += \
2346         docs/html/libudev \
2347         docs/html/gudev
2348 endif
2349
2350 include_HEADERS += \
2351         src/libudev/libudev.h
2352
2353 lib_LTLIBRARIES += \
2354         libudev.la
2355
2356 libudev_la_SOURCES =\
2357         src/libudev/libudev.sym \
2358         src/libudev/libudev-private.h \
2359         src/libudev/libudev.c \
2360         src/libudev/libudev-list.c \
2361         src/libudev/libudev-util.c \
2362         src/libudev/libudev-device.c \
2363         src/libudev/libudev-enumerate.c \
2364         src/libudev/libudev-monitor.c \
2365         src/libudev/libudev-queue.c \
2366         src/libudev/libudev-hwdb-def.h \
2367         src/libudev/libudev-hwdb.c
2368
2369 libudev_la_CFLAGS = \
2370         $(AM_CFLAGS) \
2371         -fvisibility=hidden
2372
2373 libudev_la_LDFLAGS = \
2374         $(AM_LDFLAGS) \
2375         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
2376         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
2377
2378 libudev_la_LIBADD = \
2379         libsystemd-internal.la \
2380         libsystemd-shared.la
2381
2382 pkgconfiglib_DATA += \
2383         src/libudev/libudev.pc
2384
2385 EXTRA_DIST += \
2386         src/libudev/libudev.pc.in
2387
2388 CLEANFILES += \
2389         src/libudev/libudev.pc \
2390         docs/html/libudev \
2391         docs/html/gudev
2392
2393 docs/html/libudev:
2394         $(AM_V_at)$(MKDIR_P) $(dir $@)
2395         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
2396
2397 docs/html/gudev:
2398         $(AM_V_at)$(MKDIR_P) $(dir $@)
2399         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
2400
2401 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2402 libudev-install-hook:
2403         libname=libudev.so && $(move-to-rootlibdir)
2404
2405 libudev-uninstall-hook:
2406         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
2407
2408 INSTALL_EXEC_HOOKS += libudev-install-hook
2409 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
2410
2411 # ------------------------------------------------------------------------------
2412 noinst_LTLIBRARIES += \
2413         libudev-internal.la
2414
2415 libudev_internal_la_SOURCES =\
2416         $(libudev_la_SOURCES) \
2417         src/libudev/libudev-device-private.c \
2418         src/libudev/libudev-queue-private.c
2419
2420 libudev_internal_la_CFLAGS = \
2421         $(AM_CFLAGS) \
2422         -fvisibility=default
2423
2424 # ------------------------------------------------------------------------------
2425 INSTALL_DIRS += \
2426         $(sysconfdir)/udev/rules.d \
2427         $(sysconfdir)/udev/hwdb.d
2428
2429 dist_network_DATA = \
2430         network/99-default.link
2431
2432 dist_udevrules_DATA += \
2433         rules/99-systemd.rules \
2434         rules/42-usb-hid-pm.rules \
2435         rules/50-udev-default.rules \
2436         rules/60-drm.rules \
2437         rules/60-keyboard.rules \
2438         rules/60-persistent-storage-tape.rules \
2439         rules/60-persistent-serial.rules \
2440         rules/60-persistent-input.rules \
2441         rules/60-persistent-alsa.rules \
2442         rules/60-persistent-storage.rules \
2443         rules/64-btrfs.rules \
2444         rules/75-net-description.rules \
2445         rules/75-tty-description.rules \
2446         rules/78-sound-card.rules \
2447         rules/80-net-setup-link.rules \
2448         rules/95-udev-late.rules
2449
2450 dist_udevhwdb_DATA = \
2451         hwdb/20-pci-vendor-model.hwdb \
2452         hwdb/20-pci-classes.hwdb \
2453         hwdb/20-usb-vendor-model.hwdb \
2454         hwdb/20-usb-classes.hwdb \
2455         hwdb/20-sdio-vendor-model.hwdb \
2456         hwdb/20-sdio-classes.hwdb \
2457         hwdb/20-bluetooth-vendor-product.hwdb \
2458         hwdb/20-acpi-vendor.hwdb \
2459         hwdb/20-OUI.hwdb \
2460         hwdb/60-keyboard.hwdb
2461
2462 udevconfdir = $(sysconfdir)/udev
2463 dist_udevconf_DATA = \
2464         src/udev/udev.conf
2465
2466 sharepkgconfigdir = $(datadir)/pkgconfig
2467 sharepkgconfig_DATA = \
2468         src/udev/udev.pc
2469
2470 EXTRA_DIST += \
2471         rules/99-systemd.rules.in \
2472         src/udev/udev.pc.in
2473
2474 CLEANFILES += \
2475         rules/99-systemd.rules \
2476         src/udev/udev.pc
2477
2478 EXTRA_DIST += \
2479         units/systemd-udevd.service.in \
2480         units/systemd-udev-trigger.service.in \
2481         units/systemd-udev-settle.service.in
2482
2483 CLEANFILES += \
2484         units/systemd-udevd.service \
2485         units/systemd-udev-trigger.service \
2486         units/systemd-udev-settle.service
2487
2488 SOCKETS_TARGET_WANTS += \
2489         systemd-udevd-control.socket \
2490         systemd-udevd-kernel.socket
2491 SYSINIT_TARGET_WANTS += \
2492         systemd-udevd.service \
2493         systemd-udev-trigger.service
2494
2495 rootbin_PROGRAMS += \
2496         udevadm
2497
2498 rootlibexec_PROGRAMS += \
2499         systemd-udevd
2500
2501 noinst_LTLIBRARIES += \
2502         libudev-core.la
2503
2504 src/udev/keyboard-keys.txt:
2505         $(AM_V_at)$(MKDIR_P) $(dir $@)
2506         $(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/' > $@
2507
2508 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
2509         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
2510
2511 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
2512         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
2513
2514 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
2515         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
2516
2517 libudev_core_la_SOURCES = \
2518         src/udev/udev.h \
2519         src/udev/udev-event.c \
2520         src/udev/udev-watch.c \
2521         src/udev/udev-node.c \
2522         src/udev/udev-rules.c \
2523         src/udev/udev-ctrl.c \
2524         src/udev/udev-builtin.c \
2525         src/udev/udev-builtin-btrfs.c \
2526         src/udev/udev-builtin-hwdb.c \
2527         src/udev/udev-builtin-input_id.c \
2528         src/udev/udev-builtin-keyboard.c \
2529         src/udev/udev-builtin-net_id.c \
2530         src/udev/udev-builtin-net_setup_link.c \
2531         src/udev/udev-builtin-path_id.c \
2532         src/udev/udev-builtin-usb_id.c \
2533         src/udev/net/link-config.h \
2534         src/udev/net/link-config.c \
2535         src/udev/net/ethtool-util.h \
2536         src/udev/net/ethtool-util.c
2537
2538 nodist_libudev_core_la_SOURCES = \
2539         src/udev/keyboard-keys-from-name.h \
2540         src/udev/keyboard-keys-to-name.h \
2541         src/udev/net/link-config-gperf.c
2542
2543 BUILT_SOURCES += \
2544         $(nodist_libudev_core_la_SOURCES)
2545
2546 CLEANFILES += \
2547         src/udev/keyboard-keys-from-name.gperf \
2548         src/udev/keyboard-keys.txt \
2549         src/udev/net/link-config-gperf.c
2550
2551 EXTRA_DIST += \
2552         src/udev/net/link-config-gperf.gperf
2553
2554 libudev_core_la_CFLAGS = \
2555         $(AM_CFLAGS) \
2556         $(BLKID_CFLAGS) \
2557         $(KMOD_CFLAGS)
2558
2559 libudev_core_la_LIBADD = \
2560         libudev-internal.la \
2561         libsystemd-label.la \
2562         libsystemd-internal.la \
2563         libsystemd-shared.la \
2564         $(BLKID_LIBS) \
2565         $(KMOD_LIBS)
2566
2567 libudev_core_la_CPPFLAGS = \
2568         $(AM_CPPFLAGS) \
2569         -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
2570
2571 if ENABLE_FIRMWARE
2572 libudev_core_la_SOURCES += \
2573         src/udev/udev-builtin-firmware.c
2574
2575 dist_udevrules_DATA += \
2576         rules/50-firmware.rules
2577 endif
2578
2579 if HAVE_KMOD
2580 libudev_core_la_SOURCES += \
2581         src/udev/udev-builtin-kmod.c
2582
2583 dist_udevrules_DATA += \
2584         rules/80-drivers.rules
2585 endif
2586
2587 if HAVE_BLKID
2588 libudev_core_la_SOURCES += \
2589         src/udev/udev-builtin-blkid.c
2590 endif
2591
2592 if HAVE_ACL
2593 libudev_core_la_SOURCES += \
2594         src/udev/udev-builtin-uaccess.c \
2595         src/login/logind-acl.c \
2596         src/login/sd-login.c \
2597         src/systemd/sd-login.h \
2598         src/login/login-shared.c \
2599         src/login/login-shared.h
2600
2601 libudev_core_la_LIBADD += \
2602         libsystemd-acl.la
2603 endif
2604
2605 systemd_udevd_SOURCES = \
2606         src/udev/udevd.c
2607
2608 systemd_udevd_LDADD = \
2609         libudev-core.la
2610
2611 udevadm_SOURCES = \
2612         src/udev/udevadm.c \
2613         src/udev/udevadm-info.c \
2614         src/udev/udevadm-control.c \
2615         src/udev/udevadm-monitor.c \
2616         src/udev/udevadm-hwdb.c \
2617         src/udev/udevadm-settle.c \
2618         src/udev/udevadm-trigger.c \
2619         src/udev/udevadm-test.c \
2620         src/udev/udevadm-test-builtin.c
2621
2622 udevadm_LDADD = \
2623         libudev-core.la
2624
2625 # Update hwdb on installation. Do not bother if installing
2626 # in DESTDIR, since this is likely for packaging purposes.
2627 hwdb-update-hook:
2628         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
2629
2630 INSTALL_DATA_HOOKS += \
2631         hwdb-update-hook
2632
2633 hwdb-remove-hook:
2634         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
2635
2636 # ------------------------------------------------------------------------------
2637 TESTS += \
2638         test/udev-test.pl \
2639         test/rules-test.sh
2640
2641 manual_tests += \
2642         test-libudev \
2643         test-udev
2644
2645 test_libudev_SOURCES = \
2646         src/test/test-libudev.c
2647
2648 test_libudev_LDADD = \
2649         libsystemd-label.la \
2650         libudev-internal.la \
2651         libsystemd-shared.la
2652
2653 test_udev_SOURCES = \
2654         src/test/test-udev.c
2655
2656 test_udev_LDADD = \
2657         libudev-core.la \
2658         $(BLKID_LIBS) \
2659         $(KMOD_LIBS) \
2660         $(SELINUX_LIBS)
2661
2662 if HAVE_ACL
2663 test_udev_LDADD += \
2664         libsystemd-acl.la
2665 endif
2666
2667 check_DATA += \
2668         test/sys
2669
2670 # packed sysfs test tree
2671 test/sys:
2672         $(AM_V_at)$(MKDIR_P) $(dir $@)
2673         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
2674
2675 test-sys-distclean:
2676         -rm -rf test/sys
2677 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
2678
2679 EXTRA_DIST += \
2680         test/sys.tar.xz \
2681         test/udev-test.pl \
2682         test/rules-test.sh \
2683         test/rule-syntax-check.py
2684
2685 # ------------------------------------------------------------------------------
2686 ata_id_SOURCES = \
2687         src/udev/ata_id/ata_id.c
2688
2689 ata_id_LDADD = \
2690         libudev-internal.la \
2691         libsystemd-shared.la
2692
2693 udevlibexec_PROGRAMS += \
2694         ata_id
2695
2696 # ------------------------------------------------------------------------------
2697 cdrom_id_SOURCES = \
2698         src/udev/cdrom_id/cdrom_id.c
2699
2700 cdrom_id_LDADD = \
2701         libudev-internal.la \
2702         libsystemd-shared.la
2703
2704 udevlibexec_PROGRAMS += \
2705         cdrom_id
2706
2707 dist_udevrules_DATA += \
2708         rules/60-cdrom_id.rules
2709
2710 # ------------------------------------------------------------------------------
2711 collect_SOURCES = \
2712         src/udev/collect/collect.c
2713
2714 collect_LDADD = \
2715         libudev-internal.la \
2716         libsystemd-shared.la
2717
2718 udevlibexec_PROGRAMS += \
2719         collect
2720
2721 # ------------------------------------------------------------------------------
2722 scsi_id_SOURCES =\
2723         src/udev/scsi_id/scsi_id.c \
2724         src/udev/scsi_id/scsi_serial.c \
2725         src/udev/scsi_id/scsi.h \
2726         src/udev/scsi_id/scsi_id.h
2727
2728 scsi_id_LDADD = \
2729         libudev-internal.la \
2730         libsystemd-shared.la
2731
2732 udevlibexec_PROGRAMS += \
2733         scsi_id
2734
2735 EXTRA_DIST += \
2736         src/udev/scsi_id/README
2737
2738 # ------------------------------------------------------------------------------
2739 v4l_id_SOURCES = \
2740         src/udev/v4l_id/v4l_id.c
2741
2742 v4l_id_LDADD = \
2743         libudev-internal.la
2744
2745 udevlibexec_PROGRAMS += \
2746         v4l_id
2747
2748 dist_udevrules_DATA += \
2749         rules/60-persistent-v4l.rules
2750
2751 # ------------------------------------------------------------------------------
2752 accelerometer_SOURCES = \
2753         src/udev/accelerometer/accelerometer.c
2754
2755 accelerometer_LDADD = \
2756         libudev-internal.la -lm \
2757         libsystemd-shared.la
2758
2759 udevlibexec_PROGRAMS += \
2760         accelerometer
2761
2762 dist_udevrules_DATA += \
2763         rules/61-accelerometer.rules
2764
2765 # ------------------------------------------------------------------------------
2766 if ENABLE_GUDEV
2767 if ENABLE_GTK_DOC
2768 SUBDIRS += \
2769         docs/gudev
2770 endif
2771
2772 libgudev_includedir = \
2773         $(includedir)/gudev-1.0/gudev
2774
2775 libgudev_include_HEADERS = \
2776         src/gudev/gudev.h \
2777         src/gudev/gudevenums.h \
2778         src/gudev/gudevenumtypes.h \
2779         src/gudev/gudevtypes.h \
2780         src/gudev/gudevclient.h \
2781         src/gudev/gudevdevice.h \
2782         src/gudev/gudevenumerator.h
2783
2784 lib_LTLIBRARIES += libgudev-1.0.la
2785
2786 pkgconfiglib_DATA += \
2787         src/gudev/gudev-1.0.pc
2788
2789 CLEANFILES += \
2790         src/gudev/gudev-1.0.pc
2791
2792 libgudev_1_0_la_SOURCES = \
2793         src/gudev/gudevenums.h \
2794         src/gudev/gudevenumtypes.h \
2795         src/gudev/gudevenumtypes.h\
2796         src/gudev/gudevtypes.h \
2797         src/gudev/gudevclient.h \
2798         src/gudev/gudevclient.c \
2799         src/gudev/gudevdevice.h \
2800         src/gudev/gudevdevice.c \
2801         src/gudev/gudevenumerator.h \
2802         src/gudev/gudevenumerator.c \
2803         src/gudev/gudevprivate.h
2804
2805 nodist_libgudev_1_0_la_SOURCES = \
2806         src/gudev/gudevmarshal.h \
2807         src/gudev/gudevmarshal.c \
2808         src/gudev/gudevenumtypes.h \
2809         src/gudev/gudevenumtypes.c
2810
2811 BUILT_SOURCES += \
2812         $(nodist_libgudev_1_0_la_SOURCES)
2813
2814 libgudev_1_0_la_CPPFLAGS = \
2815         $(AM_CPPFLAGS) \
2816         -I$(top_builddir)/src\
2817         -I$(top_srcdir)/src\
2818         -I$(top_builddir)/src/gudev \
2819         -I$(top_srcdir)/src/gudev \
2820         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
2821         -D_GUDEV_COMPILATION \
2822         -DG_LOG_DOMAIN=\"GUdev\"
2823
2824 libgudev_1_0_la_CFLAGS = \
2825         $(AM_CFLAGS) \
2826         -fvisibility=default \
2827         $(GLIB_CFLAGS)
2828
2829 libgudev_1_0_la_LIBADD = \
2830         libudev.la \
2831         $(GLIB_LIBS)
2832
2833 libgudev_1_0_la_LDFLAGS = \
2834         $(AM_LDFLAGS) \
2835         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
2836         -export-dynamic -no-undefined \
2837         -export-symbols-regex '^g_udev_.*'
2838
2839 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
2840         $(AM_V_at)$(MKDIR_P) $(dir $@)
2841         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
2842
2843 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
2844         $(AM_V_at)$(MKDIR_P) $(dir $@)
2845         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
2846         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
2847
2848 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
2849         $(AM_V_at)$(MKDIR_P) $(dir $@)
2850         $(AM_V_GEN)glib-mkenums --template $^ > $@
2851
2852 if HAVE_INTROSPECTION
2853 -include $(INTROSPECTION_MAKEFILE)
2854
2855 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
2856
2857 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
2858
2859 src_gudev_GUdev_1_0_gir_CFLAGS = \
2860         $(AM_CFLAGS) \
2861         $(INCLUDES) \
2862         -D_GUDEV_COMPILATION \
2863         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
2864         -I$(top_srcdir)/src \
2865         -I$(top_builddir)/src \
2866         -I$(top_srcdir)/src/gudev \
2867         -I$(top_builddir)/src/gudev
2868
2869 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
2870
2871 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
2872         --pkg-export=gudev-1.0 \
2873         --warn-all
2874
2875 src_gudev_GUdev_1_0_gir_FILES = \
2876         src/gudev/gudev.h \
2877         src/gudev/gudevtypes.h \
2878         src/gudev/gudevenums.h \
2879         src/gudev/gudevenumtypes.h \
2880         src/gudev/gudevclient.h \
2881         src/gudev/gudevdevice.h \
2882         src/gudev/gudevenumerator.h \
2883         src/gudev/gudevclient.c \
2884         src/gudev/gudevdevice.c \
2885         src/gudev/gudevenumerator.c
2886
2887 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
2888 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
2889
2890 girdir = $(datadir)/gir-1.0
2891 gir_DATA = \
2892         src/gudev/GUdev-1.0.gir
2893
2894 typelibsdir = $(libdir)/girepository-1.0
2895 typelibs_DATA = \
2896         src/gudev/GUdev-1.0.typelib
2897
2898 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
2899 endif # HAVE_INTROSPECTION
2900
2901 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
2902 libgudev-install-hook:
2903         libname=libgudev-1.0.so && $(move-to-rootlibdir)
2904
2905 libgudev-uninstall-hook:
2906         rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
2907
2908 INSTALL_EXEC_HOOKS += libgudev-install-hook
2909 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
2910 endif
2911
2912 EXTRA_DIST += \
2913         src/gudev/gudev-1.0.pc.in \
2914         src/gudev/gudevmarshal.list \
2915         src/gudev/gudevenumtypes.h.template \
2916         src/gudev/gudevenumtypes.c.template \
2917         src/gudev/gjs-example.js \
2918         src/gudev/seed-example-enum.js \
2919         src/gudev/seed-example.js
2920
2921 # ------------------------------------------------------------------------------
2922 mtd_probe_SOURCES =  \
2923         src/udev/mtd_probe/mtd_probe.c \
2924         src/udev/mtd_probe/mtd_probe.h \
2925         src/udev/mtd_probe/probe_smartmedia.c
2926
2927 dist_udevrules_DATA += \
2928         rules/75-probe_mtd.rules
2929
2930 udevlibexec_PROGRAMS += \
2931         mtd_probe
2932
2933 # ------------------------------------------------------------------------------
2934 test_id128_SOURCES = \
2935         src/test/test-id128.c
2936
2937 test_id128_LDADD = \
2938         libsystemd-internal.la \
2939         libsystemd-shared.la
2940
2941 tests += \
2942         test-id128
2943
2944 # ------------------------------------------------------------------------------
2945
2946 rootlibexec_PROGRAMS += \
2947         systemd-activate
2948
2949 systemd_activate_SOURCES = \
2950         src/activate/activate.c
2951
2952 systemd_activate_LDADD = \
2953         libsystemd-label.la \
2954         libsystemd-internal.la \
2955         libsystemd-shared.la
2956
2957 # ------------------------------------------------------------------------------
2958 systemd_journald_SOURCES = \
2959         src/journal/journald.c \
2960         src/journal/journald-server.h
2961
2962 systemd_journald_LDADD = \
2963         libsystemd-journal-core.la \
2964         libsystemd-internal.la \
2965         libsystemd-shared.la
2966
2967 systemd_cat_SOURCES = \
2968         src/journal/cat.c
2969
2970 systemd_cat_LDADD = \
2971         libsystemd-journal-core.la
2972
2973 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
2974 journalctl_CFLAGS = \
2975         $(AM_CFLAGS)
2976
2977 journalctl_SOURCES = \
2978         src/journal/journalctl.c
2979
2980 journalctl_LDADD = \
2981         libsystemd-journal-internal.la \
2982         libsystemd-internal.la \
2983         libsystemd-logs.la \
2984         libsystemd-shared.la
2985
2986 if HAVE_ACL
2987 journalctl_LDADD += \
2988         libsystemd-acl.la
2989 endif
2990
2991 if HAVE_QRENCODE
2992 journalctl_SOURCES += \
2993         src/journal/journal-qrcode.c \
2994         src/journal/journal-qrcode.h
2995
2996 journalctl_CFLAGS += \
2997         $(QRENCODE_CFLAGS)
2998
2999 journalctl_LDADD += \
3000         $(QRENCODE_LIBS)
3001 endif
3002
3003 test_journal_SOURCES = \
3004         src/journal/test-journal.c
3005
3006 test_journal_LDADD = \
3007         libsystemd-journal-core.la
3008
3009 test_journal_send_SOURCES = \
3010         src/journal/test-journal-send.c
3011
3012 test_journal_send_LDADD = \
3013         libsystemd-journal-core.la
3014
3015 test_journal_syslog_SOURCES = \
3016         src/journal/test-journal-syslog.c
3017
3018 test_journal_syslog_LDADD = \
3019         libsystemd-journal-core.la
3020
3021 test_journal_match_SOURCES = \
3022         src/journal/test-journal-match.c
3023
3024 test_journal_match_LDADD = \
3025         libsystemd-journal-core.la
3026
3027 test_journal_enum_SOURCES = \
3028         src/journal/test-journal-enum.c
3029
3030 test_journal_enum_LDADD = \
3031         libsystemd-journal-core.la
3032
3033 test_journal_stream_SOURCES = \
3034         src/journal/test-journal-stream.c
3035
3036 test_journal_stream_LDADD = \
3037         libsystemd-journal-core.la
3038
3039 test_journal_flush_SOURCES = \
3040         src/journal/test-journal-flush.c
3041
3042 test_journal_flush_LDADD = \
3043         libsystemd-journal-core.la
3044
3045 test_journal_init_SOURCES = \
3046         src/journal/test-journal-init.c
3047
3048 test_journal_init_LDADD = \
3049         libsystemd-journal-core.la
3050
3051 test_journal_verify_SOURCES = \
3052         src/journal/test-journal-verify.c
3053
3054 test_journal_verify_LDADD = \
3055         libsystemd-journal-core.la
3056
3057 test_journal_interleaving_SOURCES = \
3058         src/journal/test-journal-interleaving.c
3059
3060 test_journal_interleaving_LDADD = \
3061         libsystemd-journal-core.la
3062
3063 test_mmap_cache_SOURCES = \
3064         src/journal/test-mmap-cache.c
3065
3066 test_mmap_cache_LDADD = \
3067         libsystemd-journal-core.la
3068
3069 test_catalog_SOURCES = \
3070         src/journal/test-catalog.c
3071
3072 test_catalog_CPPFLAGS = \
3073         $(AM_CPPFLAGS) \
3074         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
3075
3076 test_catalog_LDADD = \
3077         libsystemd-journal-core.la
3078
3079 libsystemd_journal_core_la_SOURCES = \
3080         src/journal/journald-kmsg.c \
3081         src/journal/journald-kmsg.h \
3082         src/journal/journald-syslog.c \
3083         src/journal/journald-syslog.h \
3084         src/journal/journald-stream.c \
3085         src/journal/journald-stream.h \
3086         src/journal/journald-server.c \
3087         src/journal/journald-server.h \
3088         src/journal/journald-console.c \
3089         src/journal/journald-console.h \
3090         src/journal/journald-native.c \
3091         src/journal/journald-native.h \
3092         src/journal/journald-rate-limit.c \
3093         src/journal/journald-rate-limit.h \
3094         src/journal/journal-internal.h
3095
3096 nodist_libsystemd_journal_core_la_SOURCES = \
3097         src/journal/journald-gperf.c
3098
3099 libsystemd_journal_core_la_LIBADD = \
3100         libsystemd-journal-internal.la \
3101         libudev-internal.la \
3102         libsystemd-capability.la \
3103         libsystemd-label.la \
3104         libsystemd-internal.la \
3105         libsystemd-shared.la
3106
3107 if HAVE_ACL
3108 libsystemd_journal_core_la_LIBADD += \
3109         libsystemd-acl.la
3110 endif
3111
3112 noinst_LTLIBRARIES += \
3113         libsystemd-journal-core.la
3114
3115 # ------------------------------------------------------------------------------
3116
3117 # Update catalog on installation. Do not bother if installing
3118 # in DESTDIR, since this is likely for packaging purposes.
3119 catalog-update-hook:
3120         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
3121
3122 INSTALL_DATA_HOOKS += \
3123         catalog-update-hook
3124
3125 catalog-remove-hook:
3126         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
3127
3128 UNINSTALL_DATA_HOOKS += \
3129         catalog-remove-hook
3130
3131 manual_tests += \
3132         test-journal-enum
3133
3134 tests += \
3135         test-journal \
3136         test-journal-send \
3137         test-journal-syslog \
3138         test-journal-match \
3139         test-journal-stream \
3140         test-journal-init \
3141         test-journal-verify \
3142         test-journal-interleaving \
3143         test-journal-flush \
3144         test-mmap-cache \
3145         test-catalog
3146
3147 pkginclude_HEADERS += \
3148         src/systemd/sd-journal.h \
3149         src/systemd/sd-messages.h \
3150         src/systemd/_sd-common.h
3151
3152 libsystemd_journal_internal_la_SOURCES = \
3153         src/journal/sd-journal.c \
3154         src/systemd/sd-journal.h \
3155         src/systemd/_sd-common.h \
3156         src/journal/journal-file.c \
3157         src/journal/journal-file.h \
3158         src/journal/journal-vacuum.c \
3159         src/journal/journal-vacuum.h \
3160         src/journal/journal-verify.c \
3161         src/journal/journal-verify.h \
3162         src/journal/lookup3.c \
3163         src/journal/lookup3.h \
3164         src/journal/journal-send.c \
3165         src/journal/journal-def.h \
3166         src/journal/compress.h \
3167         src/journal/catalog.c \
3168         src/journal/catalog.h \
3169         src/journal/mmap-cache.c \
3170         src/journal/mmap-cache.h
3171
3172 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3173 libsystemd_journal_internal_la_CFLAGS =
3174         $(AM_CFLAGS)
3175
3176 libsystemd_journal_internal_la_LIBADD =
3177
3178 if HAVE_XZ
3179 libsystemd_journal_internal_la_SOURCES += \
3180         src/journal/compress.c
3181
3182 libsystemd_journal_internal_la_CFLAGS += \
3183         $(XZ_CFLAGS)
3184
3185 libsystemd_journal_internal_la_LIBADD += \
3186         $(XZ_LIBS)
3187 endif
3188
3189 if HAVE_GCRYPT
3190 libsystemd_journal_internal_la_SOURCES += \
3191         src/journal/journal-authenticate.c \
3192         src/journal/journal-authenticate.h \
3193         src/journal/fsprg.c \
3194         src/journal/fsprg.h
3195
3196 libsystemd_journal_internal_la_LIBADD += \
3197         $(GCRYPT_LIBS)
3198
3199 libsystemd_journal_internal_la_CFLAGS += \
3200         $(GCRYPT_CFLAGS) \
3201         -Wno-pointer-arith
3202 endif
3203
3204 noinst_LTLIBRARIES += \
3205         libsystemd-journal-internal.la
3206
3207 rootlibexec_PROGRAMS += \
3208         systemd-journald
3209
3210 rootbin_PROGRAMS += \
3211         journalctl
3212
3213 bin_PROGRAMS += \
3214         systemd-cat
3215
3216 dist_systemunit_DATA += \
3217         units/systemd-journald.socket
3218
3219 nodist_systemunit_DATA += \
3220         units/systemd-journald.service \
3221         units/systemd-journal-flush.service
3222
3223 dist_pkgsysconf_DATA += \
3224         src/journal/journald.conf
3225
3226 dist_catalog_DATA = \
3227         catalog/systemd.fr.catalog \
3228         catalog/systemd.ru.catalog \
3229         catalog/systemd.it.catalog \
3230         catalog/systemd.catalog
3231
3232 SOCKETS_TARGET_WANTS += \
3233         systemd-journald.socket
3234 SYSINIT_TARGET_WANTS += \
3235         systemd-journald.service \
3236         systemd-journal-flush.service
3237
3238 EXTRA_DIST += \
3239         units/systemd-journald.service.in \
3240         units/systemd-journal-flush.service.in \
3241         src/journal/journald-gperf.gperf
3242
3243 CLEANFILES += \
3244         src/journal/journald-gperf.c
3245
3246 # ------------------------------------------------------------------------------
3247 if HAVE_MICROHTTPD
3248 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
3249
3250 rootlibexec_PROGRAMS += \
3251         systemd-journal-gatewayd
3252
3253 systemd_journal_gatewayd_SOURCES = \
3254         src/journal/journal-gatewayd.c \
3255         src/journal/microhttpd-util.h \
3256         src/journal/microhttpd-util.c
3257
3258 systemd_journal_gatewayd_LDADD = \
3259         libsystemd-logs.la \
3260         libsystemd-journal-internal.la \
3261         libsystemd-internal.la \
3262         libsystemd-shared.la \
3263         $(MICROHTTPD_LIBS)
3264
3265 systemd_journal_gatewayd_CFLAGS = \
3266         $(AM_CFLAGS) \
3267         $(MICROHTTPD_CFLAGS)
3268
3269 systemd_journal_gatewayd_CPPFLAGS = \
3270         $(AM_CPPFLAGS) \
3271         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
3272
3273 dist_systemunit_DATA += \
3274         units/systemd-journal-gatewayd.socket
3275
3276 nodist_systemunit_DATA += \
3277         units/systemd-journal-gatewayd.service
3278
3279 dist_gatewayddocumentroot_DATA = \
3280         src/journal/browse.html
3281
3282 endif
3283
3284 EXTRA_DIST += \
3285         units/systemd-journal-gatewayd.service.in
3286
3287 # ------------------------------------------------------------------------------
3288
3289 systemd_socket_proxyd_SOURCES = \
3290         src/socket-proxy/socket-proxyd.c
3291
3292 systemd_socket_proxyd_LDADD = \
3293         libsystemd-logs.la \
3294         libsystemd-internal.la \
3295         libsystemd-journal-internal.la \
3296         libsystemd-shared.la
3297
3298 # ------------------------------------------------------------------------------
3299 if ENABLE_COREDUMP
3300 systemd_coredump_SOURCES = \
3301         src/journal/coredump.c
3302
3303 systemd_coredump_LDADD = \
3304         libsystemd-journal-internal.la \
3305         libsystemd-label.la \
3306         libsystemd-shared.la \
3307         libsystemd-internal.la
3308
3309 rootlibexec_PROGRAMS += \
3310         systemd-coredump
3311
3312 systemd_coredumpctl_SOURCES = \
3313         src/journal/coredumpctl.c
3314
3315 systemd_coredumpctl_LDADD = \
3316         libsystemd-journal-internal.la \
3317         libsystemd-internal.la \
3318         libsystemd-shared.la
3319
3320 bin_PROGRAMS += \
3321         systemd-coredumpctl
3322
3323 dist_bashcompletion_DATA += \
3324         shell-completion/bash/systemd-coredumpctl
3325
3326 dist_zshcompletion_DATA += \
3327         shell-completion/zsh/_systemd-coredumpctl
3328
3329 sysctl_DATA = \
3330         sysctl.d/50-coredump.conf
3331
3332 CLEANFILES += \
3333         sysctl.d/50-coredump.conf
3334 endif
3335
3336 EXTRA_DIST += \
3337         sysctl.d/50-coredump.conf.in
3338
3339 # ------------------------------------------------------------------------------
3340 if ENABLE_BINFMT
3341 systemd_binfmt_SOURCES = \
3342         src/binfmt/binfmt.c
3343
3344 systemd_binfmt_LDADD = \
3345         libsystemd-shared.la
3346
3347 rootlibexec_PROGRAMS += \
3348         systemd-binfmt
3349
3350 dist_systemunit_DATA += \
3351         units/proc-sys-fs-binfmt_misc.automount \
3352         units/proc-sys-fs-binfmt_misc.mount
3353
3354 nodist_systemunit_DATA += \
3355         units/systemd-binfmt.service
3356
3357 INSTALL_DIRS += \
3358         $(prefix)/lib/binfmt.d \
3359         $(sysconfdir)/binfmt.d
3360
3361 SYSINIT_TARGET_WANTS += \
3362         systemd-binfmt.service \
3363         proc-sys-fs-binfmt_misc.automount
3364
3365 endif
3366
3367 EXTRA_DIST += \
3368         units/systemd-binfmt.service.in
3369
3370 # ------------------------------------------------------------------------------
3371 if ENABLE_VCONSOLE
3372 systemd_vconsole_setup_SOURCES = \
3373         src/vconsole/vconsole-setup.c
3374
3375 systemd_vconsole_setup_LDADD = \
3376         libsystemd-shared.la
3377
3378 rootlibexec_PROGRAMS += \
3379         systemd-vconsole-setup
3380
3381 nodist_systemunit_DATA += \
3382         units/systemd-vconsole-setup.service
3383
3384 SYSINIT_TARGET_WANTS += \
3385         systemd-vconsole-setup.service
3386 endif
3387
3388 EXTRA_DIST += \
3389         units/systemd-vconsole-setup.service.in
3390
3391 # ------------------------------------------------------------------------------
3392 if ENABLE_READAHEAD
3393 systemd_readahead_SOURCES = \
3394         src/readahead/readahead.c \
3395         src/readahead/readahead-collect.c \
3396         src/readahead/readahead-replay.c \
3397         src/readahead/readahead-analyze.c \
3398         src/readahead/readahead-common.c \
3399         src/readahead/readahead-common.h
3400
3401 systemd_readahead_LDADD = \
3402         libsystemd-internal.la \
3403         libudev-internal.la \
3404         libsystemd-shared.la
3405
3406 dist_doc_DATA += \
3407         src/readahead/sd-readahead.c \
3408         src/systemd/sd-readahead.h
3409
3410 rootlibexec_PROGRAMS += \
3411         systemd-readahead
3412
3413 dist_systemunit_DATA += \
3414         units/systemd-readahead-drop.service \
3415         units/systemd-readahead-done.timer
3416
3417 nodist_systemunit_DATA += \
3418         units/systemd-readahead-collect.service \
3419         units/systemd-readahead-replay.service \
3420         units/systemd-readahead-done.service
3421
3422 endif
3423
3424 EXTRA_DIST += \
3425         units/systemd-readahead-collect.service.in \
3426         units/systemd-readahead-replay.service.in \
3427         units/systemd-readahead-done.service.in
3428
3429 # ------------------------------------------------------------------------------
3430 if ENABLE_BOOTCHART
3431 systemd_bootchart_SOURCES = \
3432         src/bootchart/bootchart.c \
3433         src/bootchart/bootchart.h \
3434         src/bootchart/store.c \
3435         src/bootchart/store.h \
3436         src/bootchart/svg.c \
3437         src/bootchart/svg.h
3438
3439 systemd_bootchart_LDADD = \
3440         libsystemd-journal-internal.la \
3441         libsystemd-shared.la
3442
3443 rootlibexec_PROGRAMS += \
3444         systemd-bootchart
3445
3446 dist_pkgsysconf_DATA += \
3447         src/bootchart/bootchart.conf
3448 endif
3449
3450 # ------------------------------------------------------------------------------
3451 if ENABLE_QUOTACHECK
3452 rootlibexec_PROGRAMS += \
3453         systemd-quotacheck
3454
3455 nodist_systemunit_DATA += \
3456         units/systemd-quotacheck.service
3457
3458 systemd_quotacheck_SOURCES = \
3459         src/quotacheck/quotacheck.c
3460
3461 systemd_quotacheck_LDADD = \
3462         libsystemd-shared.la
3463 endif
3464
3465 EXTRA_DIST += \
3466         units/systemd-quotacheck.service.in
3467
3468 nodist_systemunit_DATA += \
3469         units/quotaon.service
3470
3471 # ------------------------------------------------------------------------------
3472 if ENABLE_RANDOMSEED
3473 rootlibexec_PROGRAMS += \
3474         systemd-random-seed
3475
3476 nodist_systemunit_DATA += \
3477         units/systemd-random-seed.service
3478
3479 systemd_random_seed_SOURCES = \
3480         src/random-seed/random-seed.c
3481
3482 systemd_random_seed_LDADD = \
3483         libsystemd-label.la \
3484         libsystemd-shared.la
3485
3486 SYSINIT_TARGET_WANTS += \
3487         systemd-random-seed.service
3488
3489 endif
3490
3491 EXTRA_DIST += \
3492         units/systemd-random-seed.service.in
3493
3494 # ------------------------------------------------------------------------------
3495 if ENABLE_BACKLIGHT
3496 rootlibexec_PROGRAMS += \
3497         systemd-backlight
3498
3499 nodist_systemunit_DATA += \
3500         units/systemd-backlight@.service
3501
3502 systemd_backlight_SOURCES = \
3503         src/backlight/backlight.c
3504
3505 systemd_backlight_LDADD = \
3506         libsystemd-label.la \
3507         libudev-internal.la \
3508         libsystemd-shared.la
3509 endif
3510
3511 EXTRA_DIST += \
3512         units/systemd-backlight@.service.in
3513
3514 # ------------------------------------------------------------------------------
3515 if ENABLE_RFKILL
3516 rootlibexec_PROGRAMS += \
3517         systemd-rfkill
3518
3519 nodist_systemunit_DATA += \
3520         units/systemd-rfkill@.service
3521
3522 systemd_rfkill_SOURCES = \
3523         src/rfkill/rfkill.c
3524
3525 systemd_rfkill_LDADD = \
3526         libsystemd-label.la \
3527         libudev-internal.la \
3528         libsystemd-shared.la
3529 endif
3530
3531 EXTRA_DIST += \
3532         units/systemd-rfkill@.service.in
3533
3534 # ------------------------------------------------------------------------------
3535 if HAVE_LIBCRYPTSETUP
3536 rootlibexec_PROGRAMS += \
3537         systemd-cryptsetup
3538
3539 systemgenerator_PROGRAMS += \
3540         systemd-cryptsetup-generator
3541
3542 dist_systemunit_DATA += \
3543         units/cryptsetup.target
3544
3545 systemd_cryptsetup_SOURCES = \
3546         src/cryptsetup/cryptsetup.c
3547
3548 systemd_cryptsetup_CFLAGS = \
3549         $(AM_CFLAGS) \
3550         $(LIBCRYPTSETUP_CFLAGS)
3551
3552 systemd_cryptsetup_LDADD = \
3553         libsystemd-label.la \
3554         libudev-internal.la \
3555         libsystemd-shared.la \
3556         $(LIBCRYPTSETUP_LIBS)
3557
3558 systemd_cryptsetup_generator_SOURCES = \
3559         src/cryptsetup/cryptsetup-generator.c
3560
3561 systemd_cryptsetup_generator_LDADD = \
3562         libsystemd-label.la \
3563         libsystemd-shared.la
3564
3565 SYSINIT_TARGET_WANTS += \
3566         cryptsetup.target
3567
3568 endif
3569
3570 # ------------------------------------------------------------------------------
3571 if ENABLE_HOSTNAMED
3572 systemd_hostnamed_SOURCES = \
3573         src/hostname/hostnamed.c
3574
3575 systemd_hostnamed_LDADD = \
3576         libsystemd-label.la \
3577         libsystemd-internal.la \
3578         libsystemd-shared.la
3579
3580 rootlibexec_PROGRAMS += \
3581         systemd-hostnamed
3582
3583 nodist_systemunit_DATA += \
3584         units/systemd-hostnamed.service
3585
3586 dist_systemunit_DATA += \
3587         units/org.freedesktop.hostname1.busname
3588
3589 dist_dbuspolicy_DATA += \
3590         src/hostname/org.freedesktop.hostname1.conf
3591
3592 dist_dbussystemservice_DATA += \
3593         src/hostname/org.freedesktop.hostname1.service
3594
3595 polkitpolicy_files += \
3596         src/hostname/org.freedesktop.hostname1.policy
3597
3598 SYSTEM_UNIT_ALIASES += \
3599         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
3600
3601 BUSNAMES_TARGET_WANTS += \
3602         org.freedesktop.hostname1.busname
3603
3604 hostnamectl_SOURCES = \
3605         src/hostname/hostnamectl.c
3606
3607 hostnamectl_LDADD = \
3608         libsystemd-internal.la \
3609         libsystemd-shared.la
3610
3611 bin_PROGRAMS += \
3612         hostnamectl
3613
3614 dist_bashcompletion_DATA += \
3615         shell-completion/bash/hostnamectl
3616
3617 dist_zshcompletion_DATA += \
3618         shell-completion/zsh/_hostnamectl
3619
3620 endif
3621
3622 polkitpolicy_in_files += \
3623         src/hostname/org.freedesktop.hostname1.policy.in
3624
3625 EXTRA_DIST += \
3626         units/systemd-hostnamed.service.in
3627
3628 # ------------------------------------------------------------------------------
3629 if ENABLE_KDBUS
3630 systemd_bus_driverd_SOURCES = \
3631         src/bus-driverd/bus-driverd.c
3632
3633 systemd_bus_driverd_LDADD = \
3634         libsystemd-internal.la \
3635         libsystemd-shared.la
3636
3637 rootlibexec_PROGRAMS += \
3638         systemd-bus-driverd
3639
3640 nodist_systemunit_DATA += \
3641         units/systemd-bus-driverd.service
3642
3643 dist_systemunit_DATA += \
3644         units/org.freedesktop.DBus.busname
3645
3646 BUSNAMES_TARGET_WANTS += \
3647         org.freedesktop.DBus.busname
3648
3649 nodist_userunit_DATA += \
3650         units/user/systemd-bus-driverd.service
3651
3652 USER_BUSNAMES_TARGET_WANTS += \
3653         org.freedesktop.DBus.busname
3654
3655 USER_UNIT_ALIASES += \
3656         $(systemunitdir)/org.freedesktop.DBus.busname org.freedesktop.DBus.busname
3657 endif
3658
3659 EXTRA_DIST += \
3660         units/systemd-bus-driverd.service.in \
3661         units/user/systemd-bus-driverd.service.in
3662
3663 # ------------------------------------------------------------------------------
3664 if ENABLE_LOCALED
3665 systemd_localed_SOURCES = \
3666         src/locale/localed.c
3667
3668 systemd_localed_LDADD = \
3669         libsystemd-label.la \
3670         libsystemd-internal.la \
3671         libsystemd-shared.la
3672
3673 nodist_systemunit_DATA += \
3674         units/systemd-localed.service
3675
3676 dist_systemunit_DATA += \
3677         units/org.freedesktop.locale1.busname
3678
3679 rootlibexec_PROGRAMS += \
3680         systemd-localed
3681
3682 dist_dbuspolicy_DATA += \
3683         src/locale/org.freedesktop.locale1.conf
3684
3685 dist_dbussystemservice_DATA += \
3686         src/locale/org.freedesktop.locale1.service
3687
3688 polkitpolicy_files += \
3689         src/locale/org.freedesktop.locale1.policy
3690
3691 SYSTEM_UNIT_ALIASES += \
3692         systemd-localed.service dbus-org.freedesktop.locale1.service
3693
3694 BUSNAMES_TARGET_WANTS += \
3695         org.freedesktop.locale1.busname
3696
3697 dist_pkgdata_DATA += \
3698         src/locale/kbd-model-map
3699
3700 dist_noinst_SCRIPT = \
3701         src/locale/generate-kbd-model-map
3702
3703 update-kbd-model-map: src/locale/generate-kbd-model-map
3704         $PYTHON $< >src/locale/kbd-model-map
3705
3706 localectl_SOURCES = \
3707         src/locale/localectl.c
3708
3709 localectl_LDADD = \
3710         libsystemd-internal.la \
3711         libsystemd-shared.la
3712
3713 bin_PROGRAMS += \
3714         localectl
3715
3716 dist_bashcompletion_DATA += \
3717         shell-completion/bash/localectl
3718
3719 dist_zshcompletion_DATA += \
3720         shell-completion/zsh/_localectl
3721
3722 endif
3723
3724 .PHONY: update-kbd-model-map
3725
3726 polkitpolicy_in_files += \
3727         src/locale/org.freedesktop.locale1.policy.in
3728
3729 EXTRA_DIST += \
3730         units/systemd-localed.service.in
3731
3732 # ------------------------------------------------------------------------------
3733 if ENABLE_TIMEDATED
3734 systemd_timedated_SOURCES = \
3735         src/timedate/timedated.c
3736
3737 systemd_timedated_LDADD = \
3738         libsystemd-label.la \
3739         libsystemd-internal.la \
3740         libsystemd-shared.la
3741
3742 rootlibexec_PROGRAMS += \
3743         systemd-timedated
3744
3745 dist_dbussystemservice_DATA += \
3746         src/timedate/org.freedesktop.timedate1.service
3747
3748 dist_dbuspolicy_DATA += \
3749         src/timedate/org.freedesktop.timedate1.conf
3750
3751 nodist_systemunit_DATA += \
3752         units/systemd-timedated.service
3753
3754 dist_systemunit_DATA += \
3755         units/org.freedesktop.timedate1.busname
3756
3757 polkitpolicy_files += \
3758         src/timedate/org.freedesktop.timedate1.policy
3759
3760 INSTALL_DIRS += \
3761         $(prefix)/lib/systemd/ntp-units.d \
3762         $(sysconfdir)/systemd/ntp-units.d
3763
3764 SYSTEM_UNIT_ALIASES += \
3765         systemd-timedated.service dbus-org.freedesktop.timedate1.service
3766
3767 BUSNAMES_TARGET_WANTS += \
3768         org.freedesktop.timedate1.busname
3769
3770 timedatectl_SOURCES = \
3771         src/timedate/timedatectl.c
3772
3773 timedatectl_LDADD = \
3774         libsystemd-internal.la \
3775         libsystemd-shared.la
3776
3777 bin_PROGRAMS += \
3778         timedatectl
3779
3780 dist_bashcompletion_DATA += \
3781         shell-completion/bash/timedatectl
3782
3783 dist_zshcompletion_DATA += \
3784         shell-completion/zsh/_timedatectl
3785 endif
3786
3787 polkitpolicy_in_files += \
3788         src/timedate/org.freedesktop.timedate1.policy.in
3789
3790 EXTRA_DIST += \
3791         units/systemd-timedated.service.in
3792
3793 # ------------------------------------------------------------------------------
3794 if HAVE_MYHOSTNAME
3795 libnss_myhostname_la_SOURCES = \
3796         src/nss-myhostname/nss-myhostname.c \
3797         src/nss-myhostname/ifconf.h \
3798         src/nss-myhostname/netlink.c
3799
3800 libnss_myhostname_la_LDFLAGS = \
3801         $(AM_LDFLAGS) \
3802         -module \
3803         -export-dynamic \
3804         -avoid-version \
3805         -shared \
3806         -shrext .so.2
3807
3808 lib_LTLIBRARIES += \
3809         libnss_myhostname.la
3810 endif
3811
3812 # ------------------------------------------------------------------------------
3813 if ENABLE_MACHINED
3814 systemd_machined_SOURCES = \
3815         src/machine/machined.c \
3816         src/machine/machined.h
3817
3818 systemd_machined_LDADD = \
3819         libsystemd-machine-core.la
3820
3821 rootlibexec_PROGRAMS += \
3822         systemd-machined
3823
3824 libsystemd_machine_core_la_SOURCES = \
3825         src/machine/machined-dbus.c \
3826         src/machine/machine.c \
3827         src/machine/machine.h \
3828         src/machine/machine-dbus.c
3829
3830 libsystemd_machine_core_la_LIBADD = \
3831         libsystemd-label.la \
3832         libsystemd-internal.la \
3833         libudev-internal.la \
3834         libsystemd-shared.la
3835
3836 noinst_LTLIBRARIES += \
3837         libsystemd-machine-core.la
3838
3839 machinectl_SOURCES = \
3840         src/machine/machinectl.c
3841
3842 machinectl_LDADD = \
3843         libsystemd-internal.la \
3844         libsystemd-shared.la
3845
3846 rootbin_PROGRAMS += \
3847         machinectl
3848
3849 dist_bashcompletion_DATA += \
3850         shell-completion/bash/machinectl
3851
3852 test_machine_tables_SOURCES = \
3853         src/machine/test-machine-tables.c
3854
3855 test_machine_tables_LDADD = \
3856         libsystemd-machine-core.la
3857
3858 tests += \
3859         test-machine-tables
3860
3861 nodist_systemunit_DATA += \
3862         units/systemd-machined.service
3863
3864 dist_systemunit_DATA += \
3865         units/machine.slice \
3866         units/org.freedesktop.machine1.busname
3867
3868 dist_dbussystemservice_DATA += \
3869         src/machine/org.freedesktop.machine1.service
3870
3871 dist_dbuspolicy_DATA += \
3872         src/machine/org.freedesktop.machine1.conf
3873
3874 dist_zshcompletion_DATA += \
3875         shell-completion/zsh/_machinectl
3876
3877 SYSTEM_UNIT_ALIASES += \
3878         systemd-machined.service dbus-org.freedesktop.machine1.service
3879
3880 BUSNAMES_TARGET_WANTS += \
3881         org.freedesktop.machine1.busname
3882
3883 EXTRA_DIST += \
3884         units/systemd-machined.service.in
3885
3886 endif
3887
3888 # ------------------------------------------------------------------------------
3889 if ENABLE_NETWORKD
3890 rootlibexec_PROGRAMS += \
3891         systemd-networkd
3892
3893 systemd_networkd_SOURCES = \
3894         src/network/networkd.h \
3895         src/network/networkd.c \
3896         src/network/networkd-link.c \
3897         src/network/networkd-netdev.c \
3898         src/network/networkd-network.c \
3899         src/network/networkd-address.c \
3900         src/network/networkd-route.c \
3901         src/network/networkd-manager.c
3902
3903 nodist_systemd_networkd_SOURCES = \
3904         src/network/networkd-gperf.c
3905
3906 systemd_networkd_LDADD = \
3907         libudev-internal.la \
3908         libsystemd-internal.la \
3909         libsystemd-dhcp.la \
3910         libsystemd-label.la \
3911         libsystemd-shared.la
3912
3913 nodist_systemunit_DATA += \
3914         units/systemd-networkd.service
3915
3916 MULTI_USER_TARGET_WANTS += \
3917         systemd-networkd.service
3918
3919 test_network_SOURCES = \
3920         src/network/test-network.c \
3921         src/network/networkd.h \
3922         src/network/networkd-link.c \
3923         src/network/networkd-netdev.c \
3924         src/network/networkd-network.c \
3925         src/network/networkd-address.c \
3926         src/network/networkd-route.c \
3927         src/network/networkd-manager.c \
3928         src/network/networkd-gperf.c
3929
3930 test_network_LDADD = \
3931         libudev-internal.la \
3932         libsystemd-internal.la \
3933         libsystemd-dhcp.la \
3934         libsystemd-label.la \
3935         libsystemd-shared.la
3936
3937 tests += \
3938         test-network
3939
3940 EXTRA_DIST += \
3941         src/network/networkd-gperf.gperf \
3942         units/systemd-networkd.service.in
3943
3944 CLEANFILES += \
3945         src/network/networkd-gperf.c
3946 endif
3947
3948 # ------------------------------------------------------------------------------
3949 if ENABLE_LOGIND
3950 systemd_logind_SOURCES = \
3951         src/login/logind.c \
3952         src/login/logind.h
3953
3954 nodist_systemd_logind_SOURCES = \
3955         src/login/logind-gperf.c
3956
3957 systemd_logind_LDADD = \
3958         libsystemd-logind-core.la
3959
3960 libsystemd_logind_core_la_SOURCES = \
3961         src/login/logind-core.c \
3962         src/login/logind-device.c \
3963         src/login/logind-device.h \
3964         src/login/logind-button.c \
3965         src/login/logind-button.h \
3966         src/login/logind-action.c \
3967         src/login/logind-action.h \
3968         src/login/logind-seat.c \
3969         src/login/logind-seat.h \
3970         src/login/logind-session.c \
3971         src/login/logind-session.h \
3972         src/login/logind-session-device.c \
3973         src/login/logind-session-device.h \
3974         src/login/logind-user.c \
3975         src/login/logind-user.h \
3976         src/login/logind-inhibit.c \
3977         src/login/logind-inhibit.h \
3978         src/login/logind-dbus.c \
3979         src/login/logind-session-dbus.c \
3980         src/login/logind-seat-dbus.c \
3981         src/login/logind-user-dbus.c \
3982         src/login/logind-acl.h \
3983         src/login/login-shared.c \
3984         src/login/login-shared.h
3985
3986 libsystemd_logind_core_la_LIBADD = \
3987         libsystemd-label.la \
3988         libsystemd-capability.la \
3989         libsystemd-internal.la \
3990         libudev-internal.la \
3991         libsystemd-shared.la
3992
3993 if HAVE_ACL
3994 libsystemd_logind_core_la_SOURCES += \
3995         src/login/logind-acl.c
3996
3997 libsystemd_logind_core_la_LIBADD += \
3998         libsystemd-acl.la
3999 endif
4000
4001 noinst_LTLIBRARIES += \
4002         libsystemd-logind-core.la
4003
4004 systemd_user_sessions_SOURCES = \
4005         src/login/user-sessions.c
4006
4007 systemd_user_sessions_LDADD = \
4008         libsystemd-shared.la
4009
4010 rootlibexec_PROGRAMS += \
4011         systemd-logind \
4012         systemd-user-sessions
4013
4014 loginctl_SOURCES = \
4015         src/login/loginctl.c \
4016         src/login/sysfs-show.c
4017
4018 loginctl_LDADD = \
4019         libsystemd-internal.la \
4020         libudev-internal.la \
4021         libsystemd-shared.la
4022
4023 rootbin_PROGRAMS += \
4024         loginctl
4025
4026 dist_bashcompletion_DATA += \
4027         shell-completion/bash/loginctl
4028
4029 dist_zshcompletion_DATA += \
4030         shell-completion/zsh/_loginctl \
4031         shell-completion/zsh/_systemd-inhibit
4032
4033 systemd_inhibit_SOURCES = \
4034         src/login/inhibit.c
4035
4036 systemd_inhibit_LDADD = \
4037         libsystemd-internal.la \
4038         libsystemd-shared.la
4039
4040 rootbin_PROGRAMS += \
4041         systemd-inhibit
4042
4043 test_login_SOURCES = \
4044         src/login/test-login.c
4045
4046 test_login_LDADD = \
4047         libsystemd-internal.la \
4048         libsystemd-shared.la
4049
4050 test_login_shared_SOURCES = \
4051         src/login/test-login-shared.c
4052
4053 test_login_shared_LDADD = \
4054         libsystemd-internal.la \
4055         libsystemd-shared.la
4056
4057 test_inhibit_SOURCES = \
4058         src/login/test-inhibit.c
4059
4060 test_inhibit_LDADD = \
4061         libsystemd-internal.la \
4062         libsystemd-shared.la
4063
4064 test_login_tables_SOURCES = \
4065         src/login/test-login-tables.c
4066
4067 test_login_tables_LDADD = \
4068         libsystemd-logind-core.la
4069
4070 manual_tests += \
4071         test-login \
4072         test-inhibit
4073
4074 tests += \
4075         test-login-tables \
4076         test-login-shared
4077
4078 if HAVE_PAM
4079 pam_systemd_la_SOURCES = \
4080         src/login/pam-module.c
4081
4082 pam_systemd_la_CFLAGS = \
4083         $(AM_CFLAGS) \
4084         $(PAM_CFLAGS) \
4085         -fvisibility=hidden
4086
4087 pam_systemd_la_LDFLAGS = \
4088         $(AM_LDFLAGS) \
4089         -module \
4090         -export-dynamic \
4091         -avoid-version \
4092         -shared \
4093         -export-symbols-regex '^pam_sm_.*'
4094
4095 pam_systemd_la_LIBADD = \
4096         libsystemd-capability.la \
4097         libsystemd-internal.la \
4098         libsystemd-shared.la \
4099         $(PAM_LIBS)
4100
4101 pamlib_LTLIBRARIES = \
4102         pam_systemd.la
4103
4104 dist_pamconf_DATA = \
4105         src/login/systemd-user
4106 endif
4107
4108 nodist_systemunit_DATA += \
4109         units/systemd-logind.service \
4110         units/systemd-user-sessions.service
4111
4112 dist_systemunit_DATA += \
4113         units/user.slice \
4114         units/org.freedesktop.login1.busname
4115
4116 dist_dbussystemservice_DATA += \
4117         src/login/org.freedesktop.login1.service
4118
4119 dist_dbuspolicy_DATA += \
4120         src/login/org.freedesktop.login1.conf
4121
4122 dist_pkgsysconf_DATA += \
4123         src/login/logind.conf
4124
4125 polkitpolicy_files += \
4126         src/login/org.freedesktop.login1.policy
4127
4128 INSTALL_DIRS += \
4129         $(systemdstatedir)
4130
4131 MULTI_USER_TARGET_WANTS += \
4132         systemd-logind.service \
4133         systemd-user-sessions.service
4134
4135 SYSTEM_UNIT_ALIASES += \
4136         systemd-logind.service dbus-org.freedesktop.login1.service
4137
4138 BUSNAMES_TARGET_WANTS += \
4139         org.freedesktop.login1.busname
4140
4141 if ENABLE_MULTI_SEAT_X
4142
4143 systemd_multi_seat_x_SOURCES = \
4144         src/login/multi-seat-x.c
4145
4146 systemd_multi_seat_x_LDADD = \
4147         libsystemd-label.la \
4148         libsystemd-shared.la
4149
4150 rootlibexec_PROGRAMS += \
4151         systemd-multi-seat-x
4152
4153 endif
4154
4155 dist_udevrules_DATA += \
4156         src/login/70-uaccess.rules \
4157         src/login/70-power-switch.rules
4158
4159 nodist_udevrules_DATA += \
4160         src/login/71-seat.rules \
4161         src/login/73-seat-late.rules
4162
4163 CLEANFILES += \
4164         src/login/logind-gperf.c \
4165         src/login/71-seat.rules \
4166         src/login/73-seat-late.rules
4167 endif
4168
4169 polkitpolicy_in_files += \
4170         src/login/org.freedesktop.login1.policy.in
4171
4172 EXTRA_DIST += \
4173         src/login/logind-gperf.gperf \
4174         src/login/71-seat.rules.in \
4175         src/login/73-seat-late.rules.in \
4176         units/systemd-logind.service.in \
4177         units/systemd-user-sessions.service.in
4178
4179 # ------------------------------------------------------------------------------
4180 if HAVE_PYTHON_DEVEL
4181 pkgpyexec_LTLIBRARIES = \
4182         _journal.la \
4183         id128.la \
4184         _daemon.la \
4185         _reader.la \
4186         login.la
4187
4188 _journal_la_SOURCES = \
4189         src/python-systemd/_journal.c
4190
4191 _journal_la_CFLAGS = \
4192         $(AM_CFLAGS) \
4193         -fvisibility=default \
4194         $(PYTHON_DEVEL_CFLAGS)
4195
4196 _journal_la_LDFLAGS = \
4197         $(AM_LDFLAGS) \
4198         -shared \
4199         -module \
4200         -avoid-version
4201
4202 _journal_la_LIBADD = \
4203         $(PYTHON_DEVEL_LIBS) \
4204         libsystemd.la
4205
4206 id128_la_SOURCES = \
4207         src/python-systemd/id128.c \
4208         src/python-systemd/id128-constants.h \
4209         src/python-systemd/pyutil.c \
4210         src/python-systemd/pyutil.h
4211
4212 id128_la_CFLAGS = \
4213         $(AM_CFLAGS) \
4214         -fvisibility=default \
4215         $(PYTHON_DEVEL_CFLAGS) \
4216         -I$(top_builddir)/src/python-systemd
4217
4218 id128_la_LDFLAGS = \
4219         $(AM_LDFLAGS) \
4220         -shared \
4221         -module \
4222         -avoid-version
4223
4224 id128_la_LIBADD = \
4225         $(PYTHON_DEVEL_LIBS) \
4226         libsystemd.la
4227
4228 _daemon_la_SOURCES = \
4229         src/python-systemd/_daemon.c \
4230         src/python-systemd/pyutil.c \
4231         src/python-systemd/pyutil.h
4232
4233 _daemon_la_CFLAGS = \
4234         $(AM_CFLAGS) \
4235         -fvisibility=default \
4236         $(PYTHON_DEVEL_CFLAGS) \
4237         -I$(top_builddir)/src/python-systemd
4238
4239 _daemon_la_LDFLAGS = \
4240         $(AM_LDFLAGS) \
4241         -shared \
4242         -module \
4243         -avoid-version
4244
4245 _daemon_la_LIBADD = \
4246         $(PYTHON_DEVEL_LIBS) \
4247         libsystemd.la
4248
4249 _reader_la_SOURCES = \
4250         src/python-systemd/_reader.c \
4251         src/python-systemd/pyutil.c \
4252         src/python-systemd/pyutil.h
4253
4254 _reader_la_CFLAGS = \
4255         $(AM_CFLAGS) \
4256         -fvisibility=default \
4257         $(PYTHON_DEVEL_CFLAGS)
4258
4259 _reader_la_LDFLAGS = \
4260         $(AM_LDFLAGS) \
4261         -shared \
4262         -module \
4263         -avoid-version
4264
4265 _reader_la_LIBADD = \
4266         $(PYTHON_DEVEL_LIBS) \
4267         libsystemd.la \
4268         libsystemd-shared.la
4269
4270 login_la_SOURCES = \
4271         src/python-systemd/login.c \
4272         src/python-systemd/pyutil.c \
4273         src/python-systemd/pyutil.h
4274
4275 login_la_CFLAGS = \
4276         $(AM_CFLAGS) \
4277         -fvisibility=default \
4278         $(PYTHON_DEVEL_CFLAGS)
4279
4280 login_la_LDFLAGS = \
4281         $(AM_LDFLAGS) \
4282         -shared \
4283         -module \
4284         -avoid-version
4285
4286 login_la_LIBADD = \
4287         $(PYTHON_DEVEL_LIBS) \
4288         libsystemd.la \
4289         libsystemd-shared.la
4290
4291 dist_pkgpyexec_PYTHON = \
4292         src/python-systemd/journal.py \
4293         src/python-systemd/daemon.py \
4294         src/python-systemd/__init__.py
4295
4296 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
4297         $(AM_V_at)$(MKDIR_P) $(dir $@)
4298         $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
4299
4300 BUILT_SOURCES += \
4301         src/python-systemd/id128-constants.h
4302
4303 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
4304 sphinx-%:
4305         $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
4306         $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
4307         $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
4308
4309 python-shell:
4310         $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
4311         $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
4312
4313 destdir-sphinx: all
4314         dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
4315                 $(MAKE) DESTDIR="$$dir" install && \
4316                 $(MAKE) DESTDIR="$$dir" sphinx-html && \
4317                 rm -rf "$$dir"
4318
4319 endif
4320
4321 CLEAN_LOCAL_HOOKS += clean-sphinx
4322
4323 .PHONY: python-shell destdir-sphinx clean-sphinx clean-python
4324
4325 clean-sphinx:
4326         -rm -rf docs/html/python-systemd/
4327
4328 # Remove Python stuff, e.g. to force rebuilding for a different Python version.
4329 clean-python:
4330         -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
4331         -rm -f _daemon.la id128.la _journal.la login.la _reader.la
4332
4333 # ------------------------------------------------------------------------------
4334 if ENABLE_COMPAT_LIBS
4335
4336 define generate-fake-lib
4337         $(AM_V_at)$(MKDIR_P) $(dir $@)
4338         $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/void new_\1(void);\n__asm__(".symver new_\1,\1@LIBSYSTEMD_209");\nstatic void (*resolve_\1(void)) (void) {\n\treturn new_\1;\n}\nvoid \1(void) __attribute__((ifunc("resolve_\1")));\nobsolete_lib(\1,$(notdir $(basename $<)));\n/p' <$< >$@
4339 endef
4340
4341 libsystemd_journal_la_SOURCES = \
4342         libsystemd-journal.c \
4343         src/compat-libs/libsystemd-journal.sym
4344
4345 libsystemd_journal_la_CFLAGS = \
4346         $(AM_CFLAGS) \
4347         -fvisibility=default \
4348         -imacros $(top_srcdir)/src/compat-libs/linkwarning.h \
4349         -fno-lto
4350
4351 libsystemd_journal_la_LDFLAGS = \
4352         $(AM_LDFLAGS) \
4353         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
4354         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
4355
4356 libsystemd_journal_la_LIBADD = \
4357         libsystemd.la
4358
4359 libsystemd_login_la_SOURCES = \
4360         libsystemd-login.c \
4361         src/compat-libs/libsystemd-login.sym
4362
4363 libsystemd_login_la_CFLAGS = \
4364         $(AM_CFLAGS) \
4365         -fvisibility=default \
4366         -imacros $(top_srcdir)/src/compat-libs/linkwarning.h \
4367         -fno-lto
4368
4369 libsystemd_login_la_LDFLAGS = \
4370         $(AM_LDFLAGS) \
4371         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
4372         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
4373
4374 libsystemd_login_la_LIBADD = \
4375         libsystemd.la
4376
4377 libsystemd_id128_la_SOURCES = \
4378         libsystemd-id128.c \
4379         src/compat-libs/libsystemd-id128.sym
4380
4381 libsystemd_id128_la_CFLAGS = \
4382         $(libsystemd_login_la_CFLAGS)
4383
4384 libsystemd_id128_la_LDFLAGS = \
4385         $(AM_LDFLAGS) \
4386         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
4387         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
4388
4389 libsystemd_id128_la_LIBADD = \
4390         libsystemd.la
4391
4392 libsystemd_daemon_la_SOURCES = \
4393         libsystemd-daemon.c \
4394         src/compat-libs/libsystemd-daemon.sym
4395
4396 libsystemd_daemon_la_CFLAGS = \
4397         $(libsystemd_login_la_CFLAGS)
4398
4399 libsystemd_daemon_la_LDFLAGS = \
4400         $(AM_LDFLAGS) \
4401         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
4402         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
4403
4404 libsystemd_daemon_la_LIBADD = \
4405         libsystemd.la
4406
4407 BUILT_SOURCES += \
4408         libsystemd-journal.c \
4409         libsystemd-login.c \
4410         libsystemd-id128.c \
4411         libsystemd-daemon.c
4412
4413 libsystemd-%.c: src/compat-libs/libsystemd-%.sym
4414         $(generate-fake-lib)
4415
4416 lib_LTLIBRARIES += \
4417         libsystemd-journal.la \
4418         libsystemd-login.la \
4419         libsystemd-id128.la \
4420         libsystemd-daemon.la
4421
4422 pkgconfiglib_DATA += \
4423         src/compat-libs/libsystemd-login.pc \
4424         src/compat-libs/libsystemd-id128.pc \
4425         src/compat-libs/libsystemd-daemon.pc
4426
4427 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
4428 compat-lib-install-hook:
4429         libname=libsystemd-login.so && $(move-to-rootlibdir)
4430         libname=libsystemd-id128.so && $(move-to-rootlibdir)
4431         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
4432
4433 compat-lib-uninstall-hook:
4434         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
4435         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
4436         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
4437
4438 INSTALL_EXEC_HOOKS += compat-lib-install-hook
4439 UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
4440
4441 endif
4442
4443 EXTRA_DIST += \
4444         src/compat-libs/libsystemd-login.pc.in \
4445         src/compat-libs/libsystemd-id128.pc.in \
4446         src/compat-libs/libsystemd-daemon.pc.in
4447
4448 # ------------------------------------------------------------------------------
4449 substitutions = \
4450        '|rootlibexecdir=$(rootlibexecdir)|' \
4451        '|rootbindir=$(rootbindir)|' \
4452        '|bindir=$(bindir)|' \
4453        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
4454        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
4455        '|pkgsysconfdir=$(pkgsysconfdir)|' \
4456        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
4457        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
4458        '|pkgdatadir=$(pkgdatadir)|' \
4459        '|systemunitdir=$(systemunitdir)|' \
4460        '|userunitdir=$(userunitdir)|' \
4461        '|systempresetdir=$(systempresetdir)|' \
4462        '|userpresetdir=$(userpresetdir)|' \
4463        '|udevhwdbdir=$(udevhwdbdir)|' \
4464        '|udevrulesdir=$(udevrulesdir)|' \
4465        '|catalogdir=$(catalogdir)|' \
4466        '|tmpfilesdir=$(tmpfilesdir)|' \
4467        '|sysctldir=$(sysctldir)|' \
4468        '|systemgeneratordir=$(systemgeneratordir)|' \
4469        '|usergeneratordir=$(usergeneratordir)|' \
4470        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
4471        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
4472        '|PACKAGE_URL=$(PACKAGE_URL)|' \
4473        '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
4474        '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
4475        '|prefix=$(prefix)|' \
4476        '|exec_prefix=$(exec_prefix)|' \
4477        '|libdir=$(libdir)|' \
4478        '|includedir=$(includedir)|' \
4479        '|VERSION=$(VERSION)|' \
4480        '|rootprefix=$(rootprefix)|' \
4481        '|udevlibexecdir=$(udevlibexecdir)|' \
4482        '|SUSHELL=$(SUSHELL)|' \
4483        '|DEBUGTTY=$(DEBUGTTY)|' \
4484        '|KILL=$(KILL)|' \
4485        '|KMOD=$(KMOD)|' \
4486        '|MKDIR_P=$(MKDIR_P)|' \
4487        '|QUOTAON=$(QUOTAON)|' \
4488        '|QUOTACHECK=$(QUOTACHECK)|' \
4489        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
4490        '|VARLOGDIR=$(varlogdir)|' \
4491        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
4492        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
4493        '|PYTHON=$(PYTHON)|' \
4494        '|PYTHON_BINARY=$(PYTHON_BINARY)|'
4495
4496 SED_PROCESS = \
4497         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
4498         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
4499                 < $< > $@
4500
4501 units/%: units/%.in
4502         $(SED_PROCESS)
4503
4504 man/%: man/%.in
4505         $(SED_PROCESS)
4506
4507 sysctl.d/%: sysctl.d/%.in
4508         $(SED_PROCESS)
4509
4510 %.pc: %.pc.in
4511         $(SED_PROCESS)
4512
4513 src/core/macros.%: src/core/macros.%.in
4514         $(SED_PROCESS)
4515
4516 src/%.policy.in: src/%.policy.in.in
4517         $(SED_PROCESS)
4518
4519 %.rules: %.rules.in
4520         $(SED_PROCESS)
4521
4522 %.sh: %.sh.in
4523         $(SED_PROCESS)
4524         $(AM_V_GEN)chmod +x $@
4525
4526 src/%.c: src/%.gperf
4527         $(AM_V_at)$(MKDIR_P) $(dir $@)
4528         $(AM_V_GPERF)$(GPERF) < $< > $@
4529
4530 src/%: src/%.m4
4531         $(AM_V_at)$(MKDIR_P) $(dir $@)
4532         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
4533
4534 units/%: units/%.m4
4535         $(AM_V_at)$(MKDIR_P) $(dir $@)
4536         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
4537
4538 units/user/%: units/%.m4
4539         $(AM_V_at)$(MKDIR_P) $(dir $@)
4540         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
4541
4542 if ENABLE_POLKIT
4543 nodist_polkitpolicy_DATA = \
4544         $(polkitpolicy_files) \
4545         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
4546 endif
4547
4548 EXTRA_DIST += \
4549         $(polkitpolicy_in_files) \
4550         $(polkitpolicy_in_in_files)
4551
4552 CLEANFILES += \
4553         $(nodist_systemunit_DATA) \
4554         $(nodist_userunit_DATA) \
4555         $(pkgconfigdata_DATA) \
4556         $(pkgconfiglib_DATA) \
4557         $(nodist_polkitpolicy_DATA)
4558
4559 # ------------------------------------------------------------------------------
4560 if ENABLE_MANPAGES
4561 man/custom-entities.ent:
4562         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
4563         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
4564          printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
4565          > $@ # '
4566
4567 DISTCLEANFILES += \
4568         man/custom-entities.ent
4569
4570 XSLTPROC_FLAGS = \
4571         --nonet \
4572         --xinclude \
4573         --stringparam man.output.quietly 1 \
4574         --stringparam funcsynopsis.style ansi \
4575         --stringparam man.authors.section.enabled 0 \
4576         --stringparam man.copyright.section.enabled 0 \
4577         --stringparam systemd.version $(VERSION) \
4578         --path '$(builddir)/man:$(srcdir)/man'
4579
4580 XSLTPROC_PROCESS_MAN = \
4581         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
4582
4583 XSLTPROC_PROCESS_HTML = \
4584         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
4585
4586 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
4587         $(XSLTPROC_PROCESS_MAN)
4588
4589 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
4590         $(XSLTPROC_PROCESS_MAN)
4591
4592 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
4593         $(XSLTPROC_PROCESS_MAN)
4594
4595 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
4596         $(XSLTPROC_PROCESS_MAN)
4597
4598 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
4599         $(XSLTPROC_PROCESS_MAN)
4600
4601 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
4602         $(XSLTPROC_PROCESS_HTML)
4603
4604 define html-alias
4605         $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
4606 endef
4607
4608 endif
4609
4610 EXTRA_DIST += \
4611         man/custom-html.xsl \
4612         man/custom-man.xsl
4613
4614 # ------------------------------------------------------------------------------
4615 if HAVE_SYSV_COMPAT
4616 sysvinit_DATA = \
4617         docs/sysvinit/README
4618
4619 varlog_DATA = \
4620         docs/var-log/README
4621
4622 docs/sysvinit/README: docs/sysvinit/README.in
4623         $(SED_PROCESS)
4624
4625 docs/var-log/README: docs/var-log/README.in
4626         $(SED_PROCESS)
4627
4628 CLEANFILES += \
4629         docs/sysvinit/README \
4630         docs/var-log/README
4631 endif
4632
4633 EXTRA_DIST += \
4634         docs/sysvinit/README.in \
4635         docs/var-log/README.in
4636
4637 SOCKETS_TARGET_WANTS += \
4638         systemd-initctl.socket \
4639         systemd-shutdownd.socket
4640
4641 if HAVE_SYSV_COMPAT
4642 RUNLEVEL1_TARGET_WANTS += \
4643         systemd-update-utmp-runlevel.service
4644 RUNLEVEL2_TARGET_WANTS += \
4645 &n