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