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