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