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