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