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