chiark / gitweb /
machined: introduce polkit for OpenLogin() call
[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         src/shared/verbs.c \
900         src/shared/verbs.h \
901         src/shared/build.h
902
903 if HAVE_UTMP
904 libsystemd_shared_la_SOURCES += \
905         src/shared/utmp-wtmp.c
906 endif
907
908 nodist_libsystemd_shared_la_SOURCES = \
909         src/shared/errno-from-name.h \
910         src/shared/errno-to-name.h \
911         src/shared/af-from-name.h \
912         src/shared/af-to-name.h \
913         src/shared/arphrd-from-name.h \
914         src/shared/arphrd-to-name.h \
915         src/shared/cap-from-name.h \
916         src/shared/cap-to-name.h
917
918 libsystemd_shared_la_CFLAGS = \
919         $(AM_CFLAGS) \
920         $(CAP_CFLAGS) \
921         $(SECCOMP_CFLAGS) \
922         -pthread
923
924 libsystemd_shared_la_LIBADD = \
925         $(CAP_LIBS)
926
927 # ------------------------------------------------------------------------------
928 noinst_LTLIBRARIES += \
929         libsystemd-units.la
930
931 libsystemd_units_la_SOURCES = \
932         src/shared/install.c \
933         src/shared/install.h \
934         src/shared/install-printf.c \
935         src/shared/install-printf.h \
936         src/shared/path-lookup.c \
937         src/shared/path-lookup.h \
938         src/shared/specifier.c \
939         src/shared/specifier.h
940
941 # ------------------------------------------------------------------------------
942 noinst_LTLIBRARIES += \
943         libsystemd-label.la
944
945 libsystemd_label_la_SOURCES = \
946         src/shared/socket-label.c \
947         src/shared/label.c \
948         src/shared/label.h \
949         src/shared/selinux-util.c \
950         src/shared/selinux-util.h \
951         src/shared/mkdir-label.c \
952         src/shared/ask-password-api.c \
953         src/shared/ask-password-api.h \
954         src/shared/switch-root.h \
955         src/shared/switch-root.c \
956         src/shared/fileio-label.c \
957         src/shared/fileio-label.h \
958         src/shared/dev-setup.c \
959         src/shared/dev-setup.h \
960         src/shared/dropin.c \
961         src/shared/dropin.h \
962         src/shared/condition.c \
963         src/shared/condition.h \
964         src/shared/generator.h \
965         src/shared/generator.c
966
967 libsystemd_label_la_CFLAGS = \
968         $(AM_CFLAGS) \
969         $(SELINUX_CFLAGS)
970
971 libsystemd_label_la_LIBADD = \
972         $(SELINUX_LIBS)
973
974 # -----------------------------------------------------------------------------
975
976 if ENABLE_LDCONFIG
977 dist_systemunit_DATA += \
978         units/ldconfig.service
979
980 SYSINIT_TARGET_WANTS += \
981         ldconfig.service
982 endif
983
984 # ------------------------------------------------------------------------------
985
986 if HAVE_SECCOMP
987 noinst_LTLIBRARIES += \
988         libsystemd-seccomp.la
989
990 libsystemd_seccomp_la_SOURCES = \
991         src/shared/seccomp-util.h \
992         src/shared/seccomp-util.c
993
994 libsystemd_seccomp_la_CFLAGS = \
995         $(AM_CFLAGS) \
996         $(SECCOMP_CFLAGS)
997
998 libsystemd_seccomp_la_LIBADD = \
999         $(SECCOMP_LIBS)
1000 endif
1001
1002 # ------------------------------------------------------------------------------
1003 noinst_LTLIBRARIES += \
1004         libsystemd-logs.la
1005
1006 libsystemd_logs_la_SOURCES = \
1007         src/shared/logs-show.c \
1008         src/shared/logs-show.h
1009
1010 # ------------------------------------------------------------------------------
1011 if HAVE_ACL
1012 noinst_LTLIBRARIES += \
1013         libsystemd-acl.la
1014
1015 libsystemd_acl_la_SOURCES = \
1016         src/shared/acl-util.c \
1017         src/shared/acl-util.h
1018
1019 libsystemd_acl_la_CFLAGS = \
1020         $(AM_CFLAGS) \
1021         $(ACL_CFLAGS)
1022
1023 libsystemd_acl_la_LIBADD = \
1024         $(ACL_LIBS)
1025 endif
1026
1027 # ------------------------------------------------------------------------------
1028 noinst_LTLIBRARIES += \
1029         libsystemd-core.la
1030
1031 libsystemd_core_la_SOURCES = \
1032         src/core/unit.c \
1033         src/core/unit.h \
1034         src/core/unit-printf.c \
1035         src/core/unit-printf.h \
1036         src/core/job.c \
1037         src/core/job.h \
1038         src/core/manager.c \
1039         src/core/manager.h \
1040         src/core/transaction.c \
1041         src/core/transaction.h \
1042         src/core/load-fragment.c \
1043         src/core/load-fragment.h \
1044         src/core/service.c \
1045         src/core/service.h \
1046         src/core/socket.c \
1047         src/core/socket.h \
1048         src/core/busname.c \
1049         src/core/busname.h \
1050         src/core/bus-endpoint.c \
1051         src/core/bus-endpoint.h \
1052         src/core/bus-policy.c \
1053         src/core/bus-policy.h \
1054         src/core/target.c \
1055         src/core/target.h \
1056         src/core/snapshot.c \
1057         src/core/snapshot.h \
1058         src/core/device.c \
1059         src/core/device.h \
1060         src/core/mount.c \
1061         src/core/mount.h \
1062         src/core/automount.c \
1063         src/core/automount.h \
1064         src/core/swap.c \
1065         src/core/swap.h \
1066         src/core/timer.c \
1067         src/core/timer.h \
1068         src/core/path.c \
1069         src/core/path.h \
1070         src/core/slice.c \
1071         src/core/slice.h \
1072         src/core/scope.c \
1073         src/core/scope.h \
1074         src/core/load-dropin.c \
1075         src/core/load-dropin.h \
1076         src/core/execute.c \
1077         src/core/execute.h \
1078         src/core/kill.c \
1079         src/core/kill.h \
1080         src/core/dbus.c \
1081         src/core/dbus.h \
1082         src/core/dbus-manager.c \
1083         src/core/dbus-manager.h \
1084         src/core/dbus-unit.c \
1085         src/core/dbus-unit.h \
1086         src/core/dbus-job.c \
1087         src/core/dbus-job.h \
1088         src/core/dbus-service.c \
1089         src/core/dbus-service.h \
1090         src/core/dbus-socket.c \
1091         src/core/dbus-socket.h \
1092         src/core/dbus-busname.c \
1093         src/core/dbus-busname.h \
1094         src/core/dbus-target.c \
1095         src/core/dbus-target.h \
1096         src/core/dbus-snapshot.c \
1097         src/core/dbus-snapshot.h \
1098         src/core/dbus-device.c \
1099         src/core/dbus-device.h \
1100         src/core/dbus-mount.c \
1101         src/core/dbus-mount.h \
1102         src/core/dbus-automount.c \
1103         src/core/dbus-automount.h \
1104         src/core/dbus-swap.c \
1105         src/core/dbus-swap.h \
1106         src/core/dbus-timer.c \
1107         src/core/dbus-timer.h \
1108         src/core/dbus-path.c \
1109         src/core/dbus-path.h \
1110         src/core/dbus-slice.c \
1111         src/core/dbus-slice.h \
1112         src/core/dbus-scope.c \
1113         src/core/dbus-scope.h \
1114         src/core/dbus-execute.c \
1115         src/core/dbus-execute.h \
1116         src/core/dbus-kill.c \
1117         src/core/dbus-kill.h \
1118         src/core/dbus-cgroup.c \
1119         src/core/dbus-cgroup.h \
1120         src/core/cgroup.c \
1121         src/core/cgroup.h \
1122         src/core/selinux-access.c \
1123         src/core/selinux-access.h \
1124         src/core/selinux-setup.c \
1125         src/core/selinux-setup.h \
1126         src/core/smack-setup.c \
1127         src/core/smack-setup.h \
1128         src/core/ima-setup.c \
1129         src/core/ima-setup.h \
1130         src/core/locale-setup.h \
1131         src/core/locale-setup.c \
1132         src/core/hostname-setup.c \
1133         src/core/hostname-setup.h \
1134         src/core/machine-id-setup.c \
1135         src/core/machine-id-setup.h \
1136         src/core/mount-setup.c \
1137         src/core/mount-setup.h \
1138         src/core/kmod-setup.c \
1139         src/core/kmod-setup.h \
1140         src/core/loopback-setup.h \
1141         src/core/loopback-setup.c \
1142         src/core/namespace.c \
1143         src/core/namespace.h \
1144         src/core/killall.h \
1145         src/core/killall.c \
1146         src/core/audit-fd.c \
1147         src/core/audit-fd.h \
1148         src/core/show-status.c \
1149         src/core/show-status.h \
1150         src/core/failure-action.c \
1151         src/core/failure-action.h
1152
1153 nodist_libsystemd_core_la_SOURCES = \
1154         src/core/load-fragment-gperf.c \
1155         src/core/load-fragment-gperf-nulstr.c
1156
1157 libsystemd_core_la_CFLAGS = \
1158         $(AM_CFLAGS) \
1159         $(PAM_CFLAGS) \
1160         $(AUDIT_CFLAGS) \
1161         $(KMOD_CFLAGS) \
1162         $(APPARMOR_CFLAGS) \
1163         $(SECCOMP_CFLAGS) \
1164         $(MOUNT_CFLAGS) \
1165         -pthread
1166
1167 libsystemd_core_la_LIBADD = \
1168         libsystemd-units.la \
1169         libsystemd-label.la \
1170         libudev-internal.la \
1171         libsystemd-shared.la \
1172         libsystemd-internal.la \
1173         $(PAM_LIBS) \
1174         $(AUDIT_LIBS) \
1175         $(KMOD_LIBS) \
1176         $(APPARMOR_LIBS) \
1177         $(SECCOMP_LIBS) \
1178         $(MOUNT_LIBS)
1179
1180 if HAVE_SECCOMP
1181 libsystemd_core_la_LIBADD += \
1182         libsystemd-seccomp.la
1183 endif
1184
1185 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1186         $(AM_V_at)$(MKDIR_P) $(dir $@)
1187         $(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 ";" }' < $< > $@
1188
1189 EXTRA_DIST += \
1190         src/core/load-fragment-gperf.gperf.m4
1191
1192 CLEANFILES += \
1193         src/core/load-fragment-gperf.gperf \
1194         src/core/load-fragment-gperf.c \
1195         src/core/load-fragment-gperf-nulstr.c \
1196         src/shared/errno-list.txt \
1197         src/shared/errno-from-name.gperf \
1198         src/shared/af-list.txt \
1199         src/shared/af-from-name.gperf \
1200         src/shared/arphrd-list.txt \
1201         src/shared/arphrd-from-name.gperf \
1202         src/shared/cap-list.txt \
1203         src/shared/cap-from-name.gperf \
1204         src/resolve/dns_type-list.txt \
1205         src/resolve/dns_type-from-name.gperf
1206
1207 BUILT_SOURCES += \
1208         src/shared/errno-from-name.h \
1209         src/shared/errno-to-name.h \
1210         src/shared/af-from-name.h \
1211         src/shared/af-to-name.h \
1212         src/shared/arphrd-from-name.h \
1213         src/shared/arphrd-to-name.h \
1214         src/shared/cap-from-name.h \
1215         src/shared/cap-to-name.h \
1216         src/resolve/dns_type-from-name.h \
1217         src/resolve/dns_type-to-name.h
1218
1219 %-from-name.gperf: %-list.txt
1220         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1221
1222 %-from-name.h: %-from-name.gperf
1223         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
1224
1225
1226 src/shared/errno-list.txt:
1227         $(AM_V_at)$(MKDIR_P) $(dir $@)
1228         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
1229
1230 src/shared/errno-to-name.h: src/shared/errno-list.txt
1231         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1232
1233
1234 src/shared/af-list.txt:
1235         $(AM_V_at)$(MKDIR_P) $(dir $@)
1236         $(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; }' >$@
1237
1238 src/shared/af-to-name.h: src/shared/af-list.txt
1239         $(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 "};"}' <$< >$@
1240
1241
1242 src/shared/arphrd-list.txt:
1243         $(AM_V_at)$(MKDIR_P) $(dir $@)
1244         $(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_//' >$@
1245
1246 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
1247         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1248
1249 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
1250         $(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 }' <$< >$@
1251
1252
1253 src/shared/cap-list.txt:
1254         $(AM_V_at)$(MKDIR_P) $(dir $@)
1255         $(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 >$@
1256
1257 src/shared/cap-to-name.h: src/shared/cap-list.txt
1258         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
1259
1260 src/shared/cap-from-name.gperf: src/shared/cap-list.txt
1261         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1262
1263 src/shared/cap-from-name.h: src/shared/cap-from-name.gperf
1264         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
1265
1266
1267 src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1268         $(AM_V_at)$(MKDIR_P) $(dir $@)
1269         $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1270
1271 src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
1272         $(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" }' <$< >$@
1273
1274 src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
1275         $(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 }' <$< >$@
1276
1277 # ------------------------------------------------------------------------------
1278 systemd_SOURCES = \
1279         src/core/main.c
1280
1281 systemd_CFLAGS = \
1282         $(AM_CFLAGS) \
1283         $(SECCOMP_CFLAGS)
1284
1285 systemd_LDADD = \
1286         libsystemd-core.la \
1287         $(RT_LIBS)
1288
1289 dist_pkgsysconf_DATA += \
1290         src/core/system.conf \
1291         src/core/user.conf
1292
1293 dist_dbuspolicy_DATA += \
1294         src/core/org.freedesktop.systemd1.conf
1295
1296 dist_dbussystemservice_DATA += \
1297         src/core/org.freedesktop.systemd1.service
1298
1299 polkitpolicy_in_in_files += \
1300         src/core/org.freedesktop.systemd1.policy.in.in
1301
1302 pkgconfigdata_DATA = \
1303         src/core/systemd.pc
1304
1305 nodist_rpmmacros_DATA = \
1306         src/core/macros.systemd
1307
1308 EXTRA_DIST += \
1309         src/core/systemd.pc.in \
1310         src/core/macros.systemd.in
1311
1312 CLEANFILES += \
1313         src/core/macros.systemd \
1314         src/core/org.freedesktop.systemd1.policy.in
1315
1316 # ------------------------------------------------------------------------------
1317
1318 manual_tests += \
1319         test-ns \
1320         test-loopback \
1321         test-hostname \
1322         test-daemon \
1323         test-cgroup \
1324         test-install \
1325         test-watchdog \
1326         test-log \
1327         test-ipcrm \
1328         test-btrfs
1329
1330 if HAVE_KMOD
1331 manual_tests += \
1332         test-rtnl-manual
1333 endif
1334
1335 tests += \
1336         test-engine \
1337         test-cgroup-mask \
1338         test-job-type \
1339         test-env-replace \
1340         test-strbuf \
1341         test-strv \
1342         test-path \
1343         test-path-util \
1344         test-strxcpyx \
1345         test-unit-name \
1346         test-unit-file \
1347         test-utf8 \
1348         test-ellipsize \
1349         test-util \
1350         test-ring \
1351         test-barrier \
1352         test-pty \
1353         test-tmpfiles \
1354         test-namespace \
1355         test-date \
1356         test-sleep \
1357         test-replace-var \
1358         test-sched-prio \
1359         test-calendarspec \
1360         test-strip-tab-ansi \
1361         test-cgroup-util \
1362         test-prioq \
1363         test-fileio \
1364         test-time \
1365         test-hashmap \
1366         test-set \
1367         test-list \
1368         test-unaligned \
1369         test-tables \
1370         test-device-nodes \
1371         test-xml \
1372         test-json \
1373         test-architecture \
1374         test-socket-util \
1375         test-fdset \
1376         test-conf-files \
1377         test-capability \
1378         test-async \
1379         test-ratelimit \
1380         test-condition \
1381         test-uid-range \
1382         test-bus-policy \
1383         test-locale-util \
1384         test-execute \
1385         test-copy \
1386         test-cap-list
1387
1388 EXTRA_DIST += \
1389         test/a.service \
1390         test/basic.target \
1391         test/b.service \
1392         test/c.service \
1393         test/daughter.service \
1394         test/d.service \
1395         test/end.service \
1396         test/e.service \
1397         test/f.service \
1398         test/grandchild.service \
1399         test/g.service \
1400         test/hello-after-sleep.target \
1401         test/hello.service \
1402         test/h.service \
1403         test/parent-deep.slice \
1404         test/parent.slice \
1405         test/paths.target \
1406         test/sched_idle_bad.service \
1407         test/sched_idle_ok.service \
1408         test/sched_rr_bad.service \
1409         test/sched_rr_change.service \
1410         test/sched_rr_ok.service \
1411         test/shutdown.target \
1412         test/sleep.service \
1413         test/sockets.target \
1414         test/son.service \
1415         test/sysinit.target \
1416         test/testsuite.target \
1417         test/timers.target \
1418         test/unstoppable.service \
1419         test/path-changed.service \
1420         test/path-directorynotempty.service \
1421         test/path-existsglob.service \
1422         test/path-exists.service \
1423         test/path-makedirectory.service \
1424         test/path-modified.service \
1425         test/path-mycustomunit.service \
1426         test/path-service.service \
1427         test/path-changed.path \
1428         test/path-directorynotempty.path \
1429         test/path-existsglob.path \
1430         test/path-exists.path \
1431         test/path-makedirectory.path \
1432         test/path-modified.path \
1433         test/path-unit.path \
1434         test/exec-environment-empty.service \
1435         test/exec-environment-multiple.service \
1436         test/exec-environment.service \
1437         test/exec-group.service \
1438         test/exec-ignoresigpipe-no.service \
1439         test/exec-ignoresigpipe-yes.service \
1440         test/exec-personality-x86-64.service \
1441         test/exec-personality-x86.service \
1442         test/exec-privatedevices-no.service \
1443         test/exec-privatedevices-yes.service \
1444         test/exec-privatetmp-no.service \
1445         test/exec-privatetmp-yes.service \
1446         test/exec-systemcallerrornumber.service \
1447         test/exec-systemcallfilter-failing2.service \
1448         test/exec-systemcallfilter-failing.service \
1449         test/exec-systemcallfilter-not-failing2.service \
1450         test/exec-systemcallfilter-not-failing.service \
1451         test/exec-user.service \
1452         test/exec-workingdirectory.service \
1453         test/exec-umask-0177.service \
1454         test/exec-umask-default.service \
1455         test/bus-policy/hello.conf \
1456         test/bus-policy/methods.conf \
1457         test/bus-policy/ownerships.conf \
1458         test/bus-policy/signals.conf \
1459         test/bus-policy/check-own-rules.conf \
1460         test/bus-policy/many-rules.conf \
1461         test/bus-policy/test.conf
1462
1463
1464 EXTRA_DIST += \
1465         src/test/test-helper.h
1466
1467 test_device_nodes_SOURCES = \
1468         src/test/test-device-nodes.c
1469
1470 test_device_nodes_LDADD = \
1471         libsystemd-shared.la
1472
1473 test_engine_SOURCES = \
1474         src/test/test-engine.c
1475
1476 test_engine_CFLAGS = \
1477         $(AM_CFLAGS) \
1478         $(SECCOMP_CFLAGS)
1479
1480 test_engine_LDADD = \
1481         libsystemd-core.la \
1482         $(RT_LIBS)
1483
1484 test_job_type_SOURCES = \
1485         src/test/test-job-type.c
1486
1487 test_job_type_CFLAGS = \
1488         $(AM_CFLAGS) \
1489         $(SECCOMP_CFLAGS)
1490
1491 test_job_type_LDADD = \
1492         libsystemd-core.la \
1493         $(RT_LIBS)
1494
1495 test_ns_SOURCES = \
1496         src/test/test-ns.c
1497
1498 test_ns_CFLAGS = \
1499         $(AM_CFLAGS) \
1500         $(SECCOMP_CFLAGS)
1501
1502 test_ns_LDADD = \
1503         libsystemd-core.la
1504
1505 test_loopback_SOURCES = \
1506         src/test/test-loopback.c
1507
1508 test_loopback_LDADD = \
1509         libsystemd-core.la
1510
1511 test_hostname_SOURCES = \
1512         src/test/test-hostname.c
1513
1514 test_hostname_LDADD = \
1515         libsystemd-core.la
1516
1517 if ENABLE_EFI
1518 manual_tests += \
1519         test-boot-timestamp
1520
1521 test_boot_timestamp_SOURCES = \
1522         src/test/test-boot-timestamps.c
1523
1524 test_boot_timestamp_LDADD = \
1525         libsystemd-shared.la
1526 endif
1527
1528 test_unit_name_SOURCES = \
1529         src/test/test-unit-name.c
1530
1531 test_unit_name_CFLAGS = \
1532         $(AM_CFLAGS) \
1533         $(SECCOMP_CFLAGS)
1534
1535 test_unit_name_LDADD = \
1536         libsystemd-core.la \
1537         $(RT_LIBS)
1538
1539 test_unit_file_SOURCES = \
1540         src/test/test-unit-file.c
1541
1542 test_unit_file_CFLAGS = \
1543         $(AM_CFLAGS) \
1544         $(SECCOMP_CFLAGS)
1545
1546 test_unit_file_LDADD = \
1547         libsystemd-core.la \
1548         $(RT_LIBS)
1549
1550 test_utf8_SOURCES = \
1551         src/test/test-utf8.c
1552
1553 test_utf8_LDADD = \
1554         libsystemd-shared.la
1555
1556 test_capability_SOURCES = \
1557         src/test/test-capability.c
1558
1559 test_capability_LDADD = \
1560         libsystemd-shared.la
1561
1562 test_async_SOURCES = \
1563         src/test/test-async.c
1564
1565 test_async_LDADD = \
1566         libsystemd-shared.la
1567
1568 test_locale_util_SOURCES = \
1569         src/test/test-locale-util.c
1570
1571 test_locale_util_LDADD = \
1572         libsystemd-shared.la
1573
1574 test_copy_SOURCES = \
1575         src/test/test-copy.c
1576
1577 test_copy_LDADD = \
1578         libsystemd-shared.la
1579
1580 test_condition_SOURCES = \
1581         src/test/test-condition.c
1582
1583 test_condition_LDADD = \
1584         libsystemd-label.la \
1585         libsystemd-internal.la \
1586         libsystemd-shared.la
1587
1588 test_fdset_SOURCES = \
1589         src/test/test-fdset.c
1590
1591 test_fdset_LDADD = \
1592         libsystemd-shared.la \
1593         libsystemd-internal.la
1594
1595 test_ratelimit_SOURCES = \
1596         src/test/test-ratelimit.c
1597
1598 test_ratelimit_LDADD = \
1599         libsystemd-shared.la
1600
1601 test_util_SOURCES = \
1602         src/test/test-util.c
1603
1604 test_util_LDADD = \
1605         -lm \
1606         libsystemd-shared.la
1607
1608 test_uid_range_SOURCES = \
1609         src/test/test-uid-range.c
1610
1611 test_uid_range_LDADD = \
1612         libsystemd-shared.la
1613
1614 test_cap_list_SOURCES = \
1615         src/test/test-cap-list.c
1616
1617 test_cap_list_LDADD = \
1618         libsystemd-shared.la
1619
1620 test_socket_util_SOURCES = \
1621         src/test/test-socket-util.c
1622
1623 test_socket_util_LDADD = \
1624         libsystemd-shared.la
1625
1626 test_ring_SOURCES = \
1627         src/test/test-ring.c
1628
1629 test_ring_LDADD = \
1630         libsystemd-shared.la
1631
1632 test_barrier_SOURCES = \
1633         src/test/test-barrier.c
1634
1635 test_barrier_LDADD = \
1636         libsystemd-shared.la
1637
1638 test_pty_SOURCES = \
1639         src/test/test-pty.c
1640
1641 test_pty_LDADD = \
1642         libsystemd-core.la
1643
1644 test_tmpfiles_SOURCES = \
1645         src/test/test-tmpfiles.c
1646
1647 test_tmpfiles_LDADD = \
1648         libsystemd-shared.la
1649
1650 test_namespace_SOURCES = \
1651         src/test/test-namespace.c
1652
1653 test_namespace_LDADD = \
1654         libsystemd-core.la
1655
1656 CLEANFILES += \
1657         src/test/test-hashmap-ordered.c
1658
1659 BUILT_SOURCES += \
1660         src/test/test-hashmap-ordered.c
1661
1662 src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
1663         $(AM_V_at)$(MKDIR_P) $(dir $@)
1664         $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
1665                            { if (!match($$0, "^#include"))          \
1666                                  gsub(/hashmap/, "ordered_hashmap"); \
1667                              gsub(/HASHMAP/, "ORDERED_HASHMAP");     \
1668                              gsub(/Hashmap/, "OrderedHashmap");      \
1669                              print }' <$< >$@
1670
1671 nodist_test_hashmap_SOURCES = \
1672         src/test/test-hashmap-ordered.c
1673
1674 test_hashmap_SOURCES = \
1675         src/test/test-hashmap.c \
1676         src/test/test-hashmap-plain.c
1677
1678 test_hashmap_LDADD = \
1679         libsystemd-shared.la
1680
1681 test_set_SOURCES = \
1682         src/test/test-set.c
1683
1684 test_set_LDADD = \
1685         libsystemd-shared.la
1686
1687 test_xml_SOURCES = \
1688         src/test/test-xml.c
1689
1690 test_xml_LDADD = \
1691         libsystemd-shared.la
1692
1693 test_json_SOURCES = \
1694         src/test/test-json.c
1695
1696 test_json_LDADD = \
1697         libsystemd-shared.la \
1698         -lm
1699
1700 test_list_SOURCES = \
1701         src/test/test-list.c
1702
1703 test_list_LDADD = \
1704         libsystemd-shared.la
1705
1706 test_unaligned_LDADD = \
1707         libsystemd-shared.la
1708
1709 test_unaligned_SOURCES = \
1710         src/test/test-unaligned.c
1711
1712 test_tables_SOURCES = \
1713         src/test/test-tables.c \
1714         src/shared/test-tables.h \
1715         src/bus-proxyd/bus-xml-policy.c \
1716         src/bus-proxyd/bus-xml-policy.h \
1717         src/journal/journald-server.c \
1718         src/journal/journald-server.h
1719
1720 test_tables_CPPFLAGS = \
1721         $(AM_CPPFLAGS) \
1722         -I$(top_srcdir)/src/bus-proxyd
1723
1724 test_tables_CFLAGS = \
1725         $(AM_CFLAGS) \
1726         $(SECCOMP_CFLAGS)
1727
1728 test_tables_LDADD = \
1729         libsystemd-logs.la \
1730         libsystemd-journal-internal.la \
1731         libsystemd-journal-core.la \
1732         libsystemd-core.la \
1733         libudev-core.la \
1734         $(RT_LIBS)
1735
1736 test_prioq_SOURCES = \
1737         src/test/test-prioq.c
1738
1739 test_prioq_LDADD = \
1740         libsystemd-shared.la
1741
1742 test_fileio_SOURCES = \
1743         src/test/test-fileio.c
1744
1745 test_fileio_LDADD = \
1746         libsystemd-shared.la
1747
1748 test_time_SOURCES = \
1749         src/test/test-time.c
1750
1751 test_time_LDADD = \
1752         libsystemd-shared.la
1753
1754 test_architecture_SOURCES = \
1755         src/test/test-architecture.c
1756
1757 test_architecture_LDADD = \
1758         libsystemd-shared.la
1759
1760 test_log_SOURCES = \
1761         src/test/test-log.c
1762
1763 test_log_LDADD = \
1764         libsystemd-shared.la
1765
1766 test_ipcrm_SOURCES = \
1767         src/test/test-ipcrm.c
1768
1769 test_ipcrm_LDADD = \
1770         libsystemd-shared.la \
1771         -lrt
1772
1773 test_btrfs_SOURCES = \
1774         src/test/test-btrfs.c
1775
1776 test_btrfs_LDADD = \
1777         libsystemd-shared.la
1778
1779 test_rtnl_manual_SOURCES = \
1780         src/test/test-rtnl-manual.c
1781
1782 test_rtnl_manual_CFLAGS = \
1783         $(AM_CFLAGS) \
1784         $(KMOD_CFLAGS)
1785
1786 test_rtnl_manual_LDADD = \
1787         libsystemd-internal.la \
1788         libsystemd-shared.la \
1789         $(KMOD_LIBS)
1790
1791 test_ellipsize_SOURCES = \
1792         src/test/test-ellipsize.c
1793
1794 test_ellipsize_LDADD = \
1795         libsystemd-shared.la
1796
1797 test_date_SOURCES = \
1798         src/test/test-date.c
1799
1800 test_date_LDADD = \
1801         libsystemd-shared.la
1802
1803 test_sleep_SOURCES = \
1804         src/test/test-sleep.c
1805
1806 test_sleep_LDADD = \
1807         libsystemd-core.la
1808
1809 test_replace_var_SOURCES = \
1810         src/test/test-replace-var.c
1811
1812 test_replace_var_LDADD = \
1813         libsystemd-shared.la
1814
1815 test_calendarspec_SOURCES = \
1816         src/test/test-calendarspec.c
1817
1818 test_calendarspec_LDADD = \
1819         libsystemd-shared.la
1820
1821 test_strip_tab_ansi_SOURCES = \
1822         src/test/test-strip-tab-ansi.c
1823
1824 test_strip_tab_ansi_LDADD = \
1825         libsystemd-shared.la
1826
1827 test_daemon_SOURCES = \
1828         src/test/test-daemon.c
1829
1830 test_daemon_LDADD = \
1831         libsystemd-internal.la \
1832         libsystemd-shared.la
1833
1834 test_cgroup_SOURCES = \
1835         src/test/test-cgroup.c
1836
1837 test_cgroup_LDADD = \
1838         libsystemd-label.la \
1839         libsystemd-shared.la \
1840         libsystemd-internal.la
1841
1842 test_cgroup_mask_SOURCES = \
1843         src/test/test-cgroup-mask.c
1844
1845 test_cgroup_mask_CPPFLAGS = \
1846         $(AM_CPPFLAGS)
1847
1848 test_cgroup_mask_CFLAGS = \
1849         $(AM_CFLAGS) \
1850         $(SECCOMP_CFLAGS)
1851
1852 test_cgroup_mask_LDADD = \
1853         libsystemd-core.la \
1854         $(RT_LIBS)
1855
1856 test_cgroup_util_SOURCES = \
1857         src/test/test-cgroup-util.c
1858
1859 test_cgroup_util_LDADD = \
1860         libsystemd-label.la \
1861         libsystemd-internal.la \
1862         libsystemd-shared.la
1863
1864 test_env_replace_SOURCES = \
1865         src/test/test-env-replace.c
1866
1867 test_env_replace_LDADD = \
1868         libsystemd-shared.la
1869
1870 test_strbuf_SOURCES = \
1871         src/test/test-strbuf.c
1872
1873 test_strbuf_LDADD = \
1874         libsystemd-shared.la
1875
1876 test_strv_SOURCES = \
1877         src/test/test-strv.c
1878
1879 test_strv_LDADD = \
1880         libsystemd-units.la \
1881         libsystemd-internal.la \
1882         libsystemd-shared.la
1883
1884 test_path_util_SOURCES = \
1885         src/test/test-path-util.c
1886
1887 test_path_util_LDADD = \
1888         libsystemd-shared.la
1889
1890 test_path_SOURCES = \
1891         src/test/test-path.c
1892
1893 test_path_CFLAGS = \
1894         $(AM_CFLAGS)
1895
1896 test_path_LDADD = \
1897         libsystemd-core.la
1898
1899 test_execute_SOURCES = \
1900         src/test/test-execute.c
1901
1902 test_execute_CFLAGS = \
1903         $(AM_CFLAGS)
1904
1905 test_execute_LDADD = \
1906         libsystemd-core.la
1907
1908 test_strxcpyx_SOURCES = \
1909         src/test/test-strxcpyx.c
1910
1911 test_strxcpyx_LDADD = \
1912         libsystemd-shared.la
1913
1914 test_install_SOURCES = \
1915         src/test/test-install.c
1916
1917 test_install_LDADD = \
1918         libsystemd-units.la \
1919         libsystemd-label.la \
1920         libsystemd-shared.la \
1921         libsystemd-internal.la
1922
1923 test_watchdog_SOURCES = \
1924         src/test/test-watchdog.c
1925
1926 test_watchdog_LDADD = \
1927         libsystemd-shared.la
1928
1929 test_sched_prio_SOURCES = \
1930         src/test/test-sched-prio.c
1931
1932 test_sched_prio_CPPFLAGS = \
1933         $(AM_CPPFLAGS)
1934
1935 test_sched_prio_CFLAGS = \
1936         $(AM_CFLAGS) \
1937         $(SECCOMP_CFLAGS)
1938
1939 test_sched_prio_LDADD = \
1940         libsystemd-core.la \
1941         $(RT_LIBS)
1942
1943 test_conf_files_SOURCES = \
1944         src/test/test-conf-files.c
1945
1946 test_conf_files_LDADD = \
1947         libsystemd-shared.la
1948
1949 test_bus_policy_SOURCES = \
1950         src/bus-proxyd/test-bus-xml-policy.c \
1951         src/bus-proxyd/bus-xml-policy.c \
1952         src/bus-proxyd/bus-xml-policy.h
1953
1954 test_bus_policy_LDADD = \
1955         libsystemd-internal.la \
1956         libsystemd-shared.la
1957
1958 # ------------------------------------------------------------------------------
1959 ## .PHONY so it always rebuilds it
1960 .PHONY: coverage lcov-run lcov-report coverage-sync
1961
1962 # run lcov from scratch, always
1963 coverage: all
1964         $(MAKE) lcov-run
1965         $(MAKE) lcov-report
1966
1967 coverage_dir = coverage
1968 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1969
1970 if ENABLE_COVERAGE
1971 # reset run coverage tests
1972 lcov-run:
1973         @rm -rf $(coverage_dir)
1974         lcov $(coverage_opts) --zerocounters
1975         -$(MAKE) check
1976
1977 # generate report based on current coverage data
1978 lcov-report:
1979         $(MKDIR_P) $(coverage_dir)
1980         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1981                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1982         lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
1983         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
1984         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1985
1986 # lcov doesn't work properly with vpath builds, make sure that bad
1987 # output is not uploaded by mistake.
1988 coverage-sync: coverage
1989         test "$(builddir)" = "$(srcdir)"
1990         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1991
1992 else
1993 lcov-run lcov-report:
1994         echo "Need to reconfigure with --enable-coverage"
1995 endif
1996
1997 # ------------------------------------------------------------------------------
1998 systemd_analyze_SOURCES = \
1999         src/analyze/analyze.c \
2000         src/analyze/analyze-verify.c \
2001         src/analyze/analyze-verify.h
2002
2003 systemd_verify_CFLAGS = \
2004         $(AM_CFLAGS) \
2005         $(SECCOMP_CFLAGS)
2006
2007 systemd_analyze_LDADD = \
2008         libsystemd-core.la \
2009         libsystemd-internal.la \
2010         libsystemd-shared.la \
2011         $(RT_LIBS)
2012
2013 # ------------------------------------------------------------------------------
2014 systemd_initctl_SOURCES = \
2015         src/initctl/initctl.c
2016
2017 systemd_initctl_LDADD = \
2018         libsystemd-internal.la \
2019         libsystemd-shared.la
2020
2021 # ------------------------------------------------------------------------------
2022 systemd_update_utmp_SOURCES = \
2023         src/update-utmp/update-utmp.c
2024
2025 systemd_update_utmp_CFLAGS = \
2026         $(AM_CFLAGS) \
2027         $(AUDIT_CFLAGS)
2028
2029 systemd_update_utmp_LDADD = \
2030         libsystemd-internal.la \
2031         libsystemd-shared.la \
2032         $(AUDIT_LIBS)
2033
2034 # ------------------------------------------------------------------------------
2035 systemd_update_done_SOURCES = \
2036         src/update-done/update-done.c
2037
2038 systemd_update_done_LDADD = \
2039         libsystemd-internal.la \
2040         libsystemd-label.la \
2041         libsystemd-shared.la
2042
2043 # ------------------------------------------------------------------------------
2044 systemd_shutdownd_SOURCES = \
2045         src/shutdownd/shutdownd.c
2046
2047 systemd_shutdownd_LDADD = \
2048         libsystemd-label.la \
2049         libsystemd-internal.la \
2050         libsystemd-shared.la
2051
2052 dist_doc_DATA += \
2053         src/systemd/sd-shutdown.h
2054
2055 # ------------------------------------------------------------------------------
2056 systemd_shutdown_SOURCES = \
2057         src/core/umount.c \
2058         src/core/umount.h \
2059         src/core/shutdown.c \
2060         src/core/mount-setup.c \
2061         src/core/mount-setup.h \
2062         src/core/killall.h \
2063         src/core/killall.c
2064
2065 systemd_shutdown_LDADD = \
2066         libsystemd-label.la \
2067         libudev-internal.la \
2068         libsystemd-shared.la
2069
2070 # ------------------------------------------------------------------------------
2071 if HAVE_KMOD
2072 systemd_modules_load_SOURCES = \
2073         src/modules-load/modules-load.c
2074
2075 systemd_modules_load_CFLAGS = \
2076         $(AM_CFLAGS) \
2077         $(KMOD_CFLAGS)
2078
2079 systemd_modules_load_LDADD = \
2080         libsystemd-shared.la \
2081         $(KMOD_LIBS)
2082
2083 rootlibexec_PROGRAMS += \
2084         systemd-modules-load
2085
2086 nodist_systemunit_DATA += \
2087         units/systemd-modules-load.service
2088
2089 SYSINIT_TARGET_WANTS += \
2090         systemd-modules-load.service
2091
2092 if ENABLE_TMPFILES
2093 nodist_systemunit_DATA += \
2094         units/kmod-static-nodes.service
2095
2096 SYSINIT_TARGET_WANTS += \
2097         kmod-static-nodes.service
2098 endif
2099 endif
2100
2101 EXTRA_DIST += \
2102         units/systemd-modules-load.service.in \
2103         units/kmod-static-nodes.service.in
2104
2105 # ------------------------------------------------------------------------------
2106 if ENABLE_TMPFILES
2107 systemd_tmpfiles_SOURCES = \
2108         src/tmpfiles/tmpfiles.c
2109
2110 systemd_tmpfiles_LDADD = \
2111         libsystemd-units.la \
2112         libsystemd-label.la \
2113         libsystemd-internal.la \
2114         libsystemd-shared.la
2115
2116 rootbin_PROGRAMS += \
2117         systemd-tmpfiles
2118
2119 dist_systemunit_DATA += \
2120         units/systemd-tmpfiles-clean.timer
2121
2122 nodist_systemunit_DATA += \
2123         units/systemd-tmpfiles-setup-dev.service \
2124         units/systemd-tmpfiles-setup.service \
2125         units/systemd-tmpfiles-clean.service
2126
2127 nodist_tmpfiles_DATA = \
2128         tmpfiles.d/etc.conf
2129
2130 dist_tmpfiles_DATA = \
2131         tmpfiles.d/systemd.conf \
2132         tmpfiles.d/systemd-nologin.conf \
2133         tmpfiles.d/tmp.conf \
2134         tmpfiles.d/x11.conf \
2135         tmpfiles.d/var.conf
2136
2137 if HAVE_SYSV_COMPAT
2138 dist_tmpfiles_DATA += \
2139         tmpfiles.d/legacy.conf
2140 endif
2141
2142 SYSINIT_TARGET_WANTS += \
2143         systemd-tmpfiles-setup-dev.service \
2144         systemd-tmpfiles-setup.service
2145
2146 dist_zshcompletion_DATA += \
2147         shell-completion/zsh/_systemd-tmpfiles
2148
2149 TIMERS_TARGET_WANTS += \
2150         systemd-tmpfiles-clean.timer
2151
2152 INSTALL_DIRS += \
2153         $(tmpfilesdir) \
2154         $(sysconfdir)/tmpfiles.d
2155 endif
2156
2157 EXTRA_DIST += \
2158         tmpfiles.d/etc.conf.m4 \
2159         units/systemd-tmpfiles-setup-dev.service.in \
2160         units/systemd-tmpfiles-setup.service.in \
2161         units/systemd-tmpfiles-clean.service.in
2162
2163 CLEANFILES += \
2164         tmpfiles.d/etc.conf
2165
2166 # ------------------------------------------------------------------------------
2167 if ENABLE_SYSUSERS
2168 systemd_sysusers_SOURCES = \
2169         src/sysusers/sysusers.c
2170
2171 systemd_sysusers_LDADD = \
2172         libsystemd-units.la \
2173         libsystemd-label.la \
2174         libsystemd-internal.la \
2175         libsystemd-shared.la
2176
2177 rootbin_PROGRAMS += \
2178         systemd-sysusers
2179
2180 nodist_systemunit_DATA += \
2181         units/systemd-sysusers.service
2182
2183 SYSINIT_TARGET_WANTS += \
2184         systemd-sysusers.service
2185
2186 dist_sysusers_DATA = \
2187         sysusers.d/systemd.conf
2188
2189 nodist_sysusers_DATA = \
2190         sysusers.d/basic.conf
2191
2192 EXTRA_DIST += \
2193         units/systemd-sysusers.service.in \
2194         sysusers.d/basic.conf.in
2195
2196 CLEANFILES += \
2197         sysusers.d/basic.conf
2198
2199 INSTALL_DIRS += \
2200         $(sysusersdir)
2201 endif
2202
2203 # ------------------------------------------------------------------------------
2204 dist_factory_etc_DATA = \
2205         factory/etc/nsswitch.conf
2206
2207 if HAVE_PAM
2208 dist_factory_pam_DATA = \
2209         factory/etc/pam.d/system-auth \
2210         factory/etc/pam.d/other
2211 endif
2212
2213 # ------------------------------------------------------------------------------
2214 if ENABLE_FIRSTBOOT
2215 systemd_firstboot_SOURCES = \
2216         src/firstboot/firstboot.c
2217
2218 systemd_firstboot_LDADD = \
2219         libsystemd-units.la \
2220         libsystemd-label.la \
2221         libsystemd-internal.la \
2222         libsystemd-shared.la \
2223         -lcrypt
2224
2225 rootbin_PROGRAMS += \
2226         systemd-firstboot
2227
2228 nodist_systemunit_DATA += \
2229         units/systemd-firstboot.service
2230
2231 EXTRA_DIST += \
2232         units/systemd-firstboot.service.in
2233
2234 SYSINIT_TARGET_WANTS += \
2235         systemd-firstboot.service
2236 endif
2237
2238 # ------------------------------------------------------------------------------
2239 systemd_machine_id_setup_SOURCES = \
2240         src/machine-id-setup/machine-id-setup-main.c \
2241         src/core/machine-id-setup.c \
2242         src/core/machine-id-setup.h
2243
2244 systemd_machine_id_setup_LDADD = \
2245         libsystemd-label.la \
2246         libsystemd-internal.la \
2247         libsystemd-shared.la
2248
2249 # ------------------------------------------------------------------------------
2250 systemd_sysctl_SOURCES = \
2251         src/sysctl/sysctl.c
2252
2253 systemd_sysctl_LDADD = \
2254         libsystemd-shared.la
2255
2256 # ------------------------------------------------------------------------------
2257 systemd_sleep_SOURCES = \
2258         src/sleep/sleep.c
2259
2260 systemd_sleep_LDADD = \
2261         libsystemd-shared.la
2262
2263 # ------------------------------------------------------------------------------
2264 systemd_fsck_SOURCES = \
2265         src/fsck/fsck.c
2266
2267 systemd_fsck_LDADD = \
2268         libsystemd-internal.la \
2269         libudev-internal.la \
2270         libsystemd-shared.la
2271
2272 # ------------------------------------------------------------------------------
2273 systemd_machine_id_commit_SOURCES = \
2274         src/machine-id-commit/machine-id-commit.c \
2275         src/core/machine-id-setup.c \
2276         src/core/machine-id-setup.h
2277
2278 systemd_machine_id_commit_LDADD = \
2279         libsystemd-label.la \
2280         libsystemd-internal.la \
2281         libsystemd-shared.la
2282
2283 SYSINIT_TARGET_WANTS += \
2284         systemd-machine-id-commit.service
2285
2286 # ------------------------------------------------------------------------------
2287 systemd_ac_power_SOURCES = \
2288         src/ac-power/ac-power.c
2289
2290 systemd_ac_power_LDADD = \
2291         libudev-internal.la \
2292         libsystemd-shared.la
2293
2294 # ------------------------------------------------------------------------------
2295 systemd_detect_virt_SOURCES = \
2296         src/detect-virt/detect-virt.c
2297
2298 systemd_detect_virt_LDADD = \
2299         libsystemd-shared.la
2300
2301 INSTALL_EXEC_HOOKS += \
2302         systemd-detect-virt-install-hook
2303
2304 # ------------------------------------------------------------------------------
2305 systemd_delta_SOURCES = \
2306         src/delta/delta.c
2307
2308 systemd_delta_LDADD = \
2309         libsystemd-shared.la
2310
2311 # ------------------------------------------------------------------------------
2312 systemd_getty_generator_SOURCES = \
2313         src/getty-generator/getty-generator.c
2314
2315 systemd_getty_generator_LDADD = \
2316         libsystemd-label.la \
2317         libsystemd-shared.la
2318
2319 # ------------------------------------------------------------------------------
2320 systemd_debug_generator_SOURCES = \
2321         src/debug-generator/debug-generator.c
2322
2323 systemd_debug_generator_LDADD = \
2324         libsystemd-label.la \
2325         libsystemd-shared.la
2326
2327 # ------------------------------------------------------------------------------
2328 systemd_fstab_generator_SOURCES = \
2329         src/fstab-generator/fstab-generator.c \
2330         src/core/mount-setup.c
2331
2332 systemd_fstab_generator_LDADD = \
2333         libsystemd-label.la \
2334         libsystemd-shared.la
2335
2336 # ------------------------------------------------------------------------------
2337 systemd_system_update_generator_SOURCES = \
2338         src/system-update-generator/system-update-generator.c
2339
2340 systemd_system_update_generator_LDADD = \
2341         libsystemd-label.la \
2342         libsystemd-shared.la
2343
2344 # ------------------------------------------------------------------------------
2345 if ENABLE_HIBERNATE
2346 systemgenerator_PROGRAMS += \
2347         systemd-hibernate-resume-generator
2348
2349 rootlibexec_PROGRAMS += \
2350         systemd-hibernate-resume
2351
2352 systemd_hibernate_resume_SOURCES = \
2353         src/hibernate-resume/hibernate-resume.c
2354
2355 systemd_hibernate_resume_LDADD = \
2356         libsystemd-internal.la \
2357         libsystemd-shared.la
2358
2359 systemd_hibernate_resume_generator_SOURCES = \
2360         src/hibernate-resume/hibernate-resume-generator.c
2361
2362 systemd_hibernate_resume_generator_LDADD = \
2363         libsystemd-label.la \
2364         libsystemd-shared.la
2365
2366 EXTRA_DIST += \
2367         units/systemd-hibernate.service.in \
2368         units/systemd-hibernate-resume@.service.in \
2369         units/systemd-hybrid-sleep.service.in
2370
2371 dist_systemunit_DATA += \
2372         units/hibernate.target \
2373         units/hybrid-sleep.target
2374
2375 nodist_systemunit_DATA += \
2376         units/systemd-hibernate.service \
2377         units/systemd-hibernate-resume@.service \
2378         units/systemd-hybrid-sleep.service
2379 endif
2380
2381 # ------------------------------------------------------------------------------
2382 if ENABLE_EFI
2383 systemgenerator_PROGRAMS +=  \
2384         systemd-efi-boot-generator
2385
2386 systemd_efi_boot_generator_SOURCES = \
2387         src/efi-boot-generator/efi-boot-generator.c
2388
2389 systemd_efi_boot_generator_LDADD = \
2390         libsystemd-label.la \
2391         libsystemd-shared.la
2392
2393 # ------------------------------------------------------------------------------
2394 bootctl_SOURCES = \
2395         src/boot/boot.h \
2396         src/boot/boot-loader.h \
2397         src/boot/bootctl.c \
2398         src/boot/boot-loader.c \
2399         src/boot/boot-efi.c
2400
2401 bootctl_LDADD = \
2402         libsystemd-shared.la \
2403         libsystemd-internal.la
2404
2405 bin_PROGRAMS += \
2406         bootctl
2407
2408 dist_bashcompletion_DATA += \
2409         shell-completion/bash/bootctl
2410
2411 dist_zshcompletion_DATA += \
2412         shell-completion/zsh/_bootctl
2413
2414 endif
2415
2416 # ------------------------------------------------------------------------------
2417 if HAVE_BLKID
2418 systemgenerator_PROGRAMS +=  \
2419         systemd-gpt-auto-generator
2420
2421 systemd_gpt_auto_generator_SOURCES = \
2422         src/gpt-auto-generator/gpt-auto-generator.c \
2423         src/shared/blkid-util.h
2424
2425 systemd_gpt_auto_generator_LDADD = \
2426         libsystemd-label.la \
2427         libsystemd-internal.la \
2428         libudev-internal.la \
2429         libsystemd-shared.la \
2430         $(BLKID_LIBS)
2431
2432 systemd_gpt_auto_generator_CFLAGS = \
2433         $(AM_CFLAGS) \
2434         $(BLKID_CFLAGS)
2435 endif
2436
2437 # ------------------------------------------------------------------------------
2438 if ENABLE_KDBUS
2439 systemgenerator_PROGRAMS +=  \
2440         systemd-dbus1-generator
2441
2442 systemd_dbus1_generator_SOURCES = \
2443         src/dbus1-generator/dbus1-generator.c
2444
2445 systemd_dbus1_generator_LDADD = \
2446         libsystemd-label.la \
2447         libsystemd-internal.la \
2448         libsystemd-shared.la
2449
2450 dbus1-generator-install-hook:
2451         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2452         $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2453         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2454
2455 dbus1-generator-uninstall-hook:
2456         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2457
2458 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2459 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2460 endif
2461
2462 # ------------------------------------------------------------------------------
2463 systemd_sysv_generator_SOURCES = \
2464         src/sysv-generator/sysv-generator.c
2465
2466 systemd_sysv_generator_LDADD = \
2467         libsystemd-core.la \
2468         libsystemd-label.la \
2469         libsystemd-shared.la
2470
2471 # ------------------------------------------------------------------------------
2472 systemd_rc_local_generator_SOURCES = \
2473         src/rc-local-generator/rc-local-generator.c
2474
2475 systemd_rc_local_generator_LDADD = \
2476         libsystemd-label.la \
2477         libsystemd-shared.la
2478
2479 # ------------------------------------------------------------------------------
2480 systemd_remount_fs_SOURCES = \
2481         src/remount-fs/remount-fs.c \
2482         src/core/mount-setup.c \
2483         src/core/mount-setup.h
2484
2485 systemd_remount_fs_LDADD = \
2486         libsystemd-label.la \
2487         libsystemd-shared.la
2488
2489 # ------------------------------------------------------------------------------
2490 systemd_cgroups_agent_SOURCES = \
2491         src/cgroups-agent/cgroups-agent.c
2492
2493 systemd_cgroups_agent_LDADD = \
2494         libsystemd-internal.la \
2495         libsystemd-shared.la
2496
2497 # ------------------------------------------------------------------------------
2498 systemd_escape_SOURCES = \
2499         src/escape/escape.c
2500
2501 systemd_escape_LDADD = \
2502         libsystemd-shared.la
2503
2504 # -----------------------------------------------------------------------------
2505 systemctl_SOURCES = \
2506         src/systemctl/systemctl.c
2507
2508 systemctl_LDADD = \
2509         libsystemd-units.la \
2510         libsystemd-label.la \
2511         libsystemd-internal.la \
2512         libsystemd-logs.la \
2513         libsystemd-journal-internal.la \
2514         libsystemd-shared.la
2515
2516 # ------------------------------------------------------------------------------
2517 systemd_notify_SOURCES = \
2518         src/notify/notify.c
2519
2520 systemd_notify_LDADD = \
2521         libsystemd-internal.la \
2522         libsystemd-shared.la
2523
2524 # ------------------------------------------------------------------------------
2525 systemd_path_SOURCES = \
2526         src/path/path.c
2527
2528 systemd_path_LDADD = \
2529         libsystemd-internal.la \
2530         libsystemd-shared.la
2531
2532 # ------------------------------------------------------------------------------
2533 systemd_ask_password_SOURCES = \
2534         src/ask-password/ask-password.c
2535
2536 systemd_ask_password_LDADD = \
2537         libsystemd-label.la \
2538         libsystemd-shared.la
2539
2540 # ------------------------------------------------------------------------------
2541 systemd_reply_password_SOURCES = \
2542         src/reply-password/reply-password.c
2543
2544 systemd_reply_password_LDADD = \
2545         libsystemd-shared.la
2546
2547 # ------------------------------------------------------------------------------
2548 systemd_cgls_SOURCES = \
2549         src/cgls/cgls.c
2550
2551 systemd_cgls_LDADD = \
2552         libsystemd-internal.la \
2553         libsystemd-shared.la
2554
2555 # ------------------------------------------------------------------------------
2556 systemd_cgtop_SOURCES = \
2557         src/cgtop/cgtop.c
2558
2559 systemd_cgtop_LDADD = \
2560         libsystemd-shared.la
2561
2562 # ------------------------------------------------------------------------------
2563 systemd_nspawn_SOURCES = \
2564         src/nspawn/nspawn.c \
2565         src/core/mount-setup.c \
2566         src/core/mount-setup.h \
2567         src/core/loopback-setup.c \
2568         src/core/loopback-setup.h
2569
2570 systemd_nspawn_CFLAGS = \
2571         $(AM_CFLAGS) \
2572         $(SECCOMP_CFLAGS) \
2573         $(BLKID_CFLAGS)
2574
2575 systemd_nspawn_LDADD = \
2576         libsystemd-label.la \
2577         libsystemd-internal.la \
2578         libudev-internal.la \
2579         libsystemd-shared.la \
2580         $(BLKID_LIBS)
2581
2582 if HAVE_SECCOMP
2583 systemd_nspawn_LDADD += \
2584         libsystemd-seccomp.la \
2585         $(SECCOMP_LIBS)
2586 endif
2587
2588 # ------------------------------------------------------------------------------
2589 systemd_run_SOURCES = \
2590         src/run/run.c
2591
2592 systemd_run_LDADD = \
2593         libsystemd-label.la \
2594         libsystemd-internal.la \
2595         libsystemd-shared.la
2596
2597 # ------------------------------------------------------------------------------
2598 systemd_bus_proxyd_SOURCES = \
2599         src/bus-proxyd/bus-proxyd.c \
2600         src/bus-proxyd/bus-xml-policy.c \
2601         src/bus-proxyd/bus-xml-policy.h
2602
2603 systemd_bus_proxyd_LDADD = \
2604         libsystemd-internal.la \
2605         libsystemd-shared.la
2606
2607 bus-proxyd-install-hook:
2608         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
2609         $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2610         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
2611
2612 bus-proxyd-uninstall-hook:
2613         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2614
2615 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
2616 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
2617
2618 if ENABLE_KDBUS
2619 nodist_systemunit_DATA += \
2620         units/systemd-bus-proxyd@.service
2621
2622 dist_systemunit_DATA += \
2623         units/systemd-bus-proxyd.socket
2624
2625 nodist_userunit_DATA += \
2626         units/user/systemd-bus-proxyd@.service
2627
2628 dist_userunit_DATA += \
2629         units/user/systemd-bus-proxyd.socket
2630 endif
2631
2632 EXTRA_DIST += \
2633         units/systemd-bus-proxyd@.service.m4.in \
2634         units/user/systemd-bus-proxyd@.service.in
2635
2636 CLEANFILES += \
2637         units/systemd-bus-proxyd@.service.m4
2638
2639 if HAVE_SMACK
2640 bus-proxyd-set-cap-hook:
2641         -$(SETCAP) cap_mac_admin+ei $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd
2642
2643 INSTALL_EXEC_HOOKS += bus-proxyd-set-cap-hook
2644 endif
2645
2646 # ------------------------------------------------------------------------------
2647 systemd_tty_ask_password_agent_SOURCES = \
2648         src/tty-ask-password-agent/tty-ask-password-agent.c
2649
2650 systemd_tty_ask_password_agent_LDADD = \
2651         libsystemd-label.la \
2652         libsystemd-shared.la
2653
2654 # ------------------------------------------------------------------------------
2655 libsystemd_internal_la_SOURCES = \
2656         src/systemd/sd-bus.h \
2657         src/systemd/sd-bus-protocol.h \
2658         src/systemd/sd-bus-vtable.h \
2659         src/systemd/sd-utf8.h \
2660         src/systemd/sd-event.h \
2661         src/systemd/sd-rtnl.h \
2662         src/systemd/sd-resolve.h \
2663         src/systemd/sd-login.h \
2664         src/systemd/sd-id128.h \
2665         src/systemd/sd-daemon.h \
2666         src/systemd/sd-path.h \
2667         src/systemd/sd-network.h \
2668         src/systemd/sd-hwdb.h \
2669         src/libsystemd/sd-bus/sd-bus.c \
2670         src/libsystemd/sd-bus/bus-control.c \
2671         src/libsystemd/sd-bus/bus-control.h \
2672         src/libsystemd/sd-bus/bus-error.c \
2673         src/libsystemd/sd-bus/bus-error.h \
2674         src/libsystemd/sd-bus/bus-common-errors.h \
2675         src/libsystemd/sd-bus/bus-common-errors.c \
2676         src/libsystemd/sd-bus/bus-internal.c \
2677         src/libsystemd/sd-bus/bus-internal.h \
2678         src/libsystemd/sd-bus/bus-socket.c \
2679         src/libsystemd/sd-bus/bus-socket.h \
2680         src/libsystemd/sd-bus/bus-kernel.c \
2681         src/libsystemd/sd-bus/bus-kernel.h \
2682         src/libsystemd/sd-bus/bus-container.c \
2683         src/libsystemd/sd-bus/bus-container.h \
2684         src/libsystemd/sd-bus/bus-message.c \
2685         src/libsystemd/sd-bus/bus-message.h \
2686         src/libsystemd/sd-bus/bus-creds.c \
2687         src/libsystemd/sd-bus/bus-creds.h \
2688         src/libsystemd/sd-bus/bus-signature.c \
2689         src/libsystemd/sd-bus/bus-signature.h \
2690         src/libsystemd/sd-bus/bus-type.c \
2691         src/libsystemd/sd-bus/bus-type.h \
2692         src/libsystemd/sd-bus/bus-match.c \
2693         src/libsystemd/sd-bus/bus-match.h \
2694         src/libsystemd/sd-bus/bus-bloom.c \
2695         src/libsystemd/sd-bus/bus-bloom.h \
2696         src/libsystemd/sd-bus/bus-introspect.c \
2697         src/libsystemd/sd-bus/bus-introspect.h \
2698         src/libsystemd/sd-bus/bus-objects.c \
2699         src/libsystemd/sd-bus/bus-objects.h \
2700         src/libsystemd/sd-bus/bus-gvariant.c \
2701         src/libsystemd/sd-bus/bus-gvariant.h \
2702         src/libsystemd/sd-bus/bus-convenience.c \
2703         src/libsystemd/sd-bus/bus-track.c \
2704         src/libsystemd/sd-bus/bus-track.h \
2705         src/libsystemd/sd-bus/bus-util.c \
2706         src/libsystemd/sd-bus/bus-util.h \
2707         src/libsystemd/sd-bus/bus-slot.c \
2708         src/libsystemd/sd-bus/bus-slot.h \
2709         src/libsystemd/sd-bus/bus-protocol.h \
2710         src/libsystemd/sd-bus/kdbus.h \
2711         src/libsystemd/sd-utf8/sd-utf8.c \
2712         src/libsystemd/sd-event/sd-event.c \
2713         src/libsystemd/sd-event/event-util.h \
2714         src/libsystemd/sd-rtnl/sd-rtnl.c \
2715         src/libsystemd/sd-rtnl/rtnl-internal.h \
2716         src/libsystemd/sd-rtnl/rtnl-message.c \
2717         src/libsystemd/sd-rtnl/rtnl-types.h \
2718         src/libsystemd/sd-rtnl/rtnl-types.c \
2719         src/libsystemd/sd-rtnl/rtnl-util.h \
2720         src/libsystemd/sd-rtnl/rtnl-util.c \
2721         src/libsystemd/sd-rtnl/local-addresses.h \
2722         src/libsystemd/sd-rtnl/local-addresses.c \
2723         src/libsystemd/sd-id128/sd-id128.c \
2724         src/libsystemd/sd-daemon/sd-daemon.c \
2725         src/libsystemd/sd-login/sd-login.c \
2726         src/libsystemd/sd-path/sd-path.c \
2727         src/libsystemd/sd-network/sd-network.c \
2728         src/libsystemd/sd-network/network-util.h \
2729         src/libsystemd/sd-network/network-util.c \
2730         src/libsystemd/sd-hwdb/sd-hwdb.c \
2731         src/libsystemd/sd-hwdb/hwdb-util.h \
2732         src/libsystemd/sd-hwdb/hwdb-internal.h
2733
2734 nodist_libsystemd_internal_la_SOURCES = \
2735         src/libsystemd/libsystemd.sym
2736
2737 libsystemd_internal_la_CFLAGS = \
2738         $(AM_CFLAGS) \
2739         -pthread
2740
2741 libsystemd_internal_la_LIBADD = \
2742         $(RT_LIBS)
2743
2744 libsystemd_resolve_la_SOURCES = \
2745         src/libsystemd/sd-resolve/sd-resolve.c \
2746         src/libsystemd/sd-resolve/resolve-util.h
2747
2748 libsystemd_resolve_la_CFLAGS = \
2749         $(AM_CFLAGS) \
2750         -pthread
2751
2752 libsystemd_resolve_la_LIBADD = \
2753         -lresolv
2754
2755 noinst_LTLIBRARIES += \
2756         libsystemd-internal.la \
2757         libsystemd-resolve.la
2758
2759 libsystemd_dump_la_SOURCES = \
2760         src/libsystemd/sd-bus/bus-dump.c \
2761         src/libsystemd/sd-bus/bus-dump.h
2762
2763 noinst_LTLIBRARIES += \
2764         libsystemd-dump.la
2765
2766 EXTRA_DIST += \
2767         src/libsystemd/libsystemd.sym.m4 \
2768         src/libsystemd/libsystemd.pc.in \
2769         src/libsystemd/sd-bus/DIFFERENCES \
2770         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2771
2772 CLEANFILES += \
2773         src/libsystemd/libsystemd.sym
2774
2775 BUILT_SOURCES += \
2776         src/libsystemd/libsystemd.sym
2777
2778 libsystemd_la_SOURCES = \
2779         $(libsystemd_internal_la_SOURCES) \
2780         $(libsystemd_resolve_la_SOURCES) \
2781         $(libsystemd_journal_internal_la_SOURCES)
2782
2783 nodist_libsystemd_la_SOURCES = \
2784         $(nodist_libsystemd_internal_la_SOURCES)
2785
2786 libsystemd_la_CFLAGS = \
2787         $(libsystemd_internal_la_CFLAGS) \
2788         $(libsystemd_resolve_la_CFLAGS) \
2789         $(libsystemd_journal_internal_la_CFLAGS)
2790
2791 libsystemd_la_LDFLAGS = \
2792         $(AM_LDFLAGS) \
2793         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2794         -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2795
2796 libsystemd_la_LIBADD = \
2797         libsystemd-shared.la \
2798         $(libsystemd_internal_la_LIBADD) \
2799         $(libsystemd_journal_internal_la_LIBADD) \
2800         $(libsystemd_resolve_la_LIBADD)
2801
2802 libsystemd-install-hook:
2803         libname=libsystemd.so && $(move-to-rootlibdir)
2804
2805 libsystemd-uninstall-hook:
2806         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2807
2808 INSTALL_EXEC_HOOKS += libsystemd-install-hook
2809 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2810
2811 pkgconfiglib_DATA += \
2812         src/libsystemd/libsystemd.pc
2813
2814 pkginclude_HEADERS += \
2815         src/systemd/sd-login.h \
2816         src/systemd/sd-id128.h \
2817         src/systemd/sd-daemon.h
2818
2819 if ENABLE_KDBUS
2820 pkginclude_HEADERS += \
2821         src/systemd/sd-bus.h \
2822         src/systemd/sd-bus-protocol.h \
2823         src/systemd/sd-bus-vtable.h \
2824         src/systemd/sd-utf8.h \
2825         src/systemd/sd-event.h \
2826         src/systemd/sd-rtnl.h \
2827         src/systemd/sd-resolve.h \
2828         src/systemd/sd-path.h
2829 endif
2830
2831 lib_LTLIBRARIES += \
2832         libsystemd.la
2833
2834 tests += \
2835         test-bus-marshal \
2836         test-bus-signature \
2837         test-bus-chat \
2838         test-bus-cleanup \
2839         test-bus-server \
2840         test-bus-match \
2841         test-bus-kernel \
2842         test-bus-kernel-bloom \
2843         test-bus-kernel-benchmark \
2844         test-bus-zero-copy \
2845         test-bus-introspect \
2846         test-bus-objects \
2847         test-bus-error \
2848         test-bus-creds \
2849         test-bus-gvariant \
2850         test-event \
2851         test-rtnl \
2852         test-local-addresses \
2853         test-resolve
2854
2855 bin_PROGRAMS += \
2856         busctl
2857
2858 test_bus_marshal_SOURCES = \
2859         src/libsystemd/sd-bus/test-bus-marshal.c
2860
2861 test_bus_marshal_LDADD = \
2862         libsystemd-dump.la \
2863         libsystemd-internal.la \
2864         libsystemd-shared.la \
2865         $(GLIB_LIBS) \
2866         $(DBUS_LIBS)
2867
2868 test_bus_marshal_CFLAGS = \
2869         $(AM_CFLAGS) \
2870         $(GLIB_CFLAGS) \
2871         $(DBUS_CFLAGS)
2872
2873 test_bus_signature_SOURCES = \
2874         src/libsystemd/sd-bus/test-bus-signature.c
2875
2876 test_bus_signature_LDADD = \
2877         libsystemd-internal.la \
2878         libsystemd-shared.la
2879
2880 test_bus_chat_SOURCES = \
2881         src/libsystemd/sd-bus/test-bus-chat.c
2882
2883 test_bus_chat_CFLAGS = \
2884         $(AM_CFLAGS) \
2885         -pthread
2886
2887 test_bus_chat_LDADD = \
2888         libsystemd-internal.la \
2889         libsystemd-shared.la
2890
2891 test_bus_cleanup_SOURCES = \
2892         src/libsystemd/sd-bus/test-bus-cleanup.c
2893
2894 test_bus_cleanup_CFLAGS = \
2895         $(AM_CFLAGS) \
2896         $(SECCOMP_CFLAGS)
2897
2898 test_bus_cleanup_LDADD = \
2899         libsystemd-internal.la \
2900         libsystemd-shared.la
2901
2902 test_bus_server_SOURCES = \
2903         src/libsystemd/sd-bus/test-bus-server.c
2904
2905 test_bus_server_CFLAGS = \
2906         $(AM_CFLAGS) \
2907         -pthread
2908
2909 test_bus_server_LDADD = \
2910         libsystemd-internal.la \
2911         libsystemd-shared.la
2912
2913 test_bus_objects_SOURCES = \
2914         src/libsystemd/sd-bus/test-bus-objects.c
2915
2916 test_bus_objects_CFLAGS = \
2917         $(AM_CFLAGS) \
2918         -pthread
2919
2920 test_bus_objects_LDADD = \
2921         libsystemd-dump.la \
2922         libsystemd-internal.la \
2923         libsystemd-shared.la
2924
2925 test_bus_error_SOURCES = \
2926         src/libsystemd/sd-bus/test-bus-error.c
2927
2928 test_bus_error_LDADD = \
2929         libsystemd-internal.la \
2930         libsystemd-shared.la
2931
2932 test_bus_gvariant_SOURCES = \
2933         src/libsystemd/sd-bus/test-bus-gvariant.c
2934
2935 test_bus_gvariant_LDADD = \
2936         libsystemd-dump.la \
2937         libsystemd-internal.la \
2938         libsystemd-shared.la \
2939         $(GLIB_LIBS)
2940
2941 test_bus_gvariant_CFLAGS = \
2942         $(AM_CFLAGS) \
2943         $(GLIB_CFLAGS)
2944
2945 test_bus_creds_SOURCES = \
2946         src/libsystemd/sd-bus/test-bus-creds.c
2947
2948 test_bus_creds_LDADD = \
2949         libsystemd-dump.la \
2950         libsystemd-internal.la \
2951         libsystemd-shared.la
2952
2953 test_bus_match_SOURCES = \
2954         src/libsystemd/sd-bus/test-bus-match.c
2955
2956 test_bus_match_LDADD = \
2957         libsystemd-internal.la \
2958         libsystemd-shared.la
2959
2960 test_bus_kernel_SOURCES = \
2961         src/libsystemd/sd-bus/test-bus-kernel.c
2962
2963 test_bus_kernel_LDADD = \
2964         libsystemd-dump.la \
2965         libsystemd-internal.la \
2966         libsystemd-shared.la
2967
2968 test_bus_kernel_bloom_SOURCES = \
2969         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2970
2971 test_bus_kernel_bloom_LDADD = \
2972         libsystemd-internal.la \
2973         libsystemd-shared.la
2974
2975 test_bus_kernel_benchmark_SOURCES = \
2976         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2977
2978 test_bus_kernel_benchmark_LDADD = \
2979         libsystemd-internal.la \
2980         libsystemd-shared.la
2981
2982 test_bus_zero_copy_SOURCES = \
2983         src/libsystemd/sd-bus/test-bus-zero-copy.c
2984
2985 test_bus_zero_copy_LDADD = \
2986         libsystemd-dump.la \
2987         libsystemd-internal.la \
2988         libsystemd-shared.la
2989
2990 test_bus_introspect_SOURCES = \
2991         src/libsystemd/sd-bus/test-bus-introspect.c
2992
2993 test_bus_introspect_LDADD = \
2994         libsystemd-internal.la \
2995         libsystemd-shared.la
2996
2997 test_event_SOURCES = \
2998         src/libsystemd/sd-event/test-event.c
2999
3000 test_event_LDADD = \
3001         libsystemd-internal.la \
3002         libsystemd-shared.la
3003
3004 test_rtnl_SOURCES = \
3005         src/libsystemd/sd-rtnl/test-rtnl.c
3006
3007 test_rtnl_LDADD = \
3008         libsystemd-internal.la \
3009         libsystemd-shared.la
3010
3011 test_local_addresses_SOURCES = \
3012         src/libsystemd/sd-rtnl/test-local-addresses.c
3013
3014 test_local_addresses_LDADD = \
3015         libsystemd-internal.la \
3016         libsystemd-shared.la
3017
3018 test_resolve_SOURCES = \
3019         src/libsystemd/sd-resolve/test-resolve.c
3020
3021 test_resolve_LDADD = \
3022         libsystemd-resolve.la \
3023         libsystemd-internal.la \
3024         libsystemd-shared.la
3025
3026 test_resolve_CFLAGS = \
3027         $(AM_CFLAGS) \
3028         -pthread
3029
3030 busctl_SOURCES = \
3031         src/libsystemd/sd-bus/busctl.c \
3032         src/libsystemd/sd-bus/busctl-introspect.c \
3033         src/libsystemd/sd-bus/busctl-introspect.h
3034
3035 busctl_LDADD = \
3036         libsystemd-dump.la \
3037         libsystemd-internal.la \
3038         libsystemd-shared.la
3039
3040 # ------------------------------------------------------------------------------
3041 noinst_LTLIBRARIES += \
3042         libsystemd-network.la
3043
3044 libsystemd_network_la_CFLAGS = \
3045         $(AM_CFLAGS) \
3046         $(KMOD_CFLAGS)
3047
3048 libsystemd_network_la_SOURCES = \
3049         src/systemd/sd-dhcp-client.h \
3050         src/systemd/sd-dhcp-server.h \
3051         src/systemd/sd-dhcp-lease.h \
3052         src/systemd/sd-ipv4ll.h \
3053         src/systemd/sd-icmp6-nd.h \
3054         src/systemd/sd-dhcp6-client.h \
3055         src/systemd/sd-dhcp6-lease.h \
3056         src/systemd/sd-pppoe.h \
3057         src/libsystemd-network/sd-dhcp-client.c \
3058         src/libsystemd-network/sd-dhcp-server.c \
3059         src/libsystemd-network/dhcp-network.c \
3060         src/libsystemd-network/dhcp-option.c \
3061         src/libsystemd-network/dhcp-packet.c \
3062         src/libsystemd-network/dhcp-internal.h \
3063         src/libsystemd-network/dhcp-server-internal.h \
3064         src/libsystemd-network/dhcp-protocol.h \
3065         src/libsystemd-network/dhcp-lease-internal.h \
3066         src/libsystemd-network/sd-dhcp-lease.c \
3067         src/libsystemd-network/sd-ipv4ll.c \
3068         src/libsystemd-network/ipv4ll-network.c \
3069         src/libsystemd-network/ipv4ll-packet.c \
3070         src/libsystemd-network/ipv4ll-internal.h \
3071         src/libsystemd-network/sd-pppoe.c \
3072         src/libsystemd-network/network-internal.c \
3073         src/libsystemd-network/network-internal.h \
3074         src/libsystemd-network/sd-icmp6-nd.c \
3075         src/libsystemd-network/sd-dhcp6-client.c \
3076         src/libsystemd-network/dhcp6-internal.h \
3077         src/libsystemd-network/dhcp6-protocol.h \
3078         src/libsystemd-network/dhcp6-network.c \
3079         src/libsystemd-network/dhcp6-option.c \
3080         src/libsystemd-network/dhcp6-lease-internal.h \
3081         src/libsystemd-network/sd-dhcp6-lease.c \
3082         src/libsystemd-network/lldp.h \
3083         src/libsystemd-network/lldp-tlv.h \
3084         src/libsystemd-network/lldp-tlv.c \
3085         src/libsystemd-network/lldp-network.h \
3086         src/libsystemd-network/lldp-network.c \
3087         src/libsystemd-network/lldp-port.h \
3088         src/libsystemd-network/lldp-port.c \
3089         src/libsystemd-network/lldp-internal.h \
3090         src/libsystemd-network/lldp-internal.c \
3091         src/libsystemd-network/lldp-util.h \
3092         src/libsystemd-network/sd-lldp.h \
3093         src/libsystemd-network/sd-lldp.c
3094
3095 libsystemd_network_la_LIBADD = \
3096         libudev-internal.la \
3097         libsystemd-label.la \
3098         libsystemd-internal.la \
3099         libsystemd-shared.la \
3100         $(KMOD_LIBS)
3101
3102 test_dhcp_option_SOURCES = \
3103         src/libsystemd-network/dhcp-protocol.h \
3104         src/libsystemd-network/dhcp-internal.h \
3105         src/libsystemd-network/test-dhcp-option.c
3106
3107 test_dhcp_option_LDADD = \
3108         libsystemd-network.la \
3109         libsystemd-internal.la \
3110         libsystemd-shared.la
3111
3112 test_dhcp_client_SOURCES = \
3113         src/systemd/sd-dhcp-client.h \
3114         src/libsystemd-network/dhcp-protocol.h \
3115         src/libsystemd-network/dhcp-internal.h \
3116         src/libsystemd-network/test-dhcp-client.c
3117
3118 test_dhcp_client_LDADD = \
3119         libsystemd-network.la \
3120         libsystemd-label.la \
3121         libsystemd-internal.la \
3122         libsystemd-shared.la
3123
3124 test_dhcp_server_SOURCES = \
3125         src/libsystemd-network/test-dhcp-server.c
3126
3127 test_dhcp_server_LDADD = \
3128         libsystemd-network.la \
3129         libsystemd-internal.la \
3130         libsystemd-shared.la
3131
3132 test_ipv4ll_SOURCES = \
3133         src/systemd/sd-ipv4ll.h \
3134         src/libsystemd-network/ipv4ll-internal.h \
3135         src/libsystemd-network/test-ipv4ll.c
3136
3137 test_ipv4ll_LDADD = \
3138         libsystemd-network.la \
3139         libsystemd-label.la \
3140         libsystemd-internal.la \
3141         libsystemd-shared.la
3142
3143 test_pppoe_SOURCES = \
3144         src/systemd/sd-pppoe.h \
3145         src/libsystemd-network/test-pppoe.c
3146
3147 test_pppoe_LDADD = \
3148         libsystemd-network.la \
3149         libsystemd-shared.la
3150
3151 test_icmp6_rs_SOURCES = \
3152         src/systemd/sd-dhcp6-client.h \
3153         src/systemd/sd-icmp6-nd.h \
3154         src/libsystemd-network/dhcp6-internal.h \
3155         src/libsystemd-network/test-icmp6-rs.c
3156
3157 test_icmp6_rs_LDADD = \
3158         libsystemd-network.la \
3159         libsystemd-internal.la \
3160         libsystemd-shared.la
3161
3162 test_dhcp6_client_SOURCES = \
3163         src/systemd/sd-dhcp6-client.h \
3164         src/libsystemd-network/dhcp6-internal.h \
3165         src/libsystemd-network/test-dhcp6-client.c
3166
3167 test_dhcp6_client_LDADD = \
3168         libsystemd-network.la \
3169         libsystemd-internal.la \
3170         libsystemd-shared.la
3171
3172 test_lldp_SOURCES = \
3173        src/libsystemd-network/lldp.h \
3174        src/libsystemd-network/lldp-tlv.h \
3175        src/libsystemd-network/lldp-tlv.c \
3176        src/libsystemd-network/test-lldp.c
3177
3178 test_lldp_LDADD = \
3179         libsystemd-network.la \
3180         libsystemd-internal.la \
3181         libsystemd-shared.la
3182
3183 tests += \
3184         test-dhcp-option \
3185         test-dhcp-client \
3186         test-dhcp-server \
3187         test-ipv4ll \
3188         test-icmp6-rs \
3189         test-dhcp6-client \
3190         test-lldp
3191
3192 manual_tests += \
3193         test-pppoe
3194
3195 # ------------------------------------------------------------------------------
3196 if ENABLE_TERMINAL
3197 noinst_LTLIBRARIES += \
3198         libsystemd-terminal.la
3199
3200 rootlibexec_PROGRAMS += \
3201         systemd-consoled
3202
3203 noinst_PROGRAMS += \
3204         systemd-evcat \
3205         systemd-modeset \
3206         systemd-subterm
3207
3208 dist_pkgdata_DATA += \
3209         src/libsystemd-terminal/unifont-glyph-array.bin
3210
3211 nodist_userunit_DATA += \
3212         units/user/systemd-consoled.service
3213
3214 USER_DEFAULT_TARGET_WANTS += \
3215         systemd-consoled.service
3216
3217 tests += \
3218         test-term-page \
3219         test-term-parser \
3220         test-unifont
3221 endif
3222
3223 EXTRA_DIST += \
3224         units/user/systemd-consoled.service.in
3225
3226 libsystemd_terminal_la_CFLAGS = \
3227         $(AM_CFLAGS) \
3228         $(TERMINAL_CFLAGS)
3229
3230 libsystemd_terminal_la_SOURCES = \
3231         src/libsystemd-terminal/grdev.h \
3232         src/libsystemd-terminal/grdev-internal.h \
3233         src/libsystemd-terminal/grdev.c \
3234         src/libsystemd-terminal/grdev-drm.c \
3235         src/libsystemd-terminal/idev.h \
3236         src/libsystemd-terminal/idev-internal.h \
3237         src/libsystemd-terminal/idev.c \
3238         src/libsystemd-terminal/idev-evdev.c \
3239         src/libsystemd-terminal/idev-keyboard.c \
3240         src/libsystemd-terminal/sysview.h \
3241         src/libsystemd-terminal/sysview-internal.h \
3242         src/libsystemd-terminal/sysview.c \
3243         src/libsystemd-terminal/term.h \
3244         src/libsystemd-terminal/term-internal.h \
3245         src/libsystemd-terminal/term-charset.c \
3246         src/libsystemd-terminal/term-page.c \
3247         src/libsystemd-terminal/term-parser.c \
3248         src/libsystemd-terminal/term-screen.c \
3249         src/libsystemd-terminal/term-wcwidth.c \
3250         src/libsystemd-terminal/unifont.h \
3251         src/libsystemd-terminal/unifont-def.h \
3252         src/libsystemd-terminal/unifont.c
3253
3254 libsystemd_terminal_la_LIBADD = \
3255         libudev-internal.la \
3256         libsystemd-internal.la \
3257         libsystemd-shared.la \
3258         $(TERMINAL_LIBS)
3259
3260 systemd_consoled_CFLAGS = \
3261         $(AM_CFLAGS) \
3262         $(TERMINAL_CFLAGS)
3263
3264 systemd_consoled_SOURCES = \
3265         src/console/consoled.h \
3266         src/console/consoled.c \
3267         src/console/consoled-display.c \
3268         src/console/consoled-manager.c \
3269         src/console/consoled-session.c \
3270         src/console/consoled-terminal.c \
3271         src/console/consoled-workspace.c
3272
3273 systemd_consoled_LDADD = \
3274         libsystemd-terminal.la \
3275         libsystemd-internal.la \
3276         libsystemd-shared.la \
3277         $(TERMINAL_LIBS)
3278
3279 systemd_evcat_CFLAGS = \
3280         $(AM_CFLAGS) \
3281         $(TERMINAL_CFLAGS)
3282
3283 systemd_evcat_SOURCES = \
3284         src/libsystemd-terminal/evcat.c
3285
3286 systemd_evcat_LDADD = \
3287         libsystemd-terminal.la \
3288         libsystemd-internal.la \
3289         libsystemd-shared.la \
3290         $(TERMINAL_LIBS)
3291
3292 systemd_modeset_CFLAGS = \
3293         $(AM_CFLAGS) \
3294         $(TERMINAL_CFLAGS)
3295
3296 systemd_modeset_SOURCES = \
3297         src/libsystemd-terminal/modeset.c
3298
3299 systemd_modeset_LDADD = \
3300         libsystemd-terminal.la \
3301         libsystemd-internal.la \
3302         libsystemd-shared.la \
3303         $(TERMINAL_LIBS)
3304
3305 systemd_subterm_SOURCES = \
3306         src/libsystemd-terminal/subterm.c
3307
3308 systemd_subterm_LDADD = \
3309         libsystemd-terminal.la \
3310         libsystemd-internal.la \
3311         libsystemd-shared.la
3312
3313 test_term_page_SOURCES = \
3314         src/libsystemd-terminal/test-term-page.c
3315
3316 test_term_page_LDADD = \
3317         libsystemd-terminal.la \
3318         libsystemd-internal.la \
3319         libsystemd-shared.la
3320
3321 test_term_parser_SOURCES = \
3322         src/libsystemd-terminal/test-term-parser.c
3323
3324 test_term_parser_LDADD = \
3325         libsystemd-terminal.la \
3326         libsystemd-internal.la \
3327         libsystemd-shared.la
3328
3329 test_unifont_SOURCES = \
3330         src/libsystemd-terminal/test-unifont.c
3331
3332 test_unifont_LDADD = \
3333         libsystemd-terminal.la \
3334         libsystemd-internal.la \
3335         libsystemd-shared.la
3336
3337 .PHONY: update-unifont
3338 update-unifont: tools/compile-unifont.py
3339         $(AM_V_GEN)$(PYTHON) $< \
3340                 <$(top_srcdir)/src/libsystemd-terminal/unifont.hex \
3341                 >$(top_srcdir)/src/libsystemd-terminal/unifont-glyph-array.bin
3342         @echo "unifont-glyph-array.bin has been regenerated"
3343
3344 # ------------------------------------------------------------------------------
3345 if ENABLE_GTK_DOC
3346 SUBDIRS += \
3347         docs/libudev
3348
3349 noinst_DATA += \
3350         docs/html/libudev \
3351         docs/html/gudev
3352 endif
3353
3354 include_HEADERS += \
3355         src/libudev/libudev.h
3356
3357 lib_LTLIBRARIES += \
3358         libudev.la
3359
3360 libudev_la_SOURCES =\
3361         src/libudev/libudev.sym \
3362         src/libudev/libudev-private.h \
3363         src/libudev/libudev.c \
3364         src/libudev/libudev-list.c \
3365         src/libudev/libudev-util.c \
3366         src/libudev/libudev-device.c \
3367         src/libudev/libudev-enumerate.c \
3368         src/libudev/libudev-monitor.c \
3369         src/libudev/libudev-queue.c \
3370         src/libudev/libudev-hwdb.c
3371
3372 libudev_la_CFLAGS = \
3373         $(AM_CFLAGS) \
3374         -fvisibility=hidden
3375
3376 libudev_la_LDFLAGS = \
3377         $(AM_LDFLAGS) \
3378         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3379         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3380
3381 libudev_la_LIBADD = \
3382         libsystemd-internal.la \
3383         libsystemd-shared.la
3384
3385 pkgconfiglib_DATA += \
3386         src/libudev/libudev.pc
3387
3388 EXTRA_DIST += \
3389         src/libudev/libudev.pc.in
3390
3391 CLEANFILES += \
3392         src/libudev/libudev.pc \
3393         docs/html/libudev \
3394         docs/html/gudev
3395
3396 docs/html/libudev:
3397         $(AM_V_at)$(MKDIR_P) $(dir $@)
3398         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
3399
3400 docs/html/gudev:
3401         $(AM_V_at)$(MKDIR_P) $(dir $@)
3402         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
3403
3404 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3405 libudev-install-hook:
3406         libname=libudev.so && $(move-to-rootlibdir)
3407
3408 libudev-uninstall-hook:
3409         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
3410
3411 INSTALL_EXEC_HOOKS += libudev-install-hook
3412 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
3413
3414 # ------------------------------------------------------------------------------
3415 noinst_LTLIBRARIES += \
3416         libudev-internal.la
3417
3418 libudev_internal_la_SOURCES =\
3419         $(libudev_la_SOURCES) \
3420         src/libudev/libudev-device-private.c
3421
3422 libudev_internal_la_CFLAGS = \
3423         $(AM_CFLAGS) \
3424         -fvisibility=default
3425
3426 # ------------------------------------------------------------------------------
3427 INSTALL_DIRS += \
3428         $(sysconfdir)/udev/rules.d
3429
3430 dist_network_DATA = \
3431         network/99-default.link \
3432         network/80-container-host0.network \
3433         network/80-container-ve.network
3434
3435 dist_udevrules_DATA += \
3436         rules/42-usb-hid-pm.rules \
3437         rules/50-udev-default.rules \
3438         rules/60-drm.rules \
3439         rules/60-keyboard.rules \
3440         rules/70-mouse.rules \
3441         rules/60-persistent-storage-tape.rules \
3442         rules/60-persistent-serial.rules \
3443         rules/60-persistent-input.rules \
3444         rules/60-persistent-alsa.rules \
3445         rules/60-persistent-storage.rules \
3446         rules/64-btrfs.rules \
3447         rules/75-net-description.rules \
3448         rules/75-tty-description.rules \
3449         rules/78-sound-card.rules \
3450         rules/80-net-setup-link.rules \
3451         rules/95-udev-late.rules
3452
3453 nodist_udevrules_DATA += \
3454         rules/99-systemd.rules
3455
3456 udevconfdir = $(sysconfdir)/udev
3457 dist_udevconf_DATA = \
3458         src/udev/udev.conf
3459
3460 sharepkgconfigdir = $(datadir)/pkgconfig
3461 sharepkgconfig_DATA = \
3462         src/udev/udev.pc
3463
3464 EXTRA_DIST += \
3465         rules/99-systemd.rules.in \
3466         src/udev/udev.pc.in
3467
3468 CLEANFILES += \
3469         rules/99-systemd.rules \
3470         src/udev/udev.pc
3471
3472 EXTRA_DIST += \
3473         units/systemd-udevd.service.in \
3474         units/systemd-udev-trigger.service.in \
3475         units/systemd-udev-settle.service.in
3476
3477 CLEANFILES += \
3478         units/systemd-udevd.service \
3479         units/systemd-udev-trigger.service \
3480         units/systemd-udev-settle.service
3481
3482 SOCKETS_TARGET_WANTS += \
3483         systemd-udevd-control.socket \
3484         systemd-udevd-kernel.socket
3485
3486 SYSINIT_TARGET_WANTS += \
3487         systemd-udevd.service \
3488         systemd-udev-trigger.service
3489
3490 rootbin_PROGRAMS += \
3491         udevadm
3492
3493 rootlibexec_PROGRAMS += \
3494         systemd-udevd
3495
3496 noinst_LTLIBRARIES += \
3497         libudev-core.la
3498
3499 src/udev/keyboard-keys.txt:
3500         $(AM_V_at)$(MKDIR_P) $(dir $@)
3501         $(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/' > $@
3502
3503 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
3504         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3505
3506 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3507         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3508
3509 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
3510         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
3511
3512 libudev_core_la_SOURCES = \
3513         src/udev/udev.h \
3514         src/udev/udev-event.c \
3515         src/udev/udev-watch.c \
3516         src/udev/udev-node.c \
3517         src/udev/udev-rules.c \
3518         src/udev/udev-ctrl.c \
3519         src/udev/udev-builtin.c \
3520         src/udev/udev-builtin-btrfs.c \
3521         src/udev/udev-builtin-hwdb.c \
3522         src/udev/udev-builtin-input_id.c \
3523         src/udev/udev-builtin-keyboard.c \
3524         src/udev/udev-builtin-net_id.c \
3525         src/udev/udev-builtin-net_setup_link.c \
3526         src/udev/udev-builtin-path_id.c \
3527         src/udev/udev-builtin-usb_id.c \
3528         src/udev/net/link-config.h \
3529         src/udev/net/link-config.c \
3530         src/udev/net/ethtool-util.h \
3531         src/udev/net/ethtool-util.c
3532
3533 nodist_libudev_core_la_SOURCES = \
3534         src/udev/keyboard-keys-from-name.h \
3535         src/udev/keyboard-keys-to-name.h \
3536         src/udev/net/link-config-gperf.c
3537
3538 BUILT_SOURCES += \
3539         $(nodist_libudev_core_la_SOURCES)
3540
3541 CLEANFILES += \
3542         src/udev/keyboard-keys-from-name.gperf \
3543         src/udev/keyboard-keys.txt \
3544         src/udev/net/link-config-gperf.c
3545
3546 EXTRA_DIST += \
3547         src/udev/net/link-config-gperf.gperf
3548
3549 libudev_core_la_CFLAGS = \
3550         $(AM_CFLAGS) \
3551         $(BLKID_CFLAGS) \
3552         $(KMOD_CFLAGS)
3553
3554 libudev_core_la_LIBADD = \
3555         libudev-internal.la \
3556         libsystemd-label.la \
3557         libsystemd-internal.la \
3558         libsystemd-network.la \
3559         libsystemd-shared.la \
3560         $(BLKID_LIBS) \
3561         $(KMOD_LIBS)
3562
3563 if HAVE_KMOD
3564 libudev_core_la_SOURCES += \
3565         src/udev/udev-builtin-kmod.c
3566
3567 dist_udevrules_DATA += \
3568         rules/80-drivers.rules
3569 endif
3570
3571 if HAVE_BLKID
3572 libudev_core_la_SOURCES += \
3573         src/udev/udev-builtin-blkid.c
3574 endif
3575
3576 if HAVE_ACL
3577 libudev_core_la_SOURCES += \
3578         src/udev/udev-builtin-uaccess.c \
3579         src/login/logind-acl.c \
3580         src/libsystemd/sd-login/sd-login.c \
3581         src/systemd/sd-login.h
3582
3583 libudev_core_la_LIBADD += \
3584         libsystemd-acl.la
3585 endif
3586
3587 systemd_udevd_SOURCES = \
3588         src/udev/udevd.c
3589
3590 systemd_udevd_LDADD = \
3591         libudev-core.la
3592
3593 udevadm_SOURCES = \
3594         src/udev/udevadm.c \
3595         src/udev/udevadm-info.c \
3596         src/udev/udevadm-control.c \
3597         src/udev/udevadm-monitor.c \
3598         src/udev/udevadm-hwdb.c \
3599         src/udev/udevadm-settle.c \
3600         src/udev/udevadm-trigger.c \
3601         src/udev/udevadm-test.c \
3602         src/udev/udevadm-test-builtin.c \
3603         src/udev/udevadm-util.c \
3604         src/udev/udevadm-util.h
3605
3606 udevadm_LDADD = \
3607         libudev-core.la
3608
3609 # ------------------------------------------------------------------------------
3610 if ENABLE_HWDB
3611 INSTALL_DIRS += \
3612         $(sysconfdir)/udev/hwdb.d
3613
3614 systemd_hwdb_SOURCES = \
3615         src/libsystemd/sd-hwdb/hwdb-internal.h \
3616         src/hwdb/hwdb.c
3617
3618 systemd_hwdb_LDADD = \
3619         libsystemd-shared.la \
3620         libsystemd-internal.la \
3621         libudev-internal.la
3622
3623 rootbin_PROGRAMS += \
3624         systemd-hwdb
3625
3626 dist_udevhwdb_DATA = \
3627         hwdb/20-pci-vendor-model.hwdb \
3628         hwdb/20-pci-classes.hwdb \
3629         hwdb/20-usb-vendor-model.hwdb \
3630         hwdb/20-usb-classes.hwdb \
3631         hwdb/20-sdio-vendor-model.hwdb \
3632         hwdb/20-sdio-classes.hwdb \
3633         hwdb/20-bluetooth-vendor-product.hwdb \
3634         hwdb/20-acpi-vendor.hwdb \
3635         hwdb/20-OUI.hwdb \
3636         hwdb/20-net-ifname.hwdb \
3637         hwdb/60-keyboard.hwdb \
3638         hwdb/70-mouse.hwdb
3639
3640 EXTRA_DIST += \
3641         units/systemd-hwdb-update.service.in
3642
3643 CLEANFILES += \
3644         units/systemd-hwdb-update.service
3645
3646 SYSINIT_TARGET_WANTS += \
3647         systemd-hwdb-update.service
3648
3649 # Update hwdb on installation. Do not bother if installing
3650 # in DESTDIR, since this is likely for packaging purposes.
3651 hwdb-update-hook:
3652         -test -n "$(DESTDIR)" || $(rootbindir)/systemd-hwdb update
3653
3654 INSTALL_DATA_HOOKS += \
3655         hwdb-update-hook
3656
3657 hwdb-remove-hook:
3658         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3659 endif
3660
3661 # ------------------------------------------------------------------------------
3662 TESTS += \
3663         test/udev-test.pl \
3664         test/rules-test.sh
3665
3666 manual_tests += \
3667         test-libudev \
3668         test-udev
3669
3670 test_libudev_SOURCES = \
3671         src/test/test-libudev.c
3672
3673 test_libudev_LDADD = \
3674         libsystemd-label.la \
3675         libudev-internal.la \
3676         libsystemd-shared.la \
3677         libsystemd-internal.la
3678
3679 test_udev_SOURCES = \
3680         src/test/test-udev.c
3681
3682 test_udev_LDADD = \
3683         libudev-core.la  \
3684         $(BLKID_LIBS) \
3685         $(KMOD_LIBS) \
3686         $(SELINUX_LIBS)
3687
3688 if HAVE_ACL
3689 test_udev_LDADD += \
3690         libsystemd-acl.la
3691 endif
3692
3693 check_DATA += \
3694         test/sys
3695
3696 # packed sysfs test tree
3697 test/sys:
3698         $(AM_V_at)$(MKDIR_P) $(dir $@)
3699         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
3700
3701 test-sys-distclean:
3702         -rm -rf test/sys
3703 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3704
3705 EXTRA_DIST += \
3706         test/sys.tar.xz \
3707         test/udev-test.pl \
3708         test/rules-test.sh \
3709         test/rule-syntax-check.py
3710
3711 # ------------------------------------------------------------------------------
3712 ata_id_SOURCES = \
3713         src/udev/ata_id/ata_id.c
3714
3715 ata_id_LDADD = \
3716         libudev-internal.la \
3717         libsystemd-shared.la
3718
3719 udevlibexec_PROGRAMS += \
3720         ata_id
3721
3722 # ------------------------------------------------------------------------------
3723 cdrom_id_SOURCES = \
3724         src/udev/cdrom_id/cdrom_id.c
3725
3726 cdrom_id_LDADD = \
3727         libudev-internal.la \
3728         libsystemd-shared.la
3729
3730 udevlibexec_PROGRAMS += \
3731         cdrom_id
3732
3733 dist_udevrules_DATA += \
3734         rules/60-cdrom_id.rules
3735
3736 # ------------------------------------------------------------------------------
3737 collect_SOURCES = \
3738         src/udev/collect/collect.c
3739
3740 collect_LDADD = \
3741         libudev-internal.la \
3742         libsystemd-shared.la
3743
3744 udevlibexec_PROGRAMS += \
3745         collect
3746
3747 # ------------------------------------------------------------------------------
3748 scsi_id_SOURCES =\
3749         src/udev/scsi_id/scsi_id.c \
3750         src/udev/scsi_id/scsi_serial.c \
3751         src/udev/scsi_id/scsi.h \
3752         src/udev/scsi_id/scsi_id.h
3753
3754 scsi_id_LDADD = \
3755         libudev-internal.la \
3756         libsystemd-shared.la
3757
3758 udevlibexec_PROGRAMS += \
3759         scsi_id
3760
3761 EXTRA_DIST += \
3762         src/udev/scsi_id/README
3763
3764 # ------------------------------------------------------------------------------
3765 v4l_id_SOURCES = \
3766         src/udev/v4l_id/v4l_id.c
3767
3768 v4l_id_LDADD = \
3769         libudev-internal.la
3770
3771 udevlibexec_PROGRAMS += \
3772         v4l_id
3773
3774 dist_udevrules_DATA += \
3775         rules/60-persistent-v4l.rules
3776
3777 # ------------------------------------------------------------------------------
3778 accelerometer_SOURCES = \
3779         src/udev/accelerometer/accelerometer.c
3780
3781 accelerometer_LDADD = \
3782         libudev-internal.la -lm \
3783         libsystemd-shared.la
3784
3785 udevlibexec_PROGRAMS += \
3786         accelerometer
3787
3788 dist_udevrules_DATA += \
3789         rules/61-accelerometer.rules
3790
3791 # ------------------------------------------------------------------------------
3792 if ENABLE_GUDEV
3793 if ENABLE_GTK_DOC
3794 SUBDIRS += \
3795         docs/gudev
3796 endif
3797
3798 libgudev_includedir = \
3799         $(includedir)/gudev-1.0/gudev
3800
3801 libgudev_include_HEADERS = \
3802         src/gudev/gudev.h \
3803         src/gudev/gudevenums.h \
3804         src/gudev/gudevenumtypes.h \
3805         src/gudev/gudevtypes.h \
3806         src/gudev/gudevclient.h \
3807         src/gudev/gudevdevice.h \
3808         src/gudev/gudevenumerator.h
3809
3810 lib_LTLIBRARIES += libgudev-1.0.la
3811
3812 pkgconfiglib_DATA += \
3813         src/gudev/gudev-1.0.pc
3814
3815 CLEANFILES += \
3816         src/gudev/gudev-1.0.pc
3817
3818 libgudev_1_0_la_SOURCES = \
3819         src/gudev/libgudev-1.0.sym \
3820         src/gudev/gudevenums.h \
3821         src/gudev/gudevenumtypes.h \
3822         src/gudev/gudevenumtypes.h\
3823         src/gudev/gudevtypes.h \
3824         src/gudev/gudevclient.h \
3825         src/gudev/gudevclient.c \
3826         src/gudev/gudevdevice.h \
3827         src/gudev/gudevdevice.c \
3828         src/gudev/gudevenumerator.h \
3829         src/gudev/gudevenumerator.c \
3830         src/gudev/gudevprivate.h
3831
3832 nodist_libgudev_1_0_la_SOURCES = \
3833         src/gudev/gudevmarshal.h \
3834         src/gudev/gudevmarshal.c \
3835         src/gudev/gudevenumtypes.h \
3836         src/gudev/gudevenumtypes.c
3837
3838 BUILT_SOURCES += \
3839         $(nodist_libgudev_1_0_la_SOURCES)
3840
3841 libgudev_1_0_la_CPPFLAGS = \
3842         $(AM_CPPFLAGS) \
3843         -I$(top_builddir)/src\
3844         -I$(top_srcdir)/src\
3845         -I$(top_builddir)/src/gudev \
3846         -I$(top_srcdir)/src/gudev \
3847         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
3848         -D_GUDEV_COMPILATION \
3849         -DG_LOG_DOMAIN=\"GUdev\"
3850
3851 libgudev_1_0_la_CFLAGS = \
3852         $(AM_CFLAGS) \
3853         -fvisibility=default \
3854         $(GLIB_CFLAGS)
3855
3856 libgudev_1_0_la_LIBADD = \
3857         libudev.la \
3858         $(GLIB_LIBS)
3859
3860 libgudev_1_0_la_LDFLAGS = \
3861         $(AM_LDFLAGS) \
3862         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
3863         -export-dynamic \
3864         -no-undefined \
3865         -Wl,--version-script=$(top_srcdir)/src/gudev/libgudev-1.0.sym
3866
3867 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
3868         $(AM_V_at)$(MKDIR_P) $(dir $@)
3869         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
3870
3871 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
3872         $(AM_V_at)$(MKDIR_P) $(dir $@)
3873         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
3874         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
3875
3876 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
3877         $(AM_V_at)$(MKDIR_P) $(dir $@)
3878         $(AM_V_GEN)glib-mkenums --template $^ > $@
3879
3880 if HAVE_INTROSPECTION
3881 -include $(INTROSPECTION_MAKEFILE)
3882
3883 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
3884
3885 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
3886
3887 src_gudev_GUdev_1_0_gir_CFLAGS = \
3888         $(AM_CFLAGS) \
3889         $(INCLUDES) \
3890         -D_GUDEV_COMPILATION \
3891         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
3892         -I$(top_srcdir)/src \
3893         -I$(top_builddir)/src \
3894         -I$(top_srcdir)/src/gudev \
3895         -I$(top_builddir)/src/gudev
3896
3897 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
3898
3899 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
3900         --pkg-export=gudev-1.0 \
3901         --warn-all
3902
3903 src_gudev_GUdev_1_0_gir_FILES = \
3904         src/gudev/gudev.h \
3905         src/gudev/gudevtypes.h \
3906         src/gudev/gudevenums.h \
3907         src/gudev/gudevenumtypes.h \
3908         src/gudev/gudevclient.h \
3909         src/gudev/gudevdevice.h \
3910         src/gudev/gudevenumerator.h \
3911         src/gudev/gudevclient.c \
3912         src/gudev/gudevdevice.c \
3913         src/gudev/gudevenumerator.c
3914
3915 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
3916 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
3917
3918 girdir = $(datadir)/gir-1.0
3919 gir_DATA = \
3920         src/gudev/GUdev-1.0.gir
3921
3922 typelibsdir = $(libdir)/girepository-1.0
3923 typelibs_DATA = \
3924         src/gudev/GUdev-1.0.typelib
3925
3926 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
3927 endif # HAVE_INTROSPECTION
3928 endif
3929
3930 EXTRA_DIST += \
3931         src/gudev/gudev-1.0.pc.in \
3932         src/gudev/gudevmarshal.list \
3933         src/gudev/gudevenumtypes.h.template \
3934         src/gudev/gudevenumtypes.c.template \
3935         src/gudev/gjs-example.js \
3936         src/gudev/seed-example-enum.js \
3937         src/gudev/seed-example.js
3938
3939 # ------------------------------------------------------------------------------
3940 mtd_probe_SOURCES =  \
3941         src/udev/mtd_probe/mtd_probe.c \
3942         src/udev/mtd_probe/mtd_probe.h \
3943         src/udev/mtd_probe/probe_smartmedia.c
3944
3945 dist_udevrules_DATA += \
3946         rules/75-probe_mtd.rules
3947
3948 udevlibexec_PROGRAMS += \
3949         mtd_probe
3950
3951 # ------------------------------------------------------------------------------
3952 test_id128_SOURCES = \
3953         src/test/test-id128.c
3954
3955 test_id128_LDADD = \
3956         libsystemd-internal.la \
3957         libsystemd-shared.la
3958
3959 tests += \
3960         test-id128
3961
3962 # ------------------------------------------------------------------------------
3963
3964 rootlibexec_PROGRAMS += \
3965         systemd-activate
3966
3967 systemd_activate_SOURCES = \
3968         src/activate/activate.c
3969
3970 systemd_activate_LDADD = \
3971         libsystemd-label.la \
3972         libsystemd-internal.la \
3973         libsystemd-shared.la
3974
3975 # ------------------------------------------------------------------------------
3976 systemd_journald_SOURCES = \
3977         src/journal/journald.c \
3978         src/journal/journald-server.h
3979
3980 systemd_journald_LDADD = \
3981         libsystemd-journal-core.la \
3982         libsystemd-internal.la \
3983         libsystemd-shared.la
3984
3985 systemd_cat_SOURCES = \
3986         src/journal/cat.c
3987
3988 systemd_cat_LDADD = \
3989         libsystemd-journal-core.la
3990
3991 if HAVE_MICROHTTPD
3992 rootlibexec_PROGRAMS += \
3993         systemd-journal-remote
3994
3995 systemd_journal_remote_SOURCES = \
3996         src/journal-remote/journal-remote-parse.h \
3997         src/journal-remote/journal-remote-parse.c \
3998         src/journal-remote/journal-remote-write.h \
3999         src/journal-remote/journal-remote-write.c \
4000         src/journal-remote/journal-remote.h \
4001         src/journal-remote/journal-remote.c
4002
4003 systemd_journal_remote_LDADD = \
4004         libsystemd-internal.la \
4005         libsystemd-journal-core.la
4006
4007 systemd_journal_remote_SOURCES += \
4008         src/journal-remote/microhttpd-util.h \
4009         src/journal-remote/microhttpd-util.c
4010
4011 systemd_journal_remote_CFLAGS = \
4012         $(AM_CFLAGS) \
4013         $(MICROHTTPD_CFLAGS)
4014
4015 systemd_journal_remote_LDADD += \
4016         $(MICROHTTPD_LIBS)
4017
4018 if ENABLE_SYSUSERS
4019 dist_sysusers_DATA += \
4020         sysusers.d/systemd-remote.conf
4021 endif
4022
4023 if ENABLE_TMPFILES
4024 dist_tmpfiles_DATA += \
4025         tmpfiles.d/systemd-remote.conf
4026 endif
4027
4028 if HAVE_GNUTLS
4029 systemd_journal_remote_LDADD += \
4030         $(GNUTLS_LIBS)
4031
4032 # systemd-journal-remote make sense mostly with full crypto stack
4033 dist_systemunit_DATA += \
4034         units/systemd-journal-remote.socket
4035
4036 nodist_systemunit_DATA += \
4037         units/systemd-journal-remote.service
4038
4039 EXTRA_DIST += \
4040         units/systemd-journal-remote.service.in
4041
4042 journal-remote-install-hook: journal-install-hook
4043         -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
4044         -chown 0:0 $(DESTDIR)/var/log/journal/remote
4045         -chmod 755 $(DESTDIR)/var/log/journal/remote
4046
4047 INSTALL_EXEC_HOOKS += journal-remote-install-hook
4048
4049 endif
4050
4051 nodist_pkgsysconf_DATA += \
4052         src/journal-remote/journal-remote.conf
4053
4054 EXTRA_DIST += \
4055         src/journal-remote/journal-remote.conf.in
4056
4057 CLEANFILES += \
4058         src/journal-remote/journal-remote.conf
4059 endif
4060
4061 if HAVE_LIBCURL
4062 rootlibexec_PROGRAMS += \
4063         systemd-journal-upload
4064
4065 systemd_journal_upload_SOURCES = \
4066         src/journal-remote/journal-upload.h \
4067         src/journal-remote/journal-upload.c \
4068         src/journal-remote/journal-upload-journal.c
4069
4070 systemd_journal_upload_CFLAGS = \
4071         $(AM_CFLAGS) \
4072         $(LIBCURL_CFLAGS)
4073
4074 systemd_journal_upload_LDADD = \
4075         libsystemd-internal.la \
4076         libsystemd-journal-internal.la \
4077         libsystemd-shared.la \
4078         $(LIBCURL_LIBS)
4079
4080 nodist_systemunit_DATA += \
4081         units/systemd-journal-upload.service
4082
4083 EXTRA_DIST += \
4084         units/systemd-journal-upload.service.in
4085
4086 nodist_pkgsysconf_DATA += \
4087         src/journal-remote/journal-upload.conf
4088
4089 EXTRA_DIST += \
4090         src/journal-remote/journal-upload.conf.in
4091
4092 CLEANFILES += \
4093         src/journal-remote/journal-upload.conf
4094 endif
4095
4096 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4097 journalctl_CFLAGS = \
4098         $(AM_CFLAGS)
4099
4100 journalctl_SOURCES = \
4101         src/journal/journalctl.c
4102
4103 journalctl_LDADD = \
4104         libsystemd-journal-internal.la \
4105         libsystemd-internal.la \
4106         libsystemd-logs.la \
4107         libsystemd-shared.la
4108
4109 if HAVE_ACL
4110 journalctl_LDADD += \
4111         libsystemd-acl.la
4112 endif
4113
4114 if HAVE_QRENCODE
4115 journalctl_SOURCES += \
4116         src/journal/journal-qrcode.c \
4117         src/journal/journal-qrcode.h
4118
4119 journalctl_CFLAGS += \
4120         $(QRENCODE_CFLAGS)
4121
4122 journalctl_LDADD += \
4123         $(QRENCODE_LIBS)
4124 endif
4125
4126 test_journal_SOURCES = \
4127         src/journal/test-journal.c
4128
4129 test_journal_LDADD = \
4130         libsystemd-journal-core.la
4131
4132 test_journal_send_SOURCES = \
4133         src/journal/test-journal-send.c
4134
4135 test_journal_send_LDADD = \
4136         libsystemd-journal-core.la
4137
4138 test_journal_syslog_SOURCES = \
4139         src/journal/test-journal-syslog.c
4140
4141 test_journal_syslog_LDADD = \
4142         libsystemd-journal-core.la
4143
4144 test_journal_match_SOURCES = \
4145         src/journal/test-journal-match.c
4146
4147 test_journal_match_LDADD = \
4148         libsystemd-journal-core.la
4149
4150 test_journal_enum_SOURCES = \
4151         src/journal/test-journal-enum.c
4152
4153 test_journal_enum_LDADD = \
4154         libsystemd-journal-core.la
4155
4156 test_journal_stream_SOURCES = \
4157         src/journal/test-journal-stream.c
4158
4159 test_journal_stream_LDADD = \
4160         libsystemd-journal-core.la
4161
4162 test_journal_flush_SOURCES = \
4163         src/journal/test-journal-flush.c
4164
4165 test_journal_flush_LDADD = \
4166         libsystemd-journal-core.la
4167
4168 test_journal_init_SOURCES = \
4169         src/journal/test-journal-init.c
4170
4171 test_journal_init_LDADD = \
4172         libsystemd-journal-core.la
4173
4174 test_journal_verify_SOURCES = \
4175         src/journal/test-journal-verify.c
4176
4177 test_journal_verify_LDADD = \
4178         libsystemd-journal-core.la
4179
4180 test_journal_interleaving_SOURCES = \
4181         src/journal/test-journal-interleaving.c
4182
4183 test_journal_interleaving_LDADD = \
4184         libsystemd-journal-core.la
4185
4186 test_mmap_cache_SOURCES = \
4187         src/journal/test-mmap-cache.c
4188
4189 test_mmap_cache_LDADD = \
4190         libsystemd-journal-core.la
4191
4192 test_catalog_SOURCES = \
4193         src/journal/test-catalog.c
4194
4195 test_catalog_CPPFLAGS = \
4196         $(AM_CPPFLAGS) \
4197         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
4198
4199 test_catalog_LDADD = \
4200         libsystemd-journal-core.la
4201
4202 test_compress_SOURCES = \
4203         src/journal/test-compress.c
4204
4205 test_compress_LDADD = \
4206         libsystemd-journal-internal.la \
4207         libsystemd-shared.la
4208
4209 test_compress_benchmark_SOURCES = \
4210         src/journal/test-compress-benchmark.c
4211
4212 test_compress_benchmark_LDADD = \
4213         libsystemd-journal-internal.la \
4214         libsystemd-shared.la
4215
4216 libsystemd_journal_core_la_SOURCES = \
4217         src/journal/journald-kmsg.c \
4218         src/journal/journald-kmsg.h \
4219         src/journal/journald-syslog.c \
4220         src/journal/journald-syslog.h \
4221         src/journal/journald-stream.c \
4222         src/journal/journald-stream.h \
4223         src/journal/journald-server.c \
4224         src/journal/journald-server.h \
4225         src/journal/journald-console.c \
4226         src/journal/journald-console.h \
4227         src/journal/journald-wall.c \
4228         src/journal/journald-wall.h \
4229         src/journal/journald-native.c \
4230         src/journal/journald-native.h \
4231         src/journal/journald-audit.c \
4232         src/journal/journald-audit.h \
4233         src/journal/journald-rate-limit.c \
4234         src/journal/journald-rate-limit.h \
4235         src/journal/journal-internal.h
4236
4237 nodist_libsystemd_journal_core_la_SOURCES = \
4238         src/journal/journald-gperf.c
4239
4240 libsystemd_journal_core_la_LIBADD = \
4241         libsystemd-journal-internal.la \
4242         libudev-internal.la \
4243         libsystemd-label.la \
4244         libsystemd-internal.la \
4245         libsystemd-shared.la
4246
4247 if HAVE_ACL
4248 libsystemd_journal_core_la_LIBADD += \
4249         libsystemd-acl.la
4250 endif
4251
4252 noinst_LTLIBRARIES += \
4253         libsystemd-journal-core.la
4254
4255 journal-install-hook:
4256         -$(MKDIR_P) $(DESTDIR)/var/log/journal
4257         -chown 0:0 $(DESTDIR)/var/log/journal
4258         -chmod 755 $(DESTDIR)/var/log/journal
4259         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4260         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4261
4262 journal-uninstall-hook:
4263         -rmdir $(DESTDIR)/var/log/journal/remote
4264         -rmdir $(DESTDIR)/var/log/journal/
4265
4266 INSTALL_EXEC_HOOKS += journal-install-hook
4267 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4268
4269 # ------------------------------------------------------------------------------
4270 # Update catalog on installation. Do not bother if installing
4271 # in DESTDIR, since this is likely for packaging purposes.
4272 catalog-update-hook:
4273         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4274
4275 INSTALL_DATA_HOOKS += \
4276         catalog-update-hook
4277
4278 catalog-remove-hook:
4279         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4280
4281 UNINSTALL_DATA_HOOKS += \
4282         catalog-remove-hook
4283
4284 manual_tests += \
4285         test-journal-enum
4286
4287 tests += \
4288         test-journal \
4289         test-journal-send \
4290         test-journal-syslog \
4291         test-journal-match \
4292         test-journal-stream \
4293         test-journal-init \
4294         test-journal-verify \
4295         test-journal-interleaving \
4296         test-journal-flush \
4297         test-mmap-cache \
4298         test-catalog
4299
4300 if HAVE_COMPRESSION
4301 tests += \
4302         test-compress \
4303         test-compress-benchmark
4304 endif
4305
4306 pkginclude_HEADERS += \
4307         src/systemd/sd-journal.h \
4308         src/systemd/sd-messages.h \
4309         src/systemd/_sd-common.h
4310
4311 libsystemd_journal_internal_la_SOURCES = \
4312         src/journal/sd-journal.c \
4313         src/systemd/sd-journal.h \
4314         src/systemd/_sd-common.h \
4315         src/journal/journal-file.c \
4316         src/journal/journal-file.h \
4317         src/journal/journal-vacuum.c \
4318         src/journal/journal-vacuum.h \
4319         src/journal/journal-verify.c \
4320         src/journal/journal-verify.h \
4321         src/journal/lookup3.c \
4322         src/journal/lookup3.h \
4323         src/journal/journal-send.c \
4324         src/journal/journal-def.h \
4325         src/journal/compress.h \
4326         src/journal/catalog.c \
4327         src/journal/catalog.h \
4328         src/journal/mmap-cache.c \
4329         src/journal/mmap-cache.h
4330
4331 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4332 libsystemd_journal_internal_la_CFLAGS = \
4333         $(AM_CFLAGS)
4334
4335 libsystemd_journal_internal_la_LIBADD =
4336
4337 libsystemd_journal_internal_la_SOURCES += \
4338         src/journal/compress.c
4339
4340 if HAVE_XZ
4341 libsystemd_journal_internal_la_CFLAGS += \
4342         $(XZ_CFLAGS)
4343
4344 libsystemd_journal_internal_la_LIBADD += \
4345         $(XZ_LIBS)
4346 endif
4347
4348 if HAVE_LZ4
4349 libsystemd_journal_internal_la_LIBADD += \
4350         -llz4
4351 endif
4352
4353 if HAVE_GCRYPT
4354 libsystemd_journal_internal_la_SOURCES += \
4355         src/journal/journal-authenticate.c \
4356         src/journal/journal-authenticate.h \
4357         src/journal/fsprg.c \
4358         src/journal/fsprg.h
4359
4360 libsystemd_journal_internal_la_LIBADD += \
4361         $(GCRYPT_LIBS)
4362
4363 # fsprg.c is a drop-in file using void pointer arithmetic
4364 libsystemd_journal_internal_la_CFLAGS += \
4365         $(GCRYPT_CFLAGS) \
4366         -Wno-pointer-arith
4367 endif
4368
4369 noinst_LTLIBRARIES += \
4370         libsystemd-journal-internal.la
4371
4372 rootlibexec_PROGRAMS += \
4373         systemd-journald
4374
4375 rootbin_PROGRAMS += \
4376         journalctl
4377
4378 bin_PROGRAMS += \
4379         systemd-cat
4380
4381 dist_systemunit_DATA += \
4382         units/systemd-journald.socket \
4383         units/systemd-journald-dev-log.socket \
4384         units/systemd-journald-audit.socket
4385
4386 nodist_systemunit_DATA += \
4387         units/systemd-journald.service \
4388         units/systemd-journal-flush.service \
4389         units/systemd-journal-catalog-update.service
4390
4391 dist_pkgsysconf_DATA += \
4392         src/journal/journald.conf
4393
4394 dist_catalog_DATA = \
4395         catalog/systemd.fr.catalog \
4396         catalog/systemd.it.catalog \
4397         catalog/systemd.pl.catalog \
4398         catalog/systemd.ru.catalog \
4399         catalog/systemd.catalog
4400
4401 SOCKETS_TARGET_WANTS += \
4402         systemd-journald.socket \
4403         systemd-journald-dev-log.socket \
4404         systemd-journald-audit.socket
4405
4406 SYSINIT_TARGET_WANTS += \
4407         systemd-journald.service \
4408         systemd-journal-flush.service \
4409         systemd-journal-catalog-update.service
4410
4411 EXTRA_DIST += \
4412         units/systemd-journald.service.in \
4413         units/systemd-journal-flush.service.in \
4414         units/systemd-journal-catalog-update.service.in \
4415         src/journal/journald-gperf.gperf
4416
4417 CLEANFILES += \
4418         src/journal/journald-gperf.c
4419
4420 # ------------------------------------------------------------------------------
4421 if HAVE_MICROHTTPD
4422 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4423
4424 rootlibexec_PROGRAMS += \
4425         systemd-journal-gatewayd
4426
4427 systemd_journal_gatewayd_SOURCES = \
4428         src/journal-remote/journal-gatewayd.c \
4429         src/journal-remote/microhttpd-util.h \
4430         src/journal-remote/microhttpd-util.c
4431
4432 systemd_journal_gatewayd_LDADD = \
4433         libsystemd-logs.la \
4434         libsystemd-journal-internal.la \
4435         libsystemd-internal.la \
4436         libsystemd-shared.la \
4437         $(MICROHTTPD_LIBS)
4438
4439 if HAVE_GNUTLS
4440 systemd_journal_gatewayd_LDADD += \
4441         $(GNUTLS_LIBS)
4442 endif
4443
4444 systemd_journal_gatewayd_CFLAGS = \
4445         $(AM_CFLAGS) \
4446         $(MICROHTTPD_CFLAGS)
4447
4448 systemd_journal_gatewayd_CPPFLAGS = \
4449         $(AM_CPPFLAGS) \
4450         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4451
4452 dist_systemunit_DATA += \
4453         units/systemd-journal-gatewayd.socket
4454
4455 nodist_systemunit_DATA += \
4456         units/systemd-journal-gatewayd.service
4457
4458 dist_gatewayddocumentroot_DATA = \
4459         src/journal-remote/browse.html
4460
4461 endif
4462
4463 EXTRA_DIST += \
4464         units/systemd-journal-gatewayd.service.in
4465
4466 # ------------------------------------------------------------------------------
4467
4468 systemd_socket_proxyd_SOURCES = \
4469         src/socket-proxy/socket-proxyd.c
4470
4471 systemd_socket_proxyd_LDADD = \
4472         libsystemd-logs.la \
4473         libsystemd-internal.la \
4474         libsystemd-journal-internal.la \
4475         libsystemd-shared.la \
4476         libsystemd-resolve.la
4477
4478 # ------------------------------------------------------------------------------
4479 if ENABLE_COREDUMP
4480 systemd_coredump_SOURCES = \
4481         src/journal/coredump.c \
4482         src/journal/coredump-vacuum.c \
4483         src/journal/coredump-vacuum.h
4484
4485 systemd_coredump_LDADD = \
4486         libsystemd-journal-internal.la \
4487         libsystemd-label.la \
4488         libsystemd-internal.la \
4489         libsystemd-shared.la
4490
4491 if HAVE_ELFUTILS
4492 systemd_coredump_SOURCES += \
4493         src/journal/stacktrace.c \
4494         src/journal/stacktrace.h
4495
4496 systemd_coredump_LDADD += \
4497         $(ELFUTILS_LIBS)
4498 endif
4499
4500 rootlibexec_PROGRAMS += \
4501         systemd-coredump
4502
4503 dist_pkgsysconf_DATA += \
4504         src/journal/coredump.conf
4505
4506 if HAVE_ACL
4507 systemd_coredump_LDADD += \
4508         libsystemd-acl.la
4509 endif
4510
4511 coredumpctl_SOURCES = \
4512         src/journal/coredumpctl.c
4513
4514 coredumpctl_LDADD = \
4515         libsystemd-journal-internal.la \
4516         libsystemd-internal.la \
4517         libsystemd-shared.la
4518
4519 bin_PROGRAMS += \
4520         coredumpctl
4521
4522 manual_tests += \
4523         test-coredump-vacuum
4524
4525 test_coredump_vacuum_SOURCES = \
4526         src/journal/test-coredump-vacuum.c  \
4527         src/journal/coredump-vacuum.c \
4528         src/journal/coredump-vacuum.h
4529
4530 test_coredump_vacuum_LDADD = \
4531         libsystemd-internal.la \
4532         libsystemd-shared.la
4533
4534 dist_bashcompletion_DATA += \
4535         shell-completion/bash/coredumpctl
4536
4537 dist_zshcompletion_DATA += \
4538         shell-completion/zsh/_coredumpctl
4539
4540 sysctl_DATA = \
4541         sysctl.d/50-coredump.conf
4542
4543 CLEANFILES += \
4544         sysctl.d/50-coredump.conf
4545 endif
4546
4547 EXTRA_DIST += \
4548         sysctl.d/50-coredump.conf.in
4549
4550 # ------------------------------------------------------------------------------
4551 if ENABLE_BINFMT
4552 systemd_binfmt_SOURCES = \
4553         src/binfmt/binfmt.c
4554
4555 systemd_binfmt_LDADD = \
4556         libsystemd-shared.la
4557
4558 rootlibexec_PROGRAMS += \
4559         systemd-binfmt
4560
4561 dist_systemunit_DATA += \
4562         units/proc-sys-fs-binfmt_misc.automount \
4563         units/proc-sys-fs-binfmt_misc.mount
4564
4565 nodist_systemunit_DATA += \
4566         units/systemd-binfmt.service
4567
4568 INSTALL_DIRS += \
4569         $(prefix)/lib/binfmt.d \
4570         $(sysconfdir)/binfmt.d
4571
4572 SYSINIT_TARGET_WANTS += \
4573         systemd-binfmt.service \
4574         proc-sys-fs-binfmt_misc.automount
4575