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