Merge pull request #3428 from toanju/networkd/brvlan
[platform/upstream/systemd.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=4
43 LIBUDEV_AGE=6
44
45 LIBSYSTEMD_CURRENT=15
46 LIBSYSTEMD_REVISION=0
47 LIBSYSTEMD_AGE=15
48
49 # Dirs of external packages
50 dbuspolicydir=@dbuspolicydir@
51 dbussessionservicedir=@dbussessionservicedir@
52 dbussystemservicedir=@dbussystemservicedir@
53 pamlibdir=@pamlibdir@
54 pamconfdir=@pamconfdir@
55 pkgconfigdatadir=$(datadir)/pkgconfig
56 pkgconfiglibdir=$(libdir)/pkgconfig
57 polkitpolicydir=$(datadir)/polkit-1/actions
58 bashcompletiondir=@bashcompletiondir@
59 zshcompletiondir=@zshcompletiondir@
60 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
61 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
62 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
63 varlogdir=$(localstatedir)/log
64 systemdstatedir=$(localstatedir)/lib/systemd
65 catalogstatedir=$(systemdstatedir)/catalog
66 xinitrcdir=$(sysconfdir)/X11/xinit/xinitrc.d
67
68 # Our own, non-special dirs
69 pkgsysconfdir=$(sysconfdir)/systemd
70 userunitdir=$(prefix)/lib/systemd/user
71 userpresetdir=$(prefix)/lib/systemd/user-preset
72 tmpfilesdir=$(prefix)/lib/tmpfiles.d
73 sysusersdir=$(prefix)/lib/sysusers.d
74 sysctldir=$(prefix)/lib/sysctl.d
75 binfmtdir=$(prefix)/lib/binfmt.d
76 modulesloaddir=$(prefix)/lib/modules-load.d
77 networkdir=$(rootprefix)/lib/systemd/network
78 pkgincludedir=$(includedir)/systemd
79 systemgeneratordir=$(rootlibexecdir)/system-generators
80 usergeneratordir=$(prefix)/lib/systemd/user-generators
81 systemshutdowndir=$(rootlibexecdir)/system-shutdown
82 systemsleepdir=$(rootlibexecdir)/system-sleep
83 systemunitdir=$(rootprefix)/lib/systemd/system
84 systempresetdir=$(rootprefix)/lib/systemd/system-preset
85 udevlibexecdir=$(rootprefix)/lib/udev
86 udevhomedir=$(udevlibexecdir)
87 udevrulesdir=$(udevlibexecdir)/rules.d
88 udevhwdbdir=$(udevlibexecdir)/hwdb.d
89 catalogdir=$(prefix)/lib/systemd/catalog
90 kernelinstalldir = $(prefix)/lib/kernel/install.d
91 factory_etcdir = $(datadir)/factory/etc
92 factory_pamdir = $(datadir)/factory/etc/pam.d
93 bootlibdir = $(prefix)/lib/systemd/boot/efi
94
95 # And these are the special ones for /
96 rootprefix=@rootprefix@
97 rootbindir=$(rootprefix)/bin
98 rootlibexecdir=$(rootprefix)/lib/systemd
99
100 EXTRA_DIST =
101 BUILT_SOURCES =
102 INSTALL_EXEC_HOOKS =
103 UNINSTALL_EXEC_HOOKS =
104 INSTALL_DATA_HOOKS =
105 UNINSTALL_DATA_HOOKS =
106 DISTCLEAN_LOCAL_HOOKS =
107 CLEAN_LOCAL_HOOKS =
108 pkginclude_HEADERS =
109 noinst_LTLIBRARIES =
110 lib_LTLIBRARIES =
111 include_HEADERS =
112 noinst_DATA =
113 pkgconfigdata_DATA =
114 pkgconfiglib_DATA =
115 polkitpolicy_in_in_files =
116 polkitpolicy_in_files =
117 polkitpolicy_files =
118 dist_udevrules_DATA =
119 nodist_udevrules_DATA =
120 dist_pkgsysconf_DATA =
121 nodist_pkgsysconf_DATA =
122 dist_dbuspolicy_DATA =
123 dist_dbussystemservice_DATA =
124 dist_systemunit_DATA_busnames =
125 dist_sysusers_DATA =
126 check_PROGRAMS =
127 check_DATA =
128 tests=
129 manual_tests =
130 TEST_EXTENSIONS = .py
131 PY_LOG_COMPILER = $(PYTHON)
132 DISABLE_HARD_ERRORS = yes
133 if ENABLE_TESTS
134 noinst_PROGRAMS = $(manual_tests) $(tests) $(unsafe_tests)
135 TESTS = $(tests)
136 if ENABLE_UNSAFE_TESTS
137 TESTS += \
138         $(unsafe_tests)
139 endif
140 else
141 noinst_PROGRAMS =
142 TESTS =
143 endif
144 if ENABLE_BASH_COMPLETION
145 dist_bashcompletion_DATA = $(dist_bashcompletion_data)
146 nodist_bashcompletion_DATA = $(nodist_bashcompletion_data)
147 endif
148 if ENABLE_ZSH_COMPLETION
149 dist_zshcompletion_DATA = $(dist_zshcompletion_data)
150 nodist_zshcompletion_DATA = $(nodist_zshcompletion_data)
151 endif
152 udevlibexec_PROGRAMS =
153 gperf_gperf_sources =
154
155 in_files = $(filter %.in,$(EXTRA_DIST))
156 in_in_files = $(filter %.in.in, $(in_files))
157 m4_files = $(filter %.m4,$(EXTRA_DIST) $(in_files:.m4.in=.m4))
158
159 CLEANFILES = $(BUILT_SOURCES) \
160         $(pkgconfigdata_DATA) \
161         $(pkgconfiglib_DATA) \
162         $(nodist_bashcompletion_data) \
163         $(nodist_zshcompletion_data) \
164         $(in_files:.in=) $(in_in_files:.in.in=) \
165         $(m4_files:.m4=)
166
167 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
168         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
169         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
170
171 AM_CPPFLAGS = \
172         -include $(top_builddir)/config.h \
173         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
174         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
175         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
176         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
177         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
178         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
179         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
180         -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
181         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
182         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
183         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
184         -DSYSTEMD_FSCK_PATH=\"$(rootlibexecdir)/systemd-fsck\" \
185         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
186         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
187         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
188         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
189         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
190         -DROOTPREFIX=\"$(rootprefix)\" \
191         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
192         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
193         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
194         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
195         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
196         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
197         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
198         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
199         -DSYSTEMD_LANGUAGE_FALLBACK_MAP=\"$(pkgdatadir)/language-fallback-map\" \
200         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
201         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
202         -DQUOTACHECK=\"$(QUOTACHECK)\" \
203         -DKEXEC=\"$(KEXEC)\" \
204         -DMOUNT_PATH=\"$(MOUNT_PATH)\" \
205         -DUMOUNT_PATH=\"$(UMOUNT_PATH)\" \
206         -DLIBDIR=\"$(libdir)\" \
207         -DROOTLIBDIR=\"$(rootlibdir)\" \
208         -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
209         -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
210         -I $(top_srcdir)/src \
211         -I $(top_builddir)/src/basic \
212         -I $(top_srcdir)/src/basic \
213         -I $(top_srcdir)/src/shared \
214         -I $(top_builddir)/src/shared \
215         -I $(top_srcdir)/src/network \
216         -I $(top_srcdir)/src/login \
217         -I $(top_srcdir)/src/journal \
218         -I $(top_builddir)/src/journal \
219         -I $(top_srcdir)/src/timedate \
220         -I $(top_srcdir)/src/timesync \
221         -I $(top_srcdir)/src/nspawn \
222         -I $(top_srcdir)/src/resolve \
223         -I $(top_builddir)/src/resolve \
224         -I $(top_srcdir)/src/systemd \
225         -I $(top_builddir)/src/core \
226         -I $(top_srcdir)/src/core \
227         -I $(top_srcdir)/src/libudev \
228         -I $(top_srcdir)/src/udev \
229         -I $(top_srcdir)/src/udev/net \
230         -I $(top_builddir)/src/udev \
231         -I $(top_srcdir)/src/libsystemd/sd-bus \
232         -I $(top_srcdir)/src/libsystemd/sd-event \
233         -I $(top_srcdir)/src/libsystemd/sd-login \
234         -I $(top_srcdir)/src/libsystemd/sd-netlink \
235         -I $(top_srcdir)/src/libsystemd/sd-network \
236         -I $(top_srcdir)/src/libsystemd/sd-hwdb \
237         -I $(top_srcdir)/src/libsystemd/sd-device \
238         -I $(top_srcdir)/src/libsystemd-network \
239         $(OUR_CPPFLAGS)
240
241 AM_CFLAGS = $(OUR_CFLAGS)
242 AM_LDFLAGS = $(OUR_LDFLAGS)
243
244 # ------------------------------------------------------------------------------
245 define move-to-rootlibdir
246         if test "$(libdir)" != "$(rootlibdir)"; then \
247                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
248                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
249                 rm -f $(DESTDIR)$(libdir)/$$libname && \
250                 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
251                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
252         fi
253 endef
254
255 INSTALL_DIRS =
256
257 SHUTDOWN_TARGET_WANTS =
258 LOCAL_FS_TARGET_WANTS =
259 MULTI_USER_TARGET_WANTS =
260 GRAPHICAL_TARGET_WANTS =
261 RESCUE_TARGET_WANTS =
262 SYSINIT_TARGET_WANTS =
263 SOCKETS_TARGET_WANTS =
264 BUSNAMES_TARGET_WANTS =
265 TIMERS_TARGET_WANTS =
266 USER_SOCKETS_TARGET_WANTS =
267 USER_DEFAULT_TARGET_WANTS =
268 USER_BUSNAMES_TARGET_WANTS =
269
270 SYSTEM_UNIT_ALIASES =
271 USER_UNIT_ALIASES =
272 GENERAL_ALIASES =
273
274 install-target-wants-hook:
275         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
276         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
277         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
278         what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && dir=$(systemunitdir) && $(add-wants)
279         what="$(RESCUE_TARGET_WANTS)" && wants=rescue.target && dir=$(systemunitdir) && $(add-wants)
280         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
281         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
282         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
283         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
284         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
285         what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
286
287 install-busnames-target-wants-hook:
288         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
289         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
290
291 define add-wants
292         [ -z "$$what" ] || ( \
293           dir=$(DESTDIR)$$dir/$$wants.wants && \
294           $(MKDIR_P) -m 0755 $$dir && \
295           cd $$dir && \
296           rm -f $$what && \
297           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
298 endef
299
300 install-directories-hook:
301         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
302
303 install-aliases-hook:
304         set -- $(SYSTEM_UNIT_ALIASES) && \
305                 dir=$(systemunitdir) && $(install-aliases)
306         set -- $(USER_UNIT_ALIASES) && \
307                 dir=$(userunitdir) && $(install-relative-aliases)
308         set -- $(GENERAL_ALIASES) && \
309                 dir= && $(install-relative-aliases)
310
311 define install-aliases
312         while [ -n "$$1" ]; do \
313                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
314                 rm -f $(DESTDIR)$$dir/$$2 && \
315                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
316                 shift 2 || exit $$?; \
317         done
318 endef
319
320 define install-relative-aliases
321         while [ -n "$$1" ]; do \
322                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
323                 rm -f $(DESTDIR)$$dir/$$2 && \
324                 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
325                 shift 2 || exit $$?; \
326         done
327 endef
328
329 install-touch-usr-hook:
330         touch -c $(DESTDIR)/$(prefix)
331
332 INSTALL_EXEC_HOOKS += \
333         install-target-wants-hook \
334         install-directories-hook \
335         install-aliases-hook \
336         install-touch-usr-hook
337
338 INSTALL_EXEC_HOOKS += \
339         install-busnames-target-wants-hook
340
341 # ------------------------------------------------------------------------------
342 AM_V_M4 = $(AM_V_M4_$(V))
343 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
344 AM_V_M4_0 = @echo "  M4      " $@;
345
346 AM_V_XSLT = $(AM_V_XSLT_$(V))
347 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
348 AM_V_XSLT_0 = @echo "  XSLT    " $@;
349
350 AM_V_GPERF = $(AM_V_GPERF_$(V))
351 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
352 AM_V_GPERF_0 = @echo "  GPERF   " $@;
353
354 AM_V_LN = $(AM_V_LN_$(V))
355 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
356 AM_V_LN_0 = @echo "  LN      " $@;
357
358 AM_V_RM = $(AM_V_RM_$(V))
359 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
360 AM_V_RM_0 = @echo "  RM      " $@;
361
362 # ------------------------------------------------------------------------------
363 rootbin_PROGRAMS = \
364         systemctl \
365         systemd-notify \
366         systemd-ask-password \
367         systemd-tty-ask-password-agent \
368         systemd-machine-id-setup \
369         systemd-escape
370
371 bin_PROGRAMS = \
372         systemd-cgls \
373         systemd-cgtop \
374         systemd-nspawn \
375         systemd-detect-virt \
376         systemd-delta \
377         systemd-analyze \
378         systemd-run \
379         systemd-stdio-bridge \
380         systemd-path
381
382 dist_bin_SCRIPTS = \
383         src/kernel-install/kernel-install
384
385 dist_kernelinstall_SCRIPTS = \
386         src/kernel-install/50-depmod.install \
387         src/kernel-install/90-loaderentry.install
388
389 rootlibexec_PROGRAMS = \
390         systemd \
391         systemd-cgroups-agent \
392         systemd-initctl \
393         systemd-shutdown \
394         systemd-remount-fs \
395         systemd-reply-password \
396         systemd-fsck \
397         systemd-ac-power \
398         systemd-sysctl \
399         systemd-sleep \
400         systemd-socket-proxyd \
401         systemd-update-done
402
403 if HAVE_UTMP
404 rootlibexec_PROGRAMS += \
405         systemd-update-utmp
406 endif
407
408 systemgenerator_PROGRAMS = \
409         systemd-getty-generator \
410         systemd-fstab-generator \
411         systemd-system-update-generator \
412         systemd-debug-generator
413
414 dist_bashcompletion_data = \
415         shell-completion/bash/busctl \
416         shell-completion/bash/journalctl \
417         shell-completion/bash/systemd-analyze \
418         shell-completion/bash/systemd-cat \
419         shell-completion/bash/systemd-cgls \
420         shell-completion/bash/systemd-cgtop \
421         shell-completion/bash/systemd-delta \
422         shell-completion/bash/systemd-detect-virt \
423         shell-completion/bash/systemd-nspawn \
424         shell-completion/bash/systemd-path \
425         shell-completion/bash/systemd-run \
426         shell-completion/bash/udevadm \
427         shell-completion/bash/kernel-install
428
429 nodist_bashcompletion_data = \
430         shell-completion/bash/systemctl
431
432 dist_zshcompletion_data = \
433         shell-completion/zsh/_busctl \
434         shell-completion/zsh/_journalctl \
435         shell-completion/zsh/_udevadm \
436         shell-completion/zsh/_kernel-install \
437         shell-completion/zsh/_systemd-nspawn \
438         shell-completion/zsh/_systemd-analyze \
439         shell-completion/zsh/_systemd-run \
440         shell-completion/zsh/_sd_hosts_or_user_at_host \
441         shell-completion/zsh/_sd_outputmodes \
442         shell-completion/zsh/_sd_unit_files \
443         shell-completion/zsh/_systemd-delta \
444         shell-completion/zsh/_systemd
445
446 nodist_zshcompletion_data = \
447         shell-completion/zsh/_systemctl
448
449 EXTRA_DIST += \
450         shell-completion/bash/systemctl.in \
451         shell-completion/zsh/_systemctl.in
452
453 dist_sysctl_DATA = \
454         sysctl.d/50-default.conf
455
456 dist_systemunit_DATA = \
457         units/graphical.target \
458         units/multi-user.target \
459         units/emergency.target \
460         units/sysinit.target \
461         units/basic.target \
462         units/getty.target \
463         units/halt.target \
464         units/kexec.target \
465         units/exit.target \
466         units/local-fs.target \
467         units/local-fs-pre.target \
468         units/initrd.target \
469         units/initrd-fs.target \
470         units/initrd-root-device.target \
471         units/initrd-root-fs.target \
472         units/remote-fs.target \
473         units/remote-fs-pre.target \
474         units/network.target \
475         units/network-pre.target \
476         units/network-online.target \
477         units/nss-lookup.target \
478         units/nss-user-lookup.target \
479         units/poweroff.target \
480         units/reboot.target \
481         units/rescue.target \
482         units/rpcbind.target \
483         units/time-sync.target \
484         units/shutdown.target \
485         units/final.target \
486         units/umount.target \
487         units/sigpwr.target \
488         units/sleep.target \
489         units/sockets.target \
490         units/timers.target \
491         units/paths.target \
492         units/suspend.target \
493         units/swap.target \
494         units/slices.target \
495         units/system.slice \
496         units/x-.slice \
497         units/systemd-initctl.socket \
498         units/syslog.socket \
499         units/dev-hugepages.mount \
500         units/dev-mqueue.mount \
501         units/sys-kernel-config.mount \
502         units/sys-kernel-debug.mount \
503         units/sys-fs-fuse-connections.mount \
504         units/tmp.mount \
505         units/var-lib-machines.mount \
506         units/printer.target \
507         units/sound.target \
508         units/bluetooth.target \
509         units/smartcard.target \
510         units/systemd-ask-password-wall.path \
511         units/systemd-ask-password-console.path \
512         units/systemd-udevd-control.socket \
513         units/systemd-udevd-kernel.socket \
514         units/system-update.target \
515         units/initrd-switch-root.target \
516         units/machines.target
517
518 dist_systemunit_DATA += \
519         $(dist_systemunit_DATA_busnames)
520
521 dist_systemunit_DATA_busnames += \
522         units/busnames.target
523
524 nodist_systemunit_DATA = \
525         units/getty@.service \
526         units/serial-getty@.service \
527         units/console-shell.service \
528         units/console-getty.service \
529         units/container-getty@.service \
530         units/systemd-initctl.service \
531         units/systemd-remount-fs.service \
532         units/systemd-ask-password-wall.service \
533         units/systemd-ask-password-console.service \
534         units/systemd-sysctl.service \
535         units/emergency.service \
536         units/rescue.service \
537         units/user@.service \
538         units/systemd-suspend.service \
539         units/systemd-halt.service \
540         units/systemd-poweroff.service \
541         units/systemd-reboot.service \
542         units/systemd-kexec.service \
543         units/systemd-exit.service \
544         units/systemd-fsck@.service \
545         units/systemd-fsck-root.service \
546         units/systemd-machine-id-commit.service \
547         units/systemd-udevd.service \
548         units/systemd-udev-trigger.service \
549         units/systemd-udev-settle.service \
550         units/systemd-hwdb-update.service \
551         units/debug-shell.service \
552         units/initrd-parse-etc.service \
553         units/initrd-cleanup.service \
554         units/initrd-udevadm-cleanup-db.service \
555         units/initrd-switch-root.service \
556         units/systemd-nspawn@.service \
557         units/systemd-update-done.service
558
559 if HAVE_UTMP
560 nodist_systemunit_DATA += \
561         units/systemd-update-utmp.service \
562         units/systemd-update-utmp-runlevel.service
563 endif
564
565 dist_userunit_DATA = \
566         units/user/basic.target \
567         units/user/default.target \
568         units/user/exit.target
569
570 nodist_userunit_DATA = \
571         units/user/systemd-exit.service
572
573 dist_systempreset_DATA = \
574         system-preset/90-systemd.preset
575
576 EXTRA_DIST += \
577         units/getty@.service.m4 \
578         units/serial-getty@.service.m4 \
579         units/console-shell.service.m4.in \
580         units/console-getty.service.m4.in \
581         units/container-getty@.service.m4.in \
582         units/rescue.service.in \
583         units/systemd-initctl.service.in \
584         units/systemd-remount-fs.service.in \
585         units/systemd-update-utmp.service.in \
586         units/systemd-update-utmp-runlevel.service.in \
587         units/systemd-ask-password-wall.service.in \
588         units/systemd-ask-password-console.service.in \
589         units/systemd-sysctl.service.in \
590         units/emergency.service.in \
591         units/systemd-halt.service.in \
592         units/systemd-poweroff.service.in \
593         units/systemd-reboot.service.in \
594         units/systemd-kexec.service.in \
595         units/systemd-exit.service.in \
596         units/user/systemd-exit.service.in \
597         units/systemd-fsck@.service.in \
598         units/systemd-fsck-root.service.in \
599         units/systemd-machine-id-commit.service.in \
600         units/user@.service.m4.in \
601         units/debug-shell.service.in \
602         units/systemd-suspend.service.in \
603         units/quotaon.service.in \
604         units/initrd-parse-etc.service.in \
605         units/initrd-cleanup.service.in \
606         units/initrd-udevadm-cleanup-db.service.in \
607         units/initrd-switch-root.service.in \
608         units/systemd-nspawn@.service.in \
609         units/systemd-update-done.service.in \
610     units/tmp.mount.m4
611
612 if HAVE_SYSV_COMPAT
613 nodist_systemunit_DATA += \
614         units/rc-local.service \
615         units/halt-local.service
616
617 systemgenerator_PROGRAMS += \
618         systemd-sysv-generator \
619         systemd-rc-local-generator
620 endif
621
622 EXTRA_DIST += \
623         src/systemctl/systemd-sysv-install.SKELETON \
624         units/rc-local.service.in \
625         units/halt-local.service.in
626
627 # automake is broken and can't handle files with a dash in front
628 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
629 units-install-hook:
630         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
631
632 units-uninstall-hook:
633         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
634
635 INSTALL_DATA_HOOKS += units-install-hook
636 UNINSTALL_DATA_HOOKS += units-uninstall-hook
637
638 dist_doc_DATA = \
639         README \
640         NEWS \
641         CODING_STYLE \
642         LICENSE.LGPL2.1 \
643         LICENSE.GPL2 \
644         DISTRO_PORTING \
645         src/libsystemd/sd-bus/PORTING-DBUS1 \
646         src/libsystemd/sd-bus/DIFFERENCES \
647         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
648
649 EXTRA_DIST += \
650         README.md \
651         autogen.sh \
652         .dir-locals.el \
653         .editorconfig \
654         .vimrc \
655         .ycm_extra_conf.py \
656         .travis.yml \
657         .mailmap
658
659 @INTLTOOL_POLICY_RULE@
660
661 # ------------------------------------------------------------------------------
662
663 MANPAGES =
664 MANPAGES_ALIAS =
665
666 include Makefile-man.am
667
668 .PHONY: man update-man-list
669 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
670
671 XML_FILES = \
672         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
673 HTML_FILES = \
674         ${XML_FILES:.xml=.html}
675 HTML_ALIAS = \
676         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
677
678 if ENABLE_MANPAGES
679 man_MANS = \
680         $(MANPAGES) \
681         $(MANPAGES_ALIAS)
682
683 noinst_DATA += \
684         $(HTML_FILES) \
685         $(HTML_ALIAS) \
686         docs/html/man
687 endif
688
689 CLEANFILES += \
690         $(man_MANS) \
691         $(HTML_FILES) \
692         $(HTML_ALIAS) \
693         docs/html/man
694
695 docs/html/man:
696         $(AM_V_at)$(MKDIR_P) $(dir $@)
697         $(AM_V_LN)$(LN_S) -f ../../man $@
698
699 man/index.html: man/systemd.index.html
700         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
701
702 if HAVE_PYTHON
703 noinst_DATA += \
704         man/index.html
705 endif
706
707 CLEANFILES += \
708         man/index.html
709
710 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml)
711 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
712 SOURCE_XML_FILES = ${patsubst %,$(top_srcdir)/%,$(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))}
713
714 # This target should only be run manually. It recreates Makefile-man.am
715 # file in the source directory based on all man/*.xml files. Run it after
716 # adding, removing, or changing the conditional in a man page.
717 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB) man/custom-entities.ent
718         $(AM_V_GEN)$(PYTHON) $< $(XML_GLOB) > $(top_srcdir)/Makefile-man.tmp
719         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
720         @echo "Makefile-man.am has been regenerated"
721
722 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
723         $(AM_V_at)$(MKDIR_P) $(dir $@)
724         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
725
726 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py man/custom-entities.ent $(SOURCE_XML_FILES)
727         $(AM_V_at)$(MKDIR_P) $(dir $@)
728         $(AM_V_GEN)$(PYTHON) $< $@ $(SOURCE_XML_FILES)
729
730 CLEANFILES += \
731         man/systemd.index.xml \
732         man/systemd.directives.xml
733
734 EXTRA_DIST += \
735         $(filter-out man/systemd.directives.xml man/systemd.index.xml,$(XML_FILES)) \
736         tools/make-man-index.py \
737         tools/make-man-rules.py \
738         tools/make-directive-index.py \
739         tools/xml_helper.py \
740         man/glib-event-glue.c
741
742 # ------------------------------------------------------------------------------
743 noinst_LTLIBRARIES += \
744         libbasic.la
745
746 libbasic_la_SOURCES = \
747         src/basic/missing.h \
748         src/basic/missing_syscall.h \
749         src/basic/raw-clone.h \
750         src/basic/capability-util.c \
751         src/basic/capability-util.h \
752         src/basic/conf-files.c \
753         src/basic/conf-files.h \
754         src/basic/stdio-util.h \
755         src/basic/hostname-util.h \
756         src/basic/hostname-util.c \
757         src/basic/unit-name.c \
758         src/basic/unit-name.h \
759         src/basic/ioprio.h \
760         src/basic/securebits.h \
761         src/basic/special.h \
762         src/basic/list.h \
763         src/basic/unaligned.h \
764         src/basic/macro.h \
765         src/basic/def.h \
766         src/basic/sparse-endian.h \
767         src/basic/refcnt.h \
768         src/basic/util.c \
769         src/basic/util.h \
770         src/basic/io-util.c \
771         src/basic/io-util.h \
772         src/basic/string-util.c \
773         src/basic/string-util.h \
774         src/basic/fd-util.c \
775         src/basic/fd-util.h \
776         src/basic/parse-util.c \
777         src/basic/parse-util.h \
778         src/basic/user-util.c \
779         src/basic/user-util.h \
780         src/basic/rlimit-util.c \
781         src/basic/rlimit-util.h \
782         src/basic/dirent-util.c \
783         src/basic/dirent-util.h \
784         src/basic/xattr-util.c \
785         src/basic/xattr-util.h \
786         src/basic/chattr-util.c \
787         src/basic/chattr-util.h \
788         src/basic/proc-cmdline.c \
789         src/basic/proc-cmdline.h \
790         src/basic/fs-util.c \
791         src/basic/fs-util.h \
792         src/basic/syslog-util.c \
793         src/basic/syslog-util.h \
794         src/basic/stat-util.c \
795         src/basic/stat-util.h \
796         src/basic/mount-util.c \
797         src/basic/mount-util.h \
798         src/basic/hexdecoct.c \
799         src/basic/hexdecoct.h \
800         src/basic/glob-util.h \
801         src/basic/glob-util.c \
802         src/basic/extract-word.c \
803         src/basic/extract-word.h \
804         src/basic/escape.c \
805         src/basic/escape.h \
806         src/basic/cpu-set-util.c \
807         src/basic/cpu-set-util.h \
808         src/basic/lockfile-util.c \
809         src/basic/lockfile-util.h \
810         src/basic/path-util.c \
811         src/basic/path-util.h \
812         src/basic/time-util.c \
813         src/basic/time-util.h \
814         src/basic/locale-util.c \
815         src/basic/locale-util.h \
816         src/basic/umask-util.h \
817         src/basic/signal-util.c \
818         src/basic/signal-util.h \
819         src/basic/string-table.c \
820         src/basic/string-table.h \
821         src/basic/mempool.c \
822         src/basic/mempool.h \
823         src/basic/hashmap.c \
824         src/basic/hashmap.h \
825         src/basic/hash-funcs.c \
826         src/basic/hash-funcs.h \
827         src/basic/siphash24.c \
828         src/basic/siphash24.h \
829         src/basic/set.h \
830         src/basic/ordered-set.h \
831         src/basic/ordered-set.c \
832         src/basic/bitmap.c \
833         src/basic/bitmap.h \
834         src/basic/fdset.c \
835         src/basic/fdset.h \
836         src/basic/prioq.c \
837         src/basic/prioq.h \
838         src/basic/web-util.c \
839         src/basic/web-util.h \
840         src/basic/strv.c \
841         src/basic/strv.h \
842         src/basic/env-util.c \
843         src/basic/env-util.h \
844         src/basic/strbuf.c \
845         src/basic/strbuf.h \
846         src/basic/strxcpyx.c \
847         src/basic/strxcpyx.h \
848         src/basic/log.c \
849         src/basic/log.h \
850         src/basic/bus-label.c \
851         src/basic/bus-label.h \
852         src/basic/ratelimit.h \
853         src/basic/ratelimit.c \
854         src/basic/exit-status.c \
855         src/basic/exit-status.h \
856         src/basic/virt.c \
857         src/basic/virt.h \
858         src/basic/architecture.c \
859         src/basic/architecture.h \
860         src/basic/smack-util.c \
861         src/basic/smack-util.h \
862         src/basic/device-nodes.c \
863         src/basic/device-nodes.h \
864         src/basic/utf8.c \
865         src/basic/utf8.h \
866         src/basic/gunicode.c \
867         src/basic/gunicode.h \
868         src/basic/socket-util.c \
869         src/basic/socket-util.h \
870         src/basic/in-addr-util.c \
871         src/basic/in-addr-util.h \
872         src/basic/ether-addr-util.h \
873         src/basic/ether-addr-util.c \
874         src/basic/replace-var.c \
875         src/basic/replace-var.h \
876         src/basic/clock-util.c \
877         src/basic/clock-util.h \
878         src/basic/calendarspec.c \
879         src/basic/calendarspec.h \
880         src/basic/fileio.c \
881         src/basic/fileio.h \
882         src/basic/MurmurHash2.c \
883         src/basic/MurmurHash2.h \
884         src/basic/mkdir.c \
885         src/basic/mkdir.h \
886         src/basic/cgroup-util.c \
887         src/basic/cgroup-util.h \
888         src/basic/errno-list.c \
889         src/basic/errno-list.h \
890         src/basic/af-list.c \
891         src/basic/af-list.h \
892         src/basic/arphrd-list.c \
893         src/basic/arphrd-list.h \
894         src/basic/terminal-util.c \
895         src/basic/terminal-util.h \
896         src/basic/login-util.h \
897         src/basic/login-util.c \
898         src/basic/cap-list.c \
899         src/basic/cap-list.h \
900         src/basic/audit-util.c \
901         src/basic/audit-util.h \
902         src/basic/xml.c \
903         src/basic/xml.h \
904         src/basic/barrier.c \
905         src/basic/barrier.h \
906         src/basic/async.c \
907         src/basic/async.h \
908         src/basic/memfd-util.c \
909         src/basic/memfd-util.h \
910         src/basic/process-util.c \
911         src/basic/process-util.h \
912         src/basic/random-util.c \
913         src/basic/random-util.h \
914         src/basic/verbs.c \
915         src/basic/verbs.h \
916         src/basic/sigbus.c \
917         src/basic/sigbus.h \
918         src/basic/build.h \
919         src/basic/socket-label.c \
920         src/basic/label.c \
921         src/basic/label.h \
922         src/basic/btrfs-util.c \
923         src/basic/btrfs-util.h \
924         src/basic/btrfs-ctree.h \
925         src/basic/selinux-util.c \
926         src/basic/selinux-util.h \
927         src/basic/mkdir-label.c \
928         src/basic/fileio-label.c \
929         src/basic/fileio-label.h \
930         src/basic/rm-rf.c \
931         src/basic/rm-rf.h \
932         src/basic/copy.c \
933         src/basic/copy.h \
934         src/basic/alloc-util.h \
935         src/basic/alloc-util.c \
936         src/basic/formats-util.h \
937         src/basic/nss-util.h
938
939 nodist_libbasic_la_SOURCES = \
940         src/basic/errno-from-name.h \
941         src/basic/errno-to-name.h \
942         src/basic/af-from-name.h \
943         src/basic/af-to-name.h \
944         src/basic/arphrd-from-name.h \
945         src/basic/arphrd-to-name.h \
946         src/basic/cap-from-name.h \
947         src/basic/cap-to-name.h
948
949 libbasic_la_CFLAGS = \
950         $(AM_CFLAGS) \
951         $(SELINUX_CFLAGS) \
952         $(CAP_CFLAGS) \
953         -pthread
954
955 libbasic_la_LIBADD = \
956         $(SELINUX_LIBS) \
957         $(CAP_LIBS) \
958         -lrt \
959         -lm
960
961 # -----------------------------------------------------------------------------
962 noinst_LTLIBRARIES += \
963         libshared.la
964
965 libshared_la_SOURCES = \
966         src/shared/output-mode.h \
967         src/shared/output-mode.c \
968         src/shared/gpt.h \
969         src/shared/udev-util.h \
970         src/shared/linux/auto_dev-ioctl.h \
971         src/shared/initreq.h \
972         src/shared/dns-domain.c \
973         src/shared/dns-domain.h \
974         src/shared/efivars.c \
975         src/shared/efivars.h \
976         src/shared/fstab-util.c \
977         src/shared/fstab-util.h \
978         src/shared/sleep-config.c \
979         src/shared/sleep-config.h \
980         src/shared/conf-parser.c \
981         src/shared/conf-parser.h \
982         src/shared/pager.c \
983         src/shared/pager.h \
984         src/shared/spawn-polkit-agent.c \
985         src/shared/spawn-polkit-agent.h \
986         src/shared/apparmor-util.c \
987         src/shared/apparmor-util.h \
988         src/shared/ima-util.c \
989         src/shared/ima-util.h \
990         src/shared/ptyfwd.c \
991         src/shared/ptyfwd.h \
992         src/shared/base-filesystem.c \
993         src/shared/base-filesystem.h \
994         src/shared/uid-range.c \
995         src/shared/uid-range.h \
996         src/shared/install.c \
997         src/shared/install.h \
998         src/shared/install-printf.c \
999         src/shared/install-printf.h \
1000         src/shared/path-lookup.c \
1001         src/shared/path-lookup.h \
1002         src/shared/specifier.c \
1003         src/shared/specifier.h \
1004         src/shared/dev-setup.c \
1005         src/shared/dev-setup.h \
1006         src/shared/dropin.c \
1007         src/shared/dropin.h \
1008         src/shared/condition.c \
1009         src/shared/condition.h \
1010         src/shared/clean-ipc.c \
1011         src/shared/clean-ipc.h \
1012         src/shared/generator.h \
1013         src/shared/generator.c \
1014         src/shared/acpi-fpdt.h \
1015         src/shared/acpi-fpdt.c \
1016         src/shared/boot-timestamps.h \
1017         src/shared/boot-timestamps.c \
1018         src/shared/cgroup-show.c \
1019         src/shared/cgroup-show.h \
1020         src/shared/utmp-wtmp.h \
1021         src/shared/watchdog.c \
1022         src/shared/watchdog.h \
1023         src/shared/spawn-ask-password-agent.c \
1024         src/shared/spawn-ask-password-agent.h \
1025         src/shared/ask-password-api.c \
1026         src/shared/ask-password-api.h \
1027         src/shared/switch-root.h \
1028         src/shared/switch-root.c \
1029         src/shared/import-util.c \
1030         src/shared/import-util.h \
1031         src/shared/sysctl-util.c \
1032         src/shared/sysctl-util.h \
1033         src/shared/bus-util.c \
1034         src/shared/bus-util.h \
1035         src/shared/logs-show.c \
1036         src/shared/logs-show.h \
1037         src/shared/machine-image.c \
1038         src/shared/machine-image.h \
1039         src/shared/machine-pool.c \
1040         src/shared/machine-pool.h \
1041         src/shared/resolve-util.c \
1042         src/shared/resolve-util.h \
1043         src/shared/bus-unit-util.c \
1044         src/shared/bus-unit-util.h \
1045         src/shared/vlan-util.h \
1046         src/shared/vlan-util.c \
1047         src/shared/tests.h \
1048         src/shared/tests.c
1049
1050 if HAVE_UTMP
1051 libshared_la_SOURCES += \
1052         src/shared/utmp-wtmp.c
1053 endif
1054
1055 if HAVE_SECCOMP
1056 libshared_la_SOURCES += \
1057         src/shared/seccomp-util.h \
1058         src/shared/seccomp-util.c
1059 endif
1060
1061 if HAVE_ACL
1062 libshared_la_SOURCES += \
1063         src/shared/acl-util.c \
1064         src/shared/acl-util.h
1065 endif
1066
1067 libshared_la_CFLAGS = \
1068         $(AM_CFLAGS) \
1069         $(ACL_CFLAGS) \
1070         $(LIBIDN_CFLAGS) \
1071         $(SECCOMP_CFLAGS)
1072
1073 libshared_la_LIBADD = \
1074         libsystemd-internal.la \
1075         libsystemd-journal-internal.la \
1076         libudev-internal.la \
1077         $(ACL_LIBS) \
1078         $(LIBIDN_LIBS) \
1079         $(SECCOMP_LIBS)
1080
1081 # -----------------------------------------------------------------------------
1082 if HAVE_LIBIPTC
1083 noinst_LTLIBRARIES += \
1084         libfirewall.la
1085
1086 libfirewall_la_SOURCES = \
1087         src/shared/firewall-util.h \
1088         src/shared/firewall-util.c
1089
1090 libfirewall_la_CFLAGS = \
1091         $(AM_CFLAGS) \
1092         $(LIBIPTC_CFLAGS)
1093
1094 libfirewall_la_LIBADD = \
1095         $(LIBIPTC_LIBS)
1096 endif
1097
1098 # -----------------------------------------------------------------------------
1099 if ENABLE_LDCONFIG
1100 dist_systemunit_DATA += \
1101         units/ldconfig.service
1102
1103 SYSINIT_TARGET_WANTS += \
1104         ldconfig.service
1105 endif
1106
1107 # ------------------------------------------------------------------------------
1108 noinst_LTLIBRARIES += \
1109         libcore.la
1110
1111 libcore_la_SOURCES = \
1112         src/core/unit.c \
1113         src/core/unit.h \
1114         src/core/unit-printf.c \
1115         src/core/unit-printf.h \
1116         src/core/job.c \
1117         src/core/job.h \
1118         src/core/manager.c \
1119         src/core/manager.h \
1120         src/core/transaction.c \
1121         src/core/transaction.h \
1122         src/core/load-fragment.c \
1123         src/core/load-fragment.h \
1124         src/core/service.c \
1125         src/core/service.h \
1126         src/core/socket.c \
1127         src/core/socket.h \
1128         src/core/busname.c \
1129         src/core/busname.h \
1130         src/core/bus-policy.c \
1131         src/core/bus-policy.h \
1132         src/core/target.c \
1133         src/core/target.h \
1134         src/core/device.c \
1135         src/core/device.h \
1136         src/core/mount.c \
1137         src/core/mount.h \
1138         src/core/automount.c \
1139         src/core/automount.h \
1140         src/core/swap.c \
1141         src/core/swap.h \
1142         src/core/timer.c \
1143         src/core/timer.h \
1144         src/core/path.c \
1145         src/core/path.h \
1146         src/core/slice.c \
1147         src/core/slice.h \
1148         src/core/scope.c \
1149         src/core/scope.h \
1150         src/core/load-dropin.c \
1151         src/core/load-dropin.h \
1152         src/core/execute.c \
1153         src/core/execute.h \
1154         src/core/kill.c \
1155         src/core/kill.h \
1156         src/core/dbus.c \
1157         src/core/dbus.h \
1158         src/core/dbus-manager.c \
1159         src/core/dbus-manager.h \
1160         src/core/dbus-unit.c \
1161         src/core/dbus-unit.h \
1162         src/core/dbus-job.c \
1163         src/core/dbus-job.h \
1164         src/core/dbus-service.c \
1165         src/core/dbus-service.h \
1166         src/core/dbus-socket.c \
1167         src/core/dbus-socket.h \
1168         src/core/dbus-busname.c \
1169         src/core/dbus-busname.h \
1170         src/core/dbus-target.c \
1171         src/core/dbus-target.h \
1172         src/core/dbus-device.c \
1173         src/core/dbus-device.h \
1174         src/core/dbus-mount.c \
1175         src/core/dbus-mount.h \
1176         src/core/dbus-automount.c \
1177         src/core/dbus-automount.h \
1178         src/core/dbus-swap.c \
1179         src/core/dbus-swap.h \
1180         src/core/dbus-timer.c \
1181         src/core/dbus-timer.h \
1182         src/core/dbus-path.c \
1183         src/core/dbus-path.h \
1184         src/core/dbus-slice.c \
1185         src/core/dbus-slice.h \
1186         src/core/dbus-scope.c \
1187         src/core/dbus-scope.h \
1188         src/core/dbus-execute.c \
1189         src/core/dbus-execute.h \
1190         src/core/dbus-kill.c \
1191         src/core/dbus-kill.h \
1192         src/core/dbus-cgroup.c \
1193         src/core/dbus-cgroup.h \
1194         src/core/cgroup.c \
1195         src/core/cgroup.h \
1196         src/core/selinux-access.c \
1197         src/core/selinux-access.h \
1198         src/core/selinux-setup.c \
1199         src/core/selinux-setup.h \
1200         src/core/smack-setup.c \
1201         src/core/smack-setup.h \
1202         src/core/ima-setup.c \
1203         src/core/ima-setup.h \
1204         src/core/locale-setup.h \
1205         src/core/locale-setup.c \
1206         src/core/hostname-setup.c \
1207         src/core/hostname-setup.h \
1208         src/core/machine-id-setup.c \
1209         src/core/machine-id-setup.h \
1210         src/core/mount-setup.c \
1211         src/core/mount-setup.h \
1212         src/core/kmod-setup.c \
1213         src/core/kmod-setup.h \
1214         src/core/loopback-setup.h \
1215         src/core/loopback-setup.c \
1216         src/core/namespace.c \
1217         src/core/namespace.h \
1218         src/core/killall.h \
1219         src/core/killall.c \
1220         src/core/audit-fd.c \
1221         src/core/audit-fd.h \
1222         src/core/show-status.c \
1223         src/core/show-status.h \
1224         src/core/failure-action.c \
1225         src/core/failure-action.h
1226
1227 nodist_libcore_la_SOURCES = \
1228         src/core/load-fragment-gperf.c \
1229         src/core/load-fragment-gperf-nulstr.c
1230
1231 libcore_la_CFLAGS = \
1232         $(AM_CFLAGS) \
1233         $(PAM_CFLAGS) \
1234         $(AUDIT_CFLAGS) \
1235         $(KMOD_CFLAGS) \
1236         $(APPARMOR_CFLAGS) \
1237         $(MOUNT_CFLAGS) \
1238         $(SECCOMP_CFLAGS)
1239
1240 libcore_la_LIBADD = \
1241         libshared.la \
1242         $(PAM_LIBS) \
1243         $(AUDIT_LIBS) \
1244         $(KMOD_LIBS) \
1245         $(APPARMOR_LIBS) \
1246         $(MOUNT_LIBS)
1247
1248 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1249         $(AM_V_at)$(MKDIR_P) $(dir $@)
1250         $(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 ";" }' < $< > $@
1251
1252 gperf_gperf_m4_sources = \
1253         src/core/load-fragment-gperf.gperf.m4
1254
1255 gperf_txt_sources = \
1256         src/basic/errno-list.txt \
1257         src/basic/af-list.txt \
1258         src/basic/arphrd-list.txt \
1259         src/basic/cap-list.txt
1260
1261 BUILT_SOURCES += \
1262         $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf.c) \
1263         $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf-nulstr.c) \
1264         $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
1265         $(gperf_txt_sources:-list.txt=-from-name.h) \
1266         $(filter-out %keyboard-keys-to-name.h,$(gperf_txt_sources:-list.txt=-to-name.h))
1267
1268 CLEANFILES += \
1269         $(gperf_txt_sources:-list.txt=-from-name.gperf)
1270 DISTCLEANFILES = \
1271         $(gperf_txt_sources)
1272
1273 EXTRA_DIST += \
1274         $(gperf_gperf_m4_sources) \
1275         $(gperf_gperf_sources)
1276
1277 CLEANFILES += \
1278         $(gperf_txt_sources)
1279
1280 %-from-name.gperf: %-list.txt
1281         $(AM_V_at)$(MKDIR_P) $(dir $@)
1282         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1283
1284 %-from-name.h: %-from-name.gperf
1285         $(AM_V_at)$(MKDIR_P) $(dir $@)
1286         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
1287
1288
1289 src/basic/errno-list.txt:
1290         $(AM_V_at)$(MKDIR_P) $(dir $@)
1291         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
1292
1293 src/basic/errno-to-name.h: src/basic/errno-list.txt
1294         $(AM_V_at)$(MKDIR_P) $(dir $@)
1295         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1296
1297
1298 src/basic/af-list.txt:
1299         $(AM_V_at)$(MKDIR_P) $(dir $@)
1300         $(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; }' >$@
1301
1302 src/basic/af-to-name.h: src/basic/af-list.txt
1303         $(AM_V_at)$(MKDIR_P) $(dir $@)
1304         $(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 "};"}' <$< >$@
1305
1306
1307 src/basic/arphrd-list.txt:
1308         $(AM_V_at)$(MKDIR_P) $(dir $@)
1309         $(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_//' >$@
1310
1311 src/basic/arphrd-to-name.h: src/basic/arphrd-list.txt
1312         $(AM_V_at)$(MKDIR_P) $(dir $@)
1313         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1314
1315 src/basic/arphrd-from-name.gperf: src/basic/arphrd-list.txt
1316         $(AM_V_at)$(MKDIR_P) $(dir $@)
1317         $(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 }' <$< >$@
1318
1319
1320 src/basic/cap-list.txt:
1321         $(AM_V_at)$(MKDIR_P) $(dir $@)
1322         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
1323
1324 src/basic/cap-to-name.h: src/basic/cap-list.txt
1325         $(AM_V_at)$(MKDIR_P) $(dir $@)
1326         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
1327
1328 src/basic/cap-from-name.gperf: src/basic/cap-list.txt
1329         $(AM_V_at)$(MKDIR_P) $(dir $@)
1330         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1331
1332 src/basic/cap-from-name.h: src/basic/cap-from-name.gperf
1333         $(AM_V_at)$(MKDIR_P) $(dir $@)
1334         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
1335
1336 audit_list_includes = -include linux/audit.h -include missing.h
1337 if HAVE_AUDIT
1338 audit_list_includes += -include libaudit.h
1339 endif
1340
1341 src/journal/audit_type-list.txt:
1342         $(AM_V_at)$(MKDIR_P) $(dir $@)
1343         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@
1344
1345 src/journal/audit_type-to-name.h: src/journal/audit_type-list.txt
1346         $(AM_V_at)$(MKDIR_P) $(dir $@)
1347         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf "        case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print "        default: return NULL;\n\t}\n}\n" }' <$< >$@
1348
1349
1350 src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1351         $(AM_V_at)$(MKDIR_P) $(dir $@)
1352         $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1353
1354 src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
1355         $(AM_V_at)$(MKDIR_P) $(dir $@)
1356         $(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 "        default: return NULL;\n\t}\n}\n" }' <$< >$@
1357
1358 src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
1359         $(AM_V_at)$(MKDIR_P) $(dir $@)
1360         $(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 }' <$< >$@
1361
1362 # ------------------------------------------------------------------------------
1363 systemd_SOURCES = \
1364         src/core/main.c
1365
1366 systemd_CFLAGS = \
1367         $(AM_CFLAGS) \
1368         $(SECCOMP_CFLAGS) \
1369         $(MOUNT_CFLAGS)
1370
1371 systemd_LDADD = \
1372         libcore.la
1373
1374 dist_pkgsysconf_DATA += \
1375         src/core/system.conf \
1376         src/core/user.conf
1377
1378 dist_dbuspolicy_DATA += \
1379         src/core/org.freedesktop.systemd1.conf
1380
1381 dist_dbussystemservice_DATA += \
1382         src/core/org.freedesktop.systemd1.service
1383
1384 polkitpolicy_in_in_files += \
1385         src/core/org.freedesktop.systemd1.policy.in.in
1386
1387 pkgconfigdata_DATA += \
1388         src/core/systemd.pc
1389
1390 nodist_rpmmacros_DATA = \
1391         src/core/macros.systemd
1392
1393 BUILT_SOURCES += \
1394         src/core/triggers.systemd
1395
1396 EXTRA_DIST += \
1397         src/core/systemd.pc.in \
1398         src/core/macros.systemd.in \
1399         src/core/triggers.systemd.in
1400
1401 # ------------------------------------------------------------------------------
1402
1403 manual_tests += \
1404         test-ns \
1405         test-cgroup \
1406         test-install \
1407         test-btrfs \
1408         test-acd \
1409         test-ipv4ll-manual \
1410         test-ask-password-api
1411
1412 unsafe_tests = \
1413         test-hostname \
1414         test-ipcrm
1415
1416 if HAVE_LIBIPTC
1417 manual_tests += \
1418         test-firewall-util
1419 endif
1420
1421 if HAVE_KMOD
1422 manual_tests += \
1423         test-netlink-manual
1424 endif
1425
1426 tests += \
1427         test-daemon \
1428         test-log \
1429         test-loopback \
1430         test-engine \
1431         test-watchdog \
1432         test-cgroup-mask \
1433         test-job-type \
1434         test-env-util \
1435         test-strbuf \
1436         test-strv \
1437         test-path \
1438         test-path-util \
1439         test-strxcpyx \
1440         test-siphash24 \
1441         test-unit-name \
1442         test-unit-file \
1443         test-utf8 \
1444         test-ellipsize \
1445         test-util \
1446         test-cpu-set-util \
1447         test-hexdecoct \
1448         test-escape \
1449         test-alloc-util \
1450         test-proc-cmdline \
1451         test-io-util \
1452         test-glob-util \
1453         test-xattr-util \
1454         test-fs-util \
1455         test-web-util \
1456         test-stat-util \
1457         test-fd-util \
1458         test-string-util \
1459         test-extract-word \
1460         test-parse-util \
1461         test-user-util \
1462         test-hostname-util \
1463         test-process-util \
1464         test-terminal-util \
1465         test-path-lookup \
1466         test-barrier \
1467         test-tmpfiles \
1468         test-namespace \
1469         test-date \
1470         test-sleep \
1471         test-replace-var \
1472         test-sched-prio \
1473         test-calendarspec \
1474         test-strip-tab-ansi \
1475         test-cgroup-util \
1476         test-fstab-util \
1477         test-prioq \
1478         test-fileio \
1479         test-time \
1480         test-clock \
1481         test-hashmap \
1482         test-set \
1483         test-bitmap \
1484         test-list \
1485         test-unaligned \
1486         test-tables \
1487         test-device-nodes \
1488         test-xml \
1489         test-architecture \
1490         test-socket-util \
1491         test-fdset \
1492         test-conf-files \
1493         test-conf-parser \
1494         test-capability \
1495         test-async \
1496         test-ratelimit \
1497         test-condition \
1498         test-uid-range \
1499         test-locale-util \
1500         test-execute \
1501         test-copy \
1502         test-cap-list \
1503         test-sigbus \
1504         test-verbs \
1505         test-af-list \
1506         test-arphrd-list \
1507         test-dns-domain \
1508         test-install-root \
1509         test-rlimit-util \
1510         test-signal-util \
1511         test-selinux \
1512         test-sizeof
1513
1514 if HAVE_ACL
1515 tests += \
1516         test-acl-util
1517 endif
1518
1519 EXTRA_DIST += \
1520         test/a.service \
1521         test/basic.target \
1522         test/b.service \
1523         test/c.service \
1524         test/daughter.service \
1525         test/d.service \
1526         test/end.service \
1527         test/e.service \
1528         test/f.service \
1529         test/grandchild.service \
1530         test/g.service \
1531         test/hello-after-sleep.target \
1532         test/hello.service \
1533         test/h.service \
1534         test/parent-deep.slice \
1535         test/parent.slice \
1536         test/sched_idle_bad.service \
1537         test/sched_idle_ok.service \
1538         test/sched_rr_bad.service \
1539         test/sched_rr_change.service \
1540         test/sched_rr_ok.service \
1541         test/shutdown.target \
1542         test/sleep.service \
1543         test/sockets.target \
1544         test/son.service \
1545         test/sysinit.target \
1546         test/testsuite.target \
1547         test/timers.target \
1548         test/unstoppable.service \
1549         test/test-path/paths.target \
1550         test/test-path/basic.target \
1551         test/test-path/sysinit.target \
1552         test/test-path/path-changed.service \
1553         test/test-path/path-directorynotempty.service \
1554         test/test-path/path-existsglob.service \
1555         test/test-path/path-exists.service \
1556         test/test-path/path-makedirectory.service \
1557         test/test-path/path-modified.service \
1558         test/test-path/path-mycustomunit.service \
1559         test/test-path/path-service.service \
1560         test/test-path/path-changed.path \
1561         test/test-path/path-directorynotempty.path \
1562         test/test-path/path-existsglob.path \
1563         test/test-path/path-exists.path \
1564         test/test-path/path-makedirectory.path \
1565         test/test-path/path-modified.path \
1566         test/test-path/path-unit.path \
1567         test/test-execute/exec-environment-empty.service \
1568         test/test-execute/exec-environment-multiple.service \
1569         test/test-execute/exec-environment.service \
1570         test/test-execute/exec-passenvironment-absent.service \
1571         test/test-execute/exec-passenvironment-empty.service \
1572         test/test-execute/exec-passenvironment-repeated.service \
1573         test/test-execute/exec-passenvironment.service \
1574         test/test-execute/exec-group.service \
1575         test/test-execute/exec-group-nfsnobody.service \
1576         test/test-execute/exec-ignoresigpipe-no.service \
1577         test/test-execute/exec-ignoresigpipe-yes.service \
1578         test/test-execute/exec-personality-x86-64.service \
1579         test/test-execute/exec-personality-x86.service \
1580         test/test-execute/exec-personality-s390.service \
1581         test/test-execute/exec-privatedevices-no.service \
1582         test/test-execute/exec-privatedevices-yes.service \
1583         test/test-execute/exec-privatetmp-no.service \
1584         test/test-execute/exec-privatetmp-yes.service \
1585         test/test-execute/exec-spec-interpolation.service \
1586         test/test-execute/exec-systemcallerrornumber.service \
1587         test/test-execute/exec-systemcallfilter-failing2.service \
1588         test/test-execute/exec-systemcallfilter-failing.service \
1589         test/test-execute/exec-systemcallfilter-not-failing2.service \
1590         test/test-execute/exec-systemcallfilter-not-failing.service \
1591         test/test-execute/exec-systemcallfilter-system-user.service \
1592         test/test-execute/exec-systemcallfilter-system-user-nfsnobody.service \
1593         test/test-execute/exec-user.service \
1594         test/test-execute/exec-user-nfsnobody.service \
1595         test/test-execute/exec-workingdirectory.service \
1596         test/test-execute/exec-umask-0177.service \
1597         test/test-execute/exec-umask-default.service \
1598         test/test-execute/exec-privatenetwork-yes.service \
1599         test/test-execute/exec-environmentfile.service \
1600         test/test-execute/exec-oomscoreadjust-positive.service \
1601         test/test-execute/exec-oomscoreadjust-negative.service \
1602         test/test-execute/exec-ioschedulingclass-best-effort.service \
1603         test/test-execute/exec-ioschedulingclass-idle.service \
1604         test/test-execute/exec-ioschedulingclass-none.service \
1605         test/test-execute/exec-ioschedulingclass-realtime.service \
1606         test/test-execute/exec-capabilityboundingset-invert.service \
1607         test/test-execute/exec-capabilityboundingset-merge.service \
1608         test/test-execute/exec-capabilityboundingset-reset.service \
1609         test/test-execute/exec-capabilityboundingset-simple.service \
1610         test/test-execute/exec-capabilityambientset.service \
1611         test/test-execute/exec-capabilityambientset-nfsnobody.service \
1612         test/test-execute/exec-capabilityambientset-merge.service \
1613         test/test-execute/exec-capabilityambientset-merge-nfsnobody.service \
1614         test/test-execute/exec-runtimedirectory.service \
1615         test/test-execute/exec-runtimedirectory-mode.service \
1616         test/test-execute/exec-runtimedirectory-owner.service \
1617         test/test-execute/exec-runtimedirectory-owner-nfsnobody.service \
1618         test/bus-policy/hello.conf \
1619         test/bus-policy/methods.conf \
1620         test/bus-policy/ownerships.conf \
1621         test/bus-policy/signals.conf \
1622         test/bus-policy/check-own-rules.conf \
1623         test/bus-policy/many-rules.conf \
1624         test/bus-policy/test.conf
1625
1626
1627 EXTRA_DIST += \
1628         src/test/test-helper.h
1629
1630 test_device_nodes_SOURCES = \
1631         src/test/test-device-nodes.c
1632
1633 test_device_nodes_LDADD = \
1634         libshared.la
1635
1636 test_engine_SOURCES = \
1637         src/test/test-engine.c
1638
1639 test_engine_CFLAGS = \
1640         $(AM_CFLAGS) \
1641         $(SECCOMP_CFLAGS) \
1642         $(MOUNT_CFLAGS)
1643
1644 test_engine_LDADD = \
1645         libcore.la
1646
1647 test_job_type_SOURCES = \
1648         src/test/test-job-type.c
1649
1650 test_job_type_CFLAGS = \
1651         $(AM_CFLAGS) \
1652         $(SECCOMP_CFLAGS) \
1653         $(MOUNT_CFLAGS)
1654
1655 test_job_type_LDADD = \
1656         libcore.la
1657
1658 test_ns_SOURCES = \
1659         src/test/test-ns.c
1660
1661 test_ns_CFLAGS = \
1662         $(AM_CFLAGS) \
1663         $(SECCOMP_CFLAGS)
1664
1665 test_ns_LDADD = \
1666         libcore.la
1667
1668 test_loopback_SOURCES = \
1669         src/test/test-loopback.c
1670
1671 test_loopback_LDADD = \
1672         libcore.la
1673
1674 test_hostname_SOURCES = \
1675         src/test/test-hostname.c
1676
1677 test_hostname_LDADD = \
1678         libcore.la
1679
1680 test_dns_domain_SOURCES = \
1681         src/test/test-dns-domain.c
1682
1683 test_dns_domain_LDADD = \
1684         libsystemd-network.la \
1685         libshared.la
1686
1687
1688 if ENABLE_EFI
1689 tests += \
1690         test-boot-timestamps
1691
1692 test_boot_timestamps_SOURCES = \
1693         src/test/test-boot-timestamps.c
1694
1695 test_boot_timestamps_LDADD = \
1696         libshared.la
1697 endif
1698
1699 test_unit_name_SOURCES = \
1700         src/test/test-unit-name.c
1701
1702 test_unit_name_CFLAGS = \
1703         $(AM_CFLAGS) \
1704         $(SECCOMP_CFLAGS) \
1705         $(MOUNT_CFLAGS)
1706
1707 test_unit_name_LDADD = \
1708         libcore.la
1709
1710 test_unit_file_SOURCES = \
1711         src/test/test-unit-file.c
1712
1713 test_unit_file_CFLAGS = \
1714         $(AM_CFLAGS) \
1715         $(SECCOMP_CFLAGS) \
1716         $(MOUNT_CFLAGS)
1717
1718 test_unit_file_LDADD = \
1719         libcore.la
1720
1721 test_utf8_SOURCES = \
1722         src/test/test-utf8.c
1723
1724 test_utf8_LDADD = \
1725         libshared.la
1726
1727 test_capability_SOURCES = \
1728         src/test/test-capability.c
1729
1730 test_capability_LDADD = \
1731         libshared.la
1732
1733 test_async_SOURCES = \
1734         src/test/test-async.c
1735
1736 test_async_LDADD = \
1737         libshared.la
1738
1739 test_locale_util_SOURCES = \
1740         src/test/test-locale-util.c
1741
1742 test_locale_util_LDADD = \
1743         libshared.la
1744
1745 test_copy_SOURCES = \
1746         src/test/test-copy.c
1747
1748 test_copy_LDADD = \
1749         libshared.la
1750
1751 test_sigbus_SOURCES = \
1752         src/test/test-sigbus.c
1753
1754 test_sigbus_LDADD = \
1755         libshared.la
1756
1757 test_condition_SOURCES = \
1758         src/test/test-condition.c
1759
1760 test_condition_LDADD = \
1761         libshared.la
1762
1763 test_fdset_SOURCES = \
1764         src/test/test-fdset.c
1765
1766 test_fdset_LDADD = \
1767         libshared.la
1768
1769 test_fstab_util_SOURCES = \
1770         src/test/test-fstab-util.c
1771
1772 test_fstab_util_LDADD = \
1773         libshared.la
1774
1775 test_ratelimit_SOURCES = \
1776         src/test/test-ratelimit.c
1777
1778 test_ratelimit_LDADD = \
1779         libshared.la
1780
1781 test_util_SOURCES = \
1782         src/test/test-util.c
1783
1784 test_util_LDADD = \
1785         libshared.la
1786
1787 test_hexdecoct_SOURCES = \
1788         src/test/test-hexdecoct.c
1789
1790 test_hexdecoct_LDADD = \
1791         libbasic.la
1792
1793 test_alloc_util_SOURCES = \
1794         src/test/test-alloc-util.c
1795
1796 test_alloc_util_LDADD = \
1797         libbasic.la
1798
1799 test_xattr_util_SOURCES = \
1800         src/test/test-xattr-util.c
1801
1802 test_xattr_util_LDADD = \
1803         libbasic.la
1804
1805 test_io_util_SOURCES = \
1806         src/test/test-io-util.c
1807
1808 test_io_util_LDADD = \
1809         libbasic.la
1810
1811 test_glob_util_SOURCES = \
1812         src/test/test-glob-util.c
1813
1814 test_glob_util_LDADD = \
1815         libbasic.la
1816
1817 test_fs_util_SOURCES = \
1818         src/test/test-fs-util.c
1819
1820 test_fs_util_LDADD = \
1821         libbasic.la
1822
1823 test_proc_cmdline_SOURCES = \
1824         src/test/test-proc-cmdline.c
1825
1826 test_proc_cmdline_LDADD = \
1827         libbasic.la
1828
1829 test_fd_util_SOURCES = \
1830         src/test/test-fd-util.c
1831
1832 test_fd_util_LDADD = \
1833         libbasic.la
1834
1835 test_web_util_SOURCES = \
1836         src/test/test-web-util.c
1837
1838 test_web_util_LDADD = \
1839         libbasic.la
1840
1841 test_cpu_set_util_SOURCES = \
1842         src/test/test-cpu-set-util.c
1843
1844 test_cpu_set_util_LDADD = \
1845         libbasic.la
1846
1847 test_stat_util_SOURCES = \
1848         src/test/test-stat-util.c
1849
1850 test_stat_util_LDADD = \
1851         libbasic.la
1852
1853 test_escape_SOURCES = \
1854         src/test/test-escape.c
1855
1856 test_escape_LDADD = \
1857         libbasic.la
1858
1859 test_string_util_SOURCES = \
1860         src/test/test-string-util.c
1861
1862 test_string_util_LDADD = \
1863         libshared.la
1864
1865 test_extract_word_SOURCES = \
1866         src/test/test-extract-word.c
1867
1868 test_extract_word_LDADD = \
1869         libshared.la
1870
1871 test_parse_util_SOURCES = \
1872         src/test/test-parse-util.c
1873
1874 test_parse_util_LDADD = \
1875         libshared.la
1876
1877 test_user_util_SOURCES = \
1878         src/test/test-user-util.c
1879
1880 test_user_util_LDADD = \
1881         libshared.la
1882
1883 test_hostname_util_SOURCES = \
1884         src/test/test-hostname-util.c
1885
1886 test_hostname_util_LDADD = \
1887         libshared.la
1888
1889 test_process_util_SOURCES = \
1890         src/test/test-process-util.c
1891
1892 test_process_util_LDADD = \
1893         libshared.la
1894
1895 test_terminal_util_SOURCES = \
1896         src/test/test-terminal-util.c
1897
1898 test_terminal_util_LDADD = \
1899         libshared.la
1900
1901 test_path_lookup_SOURCES = \
1902         src/test/test-path-lookup.c
1903
1904 test_path_lookup_LDADD = \
1905         libshared.la
1906
1907 test_uid_range_SOURCES = \
1908         src/test/test-uid-range.c
1909
1910 test_uid_range_LDADD = \
1911         libshared.la
1912
1913 test_cap_list_SOURCES = \
1914         src/test/test-cap-list.c
1915
1916 test_cap_list_LDADD = \
1917         libshared.la
1918
1919 test_socket_util_SOURCES = \
1920         src/test/test-socket-util.c
1921
1922 test_socket_util_LDADD = \
1923         libshared.la
1924
1925 test_barrier_SOURCES = \
1926         src/test/test-barrier.c
1927
1928 test_barrier_LDADD = \
1929         libshared.la
1930
1931 test_tmpfiles_SOURCES = \
1932         src/test/test-tmpfiles.c
1933
1934 test_tmpfiles_LDADD = \
1935         libshared.la
1936
1937 test_namespace_SOURCES = \
1938         src/test/test-namespace.c
1939
1940 test_verbs_SOURCES = \
1941         src/test/test-verbs.c
1942
1943 test_verbs_LDADD = \
1944         libshared.la
1945
1946 test_install_root_SOURCES = \
1947         src/test/test-install-root.c
1948
1949 test_install_root_LDADD = \
1950         libshared.la
1951
1952 test_acl_util_SOURCES = \
1953         src/test/test-acl-util.c
1954
1955 test_acl_util_LDADD = \
1956         libshared.la
1957
1958 test_namespace_LDADD = \
1959         libcore.la
1960
1961 test_rlimit_util_SOURCES = \
1962         src/test/test-rlimit-util.c
1963
1964 test_rlimit_util_LDADD = \
1965         libshared.la
1966
1967 test_ask_password_api_SOURCES = \
1968         src/test/test-ask-password-api.c
1969
1970 test_ask_password_api_LDADD = \
1971         libshared.la
1972
1973 test_signal_util_SOURCES = \
1974         src/test/test-signal-util.c
1975
1976 test_signal_util_LDADD = \
1977         libshared.la
1978
1979 test_selinux_SOURCES = \
1980         src/test/test-selinux.c
1981
1982 test_selinux_LDADD = \
1983         libshared.la
1984
1985 test_sizeof_SOURCES = \
1986         src/test/test-sizeof.c
1987
1988 test_sizeof_LDADD = \
1989         libshared.la
1990
1991 BUILT_SOURCES += \
1992         src/test/test-hashmap-ordered.c
1993
1994 src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
1995         $(AM_V_at)$(MKDIR_P) $(dir $@)
1996         $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
1997                            { if (!match($$0, "^#include"))          \
1998                                  gsub(/hashmap/, "ordered_hashmap"); \
1999                              gsub(/HASHMAP/, "ORDERED_HASHMAP");     \
2000                              gsub(/Hashmap/, "OrderedHashmap");      \
2001                              print }' <$< >$@
2002
2003 nodist_test_hashmap_SOURCES = \
2004         src/test/test-hashmap-ordered.c
2005
2006 test_hashmap_SOURCES = \
2007         src/test/test-hashmap.c \
2008         src/test/test-hashmap-plain.c
2009
2010 test_hashmap_LDADD = \
2011         libshared.la
2012
2013 test_set_SOURCES = \
2014         src/test/test-set.c
2015
2016 test_set_LDADD = \
2017         libshared.la
2018
2019 test_bitmap_SOURCES = \
2020         src/test/test-bitmap.c
2021
2022 test_bitmap_LDADD = \
2023         libshared.la
2024
2025 test_xml_SOURCES = \
2026         src/test/test-xml.c
2027
2028 test_xml_LDADD = \
2029         libshared.la
2030
2031 test_list_SOURCES = \
2032         src/test/test-list.c
2033
2034 test_list_LDADD = \
2035         libshared.la
2036
2037 test_unaligned_LDADD = \
2038         libshared.la
2039
2040 test_unaligned_SOURCES = \
2041         src/test/test-unaligned.c
2042
2043 test_tables_SOURCES = \
2044         src/test/test-tables.c \
2045         src/shared/test-tables.h \
2046         src/journal/journald-server.c \
2047         src/journal/journald-server.h
2048
2049 test_tables_CPPFLAGS = \
2050         $(AM_CPPFLAGS)
2051
2052 test_tables_CFLAGS = \
2053         $(AM_CFLAGS) \
2054         $(SECCOMP_CFLAGS) \
2055         $(MOUNT_CFLAGS)
2056
2057 test_tables_LDADD = \
2058         libjournal-core.la \
2059         libcore.la \
2060         libudev-core.la
2061
2062 test_prioq_SOURCES = \
2063         src/test/test-prioq.c
2064
2065 test_prioq_LDADD = \
2066         libshared.la
2067
2068 test_fileio_SOURCES = \
2069         src/test/test-fileio.c
2070
2071 test_fileio_LDADD = \
2072         libshared.la
2073
2074 test_time_SOURCES = \
2075         src/test/test-time.c
2076
2077 test_time_LDADD = \
2078         libshared.la
2079
2080 test_clock_SOURCES = \
2081         src/test/test-clock.c
2082
2083 test_clock_LDADD = \
2084         libshared.la
2085
2086 test_architecture_SOURCES = \
2087         src/test/test-architecture.c
2088
2089 test_architecture_LDADD = \
2090         libshared.la
2091
2092 test_log_SOURCES = \
2093         src/test/test-log.c
2094
2095 test_log_LDADD = \
2096         libshared.la
2097
2098 test_ipcrm_SOURCES = \
2099         src/test/test-ipcrm.c
2100
2101 test_ipcrm_LDADD = \
2102         libshared.la
2103
2104 test_btrfs_SOURCES = \
2105         src/test/test-btrfs.c
2106
2107 test_btrfs_LDADD = \
2108         libshared.la
2109
2110 if HAVE_LIBIPTC
2111 test_firewall_util_SOURCES = \
2112         src/test/test-firewall-util.c
2113
2114 test_firewall_util_CFLAGS = \
2115         $(AM_CFLAGS) \
2116         $(LIBIPTC_CFLAGS)
2117
2118 test_firewall_util_LDADD = \
2119         libfirewall.la \
2120         libshared.la \
2121         $(LIBIPTC_LIBS)
2122 endif
2123
2124 test_netlink_manual_SOURCES = \
2125         src/test/test-netlink-manual.c
2126
2127 test_netlink_manual_CFLAGS = \
2128         $(AM_CFLAGS) \
2129         $(KMOD_CFLAGS)
2130
2131 test_netlink_manual_LDADD = \
2132         libshared.la \
2133         $(KMOD_LIBS)
2134
2135 test_ellipsize_SOURCES = \
2136         src/test/test-ellipsize.c
2137
2138 test_ellipsize_LDADD = \
2139         libshared.la
2140
2141 test_date_SOURCES = \
2142         src/test/test-date.c
2143
2144 test_date_LDADD = \
2145         libshared.la
2146
2147 test_sleep_SOURCES = \
2148         src/test/test-sleep.c
2149
2150 test_sleep_LDADD = \
2151         libcore.la
2152
2153 test_replace_var_SOURCES = \
2154         src/test/test-replace-var.c
2155
2156 test_replace_var_LDADD = \
2157         libshared.la
2158
2159 test_calendarspec_SOURCES = \
2160         src/test/test-calendarspec.c
2161
2162 test_calendarspec_LDADD = \
2163         libshared.la
2164
2165 test_strip_tab_ansi_SOURCES = \
2166         src/test/test-strip-tab-ansi.c
2167
2168 test_strip_tab_ansi_LDADD = \
2169         libshared.la
2170
2171 test_daemon_SOURCES = \
2172         src/test/test-daemon.c
2173
2174 test_daemon_LDADD = \
2175         libshared.la
2176
2177 test_cgroup_SOURCES = \
2178         src/test/test-cgroup.c
2179
2180 test_cgroup_LDADD = \
2181         libshared.la
2182
2183 test_cgroup_mask_SOURCES = \
2184         src/test/test-cgroup-mask.c
2185
2186 test_cgroup_mask_CPPFLAGS = \
2187         $(AM_CPPFLAGS) \
2188         $(MOUNT_CFLAGS)
2189
2190 test_cgroup_mask_CFLAGS = \
2191         $(AM_CFLAGS) \
2192         $(SECCOMP_CFLAGS)
2193
2194 test_cgroup_mask_LDADD = \
2195         libcore.la
2196
2197 test_cgroup_util_SOURCES = \
2198         src/test/test-cgroup-util.c
2199
2200 test_cgroup_util_LDADD = \
2201         libshared.la
2202
2203 test_env_util_SOURCES = \
2204         src/test/test-env-util.c
2205
2206 test_env_util_LDADD = \
2207         libshared.la
2208
2209 test_strbuf_SOURCES = \
2210         src/test/test-strbuf.c
2211
2212 test_strbuf_LDADD = \
2213         libshared.la
2214
2215 test_strv_SOURCES = \
2216         src/test/test-strv.c
2217
2218 test_strv_LDADD = \
2219         libshared.la
2220
2221 test_path_util_SOURCES = \
2222         src/test/test-path-util.c
2223
2224 test_path_util_LDADD = \
2225         libshared.la
2226
2227 test_path_SOURCES = \
2228         src/test/test-path.c
2229
2230 test_path_CFLAGS = \
2231         $(AM_CFLAGS) \
2232         $(MOUNT_CFLAGS)
2233
2234 test_path_LDADD = \
2235         libcore.la
2236
2237 test_execute_SOURCES = \
2238         src/test/test-execute.c
2239
2240 test_execute_CFLAGS = \
2241         $(AM_CFLAGS) \
2242         $(MOUNT_CFLAGS)
2243
2244 test_execute_LDADD = \
2245         libcore.la
2246
2247 test_siphash24_SOURCES = \
2248         src/test/test-siphash24.c
2249
2250 test_siphash24_LDADD = \
2251         libshared.la
2252
2253 test_strxcpyx_SOURCES = \
2254         src/test/test-strxcpyx.c
2255
2256 test_strxcpyx_LDADD = \
2257         libshared.la
2258
2259 test_install_SOURCES = \
2260         src/test/test-install.c
2261
2262 test_install_LDADD = \
2263         libshared.la
2264
2265 test_watchdog_SOURCES = \
2266         src/test/test-watchdog.c
2267
2268 test_watchdog_LDADD = \
2269         libshared.la
2270
2271 test_sched_prio_SOURCES = \
2272         src/test/test-sched-prio.c
2273
2274 test_sched_prio_CPPFLAGS = \
2275         $(AM_CPPFLAGS) \
2276         $(MOUNT_CFLAGS)
2277
2278 test_sched_prio_CFLAGS = \
2279         $(AM_CFLAGS) \
2280         $(SECCOMP_CFLAGS)
2281
2282 test_sched_prio_LDADD = \
2283         libcore.la
2284
2285 test_conf_files_SOURCES = \
2286         src/test/test-conf-files.c
2287
2288 test_conf_files_LDADD = \
2289         libshared.la
2290
2291 test_conf_parser_SOURCES = \
2292         src/test/test-conf-parser.c
2293
2294 test_conf_parser_LDADD = \
2295         libshared.la
2296
2297 test_af_list_SOURCES = \
2298         src/test/test-af-list.c
2299
2300 test_af_list_LDADD = \
2301         libbasic.la
2302
2303 test_arphrd_list_SOURCES = \
2304         src/test/test-arphrd-list.c
2305
2306 test_arphrd_list_LDADD = \
2307         libbasic.la
2308
2309 # ------------------------------------------------------------------------------
2310 ## .PHONY so it always rebuilds it
2311 .PHONY: coverage lcov-run lcov-report coverage-sync
2312
2313 # run lcov from scratch, always
2314 coverage: all
2315         $(MAKE) lcov-run
2316         $(MAKE) lcov-report
2317
2318 coverage_dir = coverage
2319 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
2320
2321 if ENABLE_COVERAGE
2322 # reset run coverage tests
2323 lcov-run:
2324         @rm -rf $(coverage_dir)
2325         lcov $(coverage_opts) --zerocounters
2326         -$(MAKE) check
2327
2328 # generate report based on current coverage data
2329 lcov-report:
2330         $(MKDIR_P) $(coverage_dir)
2331         lcov $(coverage_opts) --compat-libtool --capture --no-external \
2332                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
2333         lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
2334         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
2335         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
2336
2337 # lcov doesn't work properly with vpath builds, make sure that bad
2338 # output is not uploaded by mistake.
2339 coverage-sync: coverage
2340         test "$(builddir)" = "$(srcdir)"
2341         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
2342
2343 else
2344 lcov-run lcov-report:
2345         echo "Need to reconfigure with --enable-coverage"
2346 endif
2347
2348 # ------------------------------------------------------------------------------
2349 systemd_analyze_SOURCES = \
2350         src/analyze/analyze.c \
2351         src/analyze/analyze-verify.c \
2352         src/analyze/analyze-verify.h
2353
2354 systemd_analyze_CFLAGS = \
2355         $(AM_CFLAGS) \
2356         $(SECCOMP_CFLAGS) \
2357         $(MOUNT_CFLAGS)
2358
2359 systemd_analyze_LDADD = \
2360         libcore.la
2361
2362 # ------------------------------------------------------------------------------
2363 systemd_initctl_SOURCES = \
2364         src/initctl/initctl.c
2365
2366 systemd_initctl_LDADD = \
2367         libshared.la
2368
2369 # ------------------------------------------------------------------------------
2370 systemd_update_utmp_SOURCES = \
2371         src/update-utmp/update-utmp.c
2372
2373 systemd_update_utmp_CFLAGS = \
2374         $(AM_CFLAGS) \
2375         $(AUDIT_CFLAGS)
2376
2377 systemd_update_utmp_LDADD = \
2378         libshared.la \
2379         $(AUDIT_LIBS)
2380
2381 # ------------------------------------------------------------------------------
2382 systemd_update_done_SOURCES = \
2383         src/update-done/update-done.c
2384
2385 systemd_update_done_LDADD = \
2386         libshared.la
2387
2388 # ------------------------------------------------------------------------------
2389 systemd_shutdown_SOURCES = \
2390         src/core/umount.c \
2391         src/core/umount.h \
2392         src/core/shutdown.c \
2393         src/core/mount-setup.c \
2394         src/core/mount-setup.h \
2395         src/core/killall.h \
2396         src/core/killall.c
2397
2398 systemd_shutdown_LDADD = \
2399         libshared.la
2400
2401 # ------------------------------------------------------------------------------
2402 if HAVE_KMOD
2403 systemd_modules_load_SOURCES = \
2404         src/modules-load/modules-load.c
2405
2406 systemd_modules_load_CFLAGS = \
2407         $(AM_CFLAGS) \
2408         $(KMOD_CFLAGS)
2409
2410 systemd_modules_load_LDADD = \
2411         libshared.la \
2412         $(KMOD_LIBS)
2413
2414 rootlibexec_PROGRAMS += \
2415         systemd-modules-load
2416
2417 nodist_systemunit_DATA += \
2418         units/systemd-modules-load.service
2419
2420 SYSINIT_TARGET_WANTS += \
2421         systemd-modules-load.service
2422
2423 if ENABLE_TMPFILES
2424 nodist_systemunit_DATA += \
2425         units/kmod-static-nodes.service
2426
2427 SYSINIT_TARGET_WANTS += \
2428         kmod-static-nodes.service
2429 endif
2430 endif
2431
2432 EXTRA_DIST += \
2433         units/systemd-modules-load.service.in \
2434         units/kmod-static-nodes.service.in
2435
2436 # ------------------------------------------------------------------------------
2437 if ENABLE_TMPFILES
2438 systemd_tmpfiles_SOURCES = \
2439         src/tmpfiles/tmpfiles.c
2440
2441 systemd_tmpfiles_LDADD = \
2442         libshared.la
2443
2444 rootbin_PROGRAMS += \
2445         systemd-tmpfiles
2446
2447 dist_systemunit_DATA += \
2448         units/systemd-tmpfiles-clean.timer
2449
2450 nodist_systemunit_DATA += \
2451         units/systemd-tmpfiles-setup-dev.service \
2452         units/systemd-tmpfiles-setup.service \
2453         units/systemd-tmpfiles-clean.service
2454
2455 nodist_tmpfiles_DATA = \
2456         tmpfiles.d/systemd.conf \
2457         tmpfiles.d/etc.conf
2458
2459 dist_tmpfiles_DATA = \
2460         tmpfiles.d/systemd-nologin.conf \
2461         tmpfiles.d/tmp.conf \
2462         tmpfiles.d/x11.conf \
2463         tmpfiles.d/var.conf \
2464         tmpfiles.d/home.conf \
2465         tmpfiles.d/systemd-nspawn.conf \
2466         tmpfiles.d/journal-nocow.conf
2467
2468 if HAVE_SYSV_COMPAT
2469 dist_tmpfiles_DATA += \
2470         tmpfiles.d/legacy.conf
2471 endif
2472
2473 SYSINIT_TARGET_WANTS += \
2474         systemd-tmpfiles-setup-dev.service \
2475         systemd-tmpfiles-setup.service
2476
2477 dist_zshcompletion_data += \
2478         shell-completion/zsh/_systemd-tmpfiles
2479
2480 TIMERS_TARGET_WANTS += \
2481         systemd-tmpfiles-clean.timer
2482
2483 INSTALL_DIRS += \
2484         $(tmpfilesdir) \
2485         $(sysconfdir)/tmpfiles.d
2486 endif
2487
2488 EXTRA_DIST += \
2489         tmpfiles.d/systemd.conf.m4 \
2490         tmpfiles.d/etc.conf.m4 \
2491         units/systemd-tmpfiles-setup-dev.service.in \
2492         units/systemd-tmpfiles-setup.service.in \
2493         units/systemd-tmpfiles-clean.service.in
2494
2495 # ------------------------------------------------------------------------------
2496 if ENABLE_SYSUSERS
2497 systemd_sysusers_SOURCES = \
2498         src/sysusers/sysusers.c
2499
2500 systemd_sysusers_LDADD = \
2501         libshared.la
2502
2503 rootbin_PROGRAMS += \
2504         systemd-sysusers
2505
2506 nodist_systemunit_DATA += \
2507         units/systemd-sysusers.service
2508
2509 SYSINIT_TARGET_WANTS += \
2510         systemd-sysusers.service
2511
2512 nodist_sysusers_DATA = \
2513         sysusers.d/systemd.conf \
2514         sysusers.d/basic.conf
2515
2516 if HAVE_REMOTE
2517 nodist_sysusers_DATA += \
2518         sysusers.d/systemd-remote.conf
2519 endif
2520
2521 INSTALL_DIRS += \
2522         $(sysusersdir)
2523 endif
2524
2525 EXTRA_DIST += \
2526         units/systemd-sysusers.service.in \
2527         sysusers.d/systemd.conf.m4 \
2528         sysusers.d/systemd-remote.conf.m4 \
2529         sysusers.d/basic.conf.in
2530
2531 # ------------------------------------------------------------------------------
2532 dist_factory_etc_DATA = \
2533         factory/etc/nsswitch.conf
2534
2535 if HAVE_PAM
2536 dist_factory_pam_DATA = \
2537         factory/etc/pam.d/system-auth \
2538         factory/etc/pam.d/other
2539 endif
2540
2541 # ------------------------------------------------------------------------------
2542 if ENABLE_FIRSTBOOT
2543 systemd_firstboot_SOURCES = \
2544         src/firstboot/firstboot.c
2545
2546 systemd_firstboot_LDADD = \
2547         libshared.la \
2548         -lcrypt
2549
2550 rootbin_PROGRAMS += \
2551         systemd-firstboot
2552
2553 nodist_systemunit_DATA += \
2554         units/systemd-firstboot.service
2555
2556 SYSINIT_TARGET_WANTS += \
2557         systemd-firstboot.service
2558 endif
2559
2560 EXTRA_DIST += \
2561         units/systemd-firstboot.service.in
2562
2563 # ------------------------------------------------------------------------------
2564 systemd_machine_id_setup_SOURCES = \
2565         src/machine-id-setup/machine-id-setup-main.c \
2566         src/core/machine-id-setup.c \
2567         src/core/machine-id-setup.h
2568
2569 systemd_machine_id_setup_LDADD = \
2570         libshared.la
2571
2572 SYSINIT_TARGET_WANTS += \
2573         systemd-machine-id-commit.service
2574
2575 # ------------------------------------------------------------------------------
2576 systemd_sysctl_SOURCES = \
2577         src/sysctl/sysctl.c
2578
2579 systemd_sysctl_LDADD = \
2580         libshared.la
2581
2582 # ------------------------------------------------------------------------------
2583 systemd_sleep_SOURCES = \
2584         src/sleep/sleep.c
2585
2586 systemd_sleep_LDADD = \
2587         libshared.la
2588
2589 # ------------------------------------------------------------------------------
2590 systemd_fsck_SOURCES = \
2591         src/fsck/fsck.c
2592
2593 systemd_fsck_LDADD = \
2594         libshared.la
2595
2596 # ------------------------------------------------------------------------------
2597 systemd_ac_power_SOURCES = \
2598         src/ac-power/ac-power.c
2599
2600 systemd_ac_power_LDADD = \
2601         libshared.la
2602
2603 # ------------------------------------------------------------------------------
2604 systemd_detect_virt_SOURCES = \
2605         src/detect-virt/detect-virt.c
2606
2607 systemd_detect_virt_LDADD = \
2608         libshared.la
2609
2610 INSTALL_EXEC_HOOKS += \
2611         systemd-detect-virt-install-hook
2612
2613 # ------------------------------------------------------------------------------
2614 systemd_delta_SOURCES = \
2615         src/delta/delta.c
2616
2617 systemd_delta_LDADD = \
2618         libshared.la
2619
2620 # ------------------------------------------------------------------------------
2621 systemd_getty_generator_SOURCES = \
2622         src/getty-generator/getty-generator.c
2623
2624 systemd_getty_generator_LDADD = \
2625         libshared.la
2626
2627 # ------------------------------------------------------------------------------
2628 systemd_debug_generator_SOURCES = \
2629         src/debug-generator/debug-generator.c
2630
2631 systemd_debug_generator_LDADD = \
2632         libshared.la
2633
2634 # ------------------------------------------------------------------------------
2635 systemd_fstab_generator_SOURCES = \
2636         src/fstab-generator/fstab-generator.c \
2637         src/core/mount-setup.c
2638
2639 systemd_fstab_generator_LDADD = \
2640         libshared.la
2641
2642 # ------------------------------------------------------------------------------
2643 systemd_system_update_generator_SOURCES = \
2644         src/system-update-generator/system-update-generator.c
2645
2646 systemd_system_update_generator_LDADD = \
2647         libshared.la
2648
2649 # ------------------------------------------------------------------------------
2650 if ENABLE_HIBERNATE
2651 systemgenerator_PROGRAMS += \
2652         systemd-hibernate-resume-generator
2653
2654 rootlibexec_PROGRAMS += \
2655         systemd-hibernate-resume
2656
2657 systemd_hibernate_resume_SOURCES = \
2658         src/hibernate-resume/hibernate-resume.c
2659
2660 systemd_hibernate_resume_LDADD = \
2661         libshared.la
2662
2663 systemd_hibernate_resume_generator_SOURCES = \
2664         src/hibernate-resume/hibernate-resume-generator.c
2665
2666 systemd_hibernate_resume_generator_LDADD = \
2667         libshared.la
2668
2669 dist_systemunit_DATA += \
2670         units/hibernate.target \
2671         units/hybrid-sleep.target
2672
2673 nodist_systemunit_DATA += \
2674         units/systemd-hibernate.service \
2675         units/systemd-hibernate-resume@.service \
2676         units/systemd-hybrid-sleep.service
2677 endif
2678
2679 EXTRA_DIST += \
2680         units/systemd-hibernate.service.in \
2681         units/systemd-hibernate-resume@.service.in \
2682         units/systemd-hybrid-sleep.service.in
2683
2684 # ------------------------------------------------------------------------------
2685 if ENABLE_EFI
2686 if HAVE_BLKID
2687 bootctl_SOURCES = \
2688         src/boot/bootctl.c
2689
2690 bootctl_CPPFLAGS = \
2691         $(AM_CPPFLAGS) \
2692         -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\" \
2693         -DBOOTLIBDIR=\"$(bootlibdir)\"
2694
2695 bootctl_CFLAGS = \
2696         $(AM_CFLAGS) \
2697         $(BLKID_CFLAGS)
2698
2699 bootctl_LDADD = \
2700         libshared.la \
2701         $(BLKID_LIBS)
2702
2703 bin_PROGRAMS += \
2704         bootctl
2705
2706 dist_bashcompletion_data += \
2707         shell-completion/bash/bootctl
2708
2709 dist_zshcompletion_data += \
2710         shell-completion/zsh/_bootctl
2711 endif
2712
2713 # ------------------------------------------------------------------------------
2714 if HAVE_GNUEFI
2715 efi_cppflags = \
2716         $(EFI_CPPFLAGS) \
2717         -I$(top_builddir) -include config.h \
2718         -I$(EFI_INC_DIR)/efi \
2719         -I$(EFI_INC_DIR)/efi/$(EFI_ARCH) \
2720         -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\"
2721
2722 efi_cflags = \
2723         $(EFI_CFLAGS) \
2724         -Wall \
2725         -Wextra \
2726         -std=gnu90 \
2727         -nostdinc \
2728         -ggdb -O0 \
2729         -fpic \
2730         -fshort-wchar \
2731         -nostdinc \
2732         -ffreestanding \
2733         -fno-strict-aliasing \
2734         -fno-stack-protector \
2735         -Wsign-compare \
2736         -Wno-missing-field-initializers
2737
2738 if ARCH_X86_64
2739 efi_cflags += \
2740         -mno-red-zone \
2741         -mno-sse \
2742         -mno-mmx \
2743         -DEFI_FUNCTION_WRAPPER \
2744         -DGNU_EFI_USE_MS_ABI
2745 endif
2746
2747 if ARCH_IA32
2748 efi_cflags += \
2749         -mno-sse \
2750         -mno-mmx
2751 endif
2752
2753 efi_ldflags = \
2754         $(EFI_LDFLAGS) \
2755         -T $(EFI_LDS_DIR)/elf_$(EFI_ARCH)_efi.lds \
2756         -shared \
2757         -Bsymbolic \
2758         -nostdlib \
2759         -znocombreloc \
2760         -L $(EFI_LIB_DIR) \
2761         $(EFI_LDS_DIR)/crt0-efi-$(EFI_ARCH).o
2762
2763 # Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary' instead,
2764 # and add required symbols manually.
2765 if ARCH_AARCH64
2766 efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
2767 EFI_FORMAT = -O binary
2768 else
2769 EFI_FORMAT = --target=efi-app-$(EFI_ARCH)
2770 endif
2771 endif
2772 endif
2773
2774 # ------------------------------------------------------------------------------
2775 systemd_boot_headers = \
2776         src/boot/efi/util.h \
2777         src/boot/efi/console.h \
2778         src/boot/efi/graphics.h \
2779         src/boot/efi/pefile.h \
2780         src/boot/efi/measure.h \
2781         src/boot/efi/disk.h
2782
2783 systemd_boot_sources = \
2784         src/boot/efi/util.c \
2785         src/boot/efi/console.c \
2786         src/boot/efi/graphics.c \
2787         src/boot/efi/pefile.c \
2788         src/boot/efi/disk.c \
2789         src/boot/efi/measure.c \
2790         src/boot/efi/boot.c
2791
2792 EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
2793
2794 systemd_boot_objects = $(addprefix $(top_builddir)/,$(systemd_boot_sources:.c=.o))
2795 systemd_boot_solib = $(top_builddir)/src/boot/efi/systemd_boot.so
2796 systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi
2797
2798 if ENABLE_EFI
2799 if HAVE_GNUEFI
2800 bootlib_DATA = $(systemd_boot)
2801
2802 $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers))
2803         @$(MKDIR_P) $(top_builddir)/src/boot/efi/
2804         $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
2805
2806 $(systemd_boot_solib): $(systemd_boot_objects)
2807         $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \
2808                 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
2809         nm -D -u $@ | grep ' U ' && exit 1 || :
2810
2811 $(systemd_boot): $(systemd_boot_solib)
2812         $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
2813           -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
2814 endif
2815 endif
2816
2817 CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
2818
2819 # ------------------------------------------------------------------------------
2820 stub_headers = \
2821         src/boot/efi/util.h \
2822         src/boot/efi/pefile.h \
2823         src/boot/efi/disk.h \
2824         src/boot/efi/graphics.h \
2825         src/boot/efi/splash.h \
2826         src/boot/efi/measure.h \
2827         src/boot/efi/linux.h
2828
2829 stub_sources = \
2830         src/boot/efi/util.c \
2831         src/boot/efi/pefile.c \
2832         src/boot/efi/disk.c \
2833         src/boot/efi/graphics.c \
2834         src/boot/efi/splash.c \
2835         src/boot/efi/linux.c \
2836         src/boot/efi/measure.c \
2837         src/boot/efi/stub.c
2838
2839 EXTRA_DIST += \
2840         $(stub_sources) \
2841         $(stub_headers) \
2842         test/splash.bmp
2843
2844 stub_objects = $(addprefix $(top_builddir)/,$(stub_sources:.c=.o))
2845 stub_solib = $(top_builddir)/src/boot/efi/stub.so
2846 stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub
2847
2848 if ENABLE_EFI
2849 if HAVE_GNUEFI
2850 bootlib_DATA += $(stub)
2851
2852 $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(stub_headers))
2853         @$(MKDIR_P) $(top_builddir)/src/boot/efi/
2854         $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
2855
2856 $(stub_solib): $(stub_objects)
2857         $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
2858                 -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
2859         nm -D -u $@ | grep ' U ' && exit 1 || :
2860
2861 $(stub): $(stub_solib)
2862         $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
2863           -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
2864 endif
2865 endif
2866
2867 CLEANFILES += $(stub_objects) $(stub_solib) $(stub)
2868
2869
2870 # ------------------------------------------------------------------------------
2871 CLEANFILES += test-efi-disk.img
2872
2873 test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh
2874         $(AM_V_GEN)test/test-efi-create-disk.sh
2875
2876 test-efi: test-efi-disk.img
2877         $(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img
2878
2879 EXTRA_DIST += test/test-efi-create-disk.sh
2880
2881 # ------------------------------------------------------------------------------
2882 if HAVE_BLKID
2883 systemgenerator_PROGRAMS +=  \
2884         systemd-gpt-auto-generator
2885
2886 systemd_gpt_auto_generator_SOURCES = \
2887         src/gpt-auto-generator/gpt-auto-generator.c \
2888         src/basic/blkid-util.h
2889
2890 systemd_gpt_auto_generator_LDADD = \
2891         libshared.la \
2892         $(BLKID_LIBS)
2893
2894 systemd_gpt_auto_generator_CFLAGS = \
2895         $(AM_CFLAGS) \
2896         $(BLKID_CFLAGS)
2897 endif
2898
2899 # ------------------------------------------------------------------------------
2900 systemgenerator_PROGRAMS +=  \
2901         systemd-dbus1-generator
2902
2903 systemd_dbus1_generator_SOURCES = \
2904         src/dbus1-generator/dbus1-generator.c
2905
2906 systemd_dbus1_generator_LDADD = \
2907         libshared.la
2908
2909 dbus1-generator-install-hook:
2910         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2911         $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2912         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2913
2914 dbus1-generator-uninstall-hook:
2915         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2916
2917 dist_xinitrc_SCRIPTS = \
2918         xorg/50-systemd-user.sh
2919
2920 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2921 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2922
2923 # ------------------------------------------------------------------------------
2924 systemd_sysv_generator_SOURCES = \
2925         src/sysv-generator/sysv-generator.c
2926
2927 systemd_sysv_generator_LDADD = \
2928         libcore.la
2929
2930 # ------------------------------------------------------------------------------
2931 systemd_rc_local_generator_SOURCES = \
2932         src/rc-local-generator/rc-local-generator.c
2933
2934 systemd_rc_local_generator_LDADD = \
2935         libshared.la
2936
2937 # ------------------------------------------------------------------------------
2938 systemd_remount_fs_SOURCES = \
2939         src/remount-fs/remount-fs.c \
2940         src/core/mount-setup.c \
2941         src/core/mount-setup.h
2942
2943 systemd_remount_fs_LDADD = \
2944         libshared.la
2945
2946 # ------------------------------------------------------------------------------
2947 systemd_cgroups_agent_SOURCES = \
2948         src/cgroups-agent/cgroups-agent.c
2949
2950 systemd_cgroups_agent_LDADD = \
2951         libshared.la
2952
2953 # ------------------------------------------------------------------------------
2954 systemd_escape_SOURCES = \
2955         src/escape/escape.c
2956
2957 systemd_escape_LDADD = \
2958         libshared.la
2959
2960 # -----------------------------------------------------------------------------
2961 systemctl_SOURCES = \
2962         src/systemctl/systemctl.c
2963
2964 systemctl_LDADD = \
2965         libshared.la
2966
2967 # ------------------------------------------------------------------------------
2968 systemd_notify_SOURCES = \
2969         src/notify/notify.c
2970
2971 systemd_notify_LDADD = \
2972         libshared.la
2973
2974 # ------------------------------------------------------------------------------
2975 systemd_path_SOURCES = \
2976         src/path/path.c
2977
2978 systemd_path_LDADD = \
2979         libshared.la
2980
2981 # ------------------------------------------------------------------------------
2982 systemd_ask_password_SOURCES = \
2983         src/ask-password/ask-password.c
2984
2985 systemd_ask_password_LDADD = \
2986         libshared.la
2987
2988 # ------------------------------------------------------------------------------
2989 systemd_reply_password_SOURCES = \
2990         src/reply-password/reply-password.c
2991
2992 systemd_reply_password_LDADD = \
2993         libshared.la
2994
2995 # ------------------------------------------------------------------------------
2996 systemd_cgls_SOURCES = \
2997         src/cgls/cgls.c
2998
2999 systemd_cgls_LDADD = \
3000         libshared.la
3001
3002 # ------------------------------------------------------------------------------
3003 systemd_cgtop_SOURCES = \
3004         src/cgtop/cgtop.c
3005
3006 systemd_cgtop_LDADD = \
3007         libshared.la
3008
3009 # ------------------------------------------------------------------------------
3010 systemd_nspawn_SOURCES = \
3011         src/nspawn/nspawn.c \
3012         src/nspawn/nspawn-settings.c \
3013         src/nspawn/nspawn-settings.h \
3014         src/nspawn/nspawn-mount.c \
3015         src/nspawn/nspawn-mount.h \
3016         src/nspawn/nspawn-network.c \
3017         src/nspawn/nspawn-network.h \
3018         src/nspawn/nspawn-expose-ports.c \
3019         src/nspawn/nspawn-expose-ports.h \
3020         src/nspawn/nspawn-cgroup.c \
3021         src/nspawn/nspawn-cgroup.h \
3022         src/nspawn/nspawn-seccomp.c \
3023         src/nspawn/nspawn-seccomp.h \
3024         src/nspawn/nspawn-register.c \
3025         src/nspawn/nspawn-register.h \
3026         src/nspawn/nspawn-setuid.c \
3027         src/nspawn/nspawn-setuid.h \
3028         src/nspawn/nspawn-stub-pid1.c \
3029         src/nspawn/nspawn-stub-pid1.h \
3030         src/nspawn/nspawn-patch-uid.c \
3031         src/nspawn/nspawn-patch-uid.h \
3032         src/core/mount-setup.c \
3033         src/core/mount-setup.h \
3034         src/core/loopback-setup.c \
3035         src/core/loopback-setup.h \
3036         src/core/machine-id-setup.c \
3037         src/core/machine-id-setup.h
3038
3039 nodist_systemd_nspawn_SOURCES = \
3040         src/nspawn/nspawn-gperf.c
3041
3042 gperf_gperf_sources += \
3043         src/nspawn/nspawn-gperf.gperf
3044
3045 systemd_nspawn_CFLAGS = \
3046         $(AM_CFLAGS) \
3047         $(BLKID_CFLAGS) \
3048         $(SECCOMP_CFLAGS)
3049
3050 systemd_nspawn_LDADD = \
3051         libshared.la \
3052         $(BLKID_LIBS)
3053
3054 if HAVE_LIBIPTC
3055 systemd_nspawn_LDADD += \
3056         libfirewall.la
3057 endif
3058
3059 test_patch_uid_SOURCES = \
3060         src/nspawn/nspawn-patch-uid.c \
3061         src/nspawn/nspawn-patch-uid.h \
3062         src/nspawn/test-patch-uid.c
3063
3064 test_patch_uid_LDADD = \
3065         libshared.la
3066
3067 manual_tests += \
3068         test-patch-uid
3069
3070 # ------------------------------------------------------------------------------
3071 systemd_run_SOURCES = \
3072         src/run/run.c
3073
3074 systemd_run_LDADD = \
3075         libshared.la
3076
3077 # ------------------------------------------------------------------------------
3078 systemd_stdio_bridge_SOURCES = \
3079         src/stdio-bridge/stdio-bridge.c
3080
3081 systemd_stdio_bridge_LDADD = \
3082         libshared.la
3083
3084 # ------------------------------------------------------------------------------
3085 systemd_tty_ask_password_agent_SOURCES = \
3086         src/tty-ask-password-agent/tty-ask-password-agent.c
3087
3088 systemd_tty_ask_password_agent_LDADD = \
3089         libshared.la
3090
3091 # ------------------------------------------------------------------------------
3092 libsystemd_internal_la_SOURCES = \
3093         src/systemd/sd-bus.h \
3094         src/systemd/sd-bus-protocol.h \
3095         src/systemd/sd-bus-vtable.h \
3096         src/systemd/sd-utf8.h \
3097         src/systemd/sd-event.h \
3098         src/systemd/sd-netlink.h \
3099         src/systemd/sd-resolve.h \
3100         src/systemd/sd-login.h \
3101         src/systemd/sd-id128.h \
3102         src/systemd/sd-daemon.h \
3103         src/systemd/sd-path.h \
3104         src/systemd/sd-network.h \
3105         src/systemd/sd-hwdb.h \
3106         src/systemd/sd-device.h \
3107         src/libsystemd/libsystemd.sym \
3108         src/libsystemd/sd-bus/sd-bus.c \
3109         src/libsystemd/sd-bus/bus-control.c \
3110         src/libsystemd/sd-bus/bus-control.h \
3111         src/libsystemd/sd-bus/bus-error.c \
3112         src/libsystemd/sd-bus/bus-error.h \
3113         src/libsystemd/sd-bus/bus-common-errors.h \
3114         src/libsystemd/sd-bus/bus-common-errors.c \
3115         src/libsystemd/sd-bus/bus-internal.c \
3116         src/libsystemd/sd-bus/bus-internal.h \
3117         src/libsystemd/sd-bus/bus-socket.c \
3118         src/libsystemd/sd-bus/bus-socket.h \
3119         src/libsystemd/sd-bus/bus-kernel.c \
3120         src/libsystemd/sd-bus/bus-kernel.h \
3121         src/libsystemd/sd-bus/bus-container.c \
3122         src/libsystemd/sd-bus/bus-container.h \
3123         src/libsystemd/sd-bus/bus-message.c \
3124         src/libsystemd/sd-bus/bus-message.h \
3125         src/libsystemd/sd-bus/bus-creds.c \
3126         src/libsystemd/sd-bus/bus-creds.h \
3127         src/libsystemd/sd-bus/bus-signature.c \
3128         src/libsystemd/sd-bus/bus-signature.h \
3129         src/libsystemd/sd-bus/bus-type.c \
3130         src/libsystemd/sd-bus/bus-type.h \
3131         src/libsystemd/sd-bus/bus-match.c \
3132         src/libsystemd/sd-bus/bus-match.h \
3133         src/libsystemd/sd-bus/bus-bloom.c \
3134         src/libsystemd/sd-bus/bus-bloom.h \
3135         src/libsystemd/sd-bus/bus-introspect.c \
3136         src/libsystemd/sd-bus/bus-introspect.h \
3137         src/libsystemd/sd-bus/bus-objects.c \
3138         src/libsystemd/sd-bus/bus-objects.h \
3139         src/libsystemd/sd-bus/bus-gvariant.c \
3140         src/libsystemd/sd-bus/bus-gvariant.h \
3141         src/libsystemd/sd-bus/bus-convenience.c \
3142         src/libsystemd/sd-bus/bus-track.c \
3143         src/libsystemd/sd-bus/bus-track.h \
3144         src/libsystemd/sd-bus/bus-slot.c \
3145         src/libsystemd/sd-bus/bus-slot.h \
3146         src/libsystemd/sd-bus/bus-protocol.h \
3147         src/libsystemd/sd-bus/kdbus.h \
3148         src/libsystemd/sd-bus/bus-dump.c \
3149         src/libsystemd/sd-bus/bus-dump.h \
3150         src/libsystemd/sd-utf8/sd-utf8.c \
3151         src/libsystemd/sd-event/sd-event.c \
3152         src/libsystemd/sd-netlink/sd-netlink.c \
3153         src/libsystemd/sd-netlink/netlink-internal.h \
3154         src/libsystemd/sd-netlink/netlink-message.c \
3155         src/libsystemd/sd-netlink/netlink-socket.c \
3156         src/libsystemd/sd-netlink/rtnl-message.c \
3157         src/libsystemd/sd-netlink/netlink-types.h \
3158         src/libsystemd/sd-netlink/netlink-types.c \
3159         src/libsystemd/sd-netlink/netlink-util.h \
3160         src/libsystemd/sd-netlink/netlink-util.c \
3161         src/libsystemd/sd-netlink/local-addresses.h \
3162         src/libsystemd/sd-netlink/local-addresses.c \
3163         src/libsystemd/sd-id128/sd-id128.c \
3164         src/libsystemd/sd-daemon/sd-daemon.c \
3165         src/libsystemd/sd-login/sd-login.c \
3166         src/libsystemd/sd-path/sd-path.c \
3167         src/libsystemd/sd-network/sd-network.c \
3168         src/libsystemd/sd-network/network-util.h \
3169         src/libsystemd/sd-network/network-util.c \
3170         src/libsystemd/sd-hwdb/sd-hwdb.c \
3171         src/libsystemd/sd-hwdb/hwdb-util.h \
3172         src/libsystemd/sd-hwdb/hwdb-internal.h \
3173         src/libsystemd/sd-device/device-internal.h \
3174         src/libsystemd/sd-device/device-util.h \
3175         src/libsystemd/sd-device/device-enumerator.c \
3176         src/libsystemd/sd-device/device-enumerator-private.h \
3177         src/libsystemd/sd-device/sd-device.c \
3178         src/libsystemd/sd-device/device-private.c \
3179         src/libsystemd/sd-device/device-private.h \
3180         src/libsystemd/sd-resolve/sd-resolve.c
3181
3182 libsystemd_internal_la_LIBADD = \
3183         libbasic.la \
3184         -lresolv
3185
3186 noinst_LTLIBRARIES += \
3187         libsystemd-internal.la
3188
3189 EXTRA_DIST += \
3190         src/libsystemd/libsystemd.pc.in \
3191         src/libsystemd/sd-bus/DIFFERENCES \
3192         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
3193
3194 libsystemd_la_SOURCES = \
3195         $(libsystemd_internal_la_SOURCES) \
3196         $(libsystemd_journal_internal_la_SOURCES)
3197
3198 nodist_libsystemd_la_SOURCES = \
3199         $(nodist_libsystemd_internal_la_SOURCES)
3200
3201 libsystemd_la_CFLAGS = \
3202         $(libsystemd_internal_la_CFLAGS) \
3203         $(libsystemd_journal_internal_la_CFLAGS)
3204
3205 libsystemd_la_LDFLAGS = \
3206         $(AM_LDFLAGS) \
3207         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
3208         -Wl,--version-script=$(top_srcdir)/src/libsystemd/libsystemd.sym
3209
3210 libsystemd_la_LIBADD = \
3211         $(libsystemd_internal_la_LIBADD) \
3212         $(libsystemd_journal_internal_la_LIBADD)
3213
3214 libsystemd-install-hook:
3215         libname=libsystemd.so && $(move-to-rootlibdir)
3216
3217 libsystemd-uninstall-hook:
3218         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
3219
3220 INSTALL_EXEC_HOOKS += libsystemd-install-hook
3221 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
3222
3223 pkgconfiglib_DATA += \
3224         src/libsystemd/libsystemd.pc
3225
3226 pkginclude_HEADERS += \
3227         src/systemd/sd-bus.h \
3228         src/systemd/sd-bus-protocol.h \
3229         src/systemd/sd-bus-vtable.h \
3230         src/systemd/sd-event.h \
3231         src/systemd/sd-login.h \
3232         src/systemd/sd-id128.h \
3233         src/systemd/sd-daemon.h
3234
3235 lib_LTLIBRARIES += \
3236         libsystemd.la
3237
3238 tests += \
3239         test-bus-marshal \
3240         test-bus-signature \
3241         test-bus-benchmark \
3242         test-bus-chat \
3243         test-bus-cleanup \
3244         test-bus-server \
3245         test-bus-match \
3246         test-bus-kernel \
3247         test-bus-kernel-bloom \
3248         test-bus-zero-copy \
3249         test-bus-introspect \
3250         test-bus-objects \
3251         test-bus-error \
3252         test-bus-creds \
3253         test-bus-gvariant \
3254         test-event \
3255         test-netlink \
3256         test-local-addresses \
3257         test-resolve
3258
3259 bin_PROGRAMS += \
3260         busctl
3261
3262 test_bus_marshal_SOURCES = \
3263         src/libsystemd/sd-bus/test-bus-marshal.c
3264
3265 test_bus_marshal_LDADD = \
3266         libshared.la \
3267         $(GLIB_LIBS) \
3268         $(DBUS_LIBS)
3269
3270 test_bus_marshal_CFLAGS = \
3271         $(AM_CFLAGS) \
3272         $(GLIB_CFLAGS) \
3273         $(DBUS_CFLAGS)
3274
3275 test_bus_signature_SOURCES = \
3276         src/libsystemd/sd-bus/test-bus-signature.c
3277
3278 test_bus_signature_LDADD = \
3279         libshared.la
3280
3281 test_bus_chat_SOURCES = \
3282         src/libsystemd/sd-bus/test-bus-chat.c
3283
3284 test_bus_chat_LDADD = \
3285         libshared.la
3286
3287 test_bus_cleanup_SOURCES = \
3288         src/libsystemd/sd-bus/test-bus-cleanup.c
3289
3290 test_bus_cleanup_CFLAGS = \
3291         $(AM_CFLAGS) \
3292         $(SECCOMP_CFLAGS)
3293
3294 test_bus_cleanup_LDADD = \
3295         libshared.la
3296
3297 test_bus_server_SOURCES = \
3298         src/libsystemd/sd-bus/test-bus-server.c
3299
3300 test_bus_server_LDADD = \
3301         libshared.la
3302
3303 test_bus_objects_SOURCES = \
3304         src/libsystemd/sd-bus/test-bus-objects.c
3305
3306 test_bus_objects_LDADD = \
3307         libshared.la
3308
3309 test_bus_error_SOURCES = \
3310         src/libsystemd/sd-bus/test-bus-error.c
3311
3312 test_bus_error_LDADD = \
3313         libshared.la
3314
3315 test_bus_gvariant_SOURCES = \
3316         src/libsystemd/sd-bus/test-bus-gvariant.c
3317
3318 test_bus_gvariant_LDADD = \
3319         libshared.la \
3320         $(GLIB_LIBS)
3321
3322 test_bus_gvariant_CFLAGS = \
3323         $(AM_CFLAGS) \
3324         $(GLIB_CFLAGS)
3325
3326 test_bus_creds_SOURCES = \
3327         src/libsystemd/sd-bus/test-bus-creds.c
3328
3329 test_bus_creds_LDADD = \
3330         libshared.la
3331
3332 test_bus_match_SOURCES = \
3333         src/libsystemd/sd-bus/test-bus-match.c
3334
3335 test_bus_match_LDADD = \
3336         libshared.la
3337
3338 test_bus_kernel_SOURCES = \
3339         src/libsystemd/sd-bus/test-bus-kernel.c
3340
3341 test_bus_kernel_LDADD = \
3342         libshared.la
3343
3344 test_bus_kernel_bloom_SOURCES = \
3345         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
3346
3347 test_bus_kernel_bloom_LDADD = \
3348         libshared.la
3349
3350 test_bus_benchmark_SOURCES = \
3351         src/libsystemd/sd-bus/test-bus-benchmark.c
3352
3353 test_bus_benchmark_LDADD = \
3354         libshared.la
3355
3356 test_bus_zero_copy_SOURCES = \
3357         src/libsystemd/sd-bus/test-bus-zero-copy.c
3358
3359 test_bus_zero_copy_LDADD = \
3360         libshared.la
3361
3362 test_bus_introspect_SOURCES = \
3363         src/libsystemd/sd-bus/test-bus-introspect.c
3364
3365 test_bus_introspect_LDADD = \
3366         libshared.la
3367
3368 test_event_SOURCES = \
3369         src/libsystemd/sd-event/test-event.c
3370
3371 test_event_LDADD = \
3372         libshared.la
3373
3374 test_netlink_SOURCES = \
3375         src/libsystemd/sd-netlink/test-netlink.c
3376
3377 test_netlink_LDADD = \
3378         libshared.la
3379
3380 test_local_addresses_SOURCES = \
3381         src/libsystemd/sd-netlink/test-local-addresses.c
3382
3383 test_local_addresses_LDADD = \
3384         libshared.la
3385
3386 test_resolve_SOURCES = \
3387         src/libsystemd/sd-resolve/test-resolve.c
3388
3389 test_resolve_LDADD = \
3390         libshared.la
3391
3392 busctl_SOURCES = \
3393         src/libsystemd/sd-bus/busctl.c \
3394         src/libsystemd/sd-bus/busctl-introspect.c \
3395         src/libsystemd/sd-bus/busctl-introspect.h
3396
3397 busctl_LDADD = \
3398         libshared.la
3399
3400 # ------------------------------------------------------------------------------
3401 noinst_LTLIBRARIES += \
3402         libsystemd-network.la
3403
3404 libsystemd_network_la_CFLAGS = \
3405         $(AM_CFLAGS) \
3406         $(KMOD_CFLAGS)
3407
3408 libsystemd_network_la_SOURCES = \
3409         src/systemd/sd-dhcp-client.h \
3410         src/systemd/sd-dhcp-server.h \
3411         src/systemd/sd-dhcp-lease.h \
3412         src/systemd/sd-ipv4ll.h \
3413         src/systemd/sd-ipv4acd.h \
3414         src/systemd/sd-ndisc.h \
3415         src/systemd/sd-dhcp6-client.h \
3416         src/systemd/sd-dhcp6-lease.h \
3417         src/systemd/sd-lldp.h \
3418         src/libsystemd-network/sd-dhcp-client.c \
3419         src/libsystemd-network/sd-dhcp-server.c \
3420         src/libsystemd-network/dhcp-network.c \
3421         src/libsystemd-network/dhcp-option.c \
3422         src/libsystemd-network/dhcp-packet.c \
3423         src/libsystemd-network/dhcp-internal.h \
3424         src/libsystemd-network/dhcp-server-internal.h \
3425         src/libsystemd-network/dhcp-protocol.h \
3426         src/libsystemd-network/dhcp-lease-internal.h \
3427         src/libsystemd-network/sd-dhcp-lease.c \
3428         src/libsystemd-network/sd-ipv4ll.c \
3429         src/libsystemd-network/sd-ipv4acd.c \
3430         src/libsystemd-network/arp-util.h \
3431         src/libsystemd-network/arp-util.c \
3432         src/libsystemd-network/network-internal.c \
3433         src/libsystemd-network/network-internal.h \
3434         src/libsystemd-network/sd-ndisc.c \
3435         src/libsystemd-network/ndisc-internal.h \
3436         src/libsystemd-network/ndisc-router.h \
3437         src/libsystemd-network/ndisc-router.c \
3438         src/libsystemd-network/icmp6-util.h \
3439         src/libsystemd-network/icmp6-util.c \
3440         src/libsystemd-network/sd-dhcp6-client.c \
3441         src/libsystemd-network/dhcp6-internal.h \
3442         src/libsystemd-network/dhcp6-protocol.h \
3443         src/libsystemd-network/dhcp6-network.c \
3444         src/libsystemd-network/dhcp6-option.c \
3445         src/libsystemd-network/dhcp6-lease-internal.h \
3446         src/libsystemd-network/sd-dhcp6-lease.c \
3447         src/libsystemd-network/dhcp-identifier.h \
3448         src/libsystemd-network/dhcp-identifier.c \
3449         src/libsystemd-network/lldp-internal.h \
3450         src/libsystemd-network/lldp-network.h \
3451         src/libsystemd-network/lldp-network.c \
3452         src/libsystemd-network/lldp-neighbor.h \
3453         src/libsystemd-network/lldp-neighbor.c \
3454         src/libsystemd-network/sd-lldp.c
3455
3456 libsystemd_network_la_LIBADD = \
3457         $(KMOD_LIBS)
3458
3459 test_dhcp_option_SOURCES = \
3460         src/libsystemd-network/dhcp-protocol.h \
3461         src/libsystemd-network/dhcp-internal.h \
3462         src/libsystemd-network/test-dhcp-option.c
3463
3464 test_dhcp_option_LDADD = \
3465         libsystemd-network.la \
3466         libshared.la
3467
3468 test_dhcp_client_SOURCES = \
3469         src/systemd/sd-dhcp-client.h \
3470         src/libsystemd-network/dhcp-protocol.h \
3471         src/libsystemd-network/dhcp-internal.h \
3472         src/libsystemd-network/test-dhcp-client.c
3473
3474 test_dhcp_client_LDADD = \
3475         libsystemd-network.la \
3476         libshared.la
3477
3478 test_dhcp_server_SOURCES = \
3479         src/libsystemd-network/test-dhcp-server.c
3480
3481 test_dhcp_server_LDADD = \
3482         libsystemd-network.la \
3483         libshared.la
3484
3485 test_ipv4ll_SOURCES = \
3486         src/systemd/sd-ipv4ll.h \
3487         src/libsystemd-network/arp-util.h \
3488         src/libsystemd-network/test-ipv4ll.c
3489
3490 test_ipv4ll_LDADD = \
3491         libsystemd-network.la \
3492         libshared.la
3493
3494 test_ipv4ll_manual_SOURCES = \
3495         src/systemd/sd-ipv4ll.h \
3496         src/libsystemd-network/test-ipv4ll-manual.c
3497
3498 test_ipv4ll_manual_LDADD = \
3499         libsystemd-network.la \
3500         libshared.la
3501
3502 test_acd_SOURCES = \
3503         src/systemd/sd-ipv4acd.h \
3504         src/libsystemd-network/test-acd.c
3505
3506 test_acd_LDADD = \
3507         libsystemd-network.la \
3508         libshared.la
3509
3510 test_ndisc_rs_SOURCES = \
3511         src/systemd/sd-dhcp6-client.h \
3512         src/systemd/sd-ndisc.h \
3513         src/libsystemd-network/icmp6-util.h \
3514         src/libsystemd-network/test-ndisc-rs.c \
3515         src/libsystemd-network/dhcp-identifier.h \
3516         src/libsystemd-network/dhcp-identifier.c
3517
3518 test_ndisc_rs_LDADD = \
3519         libsystemd-network.la \
3520         libudev.la \
3521         libshared.la
3522
3523 test_dhcp6_client_SOURCES = \
3524         src/systemd/sd-dhcp6-client.h \
3525         src/libsystemd-network/dhcp6-internal.h \
3526         src/libsystemd-network/test-dhcp6-client.c \
3527         src/libsystemd-network/dhcp-identifier.h \
3528         src/libsystemd-network/dhcp-identifier.c
3529
3530 test_dhcp6_client_LDADD = \
3531         libsystemd-network.la \
3532         libudev.la \
3533         libshared.la
3534
3535 test_lldp_SOURCES = \
3536         src/libsystemd-network/test-lldp.c
3537
3538 test_lldp_LDADD = \
3539         libsystemd-network.la \
3540         libshared.la
3541
3542 tests += \
3543         test-dhcp-option \
3544         test-dhcp-client \
3545         test-dhcp-server \
3546         test-ipv4ll \
3547         test-ndisc-rs \
3548         test-dhcp6-client \
3549         test-lldp
3550
3551 # ------------------------------------------------------------------------------
3552 include_HEADERS += \
3553         src/libudev/libudev.h
3554
3555 lib_LTLIBRARIES += \
3556         libudev.la
3557
3558 libudev_la_SOURCES =\
3559         src/libudev/libudev.sym \
3560         src/libudev/libudev-private.h \
3561         src/libudev/libudev-device-internal.h \
3562         src/libudev/libudev.c \
3563         src/libudev/libudev-list.c \
3564         src/libudev/libudev-util.c \
3565         src/libudev/libudev-device.c \
3566         src/libudev/libudev-device-private.c \
3567         src/libudev/libudev-enumerate.c \
3568         src/libudev/libudev-monitor.c \
3569         src/libudev/libudev-queue.c \
3570         src/libudev/libudev-hwdb.c
3571
3572 libudev_la_LDFLAGS = \
3573         $(AM_LDFLAGS) \
3574         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3575         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3576
3577 libudev_la_LIBADD = \
3578         libsystemd-internal.la
3579
3580 pkgconfiglib_DATA += \
3581         src/libudev/libudev.pc
3582
3583 EXTRA_DIST += \
3584         src/libudev/libudev.pc.in
3585
3586 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3587 libudev-install-hook:
3588         libname=libudev.so && $(move-to-rootlibdir)
3589
3590 libudev-uninstall-hook:
3591         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
3592
3593 INSTALL_EXEC_HOOKS += libudev-install-hook
3594 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
3595
3596 # ------------------------------------------------------------------------------
3597 noinst_LTLIBRARIES += \
3598         libudev-internal.la
3599
3600 libudev_internal_la_SOURCES =\
3601         $(libudev_la_SOURCES)
3602
3603 # ------------------------------------------------------------------------------
3604 INSTALL_DIRS += \
3605         $(sysconfdir)/udev/rules.d
3606
3607 dist_network_DATA = \
3608         network/99-default.link \
3609         network/80-container-host0.network \
3610         network/80-container-ve.network \
3611         network/80-container-vz.network
3612
3613 dist_udevrules_DATA += \
3614         rules/50-udev-default.rules \
3615         rules/60-block.rules \
3616         rules/60-drm.rules \
3617         rules/60-evdev.rules \
3618         rules/60-persistent-storage-tape.rules \
3619         rules/60-persistent-input.rules \
3620         rules/60-persistent-alsa.rules \
3621         rules/60-persistent-storage.rules \
3622         rules/60-serial.rules \
3623         rules/64-btrfs.rules \
3624         rules/70-mouse.rules \
3625         rules/75-net-description.rules \
3626         rules/78-sound-card.rules \
3627         rules/80-net-setup-link.rules
3628
3629 nodist_udevrules_DATA += \
3630         rules/99-systemd.rules
3631
3632 udevconfdir = $(sysconfdir)/udev
3633 dist_udevconf_DATA = \
3634         src/udev/udev.conf
3635
3636 pkgconfigdata_DATA += \
3637         src/udev/udev.pc
3638
3639 EXTRA_DIST += \
3640         rules/99-systemd.rules.in \
3641         src/udev/udev.pc.in
3642
3643 EXTRA_DIST += \
3644         units/systemd-udevd.service.in \
3645         units/systemd-udev-trigger.service.in \
3646         units/systemd-udev-settle.service.in
3647
3648 SOCKETS_TARGET_WANTS += \
3649         systemd-udevd-control.socket \
3650         systemd-udevd-kernel.socket
3651
3652 SYSINIT_TARGET_WANTS += \
3653         systemd-udevd.service \
3654         systemd-udev-trigger.service
3655
3656 rootbin_PROGRAMS += \
3657         udevadm
3658
3659 rootlibexec_PROGRAMS += \
3660         systemd-udevd
3661
3662 noinst_LTLIBRARIES += \
3663         libudev-core.la
3664
3665 src/udev/keyboard-keys-list.txt:
3666         $(AM_V_at)$(MKDIR_P) $(dir $@)
3667         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($$2 != "KEY_MAX") { print $$2 } }' > $@
3668
3669 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt
3670         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3671
3672 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3673         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3674
3675 gperf_txt_sources += \
3676         src/udev/keyboard-keys-list.txt
3677
3678 libudev_core_la_SOURCES = \
3679         src/udev/udev.h \
3680         src/udev/udev-event.c \
3681         src/udev/udev-watch.c \
3682         src/udev/udev-node.c \
3683         src/udev/udev-rules.c \
3684         src/udev/udev-ctrl.c \
3685         src/udev/udev-builtin.c \
3686         src/udev/udev-builtin-btrfs.c \
3687         src/udev/udev-builtin-hwdb.c \
3688         src/udev/udev-builtin-input_id.c \
3689         src/udev/udev-builtin-keyboard.c \
3690         src/udev/udev-builtin-net_id.c \
3691         src/udev/udev-builtin-net_setup_link.c \
3692         src/udev/udev-builtin-path_id.c \
3693         src/udev/udev-builtin-usb_id.c \
3694         src/udev/net/link-config.h \
3695         src/udev/net/link-config.c \
3696         src/udev/net/ethtool-util.h \
3697         src/udev/net/ethtool-util.c
3698
3699 nodist_libudev_core_la_SOURCES = \
3700         src/udev/keyboard-keys-from-name.h \
3701         src/udev/net/link-config-gperf.c
3702
3703 gperf_gperf_sources += \
3704         src/udev/net/link-config-gperf.gperf
3705
3706 libudev_core_la_CFLAGS = \
3707         $(AM_CFLAGS) \
3708         $(BLKID_CFLAGS) \
3709         $(KMOD_CFLAGS)
3710
3711 libudev_core_la_LIBADD = \
3712         libsystemd-network.la \
3713         libshared.la \
3714         $(BLKID_LIBS) \
3715         $(KMOD_LIBS)
3716
3717 if HAVE_KMOD
3718 libudev_core_la_SOURCES += \
3719         src/udev/udev-builtin-kmod.c
3720
3721 dist_udevrules_DATA += \
3722         rules/80-drivers.rules
3723 endif
3724
3725 if HAVE_BLKID
3726 libudev_core_la_SOURCES += \
3727         src/udev/udev-builtin-blkid.c
3728 endif
3729
3730 if HAVE_ACL
3731 libudev_core_la_SOURCES += \
3732         src/udev/udev-builtin-uaccess.c \
3733         src/login/logind-acl.c \
3734         src/libsystemd/sd-login/sd-login.c \
3735         src/systemd/sd-login.h
3736 endif
3737
3738 systemd_udevd_SOURCES = \
3739         src/udev/udevd.c
3740
3741 systemd_udevd_LDADD = \
3742         libudev-core.la
3743
3744 udevadm_SOURCES = \
3745         src/udev/udevadm.c \
3746         src/udev/udevadm-info.c \
3747         src/udev/udevadm-control.c \
3748         src/udev/udevadm-monitor.c \
3749         src/udev/udevadm-hwdb.c \
3750         src/udev/udevadm-settle.c \
3751         src/udev/udevadm-trigger.c \
3752         src/udev/udevadm-test.c \
3753         src/udev/udevadm-test-builtin.c \
3754         src/udev/udevadm-util.c \
3755         src/udev/udevadm-util.h
3756
3757 udevadm_LDADD = \
3758         libudev-core.la
3759
3760 # ------------------------------------------------------------------------------
3761 if ENABLE_HWDB
3762 INSTALL_DIRS += \
3763         $(sysconfdir)/udev/hwdb.d
3764
3765 systemd_hwdb_SOURCES = \
3766         src/libsystemd/sd-hwdb/hwdb-internal.h \
3767         src/hwdb/hwdb.c
3768
3769 systemd_hwdb_LDADD = \
3770         libshared.la
3771
3772 rootbin_PROGRAMS += \
3773         systemd-hwdb
3774
3775 dist_udevhwdb_DATA = \
3776         hwdb/20-pci-vendor-model.hwdb \
3777         hwdb/20-pci-classes.hwdb \
3778         hwdb/20-usb-vendor-model.hwdb \
3779         hwdb/20-usb-classes.hwdb \
3780         hwdb/20-sdio-vendor-model.hwdb \
3781         hwdb/20-sdio-classes.hwdb \
3782         hwdb/20-bluetooth-vendor-product.hwdb \
3783         hwdb/20-acpi-vendor.hwdb \
3784         hwdb/20-OUI.hwdb \
3785         hwdb/20-net-ifname.hwdb \
3786         hwdb/60-evdev.hwdb \
3787         hwdb/60-keyboard.hwdb \
3788         hwdb/70-mouse.hwdb \
3789         hwdb/70-pointingstick.hwdb
3790
3791 SYSINIT_TARGET_WANTS += \
3792         systemd-hwdb-update.service
3793
3794 # Update hwdb on installation. Do not bother if installing
3795 # in DESTDIR, since this is likely for packaging purposes.
3796 hwdb-update-hook:
3797         -test -n "$(DESTDIR)" || $(rootbindir)/systemd-hwdb update
3798
3799 INSTALL_DATA_HOOKS += \
3800         hwdb-update-hook
3801
3802 hwdb-remove-hook:
3803         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3804 endif
3805
3806 EXTRA_DIST += \
3807         units/systemd-hwdb-update.service.in \
3808         hwdb/ids-update.pl \
3809         hwdb/sdio.ids
3810
3811 # ------------------------------------------------------------------------------
3812 if ENABLE_TESTS
3813 TESTS += \
3814         test/udev-test.pl
3815
3816 if HAVE_PYTHON
3817 TESTS += \
3818         test/rule-syntax-check.py
3819
3820 if HAVE_SYSV_COMPAT
3821 TESTS += \
3822         test/sysv-generator-test.py
3823 endif
3824 endif
3825 endif
3826
3827 tests += \
3828         test-libudev
3829
3830 manual_tests += \
3831         test-udev
3832
3833 test_libudev_SOURCES = \
3834         src/test/test-libudev.c
3835
3836 test_libudev_LDADD = \
3837         libshared.la
3838
3839 test_udev_SOURCES = \
3840         src/test/test-udev.c
3841
3842 test_udev_LDADD = \
3843         libudev-core.la  \
3844         $(BLKID_LIBS) \
3845         $(KMOD_LIBS)
3846
3847 if ENABLE_TESTS
3848 check_DATA += \
3849         test/sys
3850 endif
3851
3852 # packed sysfs test tree
3853 test/sys: test/sys.tar.xz
3854         -rm -rf test/sys
3855         $(AM_V_at)$(MKDIR_P) $(dir $@)
3856         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
3857         -touch test/sys
3858
3859 test-sys-distclean:
3860         -rm -rf test/sys
3861 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3862
3863 EXTRA_DIST += \
3864         test/sys.tar.xz \
3865         test/udev-test.pl \
3866         test/rule-syntax-check.py \
3867         test/sysv-generator-test.py \
3868         test/mocks/fsck
3869
3870 # ------------------------------------------------------------------------------
3871 ata_id_SOURCES = \
3872         src/udev/ata_id/ata_id.c
3873
3874 ata_id_LDADD = \
3875         libshared.la
3876
3877 udevlibexec_PROGRAMS += \
3878         ata_id
3879
3880 # ------------------------------------------------------------------------------
3881 cdrom_id_SOURCES = \
3882         src/udev/cdrom_id/cdrom_id.c
3883
3884 cdrom_id_LDADD = \
3885         libshared.la
3886
3887 udevlibexec_PROGRAMS += \
3888         cdrom_id
3889
3890 dist_udevrules_DATA += \
3891         rules/60-cdrom_id.rules
3892
3893 # ------------------------------------------------------------------------------
3894 collect_SOURCES = \
3895         src/udev/collect/collect.c
3896
3897 collect_LDADD = \
3898         libshared.la
3899
3900 udevlibexec_PROGRAMS += \
3901         collect
3902
3903 # ------------------------------------------------------------------------------
3904 scsi_id_SOURCES =\
3905         src/udev/scsi_id/scsi_id.c \
3906         src/udev/scsi_id/scsi_serial.c \
3907         src/udev/scsi_id/scsi.h \
3908         src/udev/scsi_id/scsi_id.h
3909
3910 scsi_id_LDADD = \
3911         libshared.la
3912
3913 udevlibexec_PROGRAMS += \
3914         scsi_id
3915
3916 EXTRA_DIST += \
3917         src/udev/scsi_id/README
3918
3919 # ------------------------------------------------------------------------------
3920 v4l_id_SOURCES = \
3921         src/udev/v4l_id/v4l_id.c
3922
3923 v4l_id_LDADD = \
3924         libshared.la
3925
3926 udevlibexec_PROGRAMS += \
3927         v4l_id
3928
3929 dist_udevrules_DATA += \
3930         rules/60-persistent-v4l.rules
3931
3932 # ------------------------------------------------------------------------------
3933 mtd_probe_SOURCES =  \
3934         src/udev/mtd_probe/mtd_probe.c \
3935         src/udev/mtd_probe/mtd_probe.h \
3936         src/udev/mtd_probe/probe_smartmedia.c
3937
3938 dist_udevrules_DATA += \
3939         rules/75-probe_mtd.rules
3940
3941 udevlibexec_PROGRAMS += \
3942         mtd_probe
3943
3944 # ------------------------------------------------------------------------------
3945 test_id128_SOURCES = \
3946         src/test/test-id128.c
3947
3948 test_id128_LDADD = \
3949         libshared.la
3950
3951 tests += \
3952         test-id128
3953
3954 # ------------------------------------------------------------------------------
3955
3956 bin_PROGRAMS += \
3957         systemd-socket-activate
3958
3959 systemd_socket_activate_SOURCES = \
3960         src/activate/activate.c
3961
3962 systemd_socket_activate_LDADD = \
3963         libshared.la
3964
3965 # ------------------------------------------------------------------------------
3966 systemd_journald_SOURCES = \
3967         src/journal/journald.c \
3968         src/journal/journald-server.h
3969
3970 systemd_journald_LDADD = \
3971         libjournal-core.la \
3972         libshared.la
3973
3974 systemd_cat_SOURCES = \
3975         src/journal/cat.c
3976
3977 systemd_cat_LDADD = \
3978         libjournal-core.la
3979
3980 if HAVE_LIBCURL
3981 rootlibexec_PROGRAMS += \
3982         systemd-journal-upload
3983
3984 systemd_journal_upload_SOURCES = \
3985         src/journal-remote/journal-upload.h \
3986         src/journal-remote/journal-upload.c \
3987         src/journal-remote/journal-upload-journal.c
3988
3989 systemd_journal_upload_CFLAGS = \
3990         $(AM_CFLAGS) \
3991         $(LIBCURL_CFLAGS)
3992
3993 systemd_journal_upload_LDADD = \
3994         libshared.la \
3995         $(LIBCURL_LIBS)
3996
3997 nodist_systemunit_DATA += \
3998         units/systemd-journal-upload.service
3999
4000 nodist_pkgsysconf_DATA += \
4001         src/journal-remote/journal-upload.conf
4002 endif
4003
4004 EXTRA_DIST += \
4005         units/systemd-journal-upload.service.in \
4006         src/journal-remote/journal-upload.conf.in
4007
4008 if HAVE_MICROHTTPD
4009 rootlibexec_PROGRAMS += \
4010         systemd-journal-remote
4011
4012 systemd_journal_remote_SOURCES = \
4013         src/journal-remote/journal-remote-parse.h \
4014         src/journal-remote/journal-remote-parse.c \
4015         src/journal-remote/journal-remote-write.h \
4016         src/journal-remote/journal-remote-write.c \
4017         src/journal-remote/journal-remote.h \
4018         src/journal-remote/journal-remote.c
4019
4020 systemd_journal_remote_LDADD = \
4021         libjournal-core.la
4022
4023 systemd_journal_remote_SOURCES += \
4024         src/journal-remote/microhttpd-util.h \
4025         src/journal-remote/microhttpd-util.c
4026
4027 systemd_journal_remote_CFLAGS = \
4028         $(AM_CFLAGS) \
4029         $(MICROHTTPD_CFLAGS)
4030
4031 systemd_journal_remote_LDADD += \
4032         $(MICROHTTPD_LIBS)
4033
4034 if ENABLE_TMPFILES
4035 dist_tmpfiles_DATA += \
4036         tmpfiles.d/systemd-remote.conf
4037 endif
4038
4039 if HAVE_GNUTLS
4040 systemd_journal_remote_LDADD += \
4041         $(GNUTLS_LIBS)
4042 endif
4043
4044 # systemd-journal-remote make sense mostly with full crypto stack
4045 dist_systemunit_DATA += \
4046         units/systemd-journal-remote.socket
4047
4048 nodist_systemunit_DATA += \
4049         units/systemd-journal-remote.service
4050
4051 journal-remote-install-hook: journal-install-hook
4052         -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
4053         -chown 0:0 $(DESTDIR)/var/log/journal/remote
4054         -chmod 755 $(DESTDIR)/var/log/journal/remote
4055
4056 INSTALL_EXEC_HOOKS += journal-remote-install-hook
4057
4058 nodist_pkgsysconf_DATA += \
4059         src/journal-remote/journal-remote.conf
4060
4061 EXTRA_DIST += \
4062         units/systemd-journal-remote.service.in \
4063         src/journal-remote/journal-remote.conf.in \
4064         src/journal-remote/log-generator.py
4065 endif
4066
4067 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4068 journalctl_CFLAGS = \
4069         $(AM_CFLAGS)
4070
4071 journalctl_SOURCES = \
4072         src/journal/journalctl.c
4073
4074 journalctl_LDADD = \
4075         libshared.la \
4076         libudev-core.la
4077
4078 if HAVE_QRENCODE
4079 journalctl_SOURCES += \
4080         src/journal/journal-qrcode.c \
4081         src/journal/journal-qrcode.h
4082
4083 journalctl_CFLAGS += \
4084         $(QRENCODE_CFLAGS)
4085
4086 journalctl_LDADD += \
4087         $(QRENCODE_LIBS)
4088 endif
4089
4090 test_journal_SOURCES = \
4091         src/journal/test-journal.c
4092
4093 test_journal_LDADD = \
4094         libjournal-core.la
4095
4096 test_journal_send_SOURCES = \
4097         src/journal/test-journal-send.c
4098
4099 test_journal_send_LDADD = \
4100         libjournal-core.la
4101
4102 test_journal_syslog_SOURCES = \
4103         src/journal/test-journal-syslog.c
4104
4105 test_journal_syslog_LDADD = \
4106         libjournal-core.la
4107
4108 test_journal_match_SOURCES = \
4109         src/journal/test-journal-match.c
4110
4111 test_journal_match_LDADD = \
4112         libjournal-core.la
4113
4114 test_journal_enum_SOURCES = \
4115         src/journal/test-journal-enum.c
4116
4117 test_journal_enum_LDADD = \
4118         libjournal-core.la
4119
4120 test_journal_stream_SOURCES = \
4121         src/journal/test-journal-stream.c
4122
4123 test_journal_stream_LDADD = \
4124         libjournal-core.la
4125
4126 test_journal_flush_SOURCES = \
4127         src/journal/test-journal-flush.c
4128
4129 test_journal_flush_LDADD = \
4130         libjournal-core.la
4131
4132 test_journal_init_SOURCES = \
4133         src/journal/test-journal-init.c
4134
4135 test_journal_init_LDADD = \
4136         libjournal-core.la
4137
4138 test_journal_verify_SOURCES = \
4139         src/journal/test-journal-verify.c
4140
4141 test_journal_verify_LDADD = \
4142         libjournal-core.la
4143
4144 test_journal_interleaving_SOURCES = \
4145         src/journal/test-journal-interleaving.c
4146
4147 test_journal_interleaving_LDADD = \
4148         libjournal-core.la
4149
4150 test_mmap_cache_SOURCES = \
4151         src/journal/test-mmap-cache.c
4152
4153 test_mmap_cache_LDADD = \
4154         libjournal-core.la
4155
4156 test_catalog_SOURCES = \
4157         src/journal/test-catalog.c
4158
4159 test_catalog_CPPFLAGS = \
4160         $(AM_CPPFLAGS) \
4161         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
4162
4163 test_catalog_LDADD = \
4164         libjournal-core.la
4165
4166 test_compress_SOURCES = \
4167         src/journal/test-compress.c
4168
4169 test_compress_LDADD = \
4170         libshared.la
4171
4172 test_compress_benchmark_SOURCES = \
4173         src/journal/test-compress-benchmark.c
4174
4175 test_compress_benchmark_LDADD = \
4176         libshared.la
4177
4178 test_audit_type_SOURCES = \
4179         src/journal/test-audit-type.c
4180
4181 test_audit_type_LDADD = \
4182         libjournal-core.la
4183
4184 libjournal_core_la_SOURCES = \
4185         src/journal/journald-kmsg.c \
4186         src/journal/journald-kmsg.h \
4187         src/journal/journald-syslog.c \
4188         src/journal/journald-syslog.h \
4189         src/journal/journald-stream.c \
4190         src/journal/journald-stream.h \
4191         src/journal/journald-server.c \
4192         src/journal/journald-server.h \
4193         src/journal/journald-console.c \
4194         src/journal/journald-console.h \
4195         src/journal/journald-wall.c \
4196         src/journal/journald-wall.h \
4197         src/journal/journald-native.c \
4198         src/journal/journald-native.h \
4199         src/journal/journald-audit.c \
4200         src/journal/journald-audit.h \
4201         src/journal/journald-rate-limit.c \
4202         src/journal/journald-rate-limit.h \
4203         src/journal/journal-internal.h
4204
4205 nodist_libjournal_core_la_SOURCES = \
4206         src/journal/journald-gperf.c
4207
4208 libjournal_core_la_LIBADD = \
4209         libshared.la
4210
4211 noinst_LTLIBRARIES += \
4212         libjournal-core.la
4213
4214 journal-install-hook:
4215         -$(MKDIR_P) $(DESTDIR)/var/log/journal
4216         -chown 0:0 $(DESTDIR)/var/log/journal
4217         -chmod 755 $(DESTDIR)/var/log/journal
4218         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4219         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4220
4221 journal-uninstall-hook:
4222         -rmdir $(DESTDIR)/var/log/journal/remote
4223         -rmdir $(DESTDIR)/var/log/journal/
4224
4225 INSTALL_EXEC_HOOKS += journal-install-hook
4226 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4227
4228 # ------------------------------------------------------------------------------
4229 # Update catalog on installation. Do not bother if installing
4230 # in DESTDIR, since this is likely for packaging purposes.
4231 catalog-update-hook:
4232         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4233
4234 INSTALL_DATA_HOOKS += \
4235         catalog-update-hook
4236
4237 catalog-remove-hook:
4238         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4239
4240 UNINSTALL_DATA_HOOKS += \
4241         catalog-remove-hook
4242
4243 tests += \
4244         test-journal \
4245         test-journal-enum \
4246         test-journal-send \
4247         test-journal-syslog \
4248         test-journal-match \
4249         test-journal-stream \
4250         test-journal-init \
4251         test-journal-verify \
4252         test-journal-interleaving \
4253         test-journal-flush \
4254         test-mmap-cache \
4255         test-catalog \
4256         test-audit-type
4257
4258 if HAVE_COMPRESSION
4259 tests += \
4260         test-compress \
4261         test-compress-benchmark
4262 endif
4263
4264 pkginclude_HEADERS += \
4265         src/systemd/sd-journal.h \
4266         src/systemd/sd-messages.h \
4267         src/systemd/_sd-common.h
4268
4269 libsystemd_journal_internal_la_SOURCES = \
4270         src/journal/sd-journal.c \
4271         src/systemd/sd-journal.h \
4272         src/systemd/_sd-common.h \
4273         src/journal/journal-file.c \
4274         src/journal/journal-file.h \
4275         src/journal/journal-vacuum.c \
4276         src/journal/journal-vacuum.h \
4277         src/journal/journal-verify.c \
4278         src/journal/journal-verify.h \
4279         src/journal/lookup3.c \
4280         src/journal/lookup3.h \
4281         src/journal/journal-send.c \
4282         src/journal/journal-def.h \
4283         src/journal/compress.h \
4284         src/journal/catalog.c \
4285         src/journal/catalog.h \
4286         src/journal/mmap-cache.c \
4287         src/journal/mmap-cache.h \
4288         src/journal/compress.c \
4289         src/journal/audit-type.h \
4290         src/journal/audit-type.c \
4291         src/shared/gcrypt-util.h \
4292         src/shared/gcrypt-util.c
4293
4294 nodist_libsystemd_journal_internal_la_SOURCES = \
4295         src/journal/audit_type-to-name.h
4296
4297 gperf_txt_sources += \
4298         src/journal/audit_type-list.txt
4299
4300 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4301 libsystemd_journal_internal_la_CFLAGS = \
4302         $(AM_CFLAGS)
4303
4304 libsystemd_journal_internal_la_LIBADD =
4305
4306 if HAVE_XZ
4307 libsystemd_journal_internal_la_CFLAGS += \
4308         $(XZ_CFLAGS)
4309
4310 libsystemd_journal_internal_la_LIBADD += \
4311         $(XZ_LIBS)
4312 endif
4313
4314 if HAVE_LZ4
4315 libsystemd_journal_internal_la_LIBADD += \
4316         -llz4
4317 endif
4318
4319 if HAVE_GCRYPT
4320 libsystemd_journal_internal_la_SOURCES += \
4321         src/journal/journal-authenticate.c \
4322         src/journal/journal-authenticate.h \
4323         src/journal/fsprg.c \
4324         src/journal/fsprg.h
4325
4326 libsystemd_journal_internal_la_LIBADD += \
4327         $(GCRYPT_LIBS)
4328
4329 # fsprg.c is a drop-in file using void pointer arithmetic
4330 libsystemd_journal_internal_la_CFLAGS += \
4331         $(GCRYPT_CFLAGS) \
4332         -Wno-pointer-arith
4333 endif
4334
4335 noinst_LTLIBRARIES += \
4336         libsystemd-journal-internal.la
4337
4338 rootlibexec_PROGRAMS += \
4339         systemd-journald
4340
4341 rootbin_PROGRAMS += \
4342         journalctl
4343
4344 bin_PROGRAMS += \
4345         systemd-cat
4346
4347 dist_systemunit_DATA += \
4348         units/systemd-journald.socket \
4349         units/systemd-journald-dev-log.socket \
4350         units/systemd-journald-audit.socket
4351
4352 nodist_systemunit_DATA += \
4353         units/systemd-journald.service \
4354         units/systemd-journal-flush.service \
4355         units/systemd-journal-catalog-update.service
4356
4357 dist_pkgsysconf_DATA += \
4358         src/journal/journald.conf
4359
4360 dist_catalog_DATA = \
4361         catalog/systemd.bg.catalog \
4362         catalog/systemd.be.catalog \
4363         catalog/systemd.be@latin.catalog \
4364         catalog/systemd.fr.catalog \
4365         catalog/systemd.it.catalog \
4366         catalog/systemd.pl.catalog \
4367         catalog/systemd.pt_BR.catalog \
4368         catalog/systemd.ru.catalog \
4369         catalog/systemd.zh_CN.catalog \
4370         catalog/systemd.zh_TW.catalog \
4371         catalog/systemd.catalog
4372
4373 SOCKETS_TARGET_WANTS += \
4374         systemd-journald.socket \
4375         systemd-journald-dev-log.socket \
4376         systemd-journald-audit.socket
4377
4378 SYSINIT_TARGET_WANTS += \
4379         systemd-journald.service \
4380         systemd-journal-flush.service \
4381         systemd-journal-catalog-update.service
4382
4383 EXTRA_DIST += \
4384         units/systemd-journald.service.in \
4385         units/systemd-journal-flush.service.in \
4386         units/systemd-journal-catalog-update.service.in
4387
4388 gperf_gperf_sources += \
4389         src/journal/journald-gperf.gperf
4390
4391 # ------------------------------------------------------------------------------
4392 if HAVE_MICROHTTPD
4393 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4394
4395 rootlibexec_PROGRAMS += \
4396         systemd-journal-gatewayd
4397
4398 systemd_journal_gatewayd_SOURCES = \
4399         src/journal-remote/journal-gatewayd.c \
4400         src/journal-remote/microhttpd-util.h \
4401         src/journal-remote/microhttpd-util.c
4402
4403 systemd_journal_gatewayd_LDADD = \
4404         libshared.la \
4405         $(MICROHTTPD_LIBS)
4406
4407 if HAVE_GNUTLS
4408 systemd_journal_gatewayd_LDADD += \
4409         $(GNUTLS_LIBS)
4410 endif
4411
4412 systemd_journal_gatewayd_CFLAGS = \
4413         $(AM_CFLAGS) \
4414         $(MICROHTTPD_CFLAGS)
4415
4416 systemd_journal_gatewayd_CPPFLAGS = \
4417         $(AM_CPPFLAGS) \
4418         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4419
4420 dist_systemunit_DATA += \
4421         units/systemd-journal-gatewayd.socket
4422
4423 nodist_systemunit_DATA += \
4424         units/systemd-journal-gatewayd.service
4425
4426 dist_gatewayddocumentroot_DATA = \
4427         src/journal-remote/browse.html
4428
4429 endif
4430
4431 EXTRA_DIST += \
4432         units/systemd-journal-gatewayd.service.in
4433
4434 # ------------------------------------------------------------------------------
4435
4436 systemd_socket_proxyd_SOURCES = \
4437         src/socket-proxy/socket-proxyd.c
4438
4439 systemd_socket_proxyd_LDADD = \
4440         libshared.la
4441
4442 # ------------------------------------------------------------------------------
4443 if ENABLE_COREDUMP
4444 systemd_coredump_SOURCES = \
4445         src/coredump/coredump.c \
4446         src/coredump/coredump-vacuum.c \
4447         src/coredump/coredump-vacuum.h
4448
4449 systemd_coredump_LDADD = \
4450         libshared.la
4451
4452 if HAVE_ELFUTILS
4453 systemd_coredump_SOURCES += \
4454         src/coredump/stacktrace.c \
4455         src/coredump/stacktrace.h
4456
4457 systemd_coredump_LDADD += \
4458         $(ELFUTILS_LIBS)
4459 endif
4460
4461 nodist_systemunit_DATA += \
4462         units/systemd-coredump@.service
4463
4464 dist_systemunit_DATA += \
4465         units/systemd-coredump.socket
4466
4467 SOCKETS_TARGET_WANTS += \
4468         systemd-coredump.socket
4469
4470 rootlibexec_PROGRAMS += \
4471         systemd-coredump
4472
4473 dist_pkgsysconf_DATA += \
4474         src/coredump/coredump.conf
4475
4476 coredumpctl_SOURCES = \
4477         src/coredump/coredumpctl.c
4478
4479 coredumpctl_LDADD = \
4480         libshared.la
4481
4482 bin_PROGRAMS += \
4483         coredumpctl
4484
4485 manual_tests += \
4486         test-coredump-vacuum
4487
4488 test_coredump_vacuum_SOURCES = \
4489         src/coredump/test-coredump-vacuum.c  \
4490         src/coredump/coredump-vacuum.c \
4491         src/coredump/coredump-vacuum.h
4492
4493 test_coredump_vacuum_LDADD = \
4494         libshared.la
4495
4496 dist_bashcompletion_data += \
4497         shell-completion/bash/coredumpctl
4498
4499 dist_zshcompletion_data += \
4500         shell-completion/zsh/_coredumpctl
4501
4502 nodist_sysctl_DATA = \
4503         sysctl.d/50-coredump.conf
4504
4505 CLEANFILES += \
4506         sysctl.d/50-coredump.conf
4507 endif
4508
4509 EXTRA_DIST += \
4510         sysctl.d/50-coredump.conf.in \
4511         units/systemd-coredump@.service.in
4512
4513 # ------------------------------------------------------------------------------
4514 if ENABLE_BINFMT
4515 systemd_binfmt_SOURCES = \
4516         src/binfmt/binfmt.c
4517
4518 systemd_binfmt_LDADD = \
4519         libshared.la
4520
4521 rootlibexec_PROGRAMS += \
4522         systemd-binfmt
4523
4524 dist_systemunit_DATA += \
4525         units/proc-sys-fs-binfmt_misc.automount \
4526         units/proc-sys-fs-binfmt_misc.mount
4527
4528 nodist_systemunit_DATA += \
4529         units/systemd-binfmt.service
4530
4531 INSTALL_DIRS += \
4532         $(prefix)/lib/binfmt.d \
4533         $(sysconfdir)/binfmt.d
4534
4535 SYSINIT_TARGET_WANTS += \
4536         systemd-binfmt.service \
4537         proc-sys-fs-binfmt_misc.automount
4538
4539 endif
4540
4541 EXTRA_DIST += \
4542         units/systemd-binfmt.service.in
4543
4544 # ------------------------------------------------------------------------------
4545 if ENABLE_VCONSOLE
4546 systemd_vconsole_setup_SOURCES = \
4547         src/vconsole/vconsole-setup.c
4548
4549 systemd_vconsole_setup_LDADD = \
4550         libshared.la
4551
4552 rootlibexec_PROGRAMS += \
4553         systemd-vconsole-setup
4554
4555 nodist_udevrules_DATA += \
4556         src/vconsole/90-vconsole.rules
4557
4558 nodist_systemunit_DATA += \
4559         units/systemd-vconsole-setup.service
4560
4561 SYSINIT_TARGET_WANTS += \
4562         systemd-vconsole-setup.service
4563 endif
4564
4565 EXTRA_DIST += \
4566         src/vconsole/90-vconsole.rules.in \
4567         units/systemd-vconsole-setup.service.in
4568
4569 # ------------------------------------------------------------------------------
4570 if ENABLE_QUOTACHECK
4571 rootlibexec_PROGRAMS += \
4572         systemd-quotacheck
4573
4574 nodist_systemunit_DATA += \
4575         units/systemd-quotacheck.service
4576
4577 systemd_quotacheck_SOURCES = \
4578         src/quotacheck/quotacheck.c
4579
4580 systemd_quotacheck_LDADD = \
4581         libshared.la
4582 endif
4583
4584 EXTRA_DIST += \
4585         units/systemd-quotacheck.service.in
4586
4587 nodist_systemunit_DATA += \
4588         units/quotaon.service
4589
4590 # ------------------------------------------------------------------------------
4591 if ENABLE_RANDOMSEED
4592 rootlibexec_PROGRAMS += \
4593         systemd-random-seed
4594
4595 nodist_systemunit_DATA += \
4596         units/systemd-random-seed.service
4597
4598 systemd_random_seed_SOURCES = \
4599         src/random-seed/random-seed.c
4600
4601 systemd_random_seed_LDADD = \
4602         libshared.la
4603
4604 SYSINIT_TARGET_WANTS += \
4605         systemd-random-seed.service
4606
4607 endif
4608
4609 EXTRA_DIST += \
4610         units/systemd-random-seed.service.in
4611
4612 # ------------------------------------------------------------------------------
4613 if ENABLE_BACKLIGHT
4614 rootlibexec_PROGRAMS += \
4615         systemd-backlight
4616
4617 nodist_systemunit_DATA += \
4618         units/systemd-backlight@.service
4619
4620 systemd_backlight_SOURCES = \
4621         src/backlight/backlight.c
4622
4623 systemd_backlight_LDADD = \
4624         libshared.la
4625 endif
4626
4627 EXTRA_DIST += \
4628         units/systemd-backlight@.service.in
4629
4630 # ------------------------------------------------------------------------------
4631 if ENABLE_RFKILL
4632 rootlibexec_PROGRAMS += \
4633         systemd-rfkill
4634
4635 nodist_systemunit_DATA += \
4636         units/systemd-rfkill.service
4637
4638 dist_systemunit_DATA += \
4639         units/systemd-rfkill.socket
4640
4641 systemd_rfkill_SOURCES = \
4642         src/rfkill/rfkill.c
4643
4644 systemd_rfkill_LDADD = \
4645         libshared.la
4646 endif
4647
4648 EXTRA_DIST += \
4649         units/systemd-rfkill.service.in
4650
4651 # ------------------------------------------------------------------------------
4652 if HAVE_LIBCRYPTSETUP
4653 rootlibexec_PROGRAMS += \
4654         systemd-cryptsetup
4655
4656 systemgenerator_PROGRAMS += \
4657         systemd-cryptsetup-generator
4658
4659 dist_systemunit_DATA += \
4660         units/cryptsetup.target \
4661         units/cryptsetup-pre.target
4662
4663 systemd_cryptsetup_SOURCES = \
4664         src/cryptsetup/cryptsetup.c
4665
4666 systemd_cryptsetup_CFLAGS = \
4667         $(AM_CFLAGS) \
4668         $(LIBCRYPTSETUP_CFLAGS)
4669
4670 systemd_cryptsetup_LDADD = \
4671         libshared.la \
4672         $(LIBCRYPTSETUP_LIBS)
4673
4674 systemd_cryptsetup_generator_SOURCES = \
4675         src/cryptsetup/cryptsetup-generator.c
4676
4677 systemd_cryptsetup_generator_LDADD = \
4678         libshared.la
4679
4680 SYSINIT_TARGET_WANTS += \
4681         cryptsetup.target
4682
4683 endif
4684
4685 # ------------------------------------------------------------------------------
4686 if ENABLE_HOSTNAMED
4687 systemd_hostnamed_SOURCES = \
4688         src/hostname/hostnamed.c
4689
4690 systemd_hostnamed_LDADD = \
4691         libshared.la
4692
4693 rootlibexec_PROGRAMS += \
4694         systemd-hostnamed
4695
4696 nodist_systemunit_DATA += \
4697         units/systemd-hostnamed.service
4698
4699 dist_systemunit_DATA_busnames += \
4700         units/org.freedesktop.hostname1.busname
4701
4702 dist_dbuspolicy_DATA += \
4703         src/hostname/org.freedesktop.hostname1.conf
4704
4705 dist_dbussystemservice_DATA += \
4706         src/hostname/org.freedesktop.hostname1.service
4707
4708 polkitpolicy_files += \
4709         src/hostname/org.freedesktop.hostname1.policy
4710
4711 SYSTEM_UNIT_ALIASES += \
4712         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
4713
4714 BUSNAMES_TARGET_WANTS += \
4715         org.freedesktop.hostname1.busname
4716
4717 hostnamectl_SOURCES = \
4718         src/hostname/hostnamectl.c
4719
4720 hostnamectl_LDADD = \
4721         libshared.la
4722
4723 bin_PROGRAMS += \
4724         hostnamectl
4725
4726 dist_bashcompletion_data += \
4727         shell-completion/bash/hostnamectl
4728
4729 dist_zshcompletion_data += \
4730         shell-completion/zsh/_hostnamectl
4731 endif
4732
4733 polkitpolicy_in_files += \
4734         src/hostname/org.freedesktop.hostname1.policy.in
4735
4736 EXTRA_DIST += \
4737         units/systemd-hostnamed.service.in
4738
4739 # ------------------------------------------------------------------------------
4740 dist_systemunit_DATA_busnames += \
4741         units/org.freedesktop.systemd1.busname
4742
4743 BUSNAMES_TARGET_WANTS += \
4744         org.freedesktop.systemd1.busname
4745
4746 # ------------------------------------------------------------------------------
4747 if ENABLE_LOCALED
4748 systemd_localed_SOURCES = \
4749         src/locale/localed.c
4750
4751 systemd_localed_LDADD = \
4752         libshared.la \
4753         -ldl
4754
4755 systemd_localed_CFLAGS = \
4756         $(AM_CFLAGS) \
4757         $(XKBCOMMON_CFLAGS)
4758
4759 nodist_systemunit_DATA += \
4760         units/systemd-localed.service
4761
4762 dist_systemunit_DATA_busnames += \
4763         units/org.freedesktop.locale1.busname
4764
4765 rootlibexec_PROGRAMS += \
4766         systemd-localed
4767
4768 dist_dbuspolicy_DATA += \
4769         src/locale/org.freedesktop.locale1.conf
4770
4771 dist_dbussystemservice_DATA += \
4772         src/locale/org.freedesktop.locale1.service
4773
4774 polkitpolicy_files += \
4775         src/locale/org.freedesktop.locale1.policy
4776
4777 SYSTEM_UNIT_ALIASES += \
4778         systemd-localed.service dbus-org.freedesktop.locale1.service
4779
4780 BUSNAMES_TARGET_WANTS += \
4781         org.freedesktop.locale1.busname
4782
4783 dist_pkgdata_DATA = \
4784         src/locale/kbd-model-map \
4785         src/locale/language-fallback-map
4786
4787 localectl_SOURCES = \
4788         src/locale/localectl.c
4789
4790 localectl_LDADD = \
4791         libshared.la
4792
4793 bin_PROGRAMS += \
4794         localectl
4795
4796 dist_bashcompletion_data += \
4797         shell-completion/bash/localectl
4798
4799 dist_zshcompletion_data += \
4800         shell-completion/zsh/_localectl
4801 endif
4802
4803 .PHONY: update-kbd-model-map
4804
4805 polkitpolicy_in_files += \
4806         src/locale/org.freedesktop.locale1.policy.in
4807
4808 EXTRA_DIST += \
4809         units/systemd-localed.service.in
4810
4811 # ------------------------------------------------------------------------------
4812 if ENABLE_TIMEDATED
4813 systemd_timedated_SOURCES = \
4814         src/timedate/timedated.c
4815
4816 systemd_timedated_LDADD = \
4817         libshared.la
4818
4819 rootlibexec_PROGRAMS += \
4820         systemd-timedated
4821
4822 dist_dbussystemservice_DATA += \
4823         src/timedate/org.freedesktop.timedate1.service
4824
4825 dist_dbuspolicy_DATA += \
4826         src/timedate/org.freedesktop.timedate1.conf
4827
4828 nodist_systemunit_DATA += \
4829         units/systemd-timedated.service
4830
4831 dist_systemunit_DATA_busnames += \
4832         units/org.freedesktop.timedate1.busname
4833
4834 polkitpolicy_files += \
4835         src/timedate/org.freedesktop.timedate1.policy
4836
4837 SYSTEM_UNIT_ALIASES += \
4838         systemd-timedated.service dbus-org.freedesktop.timedate1.service
4839
4840 BUSNAMES_TARGET_WANTS += \
4841         org.freedesktop.timedate1.busname
4842
4843 timedatectl_SOURCES = \
4844         src/timedate/timedatectl.c
4845
4846 timedatectl_LDADD = \
4847         libshared.la
4848
4849 bin_PROGRAMS += \
4850         timedatectl
4851
4852 dist_bashcompletion_data += \
4853         shell-completion/bash/timedatectl
4854
4855 dist_zshcompletion_data += \
4856         shell-completion/zsh/_timedatectl
4857 endif
4858
4859 polkitpolicy_in_files += \
4860         src/timedate/org.freedesktop.timedate1.policy.in
4861
4862 EXTRA_DIST += \
4863         units/systemd-timedated.service.in
4864
4865 # ------------------------------------------------------------------------------
4866 if ENABLE_TIMESYNCD
4867 systemd_timesyncd_SOURCES = \
4868         src/timesync/timesyncd.c \
4869         src/timesync/timesyncd-manager.c \
4870         src/timesync/timesyncd-manager.h \
4871         src/timesync/timesyncd-conf.c \
4872         src/timesync/timesyncd-conf.h \
4873         src/timesync/timesyncd-server.c \
4874         src/timesync/timesyncd-server.h
4875
4876 nodist_systemd_timesyncd_SOURCES = \
4877         src/timesync/timesyncd-gperf.c
4878
4879 systemd_timesyncd_LDADD = \
4880         libsystemd-network.la \
4881         libshared.la
4882
4883 rootlibexec_PROGRAMS += \
4884         systemd-timesyncd
4885
4886 nodist_systemunit_DATA += \
4887         units/systemd-timesyncd.service
4888
4889 GENERAL_ALIASES += \
4890         $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
4891
4892 nodist_pkgsysconf_DATA += \
4893         src/timesync/timesyncd.conf
4894
4895 endif
4896
4897 gperf_gperf_sources += \
4898         src/timesync/timesyncd-gperf.gperf
4899
4900 EXTRA_DIST += \
4901         units/systemd-timesyncd.service.in \
4902         src/timesync/timesyncd.conf.in
4903
4904 # ------------------------------------------------------------------------------
4905 test_nss_SOURCES = \
4906         src/test/test-nss.c
4907
4908 test_nss_LDADD = \
4909         libsystemd-internal.la \
4910         -ldl
4911
4912 manual_tests += \
4913         test-nss
4914
4915 # ------------------------------------------------------------------------------
4916 if HAVE_MYHOSTNAME
4917 libnss_myhostname_la_SOURCES = \
4918         src/nss-myhostname/nss-myhostname.sym \
4919         src/nss-myhostname/nss-myhostname.c
4920
4921 libnss_myhostname_la_LDFLAGS = \
4922         $(AM_LDFLAGS) \
4923         -module \
4924         -export-dynamic \
4925         -avoid-version \
4926         -shared \
4927         -shrext .so.2 \
4928         -Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
4929
4930 libnss_myhostname_la_LIBADD = \
4931         libsystemd-internal.la
4932
4933 lib_LTLIBRARIES += \
4934         libnss_myhostname.la
4935 endif
4936
4937 # ------------------------------------------------------------------------------
4938 if ENABLE_MACHINED
4939 systemd_machined_SOURCES = \
4940         src/machine/machined.c \
4941         src/machine/machined.h
4942
4943 systemd_machined_LDADD = \
4944         libmachine-core.la
4945
4946 rootlibexec_PROGRAMS += \
4947         systemd-machined
4948
4949 libmachine_core_la_SOURCES = \
4950         src/machine/machine.c \
4951         src/machine/machine.h \
4952         src/machine/machined-dbus.c \
4953         src/machine/machine-dbus.c \
4954         src/machine/machine-dbus.h \
4955         src/machine/image-dbus.c \
4956         src/machine/image-dbus.h \
4957         src/machine/operation.c \
4958         src/machine/operation.h
4959
4960 libmachine_core_la_LIBADD = \
4961         libshared.la
4962
4963 noinst_LTLIBRARIES += \
4964         libmachine-core.la
4965
4966 machinectl_SOURCES = \
4967         src/machine/machinectl.c
4968
4969 machinectl_LDADD = \
4970         libshared.la
4971
4972 rootbin_PROGRAMS += \
4973         machinectl
4974
4975 test_machine_tables_SOURCES = \
4976         src/machine/test-machine-tables.c
4977
4978 test_machine_tables_LDADD = \
4979         libmachine-core.la
4980
4981 tests += \
4982         test-machine-tables
4983
4984 nodist_systemunit_DATA += \
4985         units/systemd-machined.service
4986
4987 dist_systemunit_DATA += \
4988         units/machine.slice
4989
4990 dist_systemunit_DATA_busnames += \
4991         units/org.freedesktop.machine1.busname
4992
4993 dist_dbussystemservice_DATA += \
4994         src/machine/org.freedesktop.machine1.service
4995
4996 dist_dbuspolicy_DATA += \
4997         src/machine/org.freedesktop.machine1.conf
4998
4999 polkitpolicy_files += \
5000         src/machine/org.freedesktop.machine1.policy
5001
5002 dist_bashcompletion_data += \
5003         shell-completion/bash/machinectl
5004
5005 dist_zshcompletion_data += \
5006         shell-completion/zsh/_machinectl \
5007         shell-completion/zsh/_sd_machines
5008
5009 SYSTEM_UNIT_ALIASES += \
5010         systemd-machined.service dbus-org.freedesktop.machine1.service
5011
5012 BUSNAMES_TARGET_WANTS += \
5013         org.freedesktop.machine1.busname
5014
5015 libnss_mymachines_la_SOURCES = \
5016         src/nss-mymachines/nss-mymachines.sym \
5017         src/nss-mymachines/nss-mymachines.c
5018
5019 libnss_mymachines_la_LDFLAGS = \
5020         $(AM_LDFLAGS) \
5021         -module \
5022         -export-dynamic \
5023         -avoid-version \
5024         -shared \
5025         -shrext .so.2 \
5026         -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
5027
5028 libnss_mymachines_la_LIBADD = \
5029         libsystemd-internal.la
5030
5031 lib_LTLIBRARIES += \
5032         libnss_mymachines.la
5033
5034 endif
5035
5036 polkitpolicy_in_files += \
5037         src/machine/org.freedesktop.machine1.policy.in
5038
5039 EXTRA_DIST += \
5040         units/systemd-machined.service.in
5041
5042 # ------------------------------------------------------------------------------
5043 if ENABLE_IMPORTD
5044
5045 if HAVE_LIBCURL
5046 if HAVE_XZ
5047 if HAVE_ZLIB
5048 if HAVE_BZIP2
5049 if HAVE_GCRYPT
5050
5051 rootlibexec_PROGRAMS += \
5052         systemd-importd \
5053         systemd-pull \
5054         systemd-import \
5055         systemd-export
5056
5057 systemd_importd_SOURCES = \
5058         src/import/importd.c
5059
5060 systemd_importd_CFLAGS = \
5061         $(AM_CFLAGS) \
5062         -D SYSTEMD_PULL_PATH=\"$(rootlibexecdir)/systemd-pull\" \
5063         -D SYSTEMD_IMPORT_PATH=\"$(rootlibexecdir)/systemd-import\" \
5064         -D SYSTEMD_EXPORT_PATH=\"$(rootlibexecdir)/systemd-export\"
5065
5066 systemd_importd_LDADD = \
5067         libshared.la
5068
5069 systemd_pull_SOURCES = \
5070         src/import/pull.c \
5071         src/import/pull-raw.c \
5072         src/import/pull-raw.h \
5073         src/import/pull-tar.c \
5074         src/import/pull-tar.h \
5075         src/import/pull-job.c \
5076         src/import/pull-job.h \
5077         src/import/pull-common.c \
5078         src/import/pull-common.h \
5079         src/import/import-common.c \
5080         src/import/import-common.h \
5081         src/import/import-compress.c \
5082         src/import/import-compress.h \
5083         src/import/curl-util.c \
5084         src/import/curl-util.h \
5085         src/import/qcow2-util.c \
5086         src/import/qcow2-util.h
5087
5088 systemd_pull_CFLAGS = \
5089         $(AM_CFLAGS) \
5090         $(LIBCURL_CFLAGS) \
5091         $(XZ_CFLAGS) \
5092         $(ZLIB_CFLAGS) \
5093         $(GCRYPT_CFLAGS) \
5094         -D VENDOR_KEYRING_PATH=\"$(rootlibexecdir)/import-pubring.gpg\" \
5095         -D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\"
5096
5097 systemd_pull_LDADD = \
5098         libshared.la \
5099         $(LIBCURL_LIBS) \
5100         $(XZ_LIBS) \
5101         $(ZLIB_LIBS) \
5102         -lbz2 \
5103         $(GCRYPT_LIBS)
5104
5105 systemd_import_SOURCES = \
5106         src/import/import.c \
5107         src/import/import-raw.c \
5108         src/import/import-raw.h \
5109         src/import/import-tar.c \
5110         src/import/import-tar.h \
5111         src/import/import-common.c \
5112         src/import/import-common.h \
5113         src/import/import-compress.c \
5114         src/import/import-compress.h \
5115         src/import/qcow2-util.c \
5116         src/import/qcow2-util.h
5117
5118 systemd_import_CFLAGS = \
5119         $(AM_CFLAGS) \
5120         $(XZ_CFLAGS) \
5121         $(ZLIB_CFLAGS)
5122
5123 systemd_import_LDADD = \
5124         libshared.la \
5125         $(XZ_LIBS) \
5126         $(ZLIB_LIBS) \
5127         -lbz2
5128
5129 systemd_export_SOURCES = \
5130         src/import/export.c \
5131         src/import/export-tar.c \
5132         src/import/export-tar.h \
5133         src/import/export-raw.c \
5134         src/import/export-raw.h \
5135         src/import/import-common.c \
5136         src/import/import-common.h \
5137         src/import/import-compress.c \
5138         src/import/import-compress.h
5139
5140 systemd_export_CFLAGS = \
5141         $(AM_CFLAGS) \
5142         $(XZ_CFLAGS) \
5143         $(ZLIB_CFLAGS)
5144
5145 systemd_export_LDADD = \
5146         libshared.la \
5147         $(XZ_LIBS) \
5148         $(ZLIB_LIBS) \
5149         -lbz2
5150
5151 dist_rootlibexec_DATA = \
5152         src/import/import-pubring.gpg
5153
5154 nodist_systemunit_DATA += \
5155         units/systemd-importd.service
5156
5157 dist_systemunit_DATA_busnames += \
5158         units/org.freedesktop.import1.busname
5159
5160 BUSNAMES_TARGET_WANTS += \
5161         org.freedesktop.import1.busname
5162
5163 SYSTEM_UNIT_ALIASES += \
5164         systemd-importd.service dbus-org.freedesktop.import1.service
5165
5166 dist_dbussystemservice_DATA += \
5167         src/import/org.freedesktop.import1.service
5168
5169 dist_dbuspolicy_DATA += \
5170         src/import/org.freedesktop.import1.conf
5171
5172 polkitpolicy_files += \
5173         src/import/org.freedesktop.import1.policy
5174
5175 manual_tests += \
5176         test-qcow2
5177
5178 test_qcow2_SOURCES = \
5179         src/import/test-qcow2.c \
5180         src/import/qcow2-util.c \
5181         src/import/qcow2-util.h
5182
5183 test_qcow2_CFLAGS = \
5184         $(AM_CFLAGS) \
5185         $(ZLIB_CFLAGS)
5186
5187 test_qcow2_LDADD = \
5188         libshared.la \
5189         $(ZLIB_LIBS)
5190
5191 endif
5192 endif
5193 endif
5194 endif
5195 endif
5196
5197 endif
5198
5199 polkitpolicy_in_files += \
5200         src/import/org.freedesktop.import1.policy.in
5201
5202 EXTRA_DIST += \
5203         units/systemd-importd.service.in
5204
5205
5206 # ------------------------------------------------------------------------------
5207 if ENABLE_RESOLVED
5208
5209 basic_dns_sources = \
5210         src/resolve/resolved-dns-dnssec.c \
5211         src/resolve/resolved-dns-dnssec.h \
5212         src/resolve/resolved-dns-packet.c \
5213         src/resolve/resolved-dns-packet.h \
5214         src/resolve/resolved-dns-rr.c \
5215         src/resolve/resolved-dns-rr.h \
5216         src/resolve/resolved-dns-answer.c \
5217         src/resolve/resolved-dns-answer.h \
5218         src/resolve/resolved-dns-question.c \
5219         src/resolve/resolved-dns-question.h \
5220         src/resolve/dns-type.c \
5221         src/resolve/dns-type.h
5222
5223 systemd_resolved_SOURCES = \
5224         src/resolve/resolved.c \
5225         src/resolve/resolved-manager.c \
5226         src/resolve/resolved-manager.h \
5227         src/resolve/resolved-conf.c \
5228         src/resolve/resolved-conf.h \
5229         src/resolve/resolved-resolv-conf.c \
5230         src/resolve/resolved-resolv-conf.h \
5231         src/resolve/resolved-bus.c \
5232         src/resolve/resolved-bus.h \
5233         src/resolve/resolved-link.h \
5234         src/resolve/resolved-link.c \
5235         src/resolve/resolved-link-bus.c \
5236         src/resolve/resolved-link-bus.h \
5237         src/resolve/resolved-llmnr.h \
5238         src/resolve/resolved-llmnr.c \
5239         src/resolve/resolved-mdns.h \
5240         src/resolve/resolved-mdns.c \
5241         src/resolve/resolved-def.h \
5242         $(basic_dns_sources) \
5243         src/resolve/resolved-dns-query.h \
5244         src/resolve/resolved-dns-query.c \
5245         src/resolve/resolved-dns-synthesize.h \
5246         src/resolve/resolved-dns-synthesize.c \
5247         src/resolve/resolved-dns-transaction.h \
5248         src/resolve/resolved-dns-transaction.c \
5249         src/resolve/resolved-dns-scope.h \
5250         src/resolve/resolved-dns-scope.c \
5251         src/resolve/resolved-dns-server.h \
5252         src/resolve/resolved-dns-server.c \
5253         src/resolve/resolved-dns-search-domain.h \
5254         src/resolve/resolved-dns-search-domain.c \
5255         src/resolve/resolved-dns-cache.h \
5256         src/resolve/resolved-dns-cache.c \
5257         src/resolve/resolved-dns-zone.h \
5258         src/resolve/resolved-dns-zone.c \
5259         src/resolve/resolved-dns-stream.h \
5260         src/resolve/resolved-dns-stream.c \
5261         src/resolve/resolved-dns-trust-anchor.h \
5262         src/resolve/resolved-dns-trust-anchor.c \
5263         src/resolve/resolved-etc-hosts.h \
5264         src/resolve/resolved-etc-hosts.c \
5265         src/shared/gcrypt-util.c \
5266         src/shared/gcrypt-util.h
5267
5268 nodist_systemd_resolved_SOURCES = \
5269         src/resolve/dns_type-from-name.h \
5270         src/resolve/dns_type-to-name.h \
5271         src/resolve/resolved-gperf.c
5272
5273 systemd_resolved_LDADD = \
5274         libsystemd-network.la \
5275         libshared.la
5276
5277 rootlibexec_PROGRAMS += \
5278         systemd-resolved
5279
5280 nodist_systemunit_DATA += \
5281         units/systemd-resolved.service
5282
5283 dist_systemunit_DATA_busnames += \
5284         units/org.freedesktop.resolve1.busname
5285
5286 dist_dbuspolicy_DATA += \
5287         src/resolve/org.freedesktop.resolve1.conf
5288
5289 dist_dbussystemservice_DATA += \
5290         src/resolve/org.freedesktop.resolve1.service
5291
5292 SYSTEM_UNIT_ALIASES += \
5293         systemd-resolved.service dbus-org.freedesktop.resolve1.service
5294
5295 BUSNAMES_TARGET_WANTS += \
5296         org.freedesktop.resolve1.busname
5297
5298 GENERAL_ALIASES += \
5299         $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
5300
5301 nodist_pkgsysconf_DATA += \
5302         src/resolve/resolved.conf
5303
5304 libnss_resolve_la_SOURCES = \
5305         src/nss-resolve/nss-resolve.sym \
5306         src/nss-resolve/nss-resolve.c
5307
5308 libnss_resolve_la_LDFLAGS = \
5309         $(AM_LDFLAGS) \
5310         -module \
5311         -export-dynamic \
5312         -avoid-version \
5313         -shared \
5314         -shrext .so.2 \
5315         -Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
5316
5317 libnss_resolve_la_LIBADD = \
5318         libsystemd-internal.la \
5319         -ldl
5320
5321 lib_LTLIBRARIES += \
5322         libnss_resolve.la
5323
5324 systemd_resolve_SOURCES = \
5325         src/resolve/resolve-tool.c \
5326         $(basic_dns_sources) \
5327         src/shared/gcrypt-util.c \
5328         src/shared/gcrypt-util.h
5329
5330 nodist_systemd_resolve_SOURCES = \
5331         src/resolve/dns_type-from-name.h \
5332         src/resolve/dns_type-to-name.h
5333
5334 systemd_resolve_LDADD = \
5335         libshared.la
5336
5337 bin_PROGRAMS += \
5338         systemd-resolve
5339
5340 dist_bashcompletion_data += \
5341         shell-completion/bash/systemd-resolve
5342
5343 dist_zshcompletion_data += \
5344         shell-completion/zsh/_systemd-resolve
5345
5346 tests += \
5347         test-dns-packet \
5348         test-resolve-tables \
5349         test-dnssec
5350
5351 manual_tests += \
5352         test-dnssec-complex
5353
5354 test_resolve_tables_SOURCES = \
5355         src/resolve/test-resolve-tables.c \
5356         src/resolve/dns_type-from-name.h \
5357         src/resolve/dns_type-to-name.h \
5358         $(basic_dns_sources) \
5359         src/shared/test-tables.h
5360
5361 test_resolve_tables_LDADD = \
5362         libshared.la
5363
5364 test_dns_packet_SOURCES = \
5365         src/resolve/test-dns-packet.c \
5366         $(basic_dns_sources)
5367
5368 test_dns_packet_CPPFLAGS = \
5369         $(AM_CPPFLAGS) \
5370         -DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\"
5371
5372 test_dns_packet_LDADD = \
5373         libshared.la
5374
5375 EXTRA_DIST += \
5376         src/resolve/test-data/_openpgpkey.fedoraproject.org.pkts \
5377         src/resolve/test-data/fedoraproject.org.pkts \
5378         src/resolve/test-data/gandi.net.pkts \
5379         src/resolve/test-data/google.com.pkts \
5380         src/resolve/test-data/root.pkts \
5381         src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
5382         src/resolve/test-data/teamits.com.pkts \
5383         src/resolve/test-data/zbyszek@fedoraproject.org.pkts \
5384         src/resolve/test-data/_443._tcp.fedoraproject.org.pkts \
5385         src/resolve/test-data/kyhwana.org.pkts \
5386         src/resolve/test-data/fake-caa.pkts
5387
5388 test_dnssec_SOURCES = \
5389         src/resolve/test-dnssec.c \
5390         $(basic_dns_sources)
5391
5392 test_dnssec_LDADD = \
5393         libshared.la
5394
5395 test_dnssec_complex_SOURCES = \
5396         src/resolve/test-dnssec-complex.c \
5397         src/resolve/dns-type.c \
5398         src/resolve/dns-type.h
5399
5400 test_dnssec_complex_LDADD = \
5401         libshared.la
5402
5403 endif
5404
5405 gperf_txt_sources += \
5406         src/resolve/dns_type-list.txt
5407
5408 gperf_gperf_sources += \
5409         src/resolve/resolved-gperf.gperf
5410
5411 EXTRA_DIST += \
5412         units/systemd-resolved.service.m4.in \
5413         src/resolve/resolved.conf.in
5414
5415 # ------------------------------------------------------------------------------
5416 if ENABLE_NETWORKD
5417 rootlibexec_PROGRAMS += \
5418         systemd-networkd
5419
5420 systemd_networkd_SOURCES = \
5421         src/network/networkd.c
5422
5423 systemd_networkd_LDADD = \
5424         libnetworkd-core.la
5425
5426 if HAVE_LIBIPTC
5427 systemd_networkd_LDADD += \
5428         libfirewall.la
5429 endif
5430
5431 noinst_LTLIBRARIES += \
5432         libnetworkd-core.la
5433
5434 libnetworkd_core_la_CFLAGS = \
5435         $(AM_CFLAGS)
5436
5437 libnetworkd_core_la_SOURCES = \
5438         src/libsystemd-network/network-internal.h \
5439         src/network/networkd.h \
5440         src/network/networkd-conf.h \
5441         src/network/networkd-conf.c \
5442         src/network/networkd-link.h \
5443         src/network/networkd-link.c \
5444         src/network/networkd-netdev.h \
5445         src/network/networkd-netdev.c \
5446         src/network/networkd-netdev-tunnel.h \
5447         src/network/networkd-netdev-tunnel.c \
5448         src/network/networkd-netdev-veth.h \
5449         src/network/networkd-netdev-veth.c \
5450         src/network/networkd-netdev-vxlan.h \
5451         src/network/networkd-netdev-vxlan.c \
5452         src/network/networkd-netdev-vlan.h \
5453         src/network/networkd-netdev-vlan.c \
5454         src/network/networkd-netdev-macvlan.h \
5455         src/network/networkd-netdev-macvlan.c \
5456         src/network/networkd-netdev-ipvlan.h \
5457         src/network/networkd-netdev-ipvlan.c \
5458         src/network/networkd-netdev-dummy.h \
5459         src/network/networkd-netdev-dummy.c \
5460         src/network/networkd-netdev-tuntap.h \
5461         src/network/networkd-netdev-tuntap.c \
5462         src/network/networkd-netdev-bond.h \
5463         src/network/networkd-netdev-bond.c \
5464         src/network/networkd-netdev-bridge.h \
5465         src/network/networkd-netdev-bridge.c \
5466         src/network/networkd-link-bus.c \
5467         src/network/networkd-ipv4ll.c \
5468         src/network/networkd-dhcp4.c \
5469         src/network/networkd-dhcp6.c \
5470         src/network/networkd-ndisc.h \
5471         src/network/networkd-ndisc.c \
5472         src/network/networkd-network.h \
5473         src/network/networkd-network.c \
5474         src/network/networkd-network-bus.c \
5475         src/network/networkd-address.h \
5476         src/network/networkd-address.c \
5477         src/network/networkd-route.h \
5478         src/network/networkd-route.c \
5479         src/network/networkd-manager.c \
5480         src/network/networkd-manager-bus.c \
5481         src/network/networkd-fdb.h \
5482         src/network/networkd-fdb.c \
5483         src/network/networkd-brvlan.h \
5484         src/network/networkd-brvlan.c \
5485         src/network/networkd-address-pool.h \
5486         src/network/networkd-address-pool.c \
5487         src/network/networkd-util.h \
5488         src/network/networkd-util.c \
5489         src/network/networkd-lldp-tx.h \
5490         src/network/networkd-lldp-tx.c
5491
5492 nodist_libnetworkd_core_la_SOURCES = \
5493         src/network/networkd-gperf.c \
5494         src/network/networkd-network-gperf.c \
5495         src/network/networkd-netdev-gperf.c
5496
5497 libnetworkd_core_la_LIBADD = \
5498         libsystemd-network.la \
5499         libshared.la
5500
5501 rootlibexec_PROGRAMS += \
5502         systemd-networkd-wait-online
5503
5504 systemd_networkd_wait_online_CFLAGS = \
5505         $(AM_CFLAGS)
5506
5507 systemd_networkd_wait_online_SOURCES = \
5508         src/libsystemd-network/network-internal.h \
5509         src/network/networkd-wait-online.h \
5510         src/network/networkd-wait-online-link.h \
5511         src/network/networkd-wait-online.c \
5512         src/network/networkd-wait-online-manager.c \
5513         src/network/networkd-wait-online-link.c
5514
5515 systemd_networkd_wait_online_LDADD = \
5516         libsystemd-network.la \
5517         libshared.la
5518
5519 rootbin_PROGRAMS += \
5520         networkctl
5521
5522 networkctl_SOURCES = \
5523         src/network/networkctl.c
5524
5525 networkctl_LDADD = \
5526         libshared.la \
5527         libsystemd-network.la
5528
5529 dist_bashcompletion_data += \
5530         shell-completion/bash/networkctl
5531
5532 test_networkd_conf_SOURCES = \
5533         src/network/test-networkd-conf.c
5534
5535 test_networkd_conf_LDADD = \
5536         libnetworkd-core.la
5537
5538 test_network_SOURCES = \
5539         src/network/test-network.c
5540
5541 test_network_LDADD = \
5542         libnetworkd-core.la
5543
5544 if HAVE_LIBIPTC
5545 test_network_LDADD += \
5546         libfirewall.la
5547 endif
5548
5549 test_network_tables_SOURCES = \
5550         src/network/test-network-tables.c \
5551         src/shared/test-tables.h
5552
5553 test_network_tables_LDADD = \
5554         libnetworkd-core.la \
5555         libudev-core.la
5556
5557 if HAVE_LIBIPTC
5558 test_network_tables_LDADD += \
5559         libfirewall.la
5560 endif
5561
5562 tests += \
5563         test-networkd-conf \
5564         test-network \
5565         test-network-tables
5566
5567 dist_systemunit_DATA += \
5568         units/systemd-networkd.socket
5569
5570 nodist_systemunit_DATA += \
5571         units/systemd-networkd.service \
5572         units/systemd-networkd-wait-online.service
5573
5574 dist_systemunit_DATA_busnames += \
5575         units/org.freedesktop.network1.busname
5576
5577 dist_dbussystemservice_DATA += \
5578         src/network/org.freedesktop.network1.service
5579
5580 dist_dbuspolicy_DATA += \
5581         src/network/org.freedesktop.network1.conf
5582
5583 GENERAL_ALIASES += \
5584         $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \
5585         $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
5586         $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
5587
5588 SYSTEM_UNIT_ALIASES += \
5589         systemd-networkd.service dbus-org.freedesktop.network1.service
5590
5591 BUSNAMES_TARGET_WANTS += \
5592         org.freedesktop.network1.busname
5593
5594 endif
5595
5596 gperf_gperf_sources += \
5597         src/network/networkd-gperf.gperf \
5598         src/network/networkd-network-gperf.gperf \
5599         src/network/networkd-netdev-gperf.gperf
5600
5601 EXTRA_DIST += \
5602         units/systemd-networkd.service.m4.in \
5603         units/systemd-networkd-wait-online.service.in \
5604         test/networkd-test.py
5605
5606 # ------------------------------------------------------------------------------
5607 if ENABLE_LOGIND
5608 systemd_logind_SOURCES = \
5609         src/login/logind.c \
5610         src/login/logind.h
5611
5612 nodist_systemd_logind_SOURCES = \
5613         src/login/logind-gperf.c
5614
5615 systemd_logind_LDADD = \
5616         liblogind-core.la
5617
5618 liblogind_core_la_SOURCES = \
5619         src/login/logind-core.c \
5620         src/login/logind-device.c \
5621         src/login/logind-device.h \
5622         src/login/logind-button.c \
5623         src/login/logind-button.h \
5624         src/login/logind-action.c \
5625         src/login/logind-action.h \
5626         src/login/logind-seat.c \
5627         src/login/logind-seat.h \
5628         src/login/logind-session.c \
5629         src/login/logind-session.h \
5630         src/login/logind-session-device.c \
5631         src/login/logind-session-device.h \
5632         src/login/logind-user.c \
5633         src/login/logind-user.h \
5634         src/login/logind-inhibit.c \
5635         src/login/logind-inhibit.h \
5636         src/login/logind-dbus.c \
5637         src/login/logind-session-dbus.c \
5638         src/login/logind-seat-dbus.c \
5639         src/login/logind-user-dbus.c \
5640         src/login/logind-utmp.c \
5641         src/login/logind-acl.h
5642
5643 liblogind_core_la_LIBADD = \
5644         libshared.la
5645
5646 if HAVE_ACL
5647 liblogind_core_la_SOURCES += \
5648         src/login/logind-acl.c
5649 endif
5650
5651 noinst_LTLIBRARIES += \
5652         liblogind-core.la
5653
5654 rootlibexec_PROGRAMS += \
5655         systemd-logind
5656
5657 loginctl_SOURCES = \
5658         src/login/loginctl.c \
5659         src/login/sysfs-show.h \
5660         src/login/sysfs-show.c
5661
5662 loginctl_LDADD = \
5663         libshared.la
5664
5665 rootbin_PROGRAMS += \
5666         loginctl
5667
5668 dist_bashcompletion_data += \
5669         shell-completion/bash/loginctl
5670
5671 dist_zshcompletion_data += \
5672         shell-completion/zsh/_loginctl \
5673         shell-completion/zsh/_systemd-inhibit
5674
5675 systemd_inhibit_SOURCES = \
5676         src/login/inhibit.c
5677
5678 systemd_inhibit_LDADD = \
5679         libshared.la
5680
5681 rootbin_PROGRAMS += \
5682         systemd-inhibit
5683
5684 test_login_SOURCES = \
5685         src/libsystemd/sd-login/test-login.c
5686
5687 test_login_LDADD = \
5688         libshared.la
5689
5690 test_login_shared_SOURCES = \
5691         src/login/test-login-shared.c
5692
5693 test_login_shared_LDADD = \
5694         libshared.la
5695
5696 test_inhibit_SOURCES = \
5697         src/login/test-inhibit.c
5698
5699 test_inhibit_LDADD = \
5700         libshared.la
5701
5702 test_login_tables_SOURCES = \
5703         src/login/test-login-tables.c
5704
5705 test_login_tables_LDADD = \
5706         liblogind-core.la
5707
5708 manual_tests += \
5709         test-login \
5710         test-inhibit
5711
5712 tests += \
5713         test-login-tables \
5714         test-login-shared
5715
5716 if HAVE_PAM
5717 pam_systemd_la_SOURCES = \
5718         src/login/pam_systemd.sym \
5719         src/login/pam_systemd.c
5720
5721 pam_systemd_la_CFLAGS = \
5722         $(AM_CFLAGS) \
5723         $(PAM_CFLAGS)
5724
5725 pam_systemd_la_LDFLAGS = \
5726         $(AM_LDFLAGS) \
5727         -module \
5728         -export-dynamic \
5729         -avoid-version \
5730         -shared \
5731         -Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
5732
5733 pam_systemd_la_LIBADD = \
5734         libshared.la \
5735         $(PAM_LIBS)
5736
5737 pamlib_LTLIBRARIES = \
5738         pam_systemd.la
5739
5740 dist_pamconf_DATA = \
5741         src/login/systemd-user
5742
5743 EXTRA_DIST += \
5744         src/login/systemd-user.m4
5745 endif
5746
5747 nodist_systemunit_DATA += \
5748         units/systemd-logind.service
5749
5750 dist_systemunit_DATA += \
5751         units/user.slice
5752
5753 dist_systemunit_DATA_busnames += \
5754         units/org.freedesktop.login1.busname
5755
5756 dist_dbussystemservice_DATA += \
5757         src/login/org.freedesktop.login1.service
5758
5759 dist_dbuspolicy_DATA += \
5760         src/login/org.freedesktop.login1.conf
5761
5762 nodist_pkgsysconf_DATA += \
5763         src/login/logind.conf
5764
5765 polkitpolicy_files += \
5766         src/login/org.freedesktop.login1.policy
5767
5768 INSTALL_DIRS += \
5769         $(systemdstatedir)
5770
5771 MULTI_USER_TARGET_WANTS += \
5772         systemd-logind.service
5773
5774 SYSTEM_UNIT_ALIASES += \
5775         systemd-logind.service dbus-org.freedesktop.login1.service
5776
5777 BUSNAMES_TARGET_WANTS += \
5778         org.freedesktop.login1.busname
5779
5780 dist_udevrules_DATA += \
5781         src/login/70-uaccess.rules \
5782         src/login/70-power-switch.rules
5783
5784 nodist_udevrules_DATA += \
5785         src/login/71-seat.rules \
5786         src/login/73-seat-late.rules
5787
5788 endif
5789
5790 polkitpolicy_in_files += \
5791         src/login/org.freedesktop.login1.policy.in
5792
5793 gperf_gperf_sources += \
5794         src/login/logind-gperf.gperf
5795
5796 EXTRA_DIST += \
5797         src/login/71-seat.rules.in \
5798         src/login/73-seat-late.rules.in \
5799         units/systemd-logind.service.in \
5800         src/login/logind.conf.in
5801
5802 # ------------------------------------------------------------------------------
5803 if HAVE_PAM
5804
5805 systemd_user_sessions_SOURCES = \
5806         src/user-sessions/user-sessions.c
5807
5808 systemd_user_sessions_LDADD = \
5809         libshared.la
5810
5811 rootlibexec_PROGRAMS += \
5812         systemd-user-sessions
5813
5814 nodist_systemunit_DATA += \
5815         units/systemd-user-sessions.service
5816
5817 MULTI_USER_TARGET_WANTS += \
5818         systemd-user-sessions.service
5819
5820 endif
5821
5822 EXTRA_DIST += \
5823         units/systemd-user-sessions.service.in
5824
5825 # ------------------------------------------------------------------------------
5826 EXTRA_DIST += \
5827         test/Makefile \
5828         test/README.testsuite \
5829         test/TEST-01-BASIC \
5830         test/TEST-01-BASIC/Makefile \
5831         test/TEST-01-BASIC/test.sh \
5832         test/TEST-02-CRYPTSETUP \
5833         test/TEST-02-CRYPTSETUP/Makefile \
5834         test/TEST-02-CRYPTSETUP/test.sh \
5835         test/TEST-03-JOBS \
5836         test/TEST-03-JOBS/Makefile \
5837         test/TEST-03-JOBS/test-jobs.sh \
5838         test/TEST-03-JOBS/test.sh \
5839         test/TEST-04-JOURNAL/Makefile \
5840         test/TEST-04-JOURNAL/test-journal.sh \
5841         test/TEST-04-JOURNAL/test.sh \
5842         test/TEST-05-RLIMITS/Makefile \
5843         test/TEST-05-RLIMITS/test-rlimits.sh \
5844         test/TEST-05-RLIMITS/test.sh \
5845         test/TEST-06-SELINUX/Makefile \
5846         test/TEST-06-SELINUX/test-selinux-checks.sh \
5847         test/TEST-06-SELINUX/test.sh \
5848         test/TEST-06-SELINUX/systemd_test.te \
5849         test/TEST-06-SELINUX/systemd_test.if \
5850         test/TEST-07-ISSUE-1981/Makefile \
5851         test/TEST-07-ISSUE-1981/test-segfault.sh \
5852         test/TEST-07-ISSUE-1981/test.sh \
5853         test/TEST-08-ISSUE-2730/Makefile \
5854         test/TEST-08-ISSUE-2730/test.sh \
5855         test/TEST-09-ISSUE-2691/Makefile \
5856         test/TEST-09-ISSUE-2691/test.sh \
5857         test/TEST-10-ISSUE-2467/Makefile \
5858         test/TEST-10-ISSUE-2467/test.sh \
5859         test/TEST-11-ISSUE-3166/Makefile \
5860         test/TEST-11-ISSUE-3166/test.sh \
5861         test/TEST-12-ISSUE-3171/Makefile \
5862         test/TEST-12-ISSUE-3171/test.sh \
5863         test/test-functions
5864
5865 EXTRA_DIST += \
5866         test/loopy2.service \
5867         test/loopy3.service \
5868         test/loopy4.service \
5869         test/loopy.service \
5870         test/loopy.service.d \
5871         test/loopy.service.d/compat.conf
5872
5873 # ------------------------------------------------------------------------------
5874 substitutions = \
5875        '|rootlibexecdir=$(rootlibexecdir)|' \
5876        '|rootbindir=$(rootbindir)|' \
5877        '|bindir=$(bindir)|' \
5878        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
5879        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
5880        '|pkgsysconfdir=$(pkgsysconfdir)|' \
5881        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
5882        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
5883        '|pkgdatadir=$(pkgdatadir)|' \
5884        '|systemunitdir=$(systemunitdir)|' \
5885        '|userunitdir=$(userunitdir)|' \
5886        '|systempresetdir=$(systempresetdir)|' \
5887        '|userpresetdir=$(userpresetdir)|' \
5888        '|udevhwdbdir=$(udevhwdbdir)|' \
5889        '|udevrulesdir=$(udevrulesdir)|' \
5890        '|catalogdir=$(catalogdir)|' \
5891        '|tmpfilesdir=$(tmpfilesdir)|' \
5892        '|sysusersdir=$(sysusersdir)|' \
5893        '|sysctldir=$(sysctldir)|' \
5894        '|systemgeneratordir=$(systemgeneratordir)|' \
5895        '|usergeneratordir=$(usergeneratordir)|' \
5896        '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
5897        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
5898        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
5899        '|PACKAGE_URL=$(PACKAGE_URL)|' \
5900        '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
5901        '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
5902        '|prefix=$(prefix)|' \
5903        '|exec_prefix=$(exec_prefix)|' \
5904        '|libdir=$(libdir)|' \
5905        '|includedir=$(includedir)|' \
5906        '|VERSION=$(VERSION)|' \
5907        '|rootprefix=$(rootprefix)|' \
5908        '|udevlibexecdir=$(udevlibexecdir)|' \
5909        '|SUSHELL=$(SUSHELL)|' \
5910        '|SULOGIN=$(SULOGIN)|' \
5911        '|DEBUGTTY=$(DEBUGTTY)|' \
5912        '|KILL=$(KILL)|' \
5913        '|KMOD=$(KMOD)|' \
5914        '|MOUNT_PATH=$(MOUNT_PATH)|' \
5915        '|UMOUNT_PATH=$(UMOUNT_PATH)|' \
5916        '|MKDIR_P=$(MKDIR_P)|' \
5917        '|QUOTAON=$(QUOTAON)|' \
5918        '|QUOTACHECK=$(QUOTACHECK)|' \
5919        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
5920        '|VARLOGDIR=$(varlogdir)|' \
5921        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
5922        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
5923        '|PYTHON=$(PYTHON)|' \
5924        '|NTP_SERVERS=$(NTP_SERVERS)|' \
5925        '|DNS_SERVERS=$(DNS_SERVERS)|' \
5926        '|DEFAULT_DNSSEC_MODE=$(DEFAULT_DNSSEC_MODE)|' \
5927        '|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \
5928        '|systemuidmax=$(SYSTEM_UID_MAX)|' \
5929        '|systemgidmax=$(SYSTEM_GID_MAX)|' \
5930        '|TTY_GID=$(TTY_GID)|' \
5931        '|systemsleepdir=$(systemsleepdir)|' \
5932        '|systemshutdowndir=$(systemshutdowndir)|' \
5933        '|binfmtdir=$(binfmtdir)|' \
5934        '|modulesloaddir=$(modulesloaddir)|'
5935
5936 SED_PROCESS = \
5937         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
5938         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
5939                 < $< > $@
5940
5941 units/%: units/%.in
5942         $(SED_PROCESS)
5943
5944 man/%: man/%.in
5945         $(SED_PROCESS)
5946
5947 sysctl.d/%: sysctl.d/%.in
5948         $(SED_PROCESS)
5949
5950 %.pc: %.pc.in
5951         $(SED_PROCESS)
5952
5953 %.conf: %.conf.in
5954         $(SED_PROCESS)
5955
5956 src/core/%.systemd: src/core/%.systemd.in
5957         $(SED_PROCESS)
5958
5959 src/%.policy.in: src/%.policy.in.in
5960         $(SED_PROCESS)
5961
5962 shell-completion/%: shell-completion/%.in
5963         $(SED_PROCESS)
5964
5965 %.rules: %.rules.in
5966         $(SED_PROCESS)
5967
5968 %.conf: %.conf.in
5969         $(SED_PROCESS)
5970
5971 %.sh: %.sh.in
5972         $(SED_PROCESS)
5973         $(AM_V_GEN)chmod +x $@
5974
5975 src/%.c: src/%.gperf
5976         $(AM_V_at)$(MKDIR_P) $(dir $@)
5977         $(AM_V_GPERF)$(GPERF) < $< > $@
5978
5979 src/%: src/%.m4 $(top_builddir)/config.status
5980         $(AM_V_at)$(MKDIR_P) $(dir $@)
5981         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
5982
5983 sysusers.d/%: sysusers.d/%.m4 $(top_builddir)/config.status
5984         $(AM_V_at)$(MKDIR_P) $(dir $@)
5985         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
5986
5987 tmpfiles.d/%: tmpfiles.d/%.m4 $(top_builddir)/config.status
5988         $(AM_V_at)$(MKDIR_P) $(dir $@)
5989         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
5990
5991
5992 units/%: units/%.m4 $(top_builddir)/config.status
5993         $(AM_V_at)$(MKDIR_P) $(dir $@)
5994         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
5995
5996 units/user/%: units/user/%.m4 $(top_builddir)/config.status
5997         $(AM_V_at)$(MKDIR_P) $(dir $@)
5998         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
5999
6000 if ENABLE_POLKIT
6001 nodist_polkitpolicy_DATA = \
6002         $(polkitpolicy_files) \
6003         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
6004 endif
6005
6006 EXTRA_DIST += \
6007         $(polkitpolicy_in_files) \
6008         $(polkitpolicy_in_in_files)
6009
6010 # ------------------------------------------------------------------------------
6011 man/custom-entities.ent: configure.ac
6012         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
6013         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
6014          printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
6015          > $@ # '
6016
6017 CLEANFILES += \
6018         man/custom-entities.ent
6019
6020 XSLTPROC_FLAGS = \
6021         --nonet \
6022         --xinclude \
6023         --stringparam man.output.quietly 1 \
6024         --stringparam funcsynopsis.style ansi \
6025         --stringparam man.authors.section.enabled 0 \
6026         --stringparam man.copyright.section.enabled 0 \
6027         --stringparam systemd.version $(VERSION) \
6028         --path '$(builddir)/man:$(srcdir)/man'
6029
6030 XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc)
6031 XSLTPROC_PROCESS_MAN = \
6032         $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
6033
6034 XSLTPROC_PROCESS_HTML = \
6035         $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
6036
6037 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
6038         $(XSLTPROC_PROCESS_MAN)
6039
6040 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
6041         $(XSLTPROC_PROCESS_MAN)
6042
6043 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
6044         $(XSLTPROC_PROCESS_MAN)
6045
6046 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
6047         $(XSLTPROC_PROCESS_MAN)
6048
6049 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
6050         $(XSLTPROC_PROCESS_MAN)
6051
6052 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
6053         $(XSLTPROC_PROCESS_HTML)
6054
6055 define html-alias
6056         $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
6057 endef
6058
6059 EXTRA_DIST += \
6060         man/custom-html.xsl \
6061         man/custom-man.xsl
6062
6063 # ------------------------------------------------------------------------------
6064 if HAVE_SYSV_COMPAT
6065 sysvinit_DATA = \
6066         docs/sysvinit/README
6067
6068 varlog_DATA = \
6069         docs/var-log/README
6070
6071 docs/sysvinit/README: docs/sysvinit/README.in
6072         $(SED_PROCESS)
6073
6074 docs/var-log/README: docs/var-log/README.in
6075         $(SED_PROCESS)
6076
6077 CLEANFILES += \
6078         docs/sysvinit/README \
6079         docs/var-log/README
6080 endif
6081
6082 EXTRA_DIST += \
6083         docs/sysvinit/README.in \
6084         docs/var-log/README.in
6085
6086 SOCKETS_TARGET_WANTS += \
6087         systemd-initctl.socket
6088
6089 if HAVE_UTMP
6090 if HAVE_SYSV_COMPAT
6091 MULTI_USER_TARGET_WANTS += \
6092         systemd-update-utmp-runlevel.service
6093 GRAPHICAL_TARGET_WANTS += \
6094         systemd-update-utmp-runlevel.service
6095 RESCUE_TARGET_WANTS += \
6096         systemd-update-utmp-runlevel.service
6097 endif
6098
6099 SYSINIT_TARGET_WANTS += \
6100         systemd-update-utmp.service
6101 endif
6102
6103 SYSINIT_TARGET_WANTS += \
6104         systemd-update-done.service
6105
6106 LOCAL_FS_TARGET_WANTS += \
6107         systemd-remount-fs.service \
6108         tmp.mount \
6109         var-lib-machines.mount
6110
6111 MULTI_USER_TARGET_WANTS += \
6112         getty.target \
6113         systemd-ask-password-wall.path
6114
6115 SYSINIT_TARGET_WANTS += \
6116         dev-hugepages.mount \
6117         dev-mqueue.mount \
6118         sys-kernel-config.mount \
6119         sys-kernel-debug.mount \
6120         sys-fs-fuse-connections.mount \
6121         systemd-sysctl.service \
6122         systemd-ask-password-console.path
6123
6124 if HAVE_SYSV_COMPAT
6125 SYSTEM_UNIT_ALIASES += \
6126         poweroff.target runlevel0.target \
6127         rescue.target runlevel1.target \
6128         multi-user.target runlevel2.target \
6129         multi-user.target runlevel3.target \
6130         multi-user.target runlevel4.target \
6131         graphical.target runlevel5.target \
6132         reboot.target runlevel6.target
6133 endif
6134
6135 SYSTEM_UNIT_ALIASES += \
6136         graphical.target default.target \
6137         reboot.target ctrl-alt-del.target \
6138         getty@.service autovt@.service
6139
6140 USER_UNIT_ALIASES += \
6141         $(systemunitdir)/shutdown.target shutdown.target \
6142         $(systemunitdir)/sockets.target sockets.target \
6143         $(systemunitdir)/timers.target timers.target \
6144         $(systemunitdir)/paths.target paths.target \
6145         $(systemunitdir)/bluetooth.target bluetooth.target \
6146         $(systemunitdir)/printer.target printer.target \
6147         $(systemunitdir)/sound.target sound.target \
6148         $(systemunitdir)/smartcard.target smartcard.target
6149
6150 USER_UNIT_ALIASES += \
6151         $(systemunitdir)/busnames.target busnames.target
6152
6153 GENERAL_ALIASES += \
6154         $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
6155         $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
6156         $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
6157         $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
6158
6159 if HAVE_SYSV_COMPAT
6160 INSTALL_DIRS += \
6161         $(systemunitdir)/runlevel1.target.wants \
6162         $(systemunitdir)/runlevel2.target.wants \
6163         $(systemunitdir)/runlevel3.target.wants \
6164         $(systemunitdir)/runlevel4.target.wants \
6165         $(systemunitdir)/runlevel5.target.wants
6166 endif
6167
6168 INSTALL_DIRS += \
6169         $(prefix)/lib/modules-load.d \
6170         $(sysconfdir)/modules-load.d \
6171         $(prefix)/lib/systemd/network \
6172         $(sysconfdir)/systemd/network \
6173         $(prefix)/lib/sysctl.d \
6174         $(sysconfdir)/sysctl.d \
6175         $(prefix)/lib/kernel/install.d \
6176         $(sysconfdir)/kernel/install.d \
6177         $(systemshutdowndir) \
6178         $(systemsleepdir) \
6179         $(systemgeneratordir) \
6180         $(usergeneratordir) \
6181         \
6182         $(userunitdir) \
6183         $(pkgsysconfdir)/system \
6184         $(pkgsysconfdir)/system/multi-user.target.wants \
6185         $(pkgsysconfdir)/system/getty.target.wants \
6186         $(pkgsysconfdir)/user \
6187         $(dbussessionservicedir) \
6188         $(sysconfdir)/xdg/systemd
6189
6190 install-exec-hook: $(INSTALL_EXEC_HOOKS)
6191
6192 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
6193
6194 install-data-hook: $(INSTALL_DATA_HOOKS)
6195
6196 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
6197
6198 clean-local: $(CLEAN_LOCAL_HOOKS)
6199         rm -rf $(abs_srcdir)/install-tree
6200         rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
6201               $(abs_srcdir)/hwdb/iab.txt
6202
6203 DISTCHECK_CONFIGURE_FLAGS = \
6204         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
6205         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
6206         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
6207         --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
6208         --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
6209         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
6210         --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
6211         --with-rootprefix=$$dc_install_base \
6212         --enable-compat-libs
6213
6214 if HAVE_SYSV_COMPAT
6215 DISTCHECK_CONFIGURE_FLAGS += \
6216         --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
6217         --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
6218 else
6219 DISTCHECK_CONFIGURE_FLAGS += \
6220         --with-sysvinit-path= \
6221         --with-sysvrcnd-path=
6222 endif
6223
6224 if ENABLE_SPLIT_USR
6225 DISTCHECK_CONFIGURE_FLAGS += \
6226         --enable-split-usr
6227 else
6228 DISTCHECK_CONFIGURE_FLAGS += \
6229         --disable-split-usr
6230 endif
6231
6232 .PHONY: dist-check-help
6233 dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
6234         for i in $(abspath $^); do                                             \
6235             if $$i  --help | grep -v 'default:' | grep -E -q '.{80}.' ; then   \
6236                 echo "$(basename $$i) --help output is too wide:";             \
6237                 $$i  --help | awk 'length > 80' | grep -E --color=yes '.{80}'; \
6238                 exit 1;                                                        \
6239             fi; done
6240
6241 include_compilers = "$(CC)" "$(CC) -ansi" "$(CC) -std=iso9899:1990"
6242 public_headers = $(filter-out src/systemd/_sd-common.h, $(pkginclude_HEADERS) $(include_HEADERS))
6243 .PHONY: dist-check-includes
6244 dist-check-includes: $(public_headers)
6245         @res=0;                                                                 \
6246         for i in $(abspath $^); do                                              \
6247             for cc in $(include_compilers); do                                  \
6248                 echo "$$cc -o/dev/null -c -x c -include "$$i" - </dev/null";    \
6249                 $$cc -o/dev/null -c -x c -include "$$i" - </dev/null || res=1;  \
6250             done;                                                               \
6251         done; exit $$res
6252
6253 .PHONY: hwdb-update
6254 hwdb-update:
6255         ( cd $(top_srcdir)/hwdb && \
6256         wget -O usb.ids 'http://www.linux-usb.org/usb.ids' && \
6257         wget -O pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids' && \
6258         wget -O ma-large.txt 'http://standards.ieee.org/develop/regauth/oui/oui.txt' && \
6259         wget -O ma-medium.txt 'http://standards.ieee.org/develop/regauth/oui28/mam.txt' && \
6260         wget -O ma-small.txt 'http://standards.ieee.org/develop/regauth/oui36/oui36.txt' && \
6261         ./ids-update.pl )
6262
6263 .PHONY: built-sources
6264 built-sources: $(BUILT_SOURCES)
6265
6266 .PHONY: git-tag
6267 git-tag:
6268         git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
6269
6270 .PHONY: git-tar
6271 git-tar:
6272         git archive --format=tar --prefix=systemd-$(VERSION)/ HEAD | gzip > systemd-$(VERSION).tar.gz
6273
6274 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
6275
6276 .PHONY: doc-sync
6277 doc-sync: all
6278         rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
6279
6280 .PHONY: install-tree
6281 install-tree: all
6282         rm -rf $(abs_srcdir)/install-tree
6283         $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
6284         tree $(abs_srcdir)/install-tree
6285
6286 # Let's run all tests of the test suite, but under valgrind. Let's
6287 # exclude perl/python/shell scripts we have in there
6288 .PHONY: valgrind-tests
6289 valgrind-tests: $(TESTS)
6290         $(AM_V_GEN)for f in $(filter-out %.pl %.py, $^); do \
6291                 if file $$f | grep -q shell; then \
6292                 echo -e "$${x}Skipping non-binary $$f"; else \
6293                 echo -e "$${x}Running $$f"; \
6294                 $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
6295                 x="\n\n"; \
6296         done
6297
6298 exported-%: %
6299         $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
6300
6301 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
6302         $(AM_V_GEN)sort -u $^ > $@
6303
6304 .PHONY: check-api-docs
6305 check-api-docs: exported man
6306         $(AM_V_GEN)for symbol in `cat exported` ; do \
6307                 if test -f $(builddir)/man/$$symbol.html ; then \
6308                         echo "  Symbol $$symbol() is documented." ; \
6309                 else \
6310                         echo "‣ Symbol $$symbol() lacks documentation." ; \
6311                 fi ; \
6312         done
6313
6314 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
6315 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
6316
6317 undefined defined: $(ALL_OBJECTS)
6318         $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
6319                 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
6320         done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
6321
6322 CLEANFILES += \
6323         defined \
6324         undefined
6325
6326 .PHONY: check-api-unused
6327 check-api-unused: defined undefined exported
6328         ( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
6329
6330 .PHONY: check-includes
6331 check-includes: $(top_srcdir)/tools/check-includes.pl
6332         $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
6333                 | xargs $(top_srcdir)/tools/check-includes.pl
6334
6335 EXTRA_DIST += \
6336         $(top_srcdir)/tools/check-includes.pl
6337
6338 # Stupid test that everything purported to be exported really is
6339 define generate-sym-test
6340         $(AM_V_at)$(MKDIR_P) $(dir $@)
6341         $(AM_V_at)printf '#include <stdio.h>\n' > $@
6342         $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
6343         $(AM_V_at)printf 'void* functions[] = {\n' >> $@
6344         $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
6345         $(AM_V_at)printf '};\nint main(void) {\n' >> $@
6346         $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
6347         $(AM_V_at)printf 'return 0; }\n' >> $@
6348 endef
6349
6350 test-libsystemd-sym.c: \
6351                 $(top_builddir)/src/libsystemd/libsystemd.sym \
6352                 src/systemd/sd-journal.h \
6353                 src/systemd/sd-daemon.h \
6354                 src/systemd/sd-login.h \
6355                 src/systemd/sd-bus.h \
6356                 src/systemd/sd-utf8.h \
6357                 src/systemd/sd-resolve.h \
6358                 src/systemd/sd-path.h \
6359                 src/systemd/sd-event.h
6360         $(generate-sym-test)
6361
6362 test-libudev-sym.c: \
6363                 src/libudev/libudev.sym \
6364                 src/udev/udev.h
6365         $(generate-sym-test)
6366
6367 nodist_test_libsystemd_sym_SOURCES = \
6368         test-libsystemd-sym.c
6369 test_libsystemd_sym_LDADD = \
6370         libsystemd.la
6371
6372 nodist_test_libudev_sym_SOURCES = \
6373         test-libudev-sym.c
6374 test_libudev_sym_CFLAGS = \
6375         $(AM_CFLAGS) \
6376         -Wno-deprecated-declarations
6377 test_libudev_sym_LDADD = \
6378         libudev.la
6379
6380 BUILT_SOURCES += \
6381         test-libsystemd-sym.c \
6382         test-libudev-sym.c
6383
6384 CLEANFILES += \
6385         test-libsystemd-sym.c \
6386         test-libudev-sym.c
6387
6388 tests += \
6389         test-libsystemd-sym \
6390         test-libudev-sym
6391
6392 .PHONY: cppcheck
6393 cppcheck:
6394         cppcheck --enable=all -q $(top_srcdir)
6395
6396 # Used to extract compile flags for YCM.
6397 print-%:
6398         @echo $($*)
6399
6400 git-contrib:
6401         @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u
6402
6403 EXTRA_DIST += \
6404         tools/gdb-sd_dump_hashmaps.py
6405
6406 list-keys:
6407         gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --list-keys
6408
6409 add-key:
6410         gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import -