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