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