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