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