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