chiark / gitweb /
networkd: split out networkd-link.h
[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         units/ldconfig.service
495
496 nodist_systemunit_DATA = \
497         units/getty@.service \
498         units/serial-getty@.service \
499         units/console-shell.service \
500         units/console-getty.service \
501         units/container-getty@.service \
502         units/systemd-initctl.service \
503         units/systemd-shutdownd.service \
504         units/systemd-remount-fs.service \
505         units/systemd-update-utmp.service \
506         units/systemd-update-utmp-runlevel.service \
507         units/systemd-ask-password-wall.service \
508         units/systemd-ask-password-console.service \
509         units/systemd-sysctl.service \
510         units/emergency.service \
511         units/rescue.service \
512         units/user@.service \
513         units/systemd-hibernate.service \
514         units/systemd-hybrid-sleep.service \
515         units/systemd-suspend.service \
516         units/systemd-halt.service \
517         units/systemd-poweroff.service \
518         units/systemd-reboot.service \
519         units/systemd-kexec.service \
520         units/systemd-fsck@.service \
521         units/systemd-fsck-root.service \
522         units/systemd-udevd.service \
523         units/systemd-udev-trigger.service \
524         units/systemd-udev-settle.service \
525         units/systemd-udev-hwdb-update.service \
526         units/debug-shell.service \
527         units/initrd-parse-etc.service \
528         units/initrd-cleanup.service \
529         units/initrd-udevadm-cleanup-db.service \
530         units/initrd-switch-root.service \
531         units/systemd-nspawn@.service \
532         units/systemd-update-done.service
533
534 dist_userunit_DATA = \
535         units/user/basic.target \
536         units/user/default.target \
537         units/user/exit.target
538
539 nodist_userunit_DATA = \
540         units/user/systemd-exit.service
541
542 dist_systempreset_DATA = \
543         system-preset/90-systemd.preset
544
545 EXTRA_DIST += \
546         units/getty@.service.m4 \
547         units/serial-getty@.service.m4 \
548         units/console-shell.service.m4.in \
549         units/console-getty.service.m4.in \
550         units/container-getty@.service.m4.in \
551         units/rescue.service.m4.in \
552         units/systemd-initctl.service.in \
553         units/systemd-shutdownd.service.in \
554         units/systemd-remount-fs.service.in \
555         units/systemd-update-utmp.service.in \
556         units/systemd-update-utmp-runlevel.service.in \
557         units/systemd-ask-password-wall.service.in \
558         units/systemd-ask-password-console.service.in \
559         units/systemd-sysctl.service.in \
560         units/emergency.service.in \
561         units/systemd-halt.service.in \
562         units/systemd-poweroff.service.in \
563         units/systemd-reboot.service.in \
564         units/systemd-kexec.service.in \
565         units/user/systemd-exit.service.in \
566         units/systemd-fsck@.service.in \
567         units/systemd-fsck-root.service.in \
568         units/user@.service.in \
569         units/debug-shell.service.in \
570         units/systemd-hibernate.service.in \
571         units/systemd-hybrid-sleep.service.in \
572         units/systemd-suspend.service.in \
573         units/quotaon.service.in \
574         units/initrd-parse-etc.service.in \
575         units/initrd-cleanup.service.in \
576         units/initrd-udevadm-cleanup-db.service.in \
577         units/initrd-switch-root.service.in \
578         units/systemd-nspawn@.service.in \
579         units/systemd-update-done.service.in
580
581 CLEANFILES += \
582         units/console-shell.service.m4 \
583         units/console-getty.service.m4 \
584         units/container-getty@.service.m4 \
585         units/rescue.service.m4 \
586         units/user@.service.m4
587
588 if HAVE_SYSV_COMPAT
589 nodist_systemunit_DATA += \
590         units/rc-local.service \
591         units/halt-local.service
592
593 systemgenerator_PROGRAMS += \
594         systemd-sysv-generator \
595         systemd-rc-local-generator
596 endif
597
598 EXTRA_DIST += \
599         units/rc-local.service.in \
600         units/halt-local.service.in
601
602 # automake is broken and can't handle files with a dash in front
603 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
604 units-install-hook:
605         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
606
607 units-uninstall-hook:
608         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
609
610 INSTALL_DATA_HOOKS += units-install-hook
611 UNINSTALL_DATA_HOOKS += units-uninstall-hook
612
613 dist_doc_DATA = \
614         README \
615         NEWS \
616         LICENSE.LGPL2.1 \
617         LICENSE.GPL2 \
618         LICENSE.MIT \
619         DISTRO_PORTING \
620         src/libsystemd/sd-bus/PORTING-DBUS1 \
621         src/libsystemd/sd-bus/DIFFERENCES \
622         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
623
624 @INTLTOOL_POLICY_RULE@
625
626 # ------------------------------------------------------------------------------
627
628 MANPAGES =
629 MANPAGES_ALIAS =
630
631 include Makefile-man.am
632
633 .PHONY: man update-man-list
634 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
635
636 XML_FILES = \
637         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
638 HTML_FILES = \
639         ${XML_FILES:.xml=.html}
640 HTML_ALIAS = \
641         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
642
643 if ENABLE_MANPAGES
644 man_MANS = \
645         $(MANPAGES) \
646         $(MANPAGES_ALIAS)
647
648 noinst_DATA += \
649         $(HTML_FILES) \
650         $(HTML_ALIAS)
651
652 CLEANFILES += \
653         $(man_MANS) \
654         $(HTML_FILES) \
655         $(HTML_ALIAS)
656
657 docs/html/man:
658         $(AM_V_at)$(MKDIR_P) $(dir $@)
659         $(AM_V_LN)$(LN_S) -f ../../man $@
660
661 noinst_DATA += \
662         docs/html/man
663
664 CLEANFILES += \
665         docs/html/man
666
667 if HAVE_PYTHON
668 man/index.html: man/systemd.index.html
669         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
670
671 noinst_DATA += \
672         man/index.html
673
674 CLEANFILES += \
675         man/index.html
676
677 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
678 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
679 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
680
681 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
682         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
683         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
684         @echo "Makefile-man.am has been regenerated"
685
686 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
687         $(AM_V_at)$(MKDIR_P) $(dir $@)
688         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
689
690 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
691         $(AM_V_at)$(MKDIR_P) $(dir $@)
692         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
693
694 EXTRA_DIST += \
695         man/systemd.index.xml \
696         man/index.html \
697         man/systemd.directives.xml
698
699 CLEANFILES += \
700         man/systemd.index.xml \
701         man/systemd.directives.xml
702
703 endif
704
705 endif
706
707 EXTRA_DIST += \
708         $(XML_FILES) \
709         $(HTML_FILES) \
710         $(HTML_ALIAS) \
711         $(man_MANS) \
712         tools/make-man-index.py \
713         tools/make-directive-index.py \
714         tools/make-man-rules.py \
715         tools/xml_helper.py
716
717 # ------------------------------------------------------------------------------
718 noinst_LTLIBRARIES += \
719         libsystemd-shared.la
720
721 libsystemd_shared_la_SOURCES = \
722         src/shared/linux/auto_dev-ioctl.h \
723         src/shared/linux/fanotify.h \
724         src/shared/ioprio.h \
725         src/shared/missing.h \
726         src/shared/initreq.h \
727         src/shared/securebits.h \
728         src/shared/special.h \
729         src/shared/list.h \
730         src/shared/macro.h \
731         src/shared/def.h \
732         src/shared/sparse-endian.h \
733         src/shared/refcnt.h \
734         src/shared/udev-util.h \
735         src/shared/bus-errors.h \
736         src/shared/device-nodes.c \
737         src/shared/device-nodes.h \
738         src/shared/util.c \
739         src/shared/util.h \
740         src/shared/virt.c \
741         src/shared/virt.h \
742         src/shared/architecture.c \
743         src/shared/architecture.h \
744         src/shared/efivars.c \
745         src/shared/efivars.h \
746         src/shared/path-util.c \
747         src/shared/path-util.h \
748         src/shared/time-util.c \
749         src/shared/time-util.h \
750         src/shared/locale-util.c \
751         src/shared/locale-util.h \
752         src/shared/hashmap.c \
753         src/shared/hashmap.h \
754         src/shared/siphash24.c \
755         src/shared/siphash24.h \
756         src/shared/set.c \
757         src/shared/set.h \
758         src/shared/fdset.c \
759         src/shared/fdset.h \
760         src/shared/prioq.c \
761         src/shared/prioq.h \
762         src/shared/sleep-config.c \
763         src/shared/sleep-config.h \
764         src/shared/strv.c \
765         src/shared/strv.h \
766         src/shared/env-util.c \
767         src/shared/env-util.h \
768         src/shared/strbuf.c \
769         src/shared/strbuf.h \
770         src/shared/strxcpyx.c \
771         src/shared/strxcpyx.h \
772         src/shared/conf-parser.c \
773         src/shared/conf-parser.h \
774         src/shared/log.c \
775         src/shared/log.h \
776         src/shared/ratelimit.h \
777         src/shared/ratelimit.c \
778         src/shared/exit-status.c \
779         src/shared/exit-status.h \
780         src/shared/utf8.c \
781         src/shared/utf8.h \
782         src/shared/gunicode.c \
783         src/shared/gunicode.h \
784         src/shared/pager.c \
785         src/shared/pager.h \
786         src/shared/socket-util.c \
787         src/shared/socket-util.h \
788         src/shared/in-addr-util.c \
789         src/shared/in-addr-util.h \
790         src/shared/conf-files.c \
791         src/shared/conf-files.h \
792         src/shared/cgroup-util.c \
793         src/shared/cgroup-util.h \
794         src/shared/cgroup-show.c \
795         src/shared/cgroup-show.h \
796         src/shared/unit-name.c \
797         src/shared/unit-name.h \
798         src/shared/utmp-wtmp.c \
799         src/shared/utmp-wtmp.h \
800         src/shared/watchdog.c \
801         src/shared/watchdog.h \
802         src/shared/spawn-ask-password-agent.c \
803         src/shared/spawn-ask-password-agent.h \
804         src/shared/replace-var.c \
805         src/shared/replace-var.h \
806         src/shared/spawn-polkit-agent.c \
807         src/shared/spawn-polkit-agent.h \
808         src/shared/clock-util.c \
809         src/shared/clock-util.h \
810         src/shared/time-dst.c \
811         src/shared/time-dst.h \
812         src/shared/calendarspec.c \
813         src/shared/calendarspec.h \
814         src/shared/fileio.c \
815         src/shared/fileio.h \
816         src/shared/output-mode.h \
817         src/shared/MurmurHash2.c \
818         src/shared/MurmurHash2.h \
819         src/shared/acpi-fpdt.h \
820         src/shared/acpi-fpdt.c \
821         src/shared/boot-timestamps.h \
822         src/shared/boot-timestamps.c \
823         src/shared/mkdir.c \
824         src/shared/mkdir.h \
825         src/shared/smack-util.c \
826         src/shared/smack-util.h \
827         src/shared/apparmor-util.c \
828         src/shared/apparmor-util.h \
829         src/shared/ima-util.c \
830         src/shared/ima-util.h \
831         src/shared/ptyfwd.c \
832         src/shared/ptyfwd.h \
833         src/shared/errno-list.c \
834         src/shared/errno-list.h \
835         src/shared/af-list.c \
836         src/shared/af-list.h \
837         src/shared/arphrd-list.c \
838         src/shared/arphrd-list.h \
839         src/shared/audit.c \
840         src/shared/audit.h \
841         src/shared/xml.c \
842         src/shared/xml.h \
843         src/shared/condition-util.c \
844         src/shared/condition-util.h \
845         src/shared/bus-label.c \
846         src/shared/bus-label.h \
847         src/shared/gpt.h \
848         src/shared/clean-ipc.h \
849         src/shared/clean-ipc.c \
850         src/shared/login-shared.c \
851         src/shared/login-shared.h \
852         src/shared/ring.c \
853         src/shared/ring.h \
854         src/shared/barrier.c \
855         src/shared/barrier.h \
856         src/shared/pty.c \
857         src/shared/pty.h \
858         src/shared/async.c \
859         src/shared/async.h \
860         src/shared/copy.c \
861         src/shared/copy.h \
862         src/shared/base-filesystem.c \
863         src/shared/base-filesystem.h \
864         src/shared/nss-util.h
865
866 nodist_libsystemd_shared_la_SOURCES = \
867         src/shared/errno-from-name.h \
868         src/shared/errno-to-name.h \
869         src/shared/af-from-name.h \
870         src/shared/af-to-name.h \
871         src/shared/arphrd-from-name.h \
872         src/shared/arphrd-to-name.h
873
874 libsystemd_shared_la_CFLAGS = \
875         $(AM_CFLAGS) \
876         $(SECCOMP_CFLAGS) \
877         -pthread
878
879 # ------------------------------------------------------------------------------
880 noinst_LTLIBRARIES += \
881         libsystemd-units.la
882
883 libsystemd_units_la_SOURCES = \
884         src/shared/install.c \
885         src/shared/install.h \
886         src/shared/install-printf.c \
887         src/shared/install-printf.h \
888         src/shared/path-lookup.c \
889         src/shared/path-lookup.h \
890         src/shared/specifier.c \
891         src/shared/specifier.h
892
893 # ------------------------------------------------------------------------------
894 noinst_LTLIBRARIES += \
895         libsystemd-label.la
896
897 libsystemd_label_la_SOURCES = \
898         src/shared/socket-label.c \
899         src/shared/label.c \
900         src/shared/label.h \
901         src/shared/selinux-util.c \
902         src/shared/selinux-util.h \
903         src/shared/mkdir-label.c \
904         src/shared/ask-password-api.c \
905         src/shared/ask-password-api.h \
906         src/shared/fileio-label.c \
907         src/shared/fileio-label.h \
908         src/shared/dev-setup.c \
909         src/shared/dev-setup.h \
910         src/shared/dropin.c \
911         src/shared/dropin.h \
912         src/shared/generator.h \
913         src/shared/generator.c
914
915 libsystemd_label_la_CFLAGS = \
916         $(AM_CFLAGS) \
917         $(SELINUX_CFLAGS)
918
919 libsystemd_label_la_LIBADD = \
920         $(SELINUX_LIBS)
921
922 # ------------------------------------------------------------------------------
923
924 if HAVE_SECCOMP
925 noinst_LTLIBRARIES += \
926         libsystemd-seccomp.la
927
928 libsystemd_seccomp_la_SOURCES = \
929         src/shared/seccomp-util.h \
930         src/shared/seccomp-util.c
931
932 libsystemd_seccomp_la_CFLAGS = \
933         $(AM_CFLAGS) \
934         $(SECCOMP_CFLAGS)
935
936 libsystemd_seccomp_la_LIBADD = \
937         $(SECCOMP_LIBS)
938 endif
939
940 # ------------------------------------------------------------------------------
941 noinst_LTLIBRARIES += \
942         libsystemd-logs.la
943
944 libsystemd_logs_la_SOURCES = \
945         src/shared/logs-show.c \
946         src/shared/logs-show.h
947
948 # ------------------------------------------------------------------------------
949 noinst_LTLIBRARIES += \
950         libsystemd-capability.la
951
952 libsystemd_capability_la_SOURCES = \
953         src/shared/capability.c \
954         src/shared/capability.h
955
956 libsystemd_capability_la_CFLAGS = \
957         $(AM_CFLAGS) \
958         $(CAP_CFLAGS)
959
960 libsystemd_capability_la_LIBADD = \
961         $(CAP_LIBS)
962
963 # ------------------------------------------------------------------------------
964 if HAVE_ACL
965 noinst_LTLIBRARIES += \
966         libsystemd-acl.la
967
968 libsystemd_acl_la_SOURCES = \
969         src/shared/acl-util.c \
970         src/shared/acl-util.h
971
972 libsystemd_acl_la_CFLAGS = \
973         $(AM_CFLAGS) \
974         $(ACL_CFLAGS)
975
976 libsystemd_acl_la_LIBADD = \
977         $(ACL_LIBS)
978 endif
979
980 # ------------------------------------------------------------------------------
981 noinst_LTLIBRARIES += \
982         libsystemd-core.la
983
984 libsystemd_core_la_SOURCES = \
985         src/core/unit.c \
986         src/core/unit.h \
987         src/core/unit-printf.c \
988         src/core/unit-printf.h \
989         src/core/job.c \
990         src/core/job.h \
991         src/core/manager.c \
992         src/core/manager.h \
993         src/core/transaction.c \
994         src/core/transaction.h \
995         src/core/load-fragment.c \
996         src/core/load-fragment.h \
997         src/core/service.c \
998         src/core/service.h \
999         src/core/socket.c \
1000         src/core/socket.h \
1001         src/core/busname.c \
1002         src/core/busname.h \
1003         src/core/target.c \
1004         src/core/target.h \
1005         src/core/snapshot.c \
1006         src/core/snapshot.h \
1007         src/core/device.c \
1008         src/core/device.h \
1009         src/core/mount.c \
1010         src/core/mount.h \
1011         src/core/automount.c \
1012         src/core/automount.h \
1013         src/core/swap.c \
1014         src/core/swap.h \
1015         src/core/timer.c \
1016         src/core/timer.h \
1017         src/core/path.c \
1018         src/core/path.h \
1019         src/core/slice.c \
1020         src/core/slice.h \
1021         src/core/scope.c \
1022         src/core/scope.h \
1023         src/core/load-dropin.c \
1024         src/core/load-dropin.h \
1025         src/core/execute.c \
1026         src/core/execute.h \
1027         src/core/kill.c \
1028         src/core/kill.h \
1029         src/core/dbus.c \
1030         src/core/dbus.h \
1031         src/core/dbus-manager.c \
1032         src/core/dbus-manager.h \
1033         src/core/dbus-unit.c \
1034         src/core/dbus-unit.h \
1035         src/core/dbus-job.c \
1036         src/core/dbus-job.h \
1037         src/core/dbus-service.c \
1038         src/core/dbus-service.h \
1039         src/core/dbus-socket.c \
1040         src/core/dbus-socket.h \
1041         src/core/dbus-busname.c \
1042         src/core/dbus-busname.h \
1043         src/core/dbus-target.c \
1044         src/core/dbus-target.h \
1045         src/core/dbus-snapshot.c \
1046         src/core/dbus-snapshot.h \
1047         src/core/dbus-device.c \
1048         src/core/dbus-device.h \
1049         src/core/dbus-mount.c \
1050         src/core/dbus-mount.h \
1051         src/core/dbus-automount.c \
1052         src/core/dbus-automount.h \
1053         src/core/dbus-swap.c \
1054         src/core/dbus-swap.h \
1055         src/core/dbus-timer.c \
1056         src/core/dbus-timer.h \
1057         src/core/dbus-path.c \
1058         src/core/dbus-path.h \
1059         src/core/dbus-slice.c \
1060         src/core/dbus-slice.h \
1061         src/core/dbus-scope.c \
1062         src/core/dbus-scope.h \
1063         src/core/dbus-execute.c \
1064         src/core/dbus-execute.h \
1065         src/core/dbus-kill.c \
1066         src/core/dbus-kill.h \
1067         src/core/dbus-cgroup.c \
1068         src/core/dbus-cgroup.h \
1069         src/core/cgroup.c \
1070         src/core/cgroup.h \
1071         src/core/selinux-access.c \
1072         src/core/selinux-access.h \
1073         src/core/selinux-setup.c \
1074         src/core/selinux-setup.h \
1075         src/core/smack-setup.c \
1076         src/core/smack-setup.h \
1077         src/core/ima-setup.c \
1078         src/core/ima-setup.h \
1079         src/core/locale-setup.h \
1080         src/core/locale-setup.c \
1081         src/core/hostname-setup.c \
1082         src/core/hostname-setup.h \
1083         src/core/machine-id-setup.c \
1084         src/core/machine-id-setup.h \
1085         src/core/mount-setup.c \
1086         src/core/mount-setup.h \
1087         src/core/loopback-setup.h \
1088         src/core/loopback-setup.c \
1089         src/core/condition.c \
1090         src/core/condition.h \
1091         src/core/namespace.c \
1092         src/core/namespace.h \
1093         src/core/build.h \
1094         src/core/sysfs-show.h \
1095         src/core/switch-root.h \
1096         src/core/switch-root.c \
1097         src/core/killall.h \
1098         src/core/killall.c \
1099         src/core/audit-fd.c \
1100         src/core/audit-fd.h \
1101         src/core/show-status.c \
1102         src/core/show-status.h
1103
1104 if HAVE_KMOD
1105 libsystemd_core_la_SOURCES += \
1106         src/core/kmod-setup.c \
1107         src/core/kmod-setup.h
1108 endif
1109
1110 nodist_libsystemd_core_la_SOURCES = \
1111         src/core/load-fragment-gperf.c \
1112         src/core/load-fragment-gperf-nulstr.c
1113
1114 libsystemd_core_la_CFLAGS = \
1115         $(AM_CFLAGS) \
1116         $(PAM_CFLAGS) \
1117         $(AUDIT_CFLAGS) \
1118         $(CAP_CFLAGS) \
1119         $(KMOD_CFLAGS) \
1120         $(APPARMOR_CFLAGS) \
1121         $(SECCOMP_CFLAGS) \
1122         -pthread
1123
1124 libsystemd_core_la_LIBADD = \
1125         libsystemd-capability.la \
1126         libsystemd-units.la \
1127         libsystemd-label.la \
1128         libudev-internal.la \
1129         libsystemd-shared.la \
1130         libsystemd-internal.la \
1131         $(PAM_LIBS) \
1132         $(AUDIT_LIBS) \
1133         $(CAP_LIBS) \
1134         $(KMOD_LIBS) \
1135         $(APPARMOR_LIBS) \
1136         $(SECCOMP_LIBS)
1137
1138 if HAVE_SECCOMP
1139 libsystemd_core_la_LIBADD += \
1140         libsystemd-seccomp.la
1141 endif
1142
1143 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1144         $(AM_V_at)$(MKDIR_P) $(dir $@)
1145         $(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 ";" }' < $< > $@
1146
1147 EXTRA_DIST += \
1148         src/core/load-fragment-gperf.gperf.m4
1149
1150 CLEANFILES += \
1151         src/core/load-fragment-gperf.gperf \
1152         src/core/load-fragment-gperf.c \
1153         src/core/load-fragment-gperf-nulstr.c \
1154         src/shared/errno-list.txt \
1155         src/shared/errno-from-name.gperf \
1156         src/shared/af-list.txt \
1157         src/shared/af-from-name.gperf \
1158         src/shared/arphrd-list.txt \
1159         src/shared/arphrd-from-name.gperf \
1160         src/shared/dns_type-list.txt \
1161         src/shared/dns_type-from-name.gperf
1162
1163 BUILT_SOURCES += \
1164         src/shared/errno-from-name.h \
1165         src/shared/errno-to-name.h \
1166         src/shared/af-from-name.h \
1167         src/shared/af-to-name.h \
1168         src/shared/arphrd-from-name.h \
1169         src/shared/arphrd-to-name.h \
1170         src/resolve/dns_type-from-name.h \
1171         src/resolve/dns_type-to-name.h
1172
1173 %-from-name.gperf: %-list.txt
1174         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1175
1176 %-from-name.h: %-from-name.gperf
1177         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
1178
1179
1180 src/shared/errno-list.txt:
1181         $(AM_V_at)$(MKDIR_P) $(dir $@)
1182         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
1183
1184 src/shared/errno-to-name.h: src/shared/errno-list.txt
1185         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1186
1187
1188 src/shared/af-list.txt:
1189         $(AM_V_at)$(MKDIR_P) $(dir $@)
1190         $(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; }' >$@
1191
1192 src/shared/af-to-name.h: src/shared/af-list.txt
1193         $(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 "};"}' <$< >$@
1194
1195 src/shared/arphrd-list.txt:
1196         $(AM_V_at)$(MKDIR_P) $(dir $@)
1197         $(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_//' >$@
1198
1199 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
1200         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1201
1202 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
1203         $(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 }' <$< >$@
1204
1205
1206 src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1207         $(AM_V_at)$(MKDIR_P) $(dir $@)
1208         $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1209
1210 src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
1211         $(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" }' <$< >$@
1212
1213 src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
1214         $(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 }' <$< >$@
1215
1216 # ------------------------------------------------------------------------------
1217 systemd_SOURCES = \
1218         src/core/main.c
1219
1220 systemd_CFLAGS = \
1221         $(AM_CFLAGS) \
1222         $(SECCOMP_CFLAGS)
1223
1224 systemd_LDADD = \
1225         libsystemd-core.la \
1226         $(RT_LIBS)
1227
1228 dist_pkgsysconf_DATA += \
1229         src/core/system.conf \
1230         src/core/user.conf
1231
1232 dist_dbuspolicy_DATA += \
1233         src/core/org.freedesktop.systemd1.conf
1234
1235 dist_dbussystemservice_DATA += \
1236         src/core/org.freedesktop.systemd1.service
1237
1238 polkitpolicy_in_in_files += \
1239         src/core/org.freedesktop.systemd1.policy.in.in
1240
1241 pkgconfigdata_DATA = \
1242         src/core/systemd.pc
1243
1244 nodist_rpmmacros_DATA = \
1245         src/core/macros.systemd
1246
1247 EXTRA_DIST += \
1248         src/core/systemd.pc.in \
1249         src/core/macros.systemd.in
1250
1251 CLEANFILES += \
1252         src/core/macros.systemd \
1253         src/core/org.freedesktop.systemd1.policy.in
1254
1255 # ------------------------------------------------------------------------------
1256
1257 manual_tests += \
1258         test-ns \
1259         test-loopback \
1260         test-hostname \
1261         test-daemon \
1262         test-cgroup \
1263         test-install \
1264         test-watchdog \
1265         test-log \
1266         test-ipcrm
1267
1268 if HAVE_KMOD
1269 manual_tests += \
1270         test-rtnl-manual
1271 endif
1272
1273 tests += \
1274         test-engine \
1275         test-cgroup-mask \
1276         test-job-type \
1277         test-env-replace \
1278         test-strbuf \
1279         test-strv \
1280         test-path-util \
1281         test-strxcpyx \
1282         test-unit-name \
1283         test-unit-file \
1284         test-utf8 \
1285         test-ellipsize \
1286         test-util \
1287         test-ring \
1288         test-barrier \
1289         test-pty \
1290         test-tmpfiles \
1291         test-namespace \
1292         test-date \
1293         test-sleep \
1294         test-replace-var \
1295         test-sched-prio \
1296         test-calendarspec \
1297         test-strip-tab-ansi \
1298         test-cgroup-util \
1299         test-prioq \
1300         test-fileio \
1301         test-time \
1302         test-hashmap \
1303         test-list \
1304         test-tables \
1305         test-device-nodes \
1306         test-xml \
1307         test-architecture \
1308         test-socket-util \
1309         test-fdset \
1310         test-conf-files \
1311         test-capability \
1312         test-async \
1313         test-ratelimit
1314
1315 EXTRA_DIST += \
1316         test/a.service \
1317         test/basic.target \
1318         test/b.service \
1319         test/c.service \
1320         test/daughter.service \
1321         test/d.service \
1322         test/end.service \
1323         test/e.service \
1324         test/f.service \
1325         test/grandchild.service \
1326         test/g.service \
1327         test/hello-after-sleep.target \
1328         test/hello.service \
1329         test/h.service \
1330         test/parent-deep.slice \
1331         test/parent.slice \
1332         test/paths.target \
1333         test/sched_idle_bad.service \
1334         test/sched_idle_ok.service \
1335         test/sched_rr_bad.service \
1336         test/sched_rr_change.service \
1337         test/sched_rr_ok.service \
1338         test/shutdown.target \
1339         test/sleep.service \
1340         test/sockets.target \
1341         test/son.service \
1342         test/sysinit.target \
1343         test/testsuite.target \
1344         test/timers.target \
1345         test/unstoppable.service
1346
1347 EXTRA_DIST += \
1348         src/test/test-helper.h
1349
1350 test_device_nodes_SOURCES = \
1351         src/test/test-device-nodes.c
1352
1353 test_device_nodes_LDADD = \
1354         libsystemd-shared.la
1355
1356 test_engine_SOURCES = \
1357         src/test/test-engine.c
1358
1359 test_engine_CFLAGS = \
1360         $(AM_CFLAGS) \
1361         $(SECCOMP_CFLAGS)
1362
1363 test_engine_LDADD = \
1364         libsystemd-core.la \
1365         $(RT_LIBS)
1366
1367 test_job_type_SOURCES = \
1368         src/test/test-job-type.c
1369
1370 test_job_type_CFLAGS = \
1371         $(AM_CFLAGS) \
1372         $(SECCOMP_CFLAGS)
1373
1374 test_job_type_LDADD = \
1375         libsystemd-core.la \
1376         $(RT_LIBS)
1377
1378 test_ns_SOURCES = \
1379         src/test/test-ns.c
1380
1381 test_ns_CFLAGS = \
1382         $(AM_CFLAGS) \
1383         $(SECCOMP_CFLAGS)
1384
1385 test_ns_LDADD = \
1386         libsystemd-core.la
1387
1388 test_loopback_SOURCES = \
1389         src/test/test-loopback.c
1390
1391 test_loopback_LDADD = \
1392         libsystemd-core.la
1393
1394 test_hostname_SOURCES = \
1395         src/test/test-hostname.c
1396
1397 test_hostname_LDADD = \
1398         libsystemd-core.la
1399
1400 if ENABLE_EFI
1401 manual_tests += \
1402         test-boot-timestamp
1403
1404 test_boot_timestamp_SOURCES = \
1405         src/test/test-boot-timestamps.c
1406
1407 test_boot_timestamp_LDADD = \
1408         libsystemd-shared.la
1409 endif
1410
1411 test_unit_name_SOURCES = \
1412         src/test/test-unit-name.c
1413
1414 test_unit_name_CFLAGS = \
1415         $(AM_CFLAGS) \
1416         $(SECCOMP_CFLAGS)
1417
1418 test_unit_name_LDADD = \
1419         libsystemd-core.la \
1420         $(RT_LIBS)
1421
1422 test_unit_file_SOURCES = \
1423         src/test/test-unit-file.c
1424
1425 test_unit_file_CFLAGS = \
1426         $(AM_CFLAGS) \
1427         $(SECCOMP_CFLAGS)
1428
1429 test_unit_file_LDADD = \
1430         libsystemd-core.la \
1431         $(RT_LIBS)
1432
1433 test_utf8_SOURCES = \
1434         src/test/test-utf8.c
1435
1436 test_utf8_LDADD = \
1437         libsystemd-shared.la
1438
1439 test_capability_SOURCES = \
1440         src/test/test-capability.c
1441
1442 test_capability_LDADD = \
1443         libsystemd-shared.la \
1444         libsystemd-capability.la
1445
1446 test_async_SOURCES = \
1447         src/test/test-async.c
1448
1449 test_async_LDADD = \
1450         libsystemd-shared.la
1451
1452 test_fdset_SOURCES = \
1453         src/test/test-fdset.c
1454
1455 test_fdset_LDADD = \
1456         libsystemd-core.la
1457
1458 test_ratelimit_SOURCES = \
1459         src/test/test-ratelimit.c
1460
1461 test_ratelimit_LDADD = \
1462         libsystemd-shared.la
1463
1464 test_util_SOURCES = \
1465         src/test/test-util.c
1466
1467 test_util_LDADD = \
1468         libsystemd-core.la
1469
1470 test_socket_util_SOURCES = \
1471         src/test/test-socket-util.c
1472
1473 test_socket_util_LDADD = \
1474         libsystemd-core.la
1475
1476 test_ring_SOURCES = \
1477         src/test/test-ring.c
1478
1479 test_ring_LDADD = \
1480         libsystemd-core.la
1481
1482 test_barrier_SOURCES = \
1483         src/test/test-barrier.c
1484
1485 test_barrier_LDADD = \
1486         libsystemd-core.la
1487
1488 test_pty_SOURCES = \
1489         src/test/test-pty.c
1490
1491 test_pty_LDADD = \
1492         libsystemd-core.la
1493
1494 test_tmpfiles_SOURCES = \
1495         src/test/test-tmpfiles.c
1496
1497 test_tmpfiles_LDADD = \
1498         libsystemd-shared.la
1499
1500 test_namespace_SOURCES = \
1501         src/test/test-namespace.c
1502
1503 test_namespace_LDADD = \
1504         libsystemd-core.la
1505
1506 test_hashmap_SOURCES = \
1507         src/test/test-hashmap.c
1508
1509 test_hashmap_LDADD = \
1510         libsystemd-core.la
1511
1512 test_xml_SOURCES = \
1513         src/test/test-xml.c
1514
1515 test_xml_LDADD = \
1516         libsystemd-shared.la
1517
1518 test_list_SOURCES = \
1519         src/test/test-list.c
1520
1521 test_list_LDADD = \
1522         libsystemd-core.la
1523
1524 test_tables_SOURCES = \
1525         src/test/test-tables.c \
1526         src/shared/test-tables.h \
1527         src/bus-proxyd/bus-policy.c \
1528         src/bus-proxyd/bus-policy.h \
1529         src/journal/journald-server.c \
1530         src/journal/journald-server.h
1531
1532 test_tables_CPPFLAGS = \
1533         $(AM_CPPFLAGS) \
1534         -I$(top_srcdir)/src/bus-proxyd
1535
1536 test_tables_CFLAGS = \
1537         $(AM_CFLAGS) \
1538         $(SECCOMP_CFLAGS)
1539
1540 test_tables_LDADD = \
1541         libsystemd-logs.la \
1542         libsystemd-journal-internal.la \
1543         libsystemd-journal-core.la \
1544         libsystemd-core.la \
1545         libudev-core.la \
1546         $(RT_LIBS)
1547
1548 test_prioq_SOURCES = \
1549         src/test/test-prioq.c
1550
1551 test_prioq_LDADD = \
1552         libsystemd-core.la
1553
1554 test_fileio_SOURCES = \
1555         src/test/test-fileio.c
1556
1557 test_fileio_LDADD = \
1558         libsystemd-core.la
1559
1560 test_time_SOURCES = \
1561         src/test/test-time.c
1562
1563 test_time_LDADD = \
1564         libsystemd-core.la
1565
1566 test_architecture_SOURCES = \
1567         src/test/test-architecture.c
1568
1569 test_architecture_LDADD = \
1570         libsystemd-shared.la
1571
1572 test_log_SOURCES = \
1573         src/test/test-log.c
1574
1575 test_log_LDADD = \
1576         libsystemd-core.la
1577
1578 test_ipcrm_SOURCES = \
1579         src/test/test-ipcrm.c
1580
1581 test_ipcrm_LDADD = \
1582         libsystemd-shared.la \
1583         -lrt
1584
1585 test_rtnl_manual_SOURCES = \
1586         src/test/test-rtnl-manual.c
1587
1588 test_rtnl_manual_CFLAGS = \
1589         $(AM_CFLAGS) \
1590         $(KMOD_CFLAGS)
1591
1592 test_rtnl_manual_LDADD = \
1593         libsystemd-internal.la \
1594         libsystemd-shared.la \
1595         $(KMOD_LIBS)
1596
1597 test_ellipsize_SOURCES = \
1598         src/test/test-ellipsize.c
1599
1600 test_ellipsize_LDADD = \
1601         libsystemd-core.la
1602
1603 test_date_SOURCES = \
1604         src/test/test-date.c
1605
1606 test_date_LDADD = \
1607         libsystemd-core.la
1608
1609 test_sleep_SOURCES = \
1610         src/test/test-sleep.c
1611
1612 test_sleep_LDADD = \
1613         libsystemd-core.la
1614
1615 test_replace_var_SOURCES = \
1616         src/test/test-replace-var.c
1617
1618 test_replace_var_LDADD = \
1619         libsystemd-shared.la
1620
1621 test_calendarspec_SOURCES = \
1622         src/test/test-calendarspec.c
1623
1624 test_calendarspec_LDADD = \
1625         libsystemd-shared.la
1626
1627 test_strip_tab_ansi_SOURCES = \
1628         src/test/test-strip-tab-ansi.c
1629
1630 test_strip_tab_ansi_LDADD = \
1631         libsystemd-shared.la
1632
1633 test_daemon_SOURCES = \
1634         src/test/test-daemon.c
1635
1636 test_daemon_LDADD = \
1637         libsystemd-internal.la \
1638         libsystemd-shared.la
1639
1640 test_cgroup_SOURCES = \
1641         src/test/test-cgroup.c
1642
1643 test_cgroup_LDADD = \
1644         libsystemd-label.la \
1645         libsystemd-shared.la \
1646         libsystemd-internal.la
1647
1648 test_cgroup_mask_SOURCES = \
1649         src/test/test-cgroup-mask.c
1650
1651 test_cgroup_mask_CPPFLAGS = \
1652         $(AM_CPPFLAGS) \
1653         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1654
1655 test_cgroup_mask_CFLAGS = \
1656         $(AM_CFLAGS) \
1657         $(SECCOMP_CFLAGS)
1658
1659 test_cgroup_mask_LDADD = \
1660         libsystemd-core.la \
1661         $(RT_LIBS)
1662
1663 test_cgroup_util_SOURCES = \
1664         src/test/test-cgroup-util.c
1665
1666 test_cgroup_util_LDADD = \
1667         libsystemd-label.la \
1668         libsystemd-internal.la \
1669         libsystemd-shared.la
1670
1671 test_env_replace_SOURCES = \
1672         src/test/test-env-replace.c
1673
1674 test_env_replace_LDADD = \
1675         libsystemd-shared.la
1676
1677 test_strbuf_SOURCES = \
1678         src/test/test-strbuf.c
1679
1680 test_strbuf_LDADD = \
1681         libsystemd-shared.la
1682
1683 test_strv_SOURCES = \
1684         src/test/test-strv.c
1685
1686 test_strv_LDADD = \
1687         libsystemd-units.la \
1688         libsystemd-internal.la \
1689         libsystemd-shared.la
1690
1691 test_path_util_SOURCES = \
1692         src/test/test-path-util.c
1693
1694 test_path_util_LDADD = \
1695         libsystemd-shared.la
1696
1697 test_strxcpyx_SOURCES = \
1698         src/test/test-strxcpyx.c
1699
1700 test_strxcpyx_LDADD = \
1701         libsystemd-shared.la
1702
1703 test_install_SOURCES = \
1704         src/test/test-install.c
1705
1706 test_install_LDADD = \
1707         libsystemd-units.la \
1708         libsystemd-label.la \
1709         libsystemd-shared.la \
1710         libsystemd-internal.la
1711
1712 test_watchdog_SOURCES = \
1713         src/test/test-watchdog.c
1714
1715 test_watchdog_LDADD = \
1716         libsystemd-shared.la
1717
1718 test_sched_prio_SOURCES = \
1719         src/test/test-sched-prio.c
1720
1721 test_sched_prio_CPPFLAGS = \
1722         $(AM_CPPFLAGS) \
1723         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1724
1725 test_sched_prio_CFLAGS = \
1726         $(AM_CFLAGS) \
1727         $(SECCOMP_CFLAGS)
1728
1729 test_sched_prio_LDADD = \
1730         libsystemd-core.la \
1731         $(RT_LIBS)
1732
1733 test_conf_files_SOURCES = \
1734         src/test/test-conf-files.c
1735
1736 test_conf_files_LDADD = \
1737         libsystemd-shared.la
1738
1739 # ------------------------------------------------------------------------------
1740 ## .PHONY so it always rebuilds it
1741 .PHONY: coverage lcov-run lcov-report coverage-sync
1742
1743 # run lcov from scratch, always
1744 coverage: all
1745         $(MAKE) lcov-run
1746         $(MAKE) lcov-report
1747
1748 coverage_dir = coverage
1749 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1750
1751 if ENABLE_COVERAGE
1752 # reset run coverage tests
1753 lcov-run:
1754         @rm -rf $(coverage_dir)
1755         lcov $(coverage_opts) --zerocounters
1756         -$(MAKE) check
1757
1758 # generate report based on current coverage data
1759 lcov-report:
1760         $(MKDIR_P) $(coverage_dir)
1761         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1762                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1763         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1764         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1765
1766 # lcov doesn't work properly with vpath builds, make sure that bad
1767 # output is not uploaded by mistake.
1768 coverage-sync: coverage
1769         test "$(builddir)" = "$(srcdir)"
1770         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1771
1772 else
1773 lcov-run lcov-report:
1774         echo "Need to reconfigure with --enable-coverage"
1775 endif
1776
1777 # ------------------------------------------------------------------------------
1778 systemd_analyze_SOURCES = \
1779         src/analyze/analyze.c \
1780         src/analyze/analyze-verify.c \
1781         src/analyze/analyze-verify.h
1782
1783 systemd_verify_CFLAGS = \
1784         $(AM_CFLAGS) \
1785         $(SECCOMP_CFLAGS)
1786
1787 systemd_analyze_LDADD = \
1788         libsystemd-core.la \
1789         libsystemd-internal.la \
1790         libsystemd-shared.la \
1791         $(RT_LIBS)
1792
1793 # ------------------------------------------------------------------------------
1794 systemd_initctl_SOURCES = \
1795         src/initctl/initctl.c
1796
1797 systemd_initctl_LDADD = \
1798         libsystemd-internal.la \
1799         libsystemd-shared.la
1800
1801 # ------------------------------------------------------------------------------
1802 systemd_update_utmp_SOURCES = \
1803         src/update-utmp/update-utmp.c
1804
1805 systemd_update_utmp_CFLAGS = \
1806         $(AM_CFLAGS) \
1807         $(AUDIT_CFLAGS)
1808
1809 systemd_update_utmp_LDADD = \
1810         libsystemd-internal.la \
1811         libsystemd-shared.la \
1812         $(AUDIT_LIBS)
1813
1814 # ------------------------------------------------------------------------------
1815 systemd_update_done_SOURCES = \
1816         src/update-done/update-done.c
1817
1818 systemd_update_done_LDADD = \
1819         libsystemd-internal.la \
1820         libsystemd-label.la \
1821         libsystemd-shared.la
1822
1823 # ------------------------------------------------------------------------------
1824 systemd_shutdownd_SOURCES = \
1825         src/shutdownd/shutdownd.c
1826
1827 systemd_shutdownd_LDADD = \
1828         libsystemd-label.la \
1829         libsystemd-internal.la \
1830         libsystemd-shared.la
1831
1832 dist_doc_DATA += \
1833         src/systemd/sd-shutdown.h
1834
1835 # ------------------------------------------------------------------------------
1836 systemd_shutdown_SOURCES = \
1837         src/core/umount.c \
1838         src/core/umount.h \
1839         src/core/shutdown.c \
1840         src/core/mount-setup.c \
1841         src/core/mount-setup.h \
1842         src/core/killall.h \
1843         src/core/killall.c
1844
1845 systemd_shutdown_LDADD = \
1846         libsystemd-label.la \
1847         libudev-internal.la \
1848         libsystemd-shared.la
1849
1850 # ------------------------------------------------------------------------------
1851 if HAVE_KMOD
1852 systemd_modules_load_SOURCES = \
1853         src/modules-load/modules-load.c
1854
1855 systemd_modules_load_CFLAGS = \
1856         $(AM_CFLAGS) \
1857         $(KMOD_CFLAGS)
1858
1859 systemd_modules_load_LDADD = \
1860         libsystemd-shared.la \
1861         $(KMOD_LIBS)
1862
1863 rootlibexec_PROGRAMS += \
1864         systemd-modules-load
1865
1866 nodist_systemunit_DATA += \
1867         units/systemd-modules-load.service
1868
1869 SYSINIT_TARGET_WANTS += \
1870         systemd-modules-load.service
1871
1872 if ENABLE_TMPFILES
1873 nodist_systemunit_DATA += \
1874         units/kmod-static-nodes.service
1875
1876 SYSINIT_TARGET_WANTS += \
1877         kmod-static-nodes.service
1878 endif
1879 endif
1880
1881 EXTRA_DIST += \
1882         units/systemd-modules-load.service.in \
1883         units/kmod-static-nodes.service.in
1884
1885 # ------------------------------------------------------------------------------
1886 if ENABLE_TMPFILES
1887 systemd_tmpfiles_SOURCES = \
1888         src/tmpfiles/tmpfiles.c
1889
1890 systemd_tmpfiles_LDADD = \
1891         libsystemd-units.la \
1892         libsystemd-label.la \
1893         libsystemd-capability.la \
1894         libsystemd-internal.la \
1895         libsystemd-shared.la
1896
1897 rootbin_PROGRAMS += \
1898         systemd-tmpfiles
1899
1900 dist_systemunit_DATA += \
1901         units/systemd-tmpfiles-clean.timer
1902
1903 nodist_systemunit_DATA += \
1904         units/systemd-tmpfiles-setup-dev.service \
1905         units/systemd-tmpfiles-setup.service \
1906         units/systemd-tmpfiles-clean.service
1907
1908 dist_tmpfiles_DATA = \
1909         tmpfiles.d/systemd.conf \
1910         tmpfiles.d/systemd-nologin.conf \
1911         tmpfiles.d/systemd-remote.conf \
1912         tmpfiles.d/tmp.conf \
1913         tmpfiles.d/x11.conf \
1914         tmpfiles.d/var.conf \
1915         tmpfiles.d/etc.conf
1916
1917 if HAVE_SYSV_COMPAT
1918 dist_tmpfiles_DATA += \
1919         tmpfiles.d/legacy.conf
1920 endif
1921
1922 SYSINIT_TARGET_WANTS += \
1923         systemd-tmpfiles-setup-dev.service \
1924         systemd-tmpfiles-setup.service
1925
1926 dist_zshcompletion_DATA += \
1927         shell-completion/zsh/_systemd-tmpfiles
1928
1929 TIMERS_TARGET_WANTS += \
1930         systemd-tmpfiles-clean.timer
1931
1932 INSTALL_DIRS += \
1933         $(tmpfilesdir) \
1934         $(sysconfdir)/tmpfiles.d
1935 endif
1936
1937 EXTRA_DIST += \
1938         units/systemd-tmpfiles-setup-dev.service.in \
1939         units/systemd-tmpfiles-setup.service.in \
1940         units/systemd-tmpfiles-clean.service.in
1941
1942 # ------------------------------------------------------------------------------
1943 if ENABLE_SYSUSERS
1944 systemd_sysusers_SOURCES = \
1945         src/sysusers/sysusers.c
1946
1947 systemd_sysusers_LDADD = \
1948         libsystemd-units.la \
1949         libsystemd-label.la \
1950         libsystemd-capability.la \
1951         libsystemd-internal.la \
1952         libsystemd-shared.la
1953
1954 rootbin_PROGRAMS += \
1955         systemd-sysusers
1956
1957 nodist_systemunit_DATA += \
1958         units/systemd-sysusers.service
1959
1960 SYSINIT_TARGET_WANTS += \
1961         systemd-sysusers.service
1962
1963 dist_sysusers_DATA = \
1964         sysusers.d/systemd.conf \
1965         sysusers.d/systemd-remote.conf
1966
1967 nodist_sysusers_DATA = \
1968         sysusers.d/basic.conf
1969
1970 EXTRA_DIST += \
1971         units/systemd-sysusers.service.in \
1972         sysusers.d/basic.conf.in
1973
1974 CLEANFILES += \
1975         sysusers.d/basic.conf
1976
1977 INSTALL_DIRS += \
1978         $(sysusersdir)
1979 endif
1980
1981 # ------------------------------------------------------------------------------
1982 dist_factory_etc_DATA = \
1983         factory/etc/nsswitch.conf
1984
1985 dist_factory_pam_DATA = \
1986         factory/etc/pam.d/system-auth \
1987         factory/etc/pam.d/other
1988
1989 # ------------------------------------------------------------------------------
1990 if ENABLE_FIRSTBOOT
1991 systemd_firstboot_SOURCES = \
1992         src/firstboot/firstboot.c
1993
1994 systemd_firstboot_LDADD = \
1995         libsystemd-units.la \
1996         libsystemd-label.la \
1997         libsystemd-capability.la \
1998         libsystemd-internal.la \
1999         libsystemd-shared.la \
2000         -lcrypt
2001
2002 rootbin_PROGRAMS += \
2003         systemd-firstboot
2004
2005 nodist_systemunit_DATA += \
2006         units/systemd-firstboot.service
2007
2008 EXTRA_DIST += \
2009         units/systemd-firstboot.service.in
2010
2011 SYSINIT_TARGET_WANTS += \
2012         systemd-firstboot.service
2013 endif
2014
2015 # ------------------------------------------------------------------------------
2016 systemd_machine_id_setup_SOURCES = \
2017         src/machine-id-setup/machine-id-setup-main.c \
2018         src/core/machine-id-setup.c \
2019         src/core/machine-id-setup.h
2020
2021 systemd_machine_id_setup_LDADD = \
2022         libsystemd-label.la \
2023         libsystemd-internal.la \
2024         libsystemd-shared.la
2025
2026 # ------------------------------------------------------------------------------
2027 systemd_sysctl_SOURCES = \
2028         src/sysctl/sysctl.c
2029
2030 systemd_sysctl_LDADD = \
2031         libsystemd-shared.la
2032
2033 # ------------------------------------------------------------------------------
2034 systemd_sleep_SOURCES = \
2035         src/sleep/sleep.c
2036
2037 systemd_sleep_LDADD = \
2038         libsystemd-shared.la
2039
2040 # ------------------------------------------------------------------------------
2041 systemd_fsck_SOURCES = \
2042         src/fsck/fsck.c
2043
2044 systemd_fsck_LDADD = \
2045         libsystemd-internal.la \
2046         libudev-internal.la \
2047         libsystemd-shared.la
2048
2049 # ------------------------------------------------------------------------------
2050 systemd_ac_power_SOURCES = \
2051         src/ac-power/ac-power.c
2052
2053 systemd_ac_power_LDADD = \
2054         libudev-internal.la \
2055         libsystemd-shared.la
2056
2057 # ------------------------------------------------------------------------------
2058 systemd_detect_virt_SOURCES = \
2059         src/detect-virt/detect-virt.c
2060
2061 systemd_detect_virt_LDADD = \
2062         libsystemd-shared.la
2063
2064 INSTALL_EXEC_HOOKS += \
2065         systemd-detect-virt-install-hook
2066
2067 # ------------------------------------------------------------------------------
2068 systemd_delta_SOURCES = \
2069         src/delta/delta.c
2070
2071 systemd_delta_LDADD = \
2072         libsystemd-shared.la
2073
2074 # ------------------------------------------------------------------------------
2075 systemd_getty_generator_SOURCES = \
2076         src/getty-generator/getty-generator.c
2077
2078 systemd_getty_generator_LDADD = \
2079         libsystemd-label.la \
2080         libsystemd-shared.la
2081
2082 # ------------------------------------------------------------------------------
2083 systemd_debug_generator_SOURCES = \
2084         src/debug-generator/debug-generator.c
2085
2086 systemd_debug_generator_LDADD = \
2087         libsystemd-label.la \
2088         libsystemd-shared.la
2089
2090 # ------------------------------------------------------------------------------
2091 systemd_fstab_generator_SOURCES = \
2092         src/fstab-generator/fstab-generator.c \
2093         src/core/mount-setup.c
2094
2095 systemd_fstab_generator_LDADD = \
2096         libsystemd-label.la \
2097         libsystemd-shared.la
2098
2099 # ------------------------------------------------------------------------------
2100 systemd_system_update_generator_SOURCES = \
2101         src/system-update-generator/system-update-generator.c
2102
2103 systemd_system_update_generator_LDADD = \
2104         libsystemd-label.la \
2105         libsystemd-shared.la
2106
2107 if ENABLE_EFI
2108 # ------------------------------------------------------------------------------
2109 systemgenerator_PROGRAMS +=  \
2110         systemd-efi-boot-generator
2111
2112 systemd_efi_boot_generator_SOURCES = \
2113         src/efi-boot-generator/efi-boot-generator.c
2114
2115 systemd_efi_boot_generator_LDADD = \
2116         libsystemd-label.la \
2117         libsystemd-shared.la
2118
2119 # ------------------------------------------------------------------------------
2120 bootctl_SOURCES = \
2121         src/boot/boot.h \
2122         src/boot/boot-loader.h \
2123         src/boot/bootctl.c \
2124         src/boot/boot-loader.c \
2125         src/boot/boot-efi.c
2126
2127 bootctl_LDADD = \
2128         libsystemd-shared.la \
2129         libsystemd-internal.la
2130
2131 bin_PROGRAMS += \
2132         bootctl
2133
2134 dist_bashcompletion_DATA += \
2135         shell-completion/bash/bootctl
2136
2137 dist_zshcompletion_DATA += \
2138         shell-completion/zsh/_bootctl
2139
2140 endif
2141
2142 # ------------------------------------------------------------------------------
2143 if HAVE_BLKID
2144 systemgenerator_PROGRAMS +=  \
2145         systemd-gpt-auto-generator
2146
2147 systemd_gpt_auto_generator_SOURCES = \
2148         src/gpt-auto-generator/gpt-auto-generator.c \
2149         src/shared/blkid-util.h
2150
2151 systemd_gpt_auto_generator_LDADD = \
2152         libsystemd-label.la \
2153         libsystemd-internal.la \
2154         libudev-internal.la \
2155         libsystemd-shared.la \
2156         $(BLKID_LIBS)
2157
2158 systemd_gpt_auto_generator_CFLAGS = \
2159         $(AM_CFLAGS) \
2160         $(BLKID_CFLAGS)
2161 endif
2162
2163 # ------------------------------------------------------------------------------
2164 if ENABLE_KDBUS
2165 systemgenerator_PROGRAMS +=  \
2166         systemd-dbus1-generator
2167
2168 systemd_dbus1_generator_SOURCES = \
2169         src/dbus1-generator/dbus1-generator.c
2170
2171 systemd_dbus1_generator_LDADD = \
2172         libsystemd-label.la \
2173         libsystemd-shared.la \
2174         libsystemd-internal.la
2175
2176 dbus1-generator-install-hook:
2177         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2178         $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2179         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2180
2181 dbus1-generator-uninstall-hook:
2182         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2183
2184 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2185 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2186 endif
2187
2188 # ------------------------------------------------------------------------------
2189 systemd_sysv_generator_SOURCES = \
2190         src/sysv-generator/sysv-generator.c
2191
2192 systemd_sysv_generator_LDADD = \
2193         libsystemd-core.la \
2194         libsystemd-label.la \
2195         libsystemd-shared.la
2196
2197 # ------------------------------------------------------------------------------
2198 systemd_rc_local_generator_SOURCES = \
2199         src/rc-local-generator/rc-local-generator.c
2200
2201 systemd_rc_local_generator_LDADD = \
2202         libsystemd-label.la \
2203         libsystemd-shared.la
2204
2205 # ------------------------------------------------------------------------------
2206 systemd_remount_fs_SOURCES = \
2207         src/remount-fs/remount-fs.c \
2208         src/core/mount-setup.c \
2209         src/core/mount-setup.h
2210
2211 systemd_remount_fs_LDADD = \
2212         libsystemd-label.la \
2213         libsystemd-shared.la
2214
2215 # ------------------------------------------------------------------------------
2216 systemd_cgroups_agent_SOURCES = \
2217         src/cgroups-agent/cgroups-agent.c
2218
2219 systemd_cgroups_agent_LDADD = \
2220         libsystemd-internal.la \
2221         libsystemd-shared.la
2222
2223 # ------------------------------------------------------------------------------
2224 systemd_escape_SOURCES = \
2225         src/escape/escape.c
2226
2227 systemd_escape_LDADD = \
2228         libsystemd-shared.la
2229
2230 # -----------------------------------------------------------------------------
2231 systemctl_SOURCES = \
2232         src/systemctl/systemctl.c
2233
2234 systemctl_LDADD = \
2235         libsystemd-units.la \
2236         libsystemd-label.la \
2237         libsystemd-internal.la \
2238         libsystemd-logs.la \
2239         libsystemd-journal-internal.la \
2240         libsystemd-shared.la
2241
2242 # ------------------------------------------------------------------------------
2243 systemd_notify_SOURCES = \
2244         src/notify/notify.c \
2245         src/readahead/sd-readahead.c
2246
2247 systemd_notify_LDADD = \
2248         libsystemd-internal.la \
2249         libsystemd-shared.la
2250
2251 # ------------------------------------------------------------------------------
2252 systemd_path_SOURCES = \
2253         src/path/path.c
2254
2255 systemd_path_LDADD = \
2256         libsystemd-internal.la \
2257         libsystemd-shared.la
2258
2259 # ------------------------------------------------------------------------------
2260 systemd_ask_password_SOURCES = \
2261         src/ask-password/ask-password.c
2262
2263 systemd_ask_password_LDADD = \
2264         libsystemd-label.la \
2265         libsystemd-shared.la
2266
2267 # ------------------------------------------------------------------------------
2268 systemd_reply_password_SOURCES = \
2269         src/reply-password/reply-password.c
2270
2271 systemd_reply_password_LDADD = \
2272         libsystemd-shared.la
2273
2274 # ------------------------------------------------------------------------------
2275 systemd_cgls_SOURCES = \
2276         src/cgls/cgls.c
2277
2278 systemd_cgls_LDADD = \
2279         libsystemd-internal.la \
2280         libsystemd-shared.la
2281
2282 # ------------------------------------------------------------------------------
2283 systemd_cgtop_SOURCES = \
2284         src/cgtop/cgtop.c
2285
2286 systemd_cgtop_LDADD = \
2287         libsystemd-shared.la
2288
2289 # ------------------------------------------------------------------------------
2290 systemd_nspawn_SOURCES = \
2291         src/nspawn/nspawn.c \
2292         src/core/mount-setup.c \
2293         src/core/mount-setup.h \
2294         src/core/loopback-setup.c \
2295         src/core/loopback-setup.h
2296
2297 systemd_nspawn_CFLAGS = \
2298         $(AM_CFLAGS) \
2299         $(SECCOMP_CFLAGS) \
2300         $(BLKID_CFLAGS)
2301
2302 systemd_nspawn_LDADD = \
2303         libsystemd-label.la \
2304         libsystemd-capability.la \
2305         libsystemd-internal.la \
2306         libudev-internal.la \
2307         libsystemd-shared.la \
2308         $(BLKID_LIBS)
2309
2310 if HAVE_SECCOMP
2311 systemd_nspawn_LDADD += \
2312         libsystemd-seccomp.la \
2313         $(SECCOMP_LIBS)
2314 endif
2315
2316 # ------------------------------------------------------------------------------
2317 systemd_run_SOURCES = \
2318         src/run/run.c
2319
2320 systemd_run_LDADD = \
2321         libsystemd-label.la \
2322         libsystemd-capability.la \
2323         libsystemd-internal.la \
2324         libsystemd-shared.la
2325
2326 # ------------------------------------------------------------------------------
2327 systemd_bus_proxyd_SOURCES = \
2328         src/bus-proxyd/bus-proxyd.c \
2329         src/bus-proxyd/bus-policy.c \
2330         src/bus-proxyd/bus-policy.h
2331
2332 systemd_bus_proxyd_LDADD = \
2333         libsystemd-capability.la \
2334         libsystemd-internal.la \
2335         libsystemd-shared.la
2336
2337 bus-proxyd-install-hook:
2338         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
2339         $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2340         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
2341
2342 bus-proxyd-uninstall-hook:
2343         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2344
2345 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
2346 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
2347
2348 if ENABLE_KDBUS
2349 nodist_systemunit_DATA += \
2350         units/systemd-bus-proxyd@.service
2351
2352 dist_systemunit_DATA += \
2353         units/systemd-bus-proxyd.socket
2354
2355 dist_userunit_DATA += \
2356         units/user/systemd-bus-proxyd.socket \
2357         units/user/systemd-bus-proxyd@.service
2358 endif
2359
2360 EXTRA_DIST += \
2361         units/systemd-bus-proxyd@.service.in
2362
2363 # ------------------------------------------------------------------------------
2364 systemd_tty_ask_password_agent_SOURCES = \
2365         src/tty-ask-password-agent/tty-ask-password-agent.c
2366
2367 systemd_tty_ask_password_agent_LDADD = \
2368         libsystemd-label.la \
2369         libsystemd-shared.la
2370
2371 # ------------------------------------------------------------------------------
2372 libsystemd_internal_la_SOURCES = \
2373         src/systemd/sd-bus.h \
2374         src/systemd/sd-bus-protocol.h \
2375         src/systemd/sd-bus-vtable.h \
2376         src/systemd/sd-memfd.h \
2377         src/systemd/sd-utf8.h \
2378         src/systemd/sd-event.h \
2379         src/systemd/sd-rtnl.h \
2380         src/systemd/sd-resolve.h \
2381         src/systemd/sd-login.h \
2382         src/systemd/sd-id128.h \
2383         src/systemd/sd-daemon.h \
2384         src/systemd/sd-path.h \
2385         src/systemd/sd-network.h \
2386         src/libsystemd/sd-bus/sd-bus.c \
2387         src/libsystemd/sd-bus/bus-control.c \
2388         src/libsystemd/sd-bus/bus-control.h \
2389         src/libsystemd/sd-bus/bus-error.c \
2390         src/libsystemd/sd-bus/bus-error.h \
2391         src/libsystemd/sd-bus/bus-internal.c \
2392         src/libsystemd/sd-bus/bus-internal.h \
2393         src/libsystemd/sd-bus/bus-socket.c \
2394         src/libsystemd/sd-bus/bus-socket.h \
2395         src/libsystemd/sd-bus/bus-kernel.c \
2396         src/libsystemd/sd-bus/bus-kernel.h \
2397         src/libsystemd/sd-bus/bus-container.c \
2398         src/libsystemd/sd-bus/bus-container.h \
2399         src/libsystemd/sd-bus/bus-message.c \
2400         src/libsystemd/sd-bus/bus-message.h \
2401         src/libsystemd/sd-bus/bus-creds.c \
2402         src/libsystemd/sd-bus/bus-creds.h \
2403         src/libsystemd/sd-bus/bus-signature.c \
2404         src/libsystemd/sd-bus/bus-signature.h \
2405         src/libsystemd/sd-bus/bus-type.c \
2406         src/libsystemd/sd-bus/bus-type.h \
2407         src/libsystemd/sd-bus/bus-match.c \
2408         src/libsystemd/sd-bus/bus-match.h \
2409         src/libsystemd/sd-bus/bus-bloom.c \
2410         src/libsystemd/sd-bus/bus-bloom.h \
2411         src/libsystemd/sd-bus/bus-introspect.c \
2412         src/libsystemd/sd-bus/bus-introspect.h \
2413         src/libsystemd/sd-bus/bus-objects.c \
2414         src/libsystemd/sd-bus/bus-objects.h \
2415         src/libsystemd/sd-bus/bus-gvariant.c \
2416         src/libsystemd/sd-bus/bus-gvariant.h \
2417         src/libsystemd/sd-bus/bus-convenience.c \
2418         src/libsystemd/sd-bus/bus-track.c \
2419         src/libsystemd/sd-bus/bus-track.h \
2420         src/libsystemd/sd-bus/bus-util.c \
2421         src/libsystemd/sd-bus/bus-util.h \
2422         src/libsystemd/sd-bus/bus-slot.c \
2423         src/libsystemd/sd-bus/bus-slot.h \
2424         src/libsystemd/sd-bus/bus-protocol.h \
2425         src/libsystemd/sd-bus/kdbus.h \
2426         src/libsystemd/sd-bus/sd-memfd.c \
2427         src/libsystemd/sd-utf8/sd-utf8.c \
2428         src/libsystemd/sd-event/sd-event.c \
2429         src/libsystemd/sd-event/event-util.h \
2430         src/libsystemd/sd-rtnl/sd-rtnl.c \
2431         src/libsystemd/sd-rtnl/rtnl-internal.h \
2432         src/libsystemd/sd-rtnl/rtnl-message.c \
2433         src/libsystemd/sd-rtnl/rtnl-types.h \
2434         src/libsystemd/sd-rtnl/rtnl-types.c \
2435         src/libsystemd/sd-rtnl/rtnl-util.h \
2436         src/libsystemd/sd-rtnl/rtnl-util.c \
2437         src/libsystemd/sd-rtnl/local-addresses.h \
2438         src/libsystemd/sd-rtnl/local-addresses.c \
2439         src/libsystemd/sd-id128/sd-id128.c \
2440         src/libsystemd/sd-daemon/sd-daemon.c \
2441         src/libsystemd/sd-login/sd-login.c \
2442         src/libsystemd/sd-path/sd-path.c \
2443         src/libsystemd/sd-network/sd-network.c \
2444         src/libsystemd/sd-network/network-util.h \
2445         src/libsystemd/sd-network/network-util.c
2446
2447 nodist_libsystemd_internal_la_SOURCES = \
2448         src/libsystemd/libsystemd.sym \
2449         src/libsystemd/sd-bus/bus-error-mapping.c
2450
2451 libsystemd_internal_la_CFLAGS = \
2452         $(AM_CFLAGS) \
2453         -pthread
2454
2455 libsystemd_internal_la_LIBADD = \
2456         $(RT_LIBS)
2457
2458 libsystemd_resolve_la_SOURCES = \
2459         src/libsystemd/sd-resolve/sd-resolve.c \
2460         src/libsystemd/sd-resolve/resolve-util.h
2461
2462 libsystemd_resolve_la_CFLAGS = \
2463         $(AM_CFLAGS) \
2464         -pthread
2465
2466 libsystemd_resolve_la_LIBADD = \
2467         -lresolv
2468
2469 noinst_LTLIBRARIES += \
2470         libsystemd-internal.la \
2471         libsystemd-resolve.la
2472
2473 libsystemd_dump_la_SOURCES = \
2474         src/libsystemd/sd-bus/bus-dump.c \
2475         src/libsystemd/sd-bus/bus-dump.h
2476
2477 libsystemd_dump_la_CFLAGS = \
2478         $(AM_CFLAGS) \
2479         $(CAP_CFLAGS)
2480
2481 noinst_LTLIBRARIES += \
2482         libsystemd-dump.la
2483
2484 EXTRA_DIST += \
2485         src/libsystemd/libsystemd.sym.m4 \
2486         src/libsystemd/libsystemd.pc.in \
2487         src/libsystemd/sd-bus/bus-error-mapping.gperf \
2488         src/libsystemd/sd-bus/DIFFERENCES \
2489         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2490
2491 CLEANFILES += \
2492         src/libsystemd/libsystemd.sym \
2493         src/libsystemd/sd-bus/bus-error-mapping.c
2494
2495 BUILT_SOURCES += \
2496         src/libsystemd/libsystemd.sym
2497
2498 libsystemd_la_SOURCES = \
2499         $(libsystemd_internal_la_SOURCES) \
2500         $(libsystemd_resolve_la_SOURCES) \
2501         $(libsystemd_journal_internal_la_SOURCES)
2502
2503 nodist_libsystemd_la_SOURCES = \
2504         $(nodist_libsystemd_internal_la_SOURCES)
2505
2506 libsystemd_la_CFLAGS = \
2507         $(libsystemd_internal_la_CFLAGS) \
2508         $(libsystemd_resolve_la_CFLAGS) \
2509         $(libsystemd_journal_internal_la_CFLAGS)
2510
2511 libsystemd_la_LDFLAGS = \
2512         $(AM_LDFLAGS) \
2513         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2514         -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2515
2516 libsystemd_la_LIBADD = \
2517         libsystemd-shared.la \
2518         $(libsystemd_internal_la_LIBADD) \
2519         $(libsystemd_journal_internal_la_LIBADD) \
2520         $(libsystemd_resolve_la_LIBADD)
2521
2522 libsystemd-install-hook:
2523         libname=libsystemd.so && $(move-to-rootlibdir)
2524
2525 libsystemd-uninstall-hook:
2526         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2527
2528 INSTALL_EXEC_HOOKS += libsystemd-install-hook
2529 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2530
2531 pkgconfiglib_DATA += \
2532         src/libsystemd/libsystemd.pc
2533
2534 pkginclude_HEADERS += \
2535         src/systemd/sd-login.h \
2536         src/systemd/sd-id128.h \
2537         src/systemd/sd-daemon.h
2538
2539 if ENABLE_KDBUS
2540 pkginclude_HEADERS += \
2541         src/systemd/sd-bus.h \
2542         src/systemd/sd-bus-protocol.h \
2543         src/systemd/sd-bus-vtable.h \
2544         src/systemd/sd-memfd.h \
2545         src/systemd/sd-utf8.h \
2546         src/systemd/sd-event.h \
2547         src/systemd/sd-rtnl.h \
2548         src/systemd/sd-resolve.h \
2549         src/systemd/sd-path.h
2550 endif
2551
2552 lib_LTLIBRARIES += \
2553         libsystemd.la
2554
2555 tests += \
2556         test-bus-marshal \
2557         test-bus-signature \
2558         test-bus-chat \
2559         test-bus-cleanup \
2560         test-bus-server \
2561         test-bus-match \
2562         test-bus-kernel \
2563         test-bus-kernel-bloom \
2564         test-bus-kernel-benchmark \
2565         test-bus-memfd \
2566         test-bus-zero-copy \
2567         test-bus-introspect \
2568         test-bus-objects \
2569         test-bus-error \
2570         test-bus-creds \
2571         test-bus-gvariant \
2572         test-event \
2573         test-rtnl \
2574         test-resolve
2575
2576 bin_PROGRAMS += \
2577         busctl
2578
2579 test_bus_marshal_SOURCES = \
2580         src/libsystemd/sd-bus/test-bus-marshal.c
2581
2582 test_bus_marshal_LDADD = \
2583         libsystemd-internal.la \
2584         libsystemd-shared.la \
2585         libsystemd-dump.la \
2586         libsystemd-capability.la \
2587         $(GLIB_LIBS) \
2588         $(DBUS_LIBS) \
2589         $(CAP_LIBS)
2590
2591 test_bus_marshal_CFLAGS = \
2592         $(AM_CFLAGS) \
2593         $(GLIB_CFLAGS) \
2594         $(DBUS_CFLAGS) \
2595         $(CAP_CFLAGS)
2596
2597 test_bus_signature_SOURCES = \
2598         src/libsystemd/sd-bus/test-bus-signature.c
2599
2600 test_bus_signature_LDADD = \
2601         libsystemd-shared.la \
2602         libsystemd-internal.la
2603
2604 test_bus_chat_SOURCES = \
2605         src/libsystemd/sd-bus/test-bus-chat.c
2606
2607 test_bus_chat_CFLAGS = \
2608         $(AM_CFLAGS) \
2609         -pthread
2610
2611 test_bus_chat_LDADD = \
2612         libsystemd-internal.la \
2613         libsystemd-shared.la
2614
2615 test_bus_cleanup_SOURCES = \
2616         src/libsystemd/sd-bus/test-bus-cleanup.c
2617
2618 test_bus_cleanup_CFLAGS = \
2619         $(AM_CFLAGS) \
2620         $(SECCOMP_CFLAGS)
2621
2622 test_bus_cleanup_LDADD = \
2623         libsystemd-internal.la \
2624         libsystemd-shared.la
2625
2626 test_bus_server_SOURCES = \
2627         src/libsystemd/sd-bus/test-bus-server.c
2628
2629 test_bus_server_CFLAGS = \
2630         $(AM_CFLAGS) \
2631         -pthread
2632
2633 test_bus_server_LDADD = \
2634         libsystemd-internal.la \
2635         libsystemd-shared.la
2636
2637 test_bus_objects_SOURCES = \
2638         src/libsystemd/sd-bus/test-bus-objects.c
2639
2640 test_bus_objects_CFLAGS = \
2641         $(AM_CFLAGS) \
2642         $(CAP_CFLAGS) \
2643         -pthread
2644
2645 test_bus_objects_LDADD = \
2646         libsystemd-internal.la \
2647         libsystemd-shared.la \
2648         libsystemd-dump.la \
2649         libsystemd-capability.la \
2650         $(CAP_LIBS)
2651
2652 test_bus_error_SOURCES = \
2653         src/libsystemd/sd-bus/test-bus-error.c
2654
2655 test_bus_error_LDADD = \
2656         libsystemd-internal.la \
2657         libsystemd-shared.la
2658
2659 test_bus_gvariant_SOURCES = \
2660         src/libsystemd/sd-bus/test-bus-gvariant.c
2661
2662 test_bus_gvariant_LDADD = \
2663         libsystemd-internal.la \
2664         libsystemd-shared.la \
2665         libsystemd-dump.la \
2666         libsystemd-capability.la \
2667         $(GLIB_LIBS) \
2668         $(CAP_LIBS)
2669
2670 test_bus_gvariant_CFLAGS = \
2671         $(AM_CFLAGS) \
2672         $(GLIB_CFLAGS)
2673         $(CAP_CFLAGS)
2674
2675 test_bus_creds_SOURCES = \
2676         src/libsystemd/sd-bus/test-bus-creds.c
2677
2678 test_bus_creds_LDADD = \
2679         libsystemd-internal.la \
2680         libsystemd-shared.la \
2681         libsystemd-dump.la \
2682         libsystemd-capability.la
2683
2684 test_bus_match_SOURCES = \
2685         src/libsystemd/sd-bus/test-bus-match.c
2686
2687 test_bus_match_LDADD = \
2688         libsystemd-internal.la \
2689         libsystemd-shared.la
2690
2691 test_bus_kernel_SOURCES = \
2692         src/libsystemd/sd-bus/test-bus-kernel.c
2693
2694 test_bus_kernel_LDADD = \
2695         libsystemd-internal.la \
2696         libsystemd-shared.la \
2697         libsystemd-dump.la \
2698         libsystemd-capability.la \
2699         $(CAP_LIBS)
2700
2701 test_bus_kernel_CFLAGS = \
2702         $(AM_CFLAGS) \
2703         $(CAP_CFLAGS)
2704
2705 test_bus_kernel_bloom_SOURCES = \
2706         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2707
2708 test_bus_kernel_bloom_LDADD = \
2709         libsystemd-internal.la \
2710         libsystemd-shared.la
2711
2712 test_bus_kernel_benchmark_SOURCES = \
2713         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2714
2715 test_bus_kernel_benchmark_LDADD = \
2716         libsystemd-internal.la \
2717         libsystemd-shared.la
2718
2719 test_bus_memfd_SOURCES = \
2720         src/libsystemd/sd-bus/test-bus-memfd.c
2721
2722 test_bus_memfd_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     &