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