chiark / gitweb /
consoled: move from /bin to /lib/systemd
[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 nodist_userunit_DATA += \
2481         units/user/systemd-bus-proxyd@.service
2482
2483 dist_userunit_DATA += \
2484         units/user/systemd-bus-proxyd.socket
2485 endif
2486
2487 EXTRA_DIST += \
2488         units/systemd-bus-proxyd@.service.in \
2489         units/user/systemd-bus-proxyd@.service.in
2490
2491 # ------------------------------------------------------------------------------
2492 systemd_tty_ask_password_agent_SOURCES = \
2493         src/tty-ask-password-agent/tty-ask-password-agent.c
2494
2495 systemd_tty_ask_password_agent_LDADD = \
2496         libsystemd-label.la \
2497         libsystemd-shared.la
2498
2499 # ------------------------------------------------------------------------------
2500 libsystemd_internal_la_SOURCES = \
2501         src/systemd/sd-bus.h \
2502         src/systemd/sd-bus-protocol.h \
2503         src/systemd/sd-bus-vtable.h \
2504         src/systemd/sd-utf8.h \
2505         src/systemd/sd-event.h \
2506         src/systemd/sd-rtnl.h \
2507         src/systemd/sd-resolve.h \
2508         src/systemd/sd-login.h \
2509         src/systemd/sd-id128.h \
2510         src/systemd/sd-daemon.h \
2511         src/systemd/sd-path.h \
2512         src/systemd/sd-network.h \
2513         src/libsystemd/sd-bus/sd-bus.c \
2514         src/libsystemd/sd-bus/bus-control.c \
2515         src/libsystemd/sd-bus/bus-control.h \
2516         src/libsystemd/sd-bus/bus-error.c \
2517         src/libsystemd/sd-bus/bus-error.h \
2518         src/libsystemd/sd-bus/bus-internal.c \
2519         src/libsystemd/sd-bus/bus-internal.h \
2520         src/libsystemd/sd-bus/bus-socket.c \
2521         src/libsystemd/sd-bus/bus-socket.h \
2522         src/libsystemd/sd-bus/bus-kernel.c \
2523         src/libsystemd/sd-bus/bus-kernel.h \
2524         src/libsystemd/sd-bus/bus-container.c \
2525         src/libsystemd/sd-bus/bus-container.h \
2526         src/libsystemd/sd-bus/bus-message.c \
2527         src/libsystemd/sd-bus/bus-message.h \
2528         src/libsystemd/sd-bus/bus-creds.c \
2529         src/libsystemd/sd-bus/bus-creds.h \
2530         src/libsystemd/sd-bus/bus-signature.c \
2531         src/libsystemd/sd-bus/bus-signature.h \
2532         src/libsystemd/sd-bus/bus-type.c \
2533         src/libsystemd/sd-bus/bus-type.h \
2534         src/libsystemd/sd-bus/bus-match.c \
2535         src/libsystemd/sd-bus/bus-match.h \
2536         src/libsystemd/sd-bus/bus-bloom.c \
2537         src/libsystemd/sd-bus/bus-bloom.h \
2538         src/libsystemd/sd-bus/bus-introspect.c \
2539         src/libsystemd/sd-bus/bus-introspect.h \
2540         src/libsystemd/sd-bus/bus-objects.c \
2541         src/libsystemd/sd-bus/bus-objects.h \
2542         src/libsystemd/sd-bus/bus-gvariant.c \
2543         src/libsystemd/sd-bus/bus-gvariant.h \
2544         src/libsystemd/sd-bus/bus-convenience.c \
2545         src/libsystemd/sd-bus/bus-track.c \
2546         src/libsystemd/sd-bus/bus-track.h \
2547         src/libsystemd/sd-bus/bus-util.c \
2548         src/libsystemd/sd-bus/bus-util.h \
2549         src/libsystemd/sd-bus/bus-slot.c \
2550         src/libsystemd/sd-bus/bus-slot.h \
2551         src/libsystemd/sd-bus/bus-protocol.h \
2552         src/libsystemd/sd-bus/kdbus.h \
2553         src/libsystemd/sd-utf8/sd-utf8.c \
2554         src/libsystemd/sd-event/sd-event.c \
2555         src/libsystemd/sd-event/event-util.h \
2556         src/libsystemd/sd-rtnl/sd-rtnl.c \
2557         src/libsystemd/sd-rtnl/rtnl-internal.h \
2558         src/libsystemd/sd-rtnl/rtnl-message.c \
2559         src/libsystemd/sd-rtnl/rtnl-types.h \
2560         src/libsystemd/sd-rtnl/rtnl-types.c \
2561         src/libsystemd/sd-rtnl/rtnl-util.h \
2562         src/libsystemd/sd-rtnl/rtnl-util.c \
2563         src/libsystemd/sd-rtnl/local-addresses.h \
2564         src/libsystemd/sd-rtnl/local-addresses.c \
2565         src/libsystemd/sd-id128/sd-id128.c \
2566         src/libsystemd/sd-daemon/sd-daemon.c \
2567         src/libsystemd/sd-login/sd-login.c \
2568         src/libsystemd/sd-path/sd-path.c \
2569         src/libsystemd/sd-network/sd-network.c \
2570         src/libsystemd/sd-network/network-util.h \
2571         src/libsystemd/sd-network/network-util.c
2572
2573 nodist_libsystemd_internal_la_SOURCES = \
2574         src/libsystemd/libsystemd.sym \
2575         src/libsystemd/sd-bus/bus-error-mapping.c
2576
2577 libsystemd_internal_la_CFLAGS = \
2578         $(AM_CFLAGS) \
2579         -pthread
2580
2581 libsystemd_internal_la_LIBADD = \
2582         $(RT_LIBS)
2583
2584 libsystemd_resolve_la_SOURCES = \
2585         src/libsystemd/sd-resolve/sd-resolve.c \
2586         src/libsystemd/sd-resolve/resolve-util.h
2587
2588 libsystemd_resolve_la_CFLAGS = \
2589         $(AM_CFLAGS) \
2590         -pthread
2591
2592 libsystemd_resolve_la_LIBADD = \
2593         -lresolv
2594
2595 noinst_LTLIBRARIES += \
2596         libsystemd-internal.la \
2597         libsystemd-resolve.la
2598
2599 libsystemd_dump_la_SOURCES = \
2600         src/libsystemd/sd-bus/bus-dump.c \
2601         src/libsystemd/sd-bus/bus-dump.h
2602
2603 libsystemd_dump_la_CFLAGS = \
2604         $(AM_CFLAGS) \
2605         $(CAP_CFLAGS)
2606
2607 noinst_LTLIBRARIES += \
2608         libsystemd-dump.la
2609
2610 EXTRA_DIST += \
2611         src/libsystemd/libsystemd.sym.m4 \
2612         src/libsystemd/libsystemd.pc.in \
2613         src/libsystemd/sd-bus/bus-error-mapping.gperf \
2614         src/libsystemd/sd-bus/DIFFERENCES \
2615         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2616
2617 CLEANFILES += \
2618         src/libsystemd/libsystemd.sym \
2619         src/libsystemd/sd-bus/bus-error-mapping.c
2620
2621 BUILT_SOURCES += \
2622         src/libsystemd/libsystemd.sym
2623
2624 libsystemd_la_SOURCES = \
2625         $(libsystemd_internal_la_SOURCES) \
2626         $(libsystemd_resolve_la_SOURCES) \
2627         $(libsystemd_journal_internal_la_SOURCES)
2628
2629 nodist_libsystemd_la_SOURCES = \
2630         $(nodist_libsystemd_internal_la_SOURCES)
2631
2632 libsystemd_la_CFLAGS = \
2633         $(libsystemd_internal_la_CFLAGS) \
2634         $(libsystemd_resolve_la_CFLAGS) \
2635         $(libsystemd_journal_internal_la_CFLAGS)
2636
2637 libsystemd_la_LDFLAGS = \
2638         $(AM_LDFLAGS) \
2639         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2640         -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2641
2642 libsystemd_la_LIBADD = \
2643         libsystemd-shared.la \
2644         $(libsystemd_internal_la_LIBADD) \
2645         $(libsystemd_journal_internal_la_LIBADD) \
2646         $(libsystemd_resolve_la_LIBADD)
2647
2648 libsystemd-install-hook:
2649         libname=libsystemd.so && $(move-to-rootlibdir)
2650
2651 libsystemd-uninstall-hook:
2652         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2653
2654 INSTALL_EXEC_HOOKS += libsystemd-install-hook
2655 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2656
2657 pkgconfiglib_DATA += \
2658         src/libsystemd/libsystemd.pc
2659
2660 pkginclude_HEADERS += \
2661         src/systemd/sd-login.h \
2662         src/systemd/sd-id128.h \
2663         src/systemd/sd-daemon.h
2664
2665 if ENABLE_KDBUS
2666 pkginclude_HEADERS += \
2667         src/systemd/sd-bus.h \
2668         src/systemd/sd-bus-protocol.h \
2669         src/systemd/sd-bus-vtable.h \
2670         src/systemd/sd-utf8.h \
2671         src/systemd/sd-event.h \
2672         src/systemd/sd-rtnl.h \
2673         src/systemd/sd-resolve.h \
2674         src/systemd/sd-path.h
2675 endif
2676
2677 lib_LTLIBRARIES += \
2678         libsystemd.la
2679
2680 tests += \
2681         test-bus-marshal \
2682         test-bus-signature \
2683         test-bus-chat \
2684         test-bus-cleanup \
2685         test-bus-server \
2686         test-bus-match \
2687         test-bus-kernel \
2688         test-bus-kernel-bloom \
2689         test-bus-kernel-benchmark \
2690         test-bus-zero-copy \
2691         test-bus-introspect \
2692         test-bus-objects \
2693         test-bus-error \
2694         test-bus-creds \
2695         test-bus-gvariant \
2696         test-event \
2697         test-rtnl \
2698         test-resolve
2699
2700 bin_PROGRAMS += \
2701         busctl
2702
2703 test_bus_marshal_SOURCES = \
2704         src/libsystemd/sd-bus/test-bus-marshal.c
2705
2706 test_bus_marshal_LDADD = \
2707         libsystemd-internal.la \
2708         libsystemd-shared.la \
2709         libsystemd-dump.la \
2710         libsystemd-capability.la \
2711         $(GLIB_LIBS) \
2712         $(DBUS_LIBS) \
2713         $(CAP_LIBS)
2714
2715 test_bus_marshal_CFLAGS = \
2716         $(AM_CFLAGS) \
2717         $(GLIB_CFLAGS) \
2718         $(DBUS_CFLAGS) \
2719         $(CAP_CFLAGS)
2720
2721 test_bus_signature_SOURCES = \
2722         src/libsystemd/sd-bus/test-bus-signature.c
2723
2724 test_bus_signature_LDADD = \
2725         libsystemd-shared.la \
2726         libsystemd-internal.la
2727
2728 test_bus_chat_SOURCES = \
2729         src/libsystemd/sd-bus/test-bus-chat.c
2730
2731 test_bus_chat_CFLAGS = \
2732         $(AM_CFLAGS) \
2733         -pthread
2734
2735 test_bus_chat_LDADD = \
2736         libsystemd-internal.la \
2737         libsystemd-shared.la
2738
2739 test_bus_cleanup_SOURCES = \
2740         src/libsystemd/sd-bus/test-bus-cleanup.c
2741
2742 test_bus_cleanup_CFLAGS = \
2743         $(AM_CFLAGS) \
2744         $(SECCOMP_CFLAGS)
2745
2746 test_bus_cleanup_LDADD = \
2747         libsystemd-internal.la \
2748         libsystemd-shared.la
2749
2750 test_bus_server_SOURCES = \
2751         src/libsystemd/sd-bus/test-bus-server.c
2752
2753 test_bus_server_CFLAGS = \
2754         $(AM_CFLAGS) \
2755         -pthread
2756
2757 test_bus_server_LDADD = \
2758         libsystemd-internal.la \
2759         libsystemd-shared.la
2760
2761 test_bus_objects_SOURCES = \
2762         src/libsystemd/sd-bus/test-bus-objects.c
2763
2764 test_bus_objects_CFLAGS = \
2765         $(AM_CFLAGS) \
2766         $(CAP_CFLAGS) \
2767         -pthread
2768
2769 test_bus_objects_LDADD = \
2770         libsystemd-internal.la \
2771         libsystemd-shared.la \
2772         libsystemd-dump.la \
2773         libsystemd-capability.la \
2774         $(CAP_LIBS)
2775
2776 test_bus_error_SOURCES = \
2777         src/libsystemd/sd-bus/test-bus-error.c
2778
2779 test_bus_error_LDADD = \
2780         libsystemd-internal.la \
2781         libsystemd-shared.la
2782
2783 test_bus_gvariant_SOURCES = \
2784         src/libsystemd/sd-bus/test-bus-gvariant.c
2785
2786 test_bus_gvariant_LDADD = \
2787         libsystemd-internal.la \
2788         libsystemd-shared.la \
2789         libsystemd-dump.la \
2790         libsystemd-capability.la \
2791         $(GLIB_LIBS) \
2792         $(CAP_LIBS)
2793
2794 test_bus_gvariant_CFLAGS = \
2795         $(AM_CFLAGS) \
2796         $(GLIB_CFLAGS)
2797         $(CAP_CFLAGS)
2798
2799 test_bus_creds_SOURCES = \
2800         src/libsystemd/sd-bus/test-bus-creds.c
2801
2802 test_bus_creds_LDADD = \
2803         libsystemd-internal.la \
2804         libsystemd-shared.la \
2805         libsystemd-dump.la \
2806         libsystemd-capability.la
2807
2808 test_bus_match_SOURCES = \
2809         src/libsystemd/sd-bus/test-bus-match.c
2810
2811 test_bus_match_LDADD = \
2812         libsystemd-internal.la \
2813         libsystemd-shared.la
2814
2815 test_bus_kernel_SOURCES = \
2816         src/libsystemd/sd-bus/test-bus-kernel.c
2817
2818 test_bus_kernel_LDADD = \
2819         libsystemd-internal.la \
2820         libsystemd-shared.la \
2821         libsystemd-dump.la \
2822         libsystemd-capability.la \
2823         $(CAP_LIBS)
2824
2825 test_bus_kernel_CFLAGS = \
2826         $(AM_CFLAGS) \
2827         $(CAP_CFLAGS)
2828
2829 test_bus_kernel_bloom_SOURCES = \
2830         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2831
2832 test_bus_kernel_bloom_LDADD = \
2833         libsystemd-internal.la \
2834         libsystemd-shared.la
2835
2836 test_bus_kernel_benchmark_SOURCES = \
2837         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2838
2839 test_bus_kernel_benchmark_LDADD = \
2840         libsystemd-internal.la \
2841         libsystemd-shared.la
2842
2843 test_bus_zero_copy_SOURCES = \
2844         src/libsystemd/sd-bus/test-bus-zero-copy.c
2845
2846 test_bus_zero_copy_LDADD = \
2847         libsystemd-internal.la \
2848         libsystemd-shared.la \
2849         libsystemd-dump.la \
2850         libsystemd-capability.la \
2851         $(CAP_LIBS)
2852
2853 test_bus_zero_copy_CFLAGS = \
2854         $(AM_CFLAGS) \
2855         $(CAP_CFLAGS)
2856
2857 test_bus_introspect_SOURCES = \
2858         src/libsystemd/sd-bus/test-bus-introspect.c
2859
2860 test_bus_introspect_LDADD = \
2861         libsystemd-internal.la \
2862         libsystemd-shared.la
2863
2864 test_event_SOURCES = \
2865         src/libsystemd/sd-event/test-event.c
2866
2867 test_event_LDADD = \
2868         libsystemd-internal.la \
2869         libsystemd-shared.la
2870
2871 test_rtnl_SOURCES = \
2872         src/libsystemd/sd-rtnl/test-rtnl.c
2873
2874 test_rtnl_LDADD = \
2875         libsystemd-internal.la \
2876         libsystemd-shared.la
2877
2878 test_resolve_SOURCES = \
2879         src/libsystemd/sd-resolve/test-resolve.c
2880
2881 test_resolve_LDADD = \
2882         libsystemd-resolve.la \
2883         libsystemd-internal.la \
2884         libsystemd-shared.la
2885
2886 test_resolve_CFLAGS = \
2887         $(AM_CFLAGS) \
2888         -pthread
2889
2890 busctl_SOURCES = \
2891         src/libsystemd/sd-bus/busctl.c
2892
2893 busctl_LDADD = \
2894         libsystemd-internal.la \
2895         libsystemd-shared.la \
2896         libsystemd-dump.la \
2897         libsystemd-capability.la \
2898         $(CAP_LIBS)
2899
2900 busctl_CFLAGS = \
2901         $(AM_CFLAGS) \
2902         $(CAP_CFLAGS)
2903
2904 # ------------------------------------------------------------------------------
2905 noinst_LTLIBRARIES += \
2906         libsystemd-network.la
2907
2908 libsystemd_network_la_CFLAGS = \
2909         $(AM_CFLAGS) \
2910         $(KMOD_CFLAGS)
2911
2912 libsystemd_network_la_SOURCES = \
2913         src/systemd/sd-dhcp-client.h \
2914         src/systemd/sd-dhcp-server.h \
2915         src/systemd/sd-dhcp-lease.h \
2916         src/systemd/sd-ipv4ll.h \
2917         src/systemd/sd-icmp6-nd.h \
2918         src/systemd/sd-dhcp6-client.h \
2919         src/systemd/sd-dhcp6-lease.h \
2920         src/libsystemd-network/sd-dhcp-client.c \
2921         src/libsystemd-network/sd-dhcp-server.c \
2922         src/libsystemd-network/dhcp-network.c \
2923         src/libsystemd-network/dhcp-option.c \
2924         src/libsystemd-network/dhcp-packet.c \
2925         src/libsystemd-network/dhcp-internal.h \
2926         src/libsystemd-network/dhcp-server-internal.h \
2927         src/libsystemd-network/dhcp-protocol.h \
2928         src/libsystemd-network/dhcp-lease-internal.h \
2929         src/libsystemd-network/sd-dhcp-lease.c \
2930         src/libsystemd-network/sd-ipv4ll.c \
2931         src/libsystemd-network/ipv4ll-network.c \
2932         src/libsystemd-network/ipv4ll-packet.c \
2933         src/libsystemd-network/ipv4ll-internal.h \
2934         src/libsystemd-network/network-internal.c \
2935         src/libsystemd-network/network-internal.h \
2936         src/libsystemd-network/sd-icmp6-nd.c \
2937         src/libsystemd-network/sd-dhcp6-client.c \
2938         src/libsystemd-network/dhcp6-internal.h \
2939         src/libsystemd-network/dhcp6-protocol.h \
2940         src/libsystemd-network/dhcp6-network.c \
2941         src/libsystemd-network/dhcp6-option.c \
2942         src/libsystemd-network/dhcp6-lease-internal.h \
2943         src/libsystemd-network/sd-dhcp6-lease.c
2944
2945 libsystemd_network_la_LIBADD = \
2946         libudev-internal.la \
2947         libsystemd-label.la \
2948         libsystemd-internal.la \
2949         libsystemd-shared.la \
2950         $(KMOD_LIBS)
2951
2952 test_dhcp_option_SOURCES = \
2953         src/libsystemd-network/dhcp-protocol.h \
2954         src/libsystemd-network/dhcp-internal.h \
2955         src/libsystemd-network/test-dhcp-option.c
2956
2957 test_dhcp_option_LDADD = \
2958         libsystemd-network.la \
2959         libsystemd-internal.la \
2960         libsystemd-shared.la
2961
2962 test_dhcp_client_SOURCES = \
2963         src/systemd/sd-dhcp-client.h \
2964         src/libsystemd-network/dhcp-protocol.h \
2965         src/libsystemd-network/dhcp-internal.h \
2966         src/libsystemd-network/test-dhcp-client.c
2967
2968 test_dhcp_client_LDADD = \
2969         libsystemd-network.la \
2970         libsystemd-label.la \
2971         libsystemd-internal.la \
2972         libsystemd-shared.la
2973
2974 test_dhcp_server_SOURCES = \
2975         src/libsystemd-network/test-dhcp-server.c
2976
2977 test_dhcp_server_LDADD = \
2978         libsystemd-network.la \
2979         libsystemd-internal.la \
2980         libsystemd-shared.la
2981
2982 test_ipv4ll_SOURCES = \
2983         src/systemd/sd-ipv4ll.h \
2984         src/libsystemd-network/ipv4ll-internal.h \
2985         src/libsystemd-network/test-ipv4ll.c
2986
2987 test_ipv4ll_LDADD = \
2988         libsystemd-network.la \
2989         libsystemd-label.la \
2990         libsystemd-internal.la \
2991         libsystemd-shared.la
2992
2993 test_icmp6_rs_SOURCES = \
2994         src/systemd/sd-dhcp6-client.h \
2995         src/systemd/sd-icmp6-nd.h \
2996         src/libsystemd-network/dhcp6-internal.h \
2997         src/libsystemd-network/test-icmp6-rs.c
2998
2999 test_icmp6_rs_LDADD = \
3000         libsystemd-network.la \
3001         libsystemd-internal.la \
3002         libsystemd-shared.la
3003
3004 test_dhcp6_client_SOURCES = \
3005         src/systemd/sd-dhcp6-client.h \
3006         src/libsystemd-network/dhcp6-internal.h \
3007         src/libsystemd-network/test-dhcp6-client.c
3008
3009 test_dhcp6_client_LDADD = \
3010         libsystemd-network.la \
3011         libsystemd-internal.la \
3012         libsystemd-shared.la
3013
3014 tests += \
3015         test-dhcp-option \
3016         test-dhcp-client \
3017         test-dhcp-server \
3018         test-ipv4ll \
3019         test-icmp6-rs \
3020         test-dhcp6-client
3021
3022 # ------------------------------------------------------------------------------
3023 if ENABLE_TERMINAL
3024 noinst_LTLIBRARIES += \
3025         libsystemd-terminal.la
3026
3027 rootlibexec_PROGRAMS += \
3028         systemd-consoled
3029
3030 noinst_PROGRAMS += \
3031         systemd-evcat \
3032         systemd-modeset \
3033         systemd-subterm
3034
3035 dist_pkgdata_DATA += \
3036         src/libsystemd-terminal/unifont-glyph-array.bin
3037
3038 tests += \
3039         test-term-page \
3040         test-term-parser \
3041         test-unifont
3042 endif
3043
3044 libsystemd_terminal_la_CFLAGS = \
3045         $(AM_CFLAGS) \
3046         $(TERMINAL_CFLAGS)
3047
3048 libsystemd_terminal_la_SOURCES = \
3049         src/libsystemd-terminal/grdev.h \
3050         src/libsystemd-terminal/grdev-internal.h \
3051         src/libsystemd-terminal/grdev.c \
3052         src/libsystemd-terminal/grdev-drm.c \
3053         src/libsystemd-terminal/idev.h \
3054         src/libsystemd-terminal/idev-internal.h \
3055         src/libsystemd-terminal/idev.c \
3056         src/libsystemd-terminal/idev-evdev.c \
3057         src/libsystemd-terminal/idev-keyboard.c \
3058         src/libsystemd-terminal/sysview.h \
3059         src/libsystemd-terminal/sysview-internal.h \
3060         src/libsystemd-terminal/sysview.c \
3061         src/libsystemd-terminal/term.h \
3062         src/libsystemd-terminal/term-internal.h \
3063         src/libsystemd-terminal/term-charset.c \
3064         src/libsystemd-terminal/term-page.c \
3065         src/libsystemd-terminal/term-parser.c \
3066         src/libsystemd-terminal/term-screen.c \
3067         src/libsystemd-terminal/term-wcwidth.c \
3068         src/libsystemd-terminal/unifont.h \
3069         src/libsystemd-terminal/unifont-def.h \
3070         src/libsystemd-terminal/unifont.c
3071
3072 libsystemd_terminal_la_LIBADD = \
3073         libudev-internal.la \
3074         libsystemd-internal.la \
3075         libsystemd-shared.la \
3076         $(TERMINAL_LIBS)
3077
3078 systemd_consoled_CFLAGS = \
3079         $(AM_CFLAGS) \
3080         $(TERMINAL_CFLAGS)
3081
3082 systemd_consoled_SOURCES = \
3083         src/console/consoled.h \
3084         src/console/consoled.c \
3085         src/console/consoled-display.c \
3086         src/console/consoled-manager.c \
3087         src/console/consoled-session.c \
3088         src/console/consoled-terminal.c \
3089         src/console/consoled-workspace.c
3090
3091 systemd_consoled_LDADD = \
3092         libsystemd-terminal.la \
3093         libsystemd-internal.la \
3094         libsystemd-shared.la \
3095         $(TERMINAL_LIBS)
3096
3097 systemd_evcat_CFLAGS = \
3098         $(AM_CFLAGS) \
3099         $(TERMINAL_CFLAGS)
3100
3101 systemd_evcat_SOURCES = \
3102         src/libsystemd-terminal/evcat.c
3103
3104 systemd_evcat_LDADD = \
3105         libsystemd-terminal.la \
3106         libsystemd-internal.la \
3107         libsystemd-shared.la \
3108         $(TERMINAL_LIBS)
3109
3110 systemd_modeset_CFLAGS = \
3111         $(AM_CFLAGS) \
3112         $(TERMINAL_CFLAGS)
3113
3114 systemd_modeset_SOURCES = \
3115         src/libsystemd-terminal/modeset.c
3116
3117 systemd_modeset_LDADD = \
3118         libsystemd-terminal.la \
3119         libsystemd-internal.la \
3120         libsystemd-shared.la \
3121         $(TERMINAL_LIBS)
3122
3123 systemd_subterm_SOURCES = \
3124         src/libsystemd-terminal/subterm.c
3125
3126 systemd_subterm_LDADD = \
3127         libsystemd-terminal.la \
3128         libsystemd-internal.la \
3129         libsystemd-shared.la
3130
3131 test_term_page_SOURCES = \
3132         src/libsystemd-terminal/test-term-page.c
3133
3134 test_term_page_LDADD = \
3135         libsystemd-terminal.la \
3136         libsystemd-internal.la \
3137         libsystemd-shared.la
3138
3139 test_term_parser_SOURCES = \
3140         src/libsystemd-terminal/test-term-parser.c
3141
3142 test_term_parser_LDADD = \
3143         libsystemd-terminal.la \
3144         libsystemd-internal.la \
3145         libsystemd-shared.la
3146
3147 test_unifont_SOURCES = \
3148         src/libsystemd-terminal/test-unifont.c
3149
3150 test_unifont_LDADD = \
3151         libsystemd-terminal.la \
3152         libsystemd-internal.la \
3153         libsystemd-shared.la
3154
3155 .PHONY: update-unifont
3156 update-unifont: tools/compile-unifont.py
3157         $(AM_V_GEN)$(PYTHON) $< \
3158                 <$(top_srcdir)/src/libsystemd-terminal/unifont.hex \
3159                 >$(top_srcdir)/src/libsystemd-terminal/unifont-glyph-array.bin
3160         @echo "unifont-glyph-array.bin has been regenerated"
3161
3162 # ------------------------------------------------------------------------------
3163 if ENABLE_GTK_DOC
3164 SUBDIRS += \
3165         docs/libudev
3166
3167 noinst_DATA += \
3168         docs/html/libudev \
3169         docs/html/gudev
3170 endif
3171
3172 include_HEADERS += \
3173         src/libudev/libudev.h
3174
3175 lib_LTLIBRARIES += \
3176         libudev.la
3177
3178 libudev_la_SOURCES =\
3179         src/libudev/libudev.sym \
3180         src/libudev/libudev-private.h \
3181         src/libudev/libudev.c \
3182         src/libudev/libudev-list.c \
3183         src/libudev/libudev-util.c \
3184         src/libudev/libudev-device.c \
3185         src/libudev/libudev-enumerate.c \
3186         src/libudev/libudev-monitor.c \
3187         src/libudev/libudev-queue.c \
3188         src/libudev/libudev-hwdb-def.h \
3189         src/libudev/libudev-hwdb.c
3190
3191 libudev_la_CFLAGS = \
3192         $(AM_CFLAGS) \
3193         -fvisibility=hidden
3194
3195 libudev_la_LDFLAGS = \
3196         $(AM_LDFLAGS) \
3197         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3198         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3199
3200 libudev_la_LIBADD = \
3201         libsystemd-internal.la \
3202         libsystemd-shared.la
3203
3204 pkgconfiglib_DATA += \
3205         src/libudev/libudev.pc
3206
3207 EXTRA_DIST += \
3208         src/libudev/libudev.pc.in
3209
3210 CLEANFILES += \
3211         src/libudev/libudev.pc \
3212         docs/html/libudev \
3213         docs/html/gudev
3214
3215 docs/html/libudev:
3216         $(AM_V_at)$(MKDIR_P) $(dir $@)
3217         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
3218
3219 docs/html/gudev:
3220         $(AM_V_at)$(MKDIR_P) $(dir $@)
3221         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
3222
3223 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3224 libudev-install-hook:
3225         libname=libudev.so && $(move-to-rootlibdir)
3226
3227 libudev-uninstall-hook:
3228         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
3229
3230 INSTALL_EXEC_HOOKS += libudev-install-hook
3231 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
3232
3233 # ------------------------------------------------------------------------------
3234 noinst_LTLIBRARIES += \
3235         libudev-internal.la
3236
3237 libudev_internal_la_SOURCES =\
3238         $(libudev_la_SOURCES) \
3239         src/libudev/libudev-device-private.c
3240
3241 libudev_internal_la_CFLAGS = \
3242         $(AM_CFLAGS) \
3243         -fvisibility=default
3244
3245 # ------------------------------------------------------------------------------
3246 INSTALL_DIRS += \
3247         $(sysconfdir)/udev/rules.d \
3248         $(sysconfdir)/udev/hwdb.d
3249
3250 dist_network_DATA = \
3251         network/99-default.link \
3252         network/80-container-host0.network \
3253         network/80-container-ve.network
3254
3255 dist_udevrules_DATA += \
3256         rules/42-usb-hid-pm.rules \
3257         rules/50-udev-default.rules \
3258         rules/60-drm.rules \
3259         rules/60-keyboard.rules \
3260         rules/60-persistent-storage-tape.rules \
3261         rules/60-persistent-serial.rules \
3262         rules/60-persistent-input.rules \
3263         rules/60-persistent-alsa.rules \
3264         rules/60-persistent-storage.rules \
3265         rules/64-btrfs.rules \
3266         rules/75-net-description.rules \
3267         rules/75-tty-description.rules \
3268         rules/78-sound-card.rules \
3269         rules/80-net-setup-link.rules \
3270         rules/95-udev-late.rules
3271
3272 nodist_udevrules_DATA += \
3273         rules/99-systemd.rules
3274
3275 dist_udevhwdb_DATA = \
3276         hwdb/20-pci-vendor-model.hwdb \
3277         hwdb/20-pci-classes.hwdb \
3278         hwdb/20-usb-vendor-model.hwdb \
3279         hwdb/20-usb-classes.hwdb \
3280         hwdb/20-sdio-vendor-model.hwdb \
3281         hwdb/20-sdio-classes.hwdb \
3282         hwdb/20-bluetooth-vendor-product.hwdb \
3283         hwdb/20-acpi-vendor.hwdb \
3284         hwdb/20-OUI.hwdb \
3285         hwdb/20-net-ifname.hwdb \
3286         hwdb/60-keyboard.hwdb
3287
3288 udevconfdir = $(sysconfdir)/udev
3289 dist_udevconf_DATA = \
3290         src/udev/udev.conf
3291
3292 sharepkgconfigdir = $(datadir)/pkgconfig
3293 sharepkgconfig_DATA = \
3294         src/udev/udev.pc
3295
3296 EXTRA_DIST += \
3297         rules/99-systemd.rules.in \
3298         src/udev/udev.pc.in
3299
3300 CLEANFILES += \
3301         rules/99-systemd.rules \
3302         src/udev/udev.pc
3303
3304 EXTRA_DIST += \
3305         units/systemd-udevd.service.in \
3306         units/systemd-udev-trigger.service.in \
3307         units/systemd-udev-settle.service.in \
3308         units/systemd-udev-hwdb-update.service.in
3309
3310 CLEANFILES += \
3311         units/systemd-udevd.service \
3312         units/systemd-udev-trigger.service \
3313         units/systemd-udev-settle.service \
3314         units/systemd-udev-hwdb-update.service
3315
3316 SOCKETS_TARGET_WANTS += \
3317         systemd-udevd-control.socket \
3318         systemd-udevd-kernel.socket
3319
3320 SYSINIT_TARGET_WANTS += \
3321         systemd-udevd.service \
3322         systemd-udev-trigger.service \
3323         systemd-udev-hwdb-update.service
3324
3325 rootbin_PROGRAMS += \
3326         udevadm
3327
3328 rootlibexec_PROGRAMS += \
3329         systemd-udevd
3330
3331 noinst_LTLIBRARIES += \
3332         libudev-core.la
3333
3334 src/udev/keyboard-keys.txt:
3335         $(AM_V_at)$(MKDIR_P) $(dir $@)
3336         $(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/' > $@
3337
3338 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
3339         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3340
3341 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3342         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3343
3344 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
3345         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
3346
3347 libudev_core_la_SOURCES = \
3348         src/udev/udev.h \
3349         src/udev/udev-event.c \
3350         src/udev/udev-watch.c \
3351         src/udev/udev-node.c \
3352         src/udev/udev-rules.c \
3353         src/udev/udev-ctrl.c \
3354         src/udev/udev-builtin.c \
3355         src/udev/udev-builtin-btrfs.c \
3356         src/udev/udev-builtin-hwdb.c \
3357         src/udev/udev-builtin-input_id.c \
3358         src/udev/udev-builtin-keyboard.c \
3359         src/udev/udev-builtin-net_id.c \
3360         src/udev/udev-builtin-net_setup_link.c \
3361         src/udev/udev-builtin-path_id.c \
3362         src/udev/udev-builtin-usb_id.c \
3363         src/udev/net/link-config.h \
3364         src/udev/net/link-config.c \
3365         src/udev/net/ethtool-util.h \
3366         src/udev/net/ethtool-util.c
3367
3368 nodist_libudev_core_la_SOURCES = \
3369         src/udev/keyboard-keys-from-name.h \
3370         src/udev/keyboard-keys-to-name.h \
3371         src/udev/net/link-config-gperf.c
3372
3373 BUILT_SOURCES += \
3374         $(nodist_libudev_core_la_SOURCES)
3375
3376 CLEANFILES += \
3377         src/udev/keyboard-keys-from-name.gperf \
3378         src/udev/keyboard-keys.txt \
3379         src/udev/net/link-config-gperf.c
3380
3381 EXTRA_DIST += \
3382         src/udev/net/link-config-gperf.gperf
3383
3384 libudev_core_la_CFLAGS = \
3385         $(AM_CFLAGS) \
3386         $(BLKID_CFLAGS) \
3387         $(KMOD_CFLAGS)
3388
3389 libudev_core_la_LIBADD = \
3390         libudev-internal.la \
3391         libsystemd-label.la \
3392         libsystemd-internal.la \
3393         libsystemd-network.la \
3394         libsystemd-shared.la \
3395         $(BLKID_LIBS) \
3396         $(KMOD_LIBS)
3397
3398 if HAVE_KMOD
3399 libudev_core_la_SOURCES += \
3400         src/udev/udev-builtin-kmod.c
3401
3402 dist_udevrules_DATA += \
3403         rules/80-drivers.rules
3404 endif
3405
3406 if HAVE_BLKID
3407 libudev_core_la_SOURCES += \
3408         src/udev/udev-builtin-blkid.c
3409 endif
3410
3411 if HAVE_ACL
3412 libudev_core_la_SOURCES += \
3413         src/udev/udev-builtin-uaccess.c \
3414         src/login/logind-acl.c \
3415         src/libsystemd/sd-login/sd-login.c \
3416         src/systemd/sd-login.h
3417
3418 libudev_core_la_LIBADD += \
3419         libsystemd-acl.la
3420 endif
3421
3422 systemd_udevd_SOURCES = \
3423         src/udev/udevd.c
3424
3425 systemd_udevd_LDADD = \
3426         libudev-core.la
3427
3428 udevadm_SOURCES = \
3429         src/udev/udevadm.c \
3430         src/udev/udevadm-info.c \
3431         src/udev/udevadm-control.c \
3432         src/udev/udevadm-monitor.c \
3433         src/udev/udevadm-hwdb.c \
3434         src/udev/udevadm-settle.c \
3435         src/udev/udevadm-trigger.c \
3436         src/udev/udevadm-test.c \
3437         src/udev/udevadm-test-builtin.c
3438
3439 udevadm_LDADD = \
3440         libudev-core.la
3441
3442 # Update hwdb on installation. Do not bother if installing
3443 # in DESTDIR, since this is likely for packaging purposes.
3444 hwdb-update-hook:
3445         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
3446
3447 INSTALL_DATA_HOOKS += \
3448         hwdb-update-hook
3449
3450 hwdb-remove-hook:
3451         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3452
3453 # ------------------------------------------------------------------------------
3454 TESTS += \
3455         test/udev-test.pl \
3456         test/rules-test.sh
3457
3458 manual_tests += \
3459         test-libudev \
3460         test-udev
3461
3462 test_libudev_SOURCES = \
3463         src/test/test-libudev.c
3464
3465 test_libudev_LDADD = \
3466         libsystemd-label.la \
3467         libudev-internal.la \
3468         libsystemd-shared.la
3469
3470 test_udev_SOURCES = \
3471         src/test/test-udev.c
3472
3473 test_udev_LDADD = \
3474         libudev-core.la \
3475         $(BLKID_LIBS) \
3476         $(KMOD_LIBS) \
3477         $(SELINUX_LIBS)
3478
3479 if HAVE_ACL
3480 test_udev_LDADD += \
3481         libsystemd-acl.la
3482 endif
3483
3484 check_DATA += \
3485         test/sys
3486
3487 # packed sysfs test tree
3488 test/sys:
3489         $(AM_V_at)$(MKDIR_P) $(dir $@)
3490         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
3491
3492 test-sys-distclean:
3493         -rm -rf test/sys
3494 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3495
3496 EXTRA_DIST += \
3497         test/sys.tar.xz \
3498         test/udev-test.pl \
3499         test/rules-test.sh \
3500         test/rule-syntax-check.py
3501
3502 # ------------------------------------------------------------------------------
3503 ata_id_SOURCES = \
3504         src/udev/ata_id/ata_id.c
3505
3506 ata_id_LDADD = \
3507         libudev-internal.la \
3508         libsystemd-shared.la
3509
3510 udevlibexec_PROGRAMS += \
3511         ata_id
3512
3513 # ------------------------------------------------------------------------------
3514 cdrom_id_SOURCES = \
3515         src/udev/cdrom_id/cdrom_id.c
3516
3517 cdrom_id_LDADD = \
3518         libudev-internal.la \
3519         libsystemd-shared.la
3520
3521 udevlibexec_PROGRAMS += \
3522         cdrom_id
3523
3524 dist_udevrules_DATA += \
3525         rules/60-cdrom_id.rules
3526
3527 # ------------------------------------------------------------------------------
3528 collect_SOURCES = \
3529         src/udev/collect/collect.c
3530
3531 collect_LDADD = \
3532         libudev-internal.la \
3533         libsystemd-shared.la
3534
3535 udevlibexec_PROGRAMS += \
3536         collect
3537
3538 # ------------------------------------------------------------------------------
3539 scsi_id_SOURCES =\
3540         src/udev/scsi_id/scsi_id.c \
3541         src/udev/scsi_id/scsi_serial.c \
3542         src/udev/scsi_id/scsi.h \
3543         src/udev/scsi_id/scsi_id.h
3544
3545 scsi_id_LDADD = \
3546         libudev-internal.la \
3547         libsystemd-shared.la
3548
3549 udevlibexec_PROGRAMS += \
3550         scsi_id
3551
3552 EXTRA_DIST += \
3553         src/udev/scsi_id/README
3554
3555 # ------------------------------------------------------------------------------
3556 v4l_id_SOURCES = \
3557         src/udev/v4l_id/v4l_id.c
3558
3559 v4l_id_LDADD = \
3560         libudev-internal.la
3561
3562 udevlibexec_PROGRAMS += \
3563         v4l_id
3564
3565 dist_udevrules_DATA += \
3566         rules/60-persistent-v4l.rules
3567
3568 # ------------------------------------------------------------------------------
3569 accelerometer_SOURCES = \
3570         src/udev/accelerometer/accelerometer.c
3571
3572 accelerometer_LDADD = \
3573         libudev-internal.la -lm \
3574         libsystemd-shared.la
3575
3576 udevlibexec_PROGRAMS += \
3577         accelerometer
3578
3579 dist_udevrules_DATA += \
3580         rules/61-accelerometer.rules
3581
3582 # ------------------------------------------------------------------------------
3583 if ENABLE_GUDEV
3584 if ENABLE_GTK_DOC
3585 SUBDIRS += \
3586         docs/gudev
3587 endif
3588
3589 libgudev_includedir = \
3590         $(includedir)/gudev-1.0/gudev
3591
3592 libgudev_include_HEADERS = \
3593         src/gudev/gudev.h \
3594         src/gudev/gudevenums.h \
3595         src/gudev/gudevenumtypes.h \
3596         src/gudev/gudevtypes.h \
3597         src/gudev/gudevclient.h \
3598         src/gudev/gudevdevice.h \
3599         src/gudev/gudevenumerator.h
3600
3601 lib_LTLIBRARIES += libgudev-1.0.la
3602
3603 pkgconfiglib_DATA += \
3604         src/gudev/gudev-1.0.pc
3605
3606 CLEANFILES += \
3607         src/gudev/gudev-1.0.pc
3608
3609 libgudev_1_0_la_SOURCES = \
3610         src/gudev/libgudev-1.0.sym \
3611         src/gudev/gudevenums.h \
3612         src/gudev/gudevenumtypes.h \
3613         src/gudev/gudevenumtypes.h\
3614         src/gudev/gudevtypes.h \
3615         src/gudev/gudevclient.h \
3616         src/gudev/gudevclient.c \
3617         src/gudev/gudevdevice.h \
3618         src/gudev/gudevdevice.c \
3619         src/gudev/gudevenumerator.h \
3620         src/gudev/gudevenumerator.c \
3621         src/gudev/gudevprivate.h
3622
3623 nodist_libgudev_1_0_la_SOURCES = \
3624         src/gudev/gudevmarshal.h \
3625         src/gudev/gudevmarshal.c \
3626         src/gudev/gudevenumtypes.h \
3627         src/gudev/gudevenumtypes.c
3628
3629 BUILT_SOURCES += \
3630         $(nodist_libgudev_1_0_la_SOURCES)
3631
3632 libgudev_1_0_la_CPPFLAGS = \
3633         $(AM_CPPFLAGS) \
3634         -I$(top_builddir)/src\
3635         -I$(top_srcdir)/src\
3636         -I$(top_builddir)/src/gudev \
3637         -I$(top_srcdir)/src/gudev \
3638         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
3639         -D_GUDEV_COMPILATION \
3640         -DG_LOG_DOMAIN=\"GUdev\"
3641
3642 libgudev_1_0_la_CFLAGS = \
3643         $(AM_CFLAGS) \
3644         -fvisibility=default \
3645         $(GLIB_CFLAGS)
3646
3647 libgudev_1_0_la_LIBADD = \
3648         libudev.la \
3649         $(GLIB_LIBS)
3650
3651 libgudev_1_0_la_LDFLAGS = \
3652         $(AM_LDFLAGS) \
3653         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
3654         -export-dynamic \
3655         -no-undefined \
3656         -Wl,--version-script=$(top_srcdir)/src/gudev/libgudev-1.0.sym
3657
3658 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
3659         $(AM_V_at)$(MKDIR_P) $(dir $@)
3660         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
3661
3662 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
3663         $(AM_V_at)$(MKDIR_P) $(dir $@)
3664         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
3665         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
3666
3667 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
3668         $(AM_V_at)$(MKDIR_P) $(dir $@)
3669         $(AM_V_GEN)glib-mkenums --template $^ > $@
3670
3671 if HAVE_INTROSPECTION
3672 -include $(INTROSPECTION_MAKEFILE)
3673
3674 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
3675
3676 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
3677
3678 src_gudev_GUdev_1_0_gir_CFLAGS = \
3679         $(AM_CFLAGS) \
3680         $(INCLUDES) \
3681         -D_GUDEV_COMPILATION \
3682         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
3683         -I$(top_srcdir)/src \
3684         -I$(top_builddir)/src \
3685         -I$(top_srcdir)/src/gudev \
3686         -I$(top_builddir)/src/gudev
3687
3688 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
3689
3690 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
3691         --pkg-export=gudev-1.0 \
3692         --warn-all
3693
3694 src_gudev_GUdev_1_0_gir_FILES = \
3695         src/gudev/gudev.h \
3696         src/gudev/gudevtypes.h \
3697         src/gudev/gudevenums.h \
3698         src/gudev/gudevenumtypes.h \
3699         src/gudev/gudevclient.h \
3700         src/gudev/gudevdevice.h \
3701         src/gudev/gudevenumerator.h \
3702         src/gudev/gudevclient.c \
3703         src/gudev/gudevdevice.c \
3704         src/gudev/gudevenumerator.c
3705
3706 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
3707 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
3708
3709 girdir = $(datadir)/gir-1.0
3710 gir_DATA = \
3711         src/gudev/GUdev-1.0.gir
3712
3713 typelibsdir = $(libdir)/girepository-1.0
3714 typelibs_DATA = \
3715         src/gudev/GUdev-1.0.typelib
3716
3717 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
3718 endif # HAVE_INTROSPECTION
3719 endif
3720
3721 EXTRA_DIST += \
3722         src/gudev/gudev-1.0.pc.in \
3723         src/gudev/gudevmarshal.list \
3724         src/gudev/gudevenumtypes.h.template \
3725         src/gudev/gudevenumtypes.c.template \
3726         src/gudev/gjs-example.js \
3727         src/gudev/seed-example-enum.js \
3728         src/gudev/seed-example.js
3729
3730 # ------------------------------------------------------------------------------
3731 mtd_probe_SOURCES =  \
3732         src/udev/mtd_probe/mtd_probe.c \
3733         src/udev/mtd_probe/mtd_probe.h \
3734         src/udev/mtd_probe/probe_smartmedia.c
3735
3736 dist_udevrules_DATA += \
3737         rules/75-probe_mtd.rules
3738
3739 udevlibexec_PROGRAMS += \
3740         mtd_probe
3741
3742 # ------------------------------------------------------------------------------
3743 test_id128_SOURCES = \
3744         src/test/test-id128.c
3745
3746 test_id128_LDADD = \
3747         libsystemd-internal.la \
3748         libsystemd-shared.la
3749
3750 tests += \
3751         test-id128
3752
3753 # ------------------------------------------------------------------------------
3754
3755 rootlibexec_PROGRAMS += \
3756         systemd-activate
3757
3758 systemd_activate_SOURCES = \
3759         src/activate/activate.c
3760
3761 systemd_activate_LDADD = \
3762         libsystemd-label.la \
3763         libsystemd-internal.la \
3764         libsystemd-shared.la
3765
3766 # ------------------------------------------------------------------------------
3767 systemd_journald_SOURCES = \
3768         src/journal/journald.c \
3769         src/journal/journald-server.h
3770
3771 systemd_journald_LDADD = \
3772         libsystemd-journal-core.la \
3773         libsystemd-internal.la \
3774         libsystemd-shared.la
3775
3776 systemd_cat_SOURCES = \
3777         src/journal/cat.c
3778
3779 systemd_cat_LDADD = \
3780         libsystemd-journal-core.la
3781
3782 if HAVE_MICROHTTPD
3783 rootlibexec_PROGRAMS += \
3784         systemd-journal-remote
3785
3786 systemd_journal_remote_SOURCES = \
3787         src/journal-remote/journal-remote-parse.h \
3788         src/journal-remote/journal-remote-parse.c \
3789         src/journal-remote/journal-remote-write.h \
3790         src/journal-remote/journal-remote-write.c \
3791         src/journal-remote/journal-remote.h \
3792         src/journal-remote/journal-remote.c
3793
3794 systemd_journal_remote_LDADD = \
3795         libsystemd-internal.la \
3796         libsystemd-journal-core.la
3797
3798 systemd_journal_remote_SOURCES += \
3799         src/journal-remote/microhttpd-util.h \
3800         src/journal-remote/microhttpd-util.c
3801
3802 systemd_journal_remote_CFLAGS = \
3803         $(AM_CFLAGS) \
3804         $(MICROHTTPD_CFLAGS)
3805
3806 systemd_journal_remote_LDADD += \
3807         $(MICROHTTPD_LIBS)
3808
3809 if HAVE_GNUTLS
3810 systemd_journal_remote_LDADD += \
3811         $(GNUTLS_LIBS)
3812
3813 # systemd-journal-remote make sense mostly with full crypto stack
3814 dist_systemunit_DATA += \
3815         units/systemd-journal-remote.socket
3816
3817 nodist_systemunit_DATA += \
3818         units/systemd-journal-remote.service
3819
3820 EXTRA_DIST += \
3821         units/systemd-journal-remote.service.in
3822
3823 journal-remote-install-hook: journal-install-hook
3824         -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
3825         -chown 0:0 $(DESTDIR)/var/log/journal/remote
3826         -chmod 755 $(DESTDIR)/var/log/journal/remote
3827
3828 INSTALL_EXEC_HOOKS += journal-remote-install-hook
3829
3830 endif
3831
3832 nodist_pkgsysconf_DATA += \
3833         src/journal-remote/journal-remote.conf
3834
3835 EXTRA_DIST += \
3836         src/journal-remote/journal-remote.conf.in
3837
3838 CLEANFILES += \
3839         src/journal-remote/journal-remote.conf
3840 endif
3841
3842 if HAVE_LIBCURL
3843 rootlibexec_PROGRAMS += \
3844         systemd-journal-upload
3845
3846 systemd_journal_upload_SOURCES = \
3847         src/journal-remote/journal-upload.h \
3848         src/journal-remote/journal-upload.c \
3849         src/journal-remote/journal-upload-journal.c
3850
3851 systemd_journal_upload_CFLAGS = \
3852         $(AM_CFLAGS) \
3853         $(LIBCURL_CFLAGS)
3854
3855 systemd_journal_upload_LDADD = \
3856         libsystemd-core.la \
3857         libsystemd-internal.la \
3858         libsystemd-journal-internal.la \
3859         libsystemd-shared.la \
3860         $(LIBCURL_LIBS)
3861
3862 nodist_systemunit_DATA += \
3863         units/systemd-journal-upload.service
3864
3865 EXTRA_DIST += \
3866         units/systemd-journal-upload.service.in
3867
3868 nodist_pkgsysconf_DATA += \
3869         src/journal-remote/journal-upload.conf
3870
3871 EXTRA_DIST += \
3872         src/journal-remote/journal-upload.conf.in
3873
3874 CLEANFILES += \
3875         src/journal-remote/journal-upload.conf
3876 endif
3877
3878 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3879 journalctl_CFLAGS = \
3880         $(AM_CFLAGS)
3881
3882 journalctl_SOURCES = \
3883         src/journal/journalctl.c
3884
3885 journalctl_LDADD = \
3886         libsystemd-journal-internal.la \
3887         libsystemd-internal.la \
3888         libsystemd-logs.la \
3889         libsystemd-shared.la
3890
3891 if HAVE_ACL
3892 journalctl_LDADD += \
3893         libsystemd-acl.la
3894 endif
3895
3896 if HAVE_QRENCODE
3897 journalctl_SOURCES += \
3898         src/journal/journal-qrcode.c \
3899         src/journal/journal-qrcode.h
3900
3901 journalctl_CFLAGS += \
3902         $(QRENCODE_CFLAGS)
3903
3904 journalctl_LDADD += \
3905         $(QRENCODE_LIBS)
3906 endif
3907
3908 test_journal_SOURCES = \
3909         src/journal/test-journal.c
3910
3911 test_journal_LDADD = \
3912         libsystemd-journal-core.la
3913
3914 test_journal_send_SOURCES = \
3915         src/journal/test-journal-send.c
3916
3917 test_journal_send_LDADD = \
3918         libsystemd-journal-core.la
3919
3920 test_journal_syslog_SOURCES = \
3921         src/journal/test-journal-syslog.c
3922
3923 test_journal_syslog_LDADD = \
3924         libsystemd-journal-core.la
3925
3926 test_journal_match_SOURCES = \
3927         src/journal/test-journal-match.c
3928
3929 test_journal_match_LDADD = \
3930         libsystemd-journal-core.la
3931
3932 test_journal_enum_SOURCES = \
3933         src/journal/test-journal-enum.c
3934
3935 test_journal_enum_LDADD = \
3936         libsystemd-journal-core.la
3937
3938 test_journal_stream_SOURCES = \
3939         src/journal/test-journal-stream.c
3940
3941 test_journal_stream_LDADD = \
3942         libsystemd-journal-core.la
3943
3944 test_journal_flush_SOURCES = \
3945         src/journal/test-journal-flush.c
3946
3947 test_journal_flush_LDADD = \
3948         libsystemd-journal-core.la
3949
3950 test_journal_init_SOURCES = \
3951         src/journal/test-journal-init.c
3952
3953 test_journal_init_LDADD = \
3954         libsystemd-journal-core.la
3955
3956 test_journal_verify_SOURCES = \
3957         src/journal/test-journal-verify.c
3958
3959 test_journal_verify_LDADD = \
3960         libsystemd-journal-core.la
3961
3962 test_journal_interleaving_SOURCES = \
3963         src/journal/test-journal-interleaving.c
3964
3965 test_journal_interleaving_LDADD = \
3966         libsystemd-journal-core.la
3967
3968 test_mmap_cache_SOURCES = \
3969         src/journal/test-mmap-cache.c
3970
3971 test_mmap_cache_LDADD = \
3972         libsystemd-journal-core.la
3973
3974 test_catalog_SOURCES = \
3975         src/journal/test-catalog.c
3976
3977 test_catalog_CPPFLAGS = \
3978         $(AM_CPPFLAGS) \
3979         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
3980
3981 test_catalog_LDADD = \
3982         libsystemd-journal-core.la
3983
3984 test_compress_SOURCES = \
3985         src/journal/test-compress.c
3986
3987 test_compress_LDADD = \
3988         libsystemd-journal-internal.la \
3989         libsystemd-shared.la
3990
3991 test_compress_benchmark_SOURCES = \
3992         src/journal/test-compress-benchmark.c
3993
3994 test_compress_benchmark_LDADD = \
3995         libsystemd-journal-internal.la \
3996         libsystemd-shared.la
3997
3998 libsystemd_journal_core_la_SOURCES = \
3999         src/journal/journald-kmsg.c \
4000         src/journal/journald-kmsg.h \
4001         src/journal/journald-syslog.c \
4002         src/journal/journald-syslog.h \
4003         src/journal/journald-stream.c \
4004         src/journal/journald-stream.h \
4005         src/journal/journald-server.c \
4006         src/journal/journald-server.h \
4007         src/journal/journald-console.c \
4008         src/journal/journald-console.h \
4009         src/journal/journald-wall.c \
4010         src/journal/journald-wall.h \
4011         src/journal/journald-native.c \
4012         src/journal/journald-native.h \
4013         src/journal/journald-rate-limit.c \
4014         src/journal/journald-rate-limit.h \
4015         src/journal/journal-internal.h
4016
4017 nodist_libsystemd_journal_core_la_SOURCES = \
4018         src/journal/journald-gperf.c
4019
4020 libsystemd_journal_core_la_LIBADD = \
4021         libsystemd-journal-internal.la \
4022         libudev-internal.la \
4023         libsystemd-capability.la \
4024         libsystemd-label.la \
4025         libsystemd-internal.la \
4026         libsystemd-shared.la
4027
4028 if HAVE_ACL
4029 libsystemd_journal_core_la_LIBADD += \
4030         libsystemd-acl.la
4031 endif
4032
4033 noinst_LTLIBRARIES += \
4034         libsystemd-journal-core.la
4035
4036 journal-install-hook:
4037         -$(MKDIR_P) $(DESTDIR)/var/log/journal
4038         -chown 0:0 $(DESTDIR)/var/log/journal
4039         -chmod 755 $(DESTDIR)/var/log/journal
4040         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4041         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4042
4043 journal-uninstall-hook:
4044         -rmdir $(DESTDIR)/var/log/journal/remote
4045         -rmdir $(DESTDIR)/var/log/journal/
4046
4047 INSTALL_EXEC_HOOKS += journal-install-hook
4048 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4049
4050 # ------------------------------------------------------------------------------
4051 # Update catalog on installation. Do not bother if installing
4052 # in DESTDIR, since this is likely for packaging purposes.
4053 catalog-update-hook:
4054         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4055
4056 INSTALL_DATA_HOOKS += \
4057         catalog-update-hook
4058
4059 catalog-remove-hook:
4060         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4061
4062 UNINSTALL_DATA_HOOKS += \
4063         catalog-remove-hook
4064
4065 manual_tests += \
4066         test-journal-enum
4067
4068 tests += \
4069         test-journal \
4070         test-journal-send \
4071         test-journal-syslog \
4072         test-journal-match \
4073         test-journal-stream \
4074         test-journal-init \
4075         test-journal-verify \
4076         test-journal-interleaving \
4077         test-journal-flush \
4078         test-mmap-cache \
4079         test-catalog
4080
4081 if HAVE_COMPRESSION
4082 tests += \
4083         test-compress \
4084         test-compress-benchmark
4085 endif
4086
4087 pkginclude_HEADERS += \
4088         src/systemd/sd-journal.h \
4089         src/systemd/sd-messages.h \
4090         src/systemd/_sd-common.h
4091
4092 libsystemd_journal_internal_la_SOURCES = \
4093         src/journal/sd-journal.c \
4094         src/systemd/sd-journal.h \
4095         src/systemd/_sd-common.h \
4096         src/journal/journal-file.c \
4097         src/journal/journal-file.h \
4098         src/journal/journal-vacuum.c \
4099         src/journal/journal-vacuum.h \
4100         src/journal/journal-verify.c \
4101         src/journal/journal-verify.h \
4102         src/journal/lookup3.c \
4103         src/journal/lookup3.h \
4104         src/journal/journal-send.c \
4105         src/journal/journal-def.h \
4106         src/journal/compress.h \
4107         src/journal/catalog.c \
4108         src/journal/catalog.h \
4109         src/journal/mmap-cache.c \
4110         src/journal/mmap-cache.h
4111
4112 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4113 libsystemd_journal_internal_la_CFLAGS = \
4114         $(AM_CFLAGS)
4115
4116 libsystemd_journal_internal_la_LIBADD =
4117
4118 libsystemd_journal_internal_la_SOURCES += \
4119         src/journal/compress.c
4120
4121 if HAVE_XZ
4122 libsystemd_journal_internal_la_CFLAGS += \
4123         $(XZ_CFLAGS)
4124
4125 libsystemd_journal_internal_la_LIBADD += \
4126         $(XZ_LIBS)
4127 endif
4128
4129 if HAVE_LZ4
4130 libsystemd_journal_internal_la_LIBADD += \
4131         -llz4
4132 endif
4133
4134 if HAVE_GCRYPT
4135 libsystemd_journal_internal_la_SOURCES += \
4136         src/journal/journal-authenticate.c \
4137         src/journal/journal-authenticate.h \
4138         src/journal/fsprg.c \
4139         src/journal/fsprg.h
4140
4141 libsystemd_journal_internal_la_LIBADD += \
4142         $(GCRYPT_LIBS)
4143
4144 # fsprg.c is a drop-in file using void pointer arithmetic
4145 libsystemd_journal_internal_la_CFLAGS += \
4146         $(GCRYPT_CFLAGS) \
4147         -Wno-pointer-arith
4148 endif
4149
4150 noinst_LTLIBRARIES += \
4151         libsystemd-journal-internal.la
4152
4153 rootlibexec_PROGRAMS += \
4154         systemd-journald
4155
4156 rootbin_PROGRAMS += \
4157         journalctl
4158
4159 bin_PROGRAMS += \
4160         systemd-cat
4161
4162 dist_systemunit_DATA += \
4163         units/systemd-journald.socket \
4164         units/systemd-journald-dev-log.socket
4165
4166 nodist_systemunit_DATA += \
4167         units/systemd-journald.service \
4168         units/systemd-journal-flush.service \
4169         units/systemd-journal-catalog-update.service
4170
4171 dist_pkgsysconf_DATA += \
4172         src/journal/journald.conf
4173
4174 dist_catalog_DATA = \
4175         catalog/systemd.fr.catalog \
4176         catalog/systemd.it.catalog \
4177         catalog/systemd.pl.catalog \
4178         catalog/systemd.ru.catalog \
4179         catalog/systemd.catalog
4180
4181 SOCKETS_TARGET_WANTS += \
4182         systemd-journald.socket \
4183         systemd-journald-dev-log.socket
4184
4185 SYSINIT_TARGET_WANTS += \
4186         systemd-journald.service \
4187         systemd-journal-flush.service \
4188         systemd-journal-catalog-update.service
4189
4190 EXTRA_DIST += \
4191         units/systemd-journald.service.in \
4192         units/systemd-journal-flush.service.in \
4193         units/systemd-journal-catalog-update.service.in \
4194         src/journal/journald-gperf.gperf
4195
4196 CLEANFILES += \
4197         src/journal/journald-gperf.c
4198
4199 # ------------------------------------------------------------------------------
4200 if HAVE_MICROHTTPD
4201 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4202
4203 rootlibexec_PROGRAMS += \
4204         systemd-journal-gatewayd
4205
4206 systemd_journal_gatewayd_SOURCES = \
4207         src/journal-remote/journal-gatewayd.c \
4208         src/journal-remote/microhttpd-util.h \
4209         src/journal-remote/microhttpd-util.c
4210
4211 systemd_journal_gatewayd_LDADD = \
4212         libsystemd-logs.la \
4213         libsystemd-journal-internal.la \
4214         libsystemd-internal.la \
4215         libsystemd-shared.la \
4216         $(MICROHTTPD_LIBS)
4217
4218 if HAVE_GNUTLS
4219 systemd_journal_gatewayd_LDADD += \
4220         $(GNUTLS_LIBS)
4221 endif
4222
4223 systemd_journal_gatewayd_CFLAGS = \
4224         $(AM_CFLAGS) \
4225         $(MICROHTTPD_CFLAGS)
4226
4227 systemd_journal_gatewayd_CPPFLAGS = \
4228         $(AM_CPPFLAGS) \
4229         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4230
4231 dist_systemunit_DATA += \
4232         units/systemd-journal-gatewayd.socket
4233
4234 nodist_systemunit_DATA += \
4235         units/systemd-journal-gatewayd.service
4236
4237 dist_gatewayddocumentroot_DATA = \
4238         src/journal-remote/browse.html
4239
4240 endif
4241
4242 EXTRA_DIST += \
4243         units/systemd-journal-gatewayd.service.in
4244
4245 # ------------------------------------------------------------------------------
4246
4247 systemd_socket_proxyd_SOURCES = \
4248         src/socket-proxy/socket-proxyd.c
4249
4250 systemd_socket_proxyd_LDADD = \
4251         libsystemd-logs.la \
4252         libsystemd-internal.la \
4253         libsystemd-journal-internal.la \
4254         libsystemd-shared.la \
4255         libsystemd-resolve.la
4256
4257 # ------------------------------------------------------------------------------
4258 if ENABLE_COREDUMP
4259 systemd_coredump_SOURCES = \
4260         src/journal/coredump.c \
4261         src/journal/coredump-vacuum.c \
4262         src/journal/coredump-vacuum.h
4263
4264 systemd_coredump_LDADD = \
4265         libsystemd-journal-internal.la \
4266         libsystemd-label.la \
4267         libsystemd-internal.la \
4268         libsystemd-shared.la
4269
4270 if HAVE_ELFUTILS
4271 systemd_coredump_SOURCES += \
4272         src/journal/stacktrace.c \
4273         src/journal/stacktrace.h
4274
4275 systemd_coredump_LDADD += \
4276         $(ELFUTILS_LIBS)
4277 endif
4278
4279 rootlibexec_PROGRAMS += \
4280         systemd-coredump
4281
4282 dist_pkgsysconf_DATA += \
4283         src/journal/coredump.conf
4284
4285 if HAVE_ACL
4286 systemd_coredump_LDADD += \
4287         libsystemd-acl.la
4288 endif
4289
4290 coredumpctl_SOURCES = \
4291         src/journal/coredumpctl.c
4292
4293 coredumpctl_LDADD = \
4294         libsystemd-journal-internal.la \
4295         libsystemd-internal.la \
4296         libsystemd-shared.la
4297
4298 bin_PROGRAMS += \
4299         coredumpctl
4300
4301 manual_tests += \
4302         test-coredump-vacuum
4303
4304 test_coredump_vacuum_SOURCES = \
4305         src/journal/test-coredump-vacuum.c  \
4306         src/journal/coredump-vacuum.c \
4307         src/journal/coredump-vacuum.h
4308
4309 test_coredump_vacuum_LDADD = \
4310         libsystemd-internal.la \
4311         libsystemd-shared.la
4312
4313 dist_bashcompletion_DATA += \
4314         shell-completion/bash/coredumpctl
4315
4316 dist_zshcompletion_DATA += \
4317         shell-completion/zsh/_coredumpctl
4318
4319 sysctl_DATA = \
4320         sysctl.d/50-coredump.conf
4321
4322 CLEANFILES += \
4323         sysctl.d/50-coredump.conf
4324 endif
4325
4326 EXTRA_DIST += \
4327         sysctl.d/50-coredump.conf.in
4328
4329 # ------------------------------------------------------------------------------
4330 if ENABLE_BINFMT
4331 systemd_binfmt_SOURCES = \
4332         src/binfmt/binfmt.c
4333
4334 systemd_binfmt_LDADD = \
4335         libsystemd-shared.la
4336
4337 rootlibexec_PROGRAMS += \
4338         systemd-binfmt
4339
4340 dist_systemunit_DATA += \
4341         units/proc-sys-fs-binfmt_misc.automount \
4342         units/proc-sys-fs-binfmt_misc.mount
4343
4344 nodist_systemunit_DATA += \
4345         units/systemd-binfmt.service
4346
4347 INSTALL_DIRS += \
4348         $(prefix)/lib/binfmt.d \
4349         $(sysconfdir)/binfmt.d
4350
4351 SYSINIT_TARGET_WANTS += \
4352         systemd-binfmt.service \
4353         proc-sys-fs-binfmt_misc.automount
4354
4355 endif
4356
4357 EXTRA_DIST += \
4358         units/systemd-binfmt.service.in
4359
4360 # ------------------------------------------------------------------------------
4361 if ENABLE_VCONSOLE
4362 systemd_vconsole_setup_SOURCES = \
4363         src/vconsole/vconsole-setup.c
4364
4365 systemd_vconsole_setup_LDADD = \
4366         libsystemd-shared.la
4367
4368 rootlibexec_PROGRAMS += \
4369         systemd-vconsole-setup
4370
4371 nodist_systemunit_DATA += \
4372         units/systemd-vconsole-setup.service
4373
4374 SYSINIT_TARGET_WANTS += \
4375         systemd-vconsole-setup.service
4376 endif
4377
4378 EXTRA_DIST += \
4379         units/systemd-vconsole-setup.service.in
4380
4381 # ------------------------------------------------------------------------------
4382 if ENABLE_BOOTCHART
4383 systemd_bootchart_SOURCES = \
4384         src/bootchart/bootchart.c \
4385         src/bootchart/bootchart.h \
4386         src/bootchart/store.c \
4387         src/bootchart/store.h \
4388         src/bootchart/svg.c \
4389         src/bootchart/svg.h
4390
4391 systemd_bootchart_LDADD = \
4392         libsystemd-journal-internal.la \
4393         libsystemd-shared.la
4394
4395 rootlibexec_PROGRAMS += \
4396         systemd-bootchart
4397
4398 dist_pkgsysconf_DATA += \
4399         src/bootchart/bootchart.conf
4400 endif
4401
4402 # ------------------------------------------------------------------------------
4403 if ENABLE_QUOTACHECK
4404 rootlibexec_PROGRAMS += \
4405         systemd-quotacheck
4406
4407 nodist_systemunit_DATA += \
4408         units/systemd-quotacheck.service
4409
4410 systemd_quotacheck_SOURCES = \
4411         src/quotacheck/quotacheck.c
4412
4413 systemd_quotacheck_LDADD = \
4414         libsystemd-shared.la
4415 endif
4416
4417 EXTRA_DIST += \
4418         units/systemd-quotacheck.service.in
4419
4420 nodist_systemunit_DATA += \
4421         units/quotaon.service
4422
4423 # ------------------------------------------------------------------------------
4424 if ENABLE_RANDOMSEED
4425 rootlibexec_PROGRAMS += \
4426         systemd-random-seed
4427
4428 nodist_systemunit_DATA += \
4429         units/systemd-random-seed.service
4430
4431 systemd_random_seed_SOURCES = \
4432         src/random-seed/random-seed.c
4433
4434 systemd_random_seed_LDADD = \
4435         libsystemd-label.la \
4436         libsystemd-shared.la
4437
4438 SYSINIT_TARGET_WANTS += \
4439         systemd-random-seed.service
4440
4441 endif
4442
4443 EXTRA_DIST += \
4444         units/systemd-random-seed.service.in
4445
4446 # ------------------------------------------------------------------------------
4447 if ENABLE_BACKLIGHT
4448 rootlibexec_PROGRAMS += \
4449         systemd-backlight
4450
4451 nodist_systemunit_DATA += \
4452         units/systemd-backlight@.service
4453
4454 systemd_backlight_SOURCES = \
4455         src/backlight/backlight.c
4456
4457 systemd_backlight_LDADD = \
4458         libsystemd-label.la \
4459         libudev-internal.la \
4460         libsystemd-shared.la
4461 endif
4462
4463 EXTRA_DIST += \
4464         units/systemd-backlight@.service.in
4465
4466 # ------------------------------------------------------------------------------
4467 if ENABLE_RFKILL
4468 rootlibexec_PROGRAMS += \
4469         systemd-rfkill
4470
4471 nodist_systemunit_DATA += \
4472         units/systemd-rfkill@.service
4473
4474 systemd_rfkill_SOURCES = \
4475         src/rfkill/rfkill.c
4476
4477 systemd_rfkill_LDADD = \
4478         libsystemd-label.la \
4479         libudev-internal.la \
4480         libsystemd-shared.la
4481 endif
4482
4483 EXTRA_DIST += \
4484         units/systemd-rfkill@.service.in
4485
4486 # ------------------------------------------------------------------------------
4487 if HAVE_LIBCRYPTSETUP
4488 rootlibexec_PROGRAMS += \
4489         systemd-cryptsetup
4490
4491 systemgenerator_PROGRAMS += \
4492         systemd-cryptsetup-generator
4493
4494 dist_systemunit_DATA += \
4495         units/cryptsetup.target \
4496         units/cryptsetup-pre.target
4497
4498 systemd_cryptsetup_SOURCES = \
4499         src/cryptsetup/cryptsetup.c
4500
4501 systemd_cryptsetup_CFLAGS = \
4502         $(AM_CFLAGS) \
4503         $(LIBCRYPTSETUP_CFLAGS)
4504
4505 systemd_cryptsetup_LDADD = \
4506         libsystemd-label.la \
4507         libudev-internal.la \
4508         libsystemd-shared.la \
4509         $(LIBCRYPTSETUP_LIBS)
4510
4511 systemd_cryptsetup_generator_SOURCES = \
4512         src/cryptsetup/cryptsetup-generator.c
4513
4514 systemd_cryptsetup_generator_LDADD = \
4515         libsystemd-label.la \
4516         libsystemd-shared.la
4517
4518 SYSINIT_TARGET_WANTS += \
4519         cryptsetup.target
4520
4521 endif
4522
4523 # ------------------------------------------------------------------------------
4524 if ENABLE_HOSTNAMED
4525 systemd_hostnamed_SOURCES = \
4526         src/hostname/hostnamed.c
4527
4528 systemd_hostnamed_LDADD = \
4529         libsystemd-label.la \
4530         libsystemd-internal.la \
4531         libsystemd-shared.la
4532
4533 rootlibexec_PROGRAMS += \
4534         systemd-hostnamed
4535
4536 nodist_systemunit_DATA += \
4537         units/systemd-hostnamed.service
4538
4539 dist_systemunit_DATA_busnames += \
4540         units/org.freedesktop.hostname1.busname
4541
4542 dist_dbuspolicy_DATA += \
4543         src/hostname/org.freedesktop.hostname1.conf
4544
4545 dist_dbussystemservice_DATA += \
4546         src/hostname/org.freedesktop.hostname1.service
4547
4548 polkitpolicy_files += \
4549         src/hostname/org.freedesktop.hostname1.policy
4550
4551 SYSTEM_UNIT_ALIASES += \
4552         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
4553
4554 BUSNAMES_TARGET_WANTS += \
4555         org.freedesktop.hostname1.busname
4556
4557 hostnamectl_SOURCES = \
4558         src/hostname/hostnamectl.c
4559
4560 hostnamectl_LDADD = \
4561         libsystemd-internal.la \
4562         libsystemd-shared.la
4563
4564 bin_PROGRAMS += \
4565         hostnamectl
4566
4567 dist_bashcompletion_DATA += \
4568         shell-completion/bash/hostnamectl
4569
4570 dist_zshcompletion_DATA += \
4571         shell-completion/zsh/_hostnamectl
4572
4573 endif
4574
4575 polkitpolicy_in_files += \
4576         src/hostname/org.freedesktop.hostname1.policy.in
4577
4578 EXTRA_DIST += \
4579         units/systemd-hostnamed.service.in
4580
4581 # ------------------------------------------------------------------------------
4582 dist_systemunit_DATA_busnames += \
4583         units/org.freedesktop.systemd1.busname
4584
4585 BUSNAMES_TARGET_WANTS += \
4586         org.freedesktop.systemd1.busname
4587
4588 # ------------------------------------------------------------------------------
4589 if ENABLE_LOCALED
4590 systemd_localed_SOURCES = \
4591         src/locale/localed.c
4592
4593 systemd_localed_LDADD = \
4594         libsystemd-label.la \
4595         libsystemd-internal.la \
4596         libsystemd-shared.la
4597
4598 nodist_systemunit_DATA += \
4599         units/systemd-localed.service