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