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