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