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