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