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