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