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