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