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