chiark / gitweb /
man: clarify what "microsoft" and "oracle" stand for
[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 GCC_COLORS ?= 'ooh, shiny!'
28 export GCC_COLORS
29
30 SUBDIRS = . po
31
32 # remove targets if the command fails
33 .DELETE_ON_ERROR:
34
35 # keep intermediate files
36 .SECONDARY:
37
38 # Keep the test-suite.log
39 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
40
41 LIBUDEV_CURRENT=7
42 LIBUDEV_REVISION=0
43 LIBUDEV_AGE=6
44
45 LIBGUDEV_CURRENT=2
46 LIBGUDEV_REVISION=0
47 LIBGUDEV_AGE=2
48
49 LIBSYSTEMD_CURRENT=4
50 LIBSYSTEMD_REVISION=0
51 LIBSYSTEMD_AGE=4
52
53 # The following four libraries only exist for compatibility reasons,
54 # their version info should not be bumped anymore
55 LIBSYSTEMD_LOGIN_CURRENT=9
56 LIBSYSTEMD_LOGIN_REVISION=3
57 LIBSYSTEMD_LOGIN_AGE=9
58
59 LIBSYSTEMD_DAEMON_CURRENT=0
60 LIBSYSTEMD_DAEMON_REVISION=12
61 LIBSYSTEMD_DAEMON_AGE=0
62
63 LIBSYSTEMD_ID128_CURRENT=0
64 LIBSYSTEMD_ID128_REVISION=28
65 LIBSYSTEMD_ID128_AGE=0
66
67 LIBSYSTEMD_JOURNAL_CURRENT=11
68 LIBSYSTEMD_JOURNAL_REVISION=5
69 LIBSYSTEMD_JOURNAL_AGE=11
70
71 # Dirs of external packages
72 dbuspolicydir=@dbuspolicydir@
73 dbussessionservicedir=@dbussessionservicedir@
74 dbussystemservicedir=@dbussystemservicedir@
75 pamlibdir=@pamlibdir@
76 pamconfdir=@pamconfdir@
77 pkgconfigdatadir=$(datadir)/pkgconfig
78 pkgconfiglibdir=$(libdir)/pkgconfig
79 polkitpolicydir=$(datadir)/polkit-1/actions
80 bashcompletiondir=@bashcompletiondir@
81 zshcompletiondir=@zshcompletiondir@
82 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
83 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
84 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
85 varlogdir=$(localstatedir)/log
86 systemdstatedir=$(localstatedir)/lib/systemd
87 catalogstatedir=$(systemdstatedir)/catalog
88
89 # Our own, non-special dirs
90 pkgsysconfdir=$(sysconfdir)/systemd
91 userunitdir=$(prefix)/lib/systemd/user
92 userpresetdir=$(prefix)/lib/systemd/user-preset
93 tmpfilesdir=$(prefix)/lib/tmpfiles.d
94 sysusersdir=$(prefix)/lib/sysusers.d
95 sysctldir=$(prefix)/lib/sysctl.d
96 binfmtdir=$(prefix)/lib/binfmt.d
97 modulesloaddir=$(prefix)/lib/modules-load.d
98 networkdir=$(rootprefix)/lib/systemd/network
99 pkgincludedir=$(includedir)/systemd
100 systemgeneratordir=$(rootlibexecdir)/system-generators
101 usergeneratordir=$(prefix)/lib/systemd/user-generators
102 systemshutdowndir=$(rootlibexecdir)/system-shutdown
103 systemsleepdir=$(rootlibexecdir)/system-sleep
104 systemunitdir=$(rootprefix)/lib/systemd/system
105 systempresetdir=$(rootprefix)/lib/systemd/system-preset
106 udevlibexecdir=$(rootprefix)/lib/udev
107 udevhomedir=$(udevlibexecdir)
108 udevrulesdir=$(udevlibexecdir)/rules.d
109 udevhwdbdir=$(udevlibexecdir)/hwdb.d
110 catalogdir=$(prefix)/lib/systemd/catalog
111 kernelinstalldir = $(prefix)/lib/kernel/install.d
112 factory_etcdir = $(prefix)/share/factory/etc
113 factory_pamdir = $(prefix)/share/factory/etc/pam.d
114
115 # And these are the special ones for /
116 rootprefix=@rootprefix@
117 rootbindir=$(rootprefix)/bin
118 rootlibexecdir=$(rootprefix)/lib/systemd
119
120 CLEANFILES = $(BUILT_SOURCES)
121 DISTCLEANFILES =
122 EXTRA_DIST =
123 BUILT_SOURCES =
124 INSTALL_EXEC_HOOKS =
125 UNINSTALL_EXEC_HOOKS =
126 INSTALL_DATA_HOOKS =
127 UNINSTALL_DATA_HOOKS =
128 DISTCLEAN_LOCAL_HOOKS =
129 CLEAN_LOCAL_HOOKS =
130 pkginclude_HEADERS =
131 noinst_LTLIBRARIES =
132 lib_LTLIBRARIES =
133 include_HEADERS =
134 noinst_DATA =
135 pkgconfiglib_DATA =
136 polkitpolicy_in_in_files =
137 polkitpolicy_in_files =
138 polkitpolicy_files =
139 dist_udevrules_DATA =
140 nodist_udevrules_DATA =
141 dist_pkgsysconf_DATA =
142 nodist_pkgsysconf_DATA =
143 dist_pkgdata_DATA =
144 dist_dbuspolicy_DATA =
145 dist_dbussystemservice_DATA =
146 dist_systemunit_DATA_busnames =
147 check_PROGRAMS =
148 check_DATA =
149 tests=
150 manual_tests =
151 if ENABLE_TESTS
152 noinst_PROGRAMS = $(manual_tests) $(tests)
153 TESTS = $(tests)
154 else
155 noinst_PROGRAMS =
156 TESTS =
157 endif
158 udevlibexec_PROGRAMS =
159
160 .PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
161         $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
162         $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
163
164 AM_CPPFLAGS = \
165         -include $(top_builddir)/config.h \
166         -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
167         -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
168         -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
169         -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
170         -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
171         -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
172         -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
173         -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
174         -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
175         -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
176         -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
177         -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
178         -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
179         -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
180         -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
181         -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
182         -DROOTPREFIX=\"$(rootprefix)\" \
183         -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
184         -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
185         -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
186         -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
187         -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
188         -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
189         -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
190         -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
191         -DX_SERVER=\"$(bindir)/X\" \
192         -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
193         -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
194         -DQUOTACHECK=\"$(QUOTACHECK)\" \
195         -DKEXEC=\"$(KEXEC)\" \
196         -DLIBDIR=\"$(libdir)\" \
197         -DROOTLIBDIR=\"$(rootlibdir)\" \
198         -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
199         -I $(top_srcdir)/src \
200         -I $(top_builddir)/src/shared \
201         -I $(top_srcdir)/src/shared \
202         -I $(top_srcdir)/src/network \
203         -I $(top_srcdir)/src/login \
204         -I $(top_srcdir)/src/journal \
205         -I $(top_srcdir)/src/timedate \
206         -I $(top_srcdir)/src/timesync \
207         -I $(top_srcdir)/src/resolve \
208         -I $(top_builddir)/src/resolve \
209         -I $(top_srcdir)/src/systemd \
210         -I $(top_builddir)/src/core \
211         -I $(top_srcdir)/src/core \
212         -I $(top_srcdir)/src/libudev \
213         -I $(top_srcdir)/src/udev \
214         -I $(top_srcdir)/src/udev/net \
215         -I $(top_builddir)/src/udev \
216         -I $(top_srcdir)/src/libsystemd/sd-bus \
217         -I $(top_srcdir)/src/libsystemd/sd-event \
218         -I $(top_srcdir)/src/libsystemd/sd-rtnl \
219         -I $(top_srcdir)/src/libsystemd/sd-network \
220         -I $(top_srcdir)/src/libsystemd-network \
221         -I $(top_srcdir)/src/libsystemd-terminal \
222         $(OUR_CPPFLAGS)
223
224 AM_CFLAGS = $(OUR_CFLAGS)
225 AM_LDFLAGS = $(OUR_LDFLAGS)
226
227 # ------------------------------------------------------------------------------
228 define move-to-rootlibdir
229         if test "$(libdir)" != "$(rootlibdir)"; then \
230                 $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
231                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
232                 rm -f $(DESTDIR)$(libdir)/$$libname && \
233                 $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
234                 mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
235         fi
236 endef
237
238 INSTALL_DIRS =
239
240 RUNLEVEL1_TARGET_WANTS =
241 RUNLEVEL2_TARGET_WANTS =
242 RUNLEVEL3_TARGET_WANTS =
243 RUNLEVEL4_TARGET_WANTS =
244 RUNLEVEL5_TARGET_WANTS =
245 SHUTDOWN_TARGET_WANTS =
246 LOCAL_FS_TARGET_WANTS =
247 MULTI_USER_TARGET_WANTS =
248 SYSINIT_TARGET_WANTS =
249 SOCKETS_TARGET_WANTS =
250 BUSNAMES_TARGET_WANTS =
251 TIMERS_TARGET_WANTS =
252 USER_SOCKETS_TARGET_WANTS =
253 USER_DEFAULT_TARGET_WANTS =
254 USER_BUSNAMES_TARGET_WANTS =
255
256 SYSTEM_UNIT_ALIASES =
257 USER_UNIT_ALIASES =
258 GENERAL_ALIASES =
259
260 install-target-wants-hook:
261         what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && dir=$(systemunitdir) && $(add-wants)
262         what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && dir=$(systemunitdir) && $(add-wants)
263         what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && dir=$(systemunitdir) && $(add-wants)
264         what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && dir=$(systemunitdir) && $(add-wants)
265         what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && dir=$(systemunitdir) && $(add-wants)
266         what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
267         what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
268         what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
269         what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
270         what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
271         what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
272         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
273         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
274         what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
275
276 install-busnames-target-wants-hook:
277         what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
278         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
279
280 define add-wants
281         [ -z "$$what" ] || ( \
282           dir=$(DESTDIR)$$dir/$$wants.wants && \
283           $(MKDIR_P) -m 0755 $$dir && \
284           cd $$dir && \
285           rm -f $$what && \
286           for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
287 endef
288
289 install-directories-hook:
290         $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
291
292 install-aliases-hook:
293         set -- $(SYSTEM_UNIT_ALIASES) && \
294                 dir=$(systemunitdir) && $(install-aliases)
295         set -- $(USER_UNIT_ALIASES) && \
296                 dir=$(userunitdir) && $(install-relative-aliases)
297         set -- $(GENERAL_ALIASES) && \
298                 dir= && $(install-relative-aliases)
299
300 define install-aliases
301         while [ -n "$$1" ]; do \
302                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
303                 rm -f $(DESTDIR)$$dir/$$2 && \
304                 $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
305                 shift 2 || exit $$?; \
306         done
307 endef
308
309 define install-relative-aliases
310         while [ -n "$$1" ]; do \
311                 $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
312                 rm -f $(DESTDIR)$$dir/$$2 && \
313                 $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
314                 shift 2 || exit $$?; \
315         done
316 endef
317
318 install-touch-usr-hook:
319         touch -c $(DESTDIR)/$(prefix)
320
321 INSTALL_EXEC_HOOKS += \
322         install-target-wants-hook \
323         install-directories-hook \
324         install-aliases-hook \
325         install-touch-usr-hook
326
327 if ENABLE_KDBUS
328 INSTALL_EXEC_HOOKS += \
329         install-busnames-target-wants-hook
330 endif
331
332 # ------------------------------------------------------------------------------
333 AM_V_M4 = $(AM_V_M4_$(V))
334 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
335 AM_V_M4_0 = @echo "  M4      " $@;
336
337 AM_V_XSLT = $(AM_V_XSLT_$(V))
338 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
339 AM_V_XSLT_0 = @echo "  XSLT    " $@;
340
341 AM_V_GPERF = $(AM_V_GPERF_$(V))
342 AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
343 AM_V_GPERF_0 = @echo "  GPERF   " $@;
344
345 AM_V_LN = $(AM_V_LN_$(V))
346 AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
347 AM_V_LN_0 = @echo "  LN      " $@;
348
349 AM_V_RM = $(AM_V_RM_$(V))
350 AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
351 AM_V_RM_0 = @echo "  RM      " $@;
352
353 # ------------------------------------------------------------------------------
354 rootbin_PROGRAMS = \
355         systemctl \
356         systemd-notify \
357         systemd-ask-password \
358         systemd-tty-ask-password-agent \
359         systemd-machine-id-setup \
360         systemd-escape
361
362 bin_PROGRAMS = \
363         systemd-cgls \
364         systemd-cgtop \
365         systemd-nspawn \
366         systemd-detect-virt \
367         systemd-delta \
368         systemd-analyze \
369         systemd-run \
370         systemd-path
371
372 dist_bin_SCRIPTS = \
373         src/kernel-install/kernel-install
374
375 dist_kernelinstall_SCRIPTS = \
376         src/kernel-install/50-depmod.install \
377         src/kernel-install/90-loaderentry.install
378
379 rootlibexec_PROGRAMS = \
380         systemd \
381         systemd-cgroups-agent \
382         systemd-initctl \
383         systemd-shutdownd \
384         systemd-shutdown \
385         systemd-remount-fs \
386         systemd-reply-password \
387         systemd-fsck \
388         systemd-ac-power \
389         systemd-sysctl \
390         systemd-sleep \
391         systemd-bus-proxyd \
392         systemd-socket-proxyd \
393         systemd-update-done
394
395 if HAVE_UTMP
396 rootlibexec_PROGRAMS += \
397         systemd-update-utmp
398 endif
399
400 systemgenerator_PROGRAMS = \
401         systemd-getty-generator \
402         systemd-fstab-generator \
403         systemd-system-update-generator \
404         systemd-debug-generator
405
406 dist_bashcompletion_DATA = \
407         shell-completion/bash/busctl \
408         shell-completion/bash/journalctl \
409         shell-completion/bash/systemd-analyze \
410         shell-completion/bash/systemd-cat \
411         shell-completion/bash/systemd-cgls \
412         shell-completion/bash/systemd-cgtop \
413         shell-completion/bash/systemd-delta \
414         shell-completion/bash/systemd-detect-virt \
415         shell-completion/bash/systemd-nspawn \
416         shell-completion/bash/systemd-run \
417         shell-completion/bash/udevadm \
418         shell-completion/bash/kernel-install
419
420 nodist_bashcompletion_DATA = \
421         shell-completion/bash/systemctl
422
423 dist_zshcompletion_DATA = \
424         shell-completion/zsh/_journalctl \
425         shell-completion/zsh/_udevadm \
426         shell-completion/zsh/_kernel-install \
427         shell-completion/zsh/_systemd-nspawn \
428         shell-completion/zsh/_systemd-analyze \
429         shell-completion/zsh/_systemd-run \
430         shell-completion/zsh/_sd_hosts_or_user_at_host \
431         shell-completion/zsh/_sd_outputmodes \
432         shell-completion/zsh/_sd_unit_files \
433         shell-completion/zsh/_systemd-delta \
434         shell-completion/zsh/_systemd
435
436 nodist_zshcompletion_DATA = \
437         shell-completion/zsh/_systemctl
438
439 EXTRA_DIST += \
440         shell-completion/bash/systemctl.in \
441         shell-completion/zsh/_systemctl.in
442
443 CLEANFILES += \
444         $(nodist_bashcompletion_DATA) \
445         $(nodist_zshcompletion_DATA)
446
447 dist_sysctl_DATA = \
448         sysctl.d/50-default.conf
449
450 dist_systemunit_DATA = \
451         units/graphical.target \
452         units/multi-user.target \
453         units/emergency.target \
454         units/sysinit.target \
455         units/basic.target \
456         units/getty.target \
457         units/halt.target \
458         units/kexec.target \
459         units/local-fs.target \
460         units/local-fs-pre.target \
461         units/initrd.target \
462         units/initrd-fs.target \
463         units/initrd-root-fs.target \
464         units/remote-fs.target \
465         units/remote-fs-pre.target \
466         units/network.target \
467         units/network-pre.target \
468         units/network-online.target \
469         units/nss-lookup.target \
470         units/nss-user-lookup.target \
471         units/poweroff.target \
472         units/reboot.target \
473         units/rescue.target \
474         units/rpcbind.target \
475         units/time-sync.target \
476         units/shutdown.target \
477         units/final.target \
478         units/umount.target \
479         units/sigpwr.target \
480         units/sleep.target \
481         units/sockets.target \
482         units/timers.target \
483         units/paths.target \
484         units/suspend.target \
485         units/swap.target \
486         units/slices.target \
487         units/system.slice \
488         units/x-.slice \
489         units/systemd-initctl.socket \
490         units/systemd-shutdownd.socket \
491         units/syslog.socket \
492         units/dev-hugepages.mount \
493         units/dev-mqueue.mount \
494         units/sys-kernel-config.mount \
495         units/sys-kernel-debug.mount \
496         units/sys-fs-fuse-connections.mount \
497         units/tmp.mount \
498         units/printer.target \
499         units/sound.target \
500         units/bluetooth.target \
501         units/smartcard.target \
502         units/systemd-ask-password-wall.path \
503         units/systemd-ask-password-console.path \
504         units/systemd-udevd-control.socket \
505         units/systemd-udevd-kernel.socket \
506         units/system-update.target \
507         units/initrd-switch-root.target
508
509 if ENABLE_KDBUS
510 dist_systemunit_DATA += \
511         $(dist_systemunit_DATA_busnames)
512 endif
513
514 dist_systemunit_DATA_busnames += \
515         units/busnames.target
516
517 nodist_systemunit_DATA = \
518         units/getty@.service \
519         units/serial-getty@.service \
520         units/console-shell.service \
521         units/console-getty.service \
522         units/container-getty@.service \
523         units/systemd-initctl.service \
524         units/systemd-shutdownd.service \
525         units/systemd-remount-fs.service \
526         units/systemd-ask-password-wall.service \
527         units/systemd-ask-password-console.service \
528         units/systemd-sysctl.service \
529         units/emergency.service \
530         units/rescue.service \
531         units/user@.service \
532         units/systemd-suspend.service \
533         units/systemd-halt.service \
534         units/systemd-poweroff.service \
535         units/systemd-reboot.service \
536         units/systemd-kexec.service \
537         units/systemd-fsck@.service \
538         units/systemd-fsck-root.service \
539         units/systemd-udevd.service \
540         units/systemd-udev-trigger.service \
541         units/systemd-udev-settle.service \
542         units/systemd-udev-hwdb-update.service \
543         units/debug-shell.service \
544         units/initrd-parse-etc.service \
545         units/initrd-cleanup.service \
546         units/initrd-udevadm-cleanup-db.service \
547         units/initrd-switch-root.service \
548         units/systemd-nspawn@.service \
549         units/systemd-update-done.service
550
551 if HAVE_UTMP
552 nodist_systemunit_DATA += \
553         units/systemd-update-utmp.service \
554         units/systemd-update-utmp-runlevel.service
555 endif
556
557 dist_userunit_DATA = \
558         units/user/basic.target \
559         units/user/default.target \
560         units/user/exit.target
561
562 nodist_userunit_DATA = \
563         units/user/systemd-exit.service
564
565 dist_systempreset_DATA = \
566         system-preset/90-systemd.preset
567
568 EXTRA_DIST += \
569         units/getty@.service.m4 \
570         units/serial-getty@.service.m4 \
571         units/console-shell.service.m4.in \
572         units/console-getty.service.m4.in \
573         units/container-getty@.service.m4.in \
574         units/rescue.service.in \
575         units/systemd-initctl.service.in \
576         units/systemd-shutdownd.service.in \
577         units/systemd-remount-fs.service.in \
578         units/systemd-update-utmp.service.in \
579         units/systemd-update-utmp-runlevel.service.in \
580         units/systemd-ask-password-wall.service.in \
581         units/systemd-ask-password-console.service.in \
582         units/systemd-sysctl.service.in \
583         units/emergency.service.in \
584         units/systemd-halt.service.in \
585         units/systemd-poweroff.service.in \
586         units/systemd-reboot.service.in \
587         units/systemd-kexec.service.in \
588         units/user/systemd-exit.service.in \
589         units/systemd-fsck@.service.in \
590         units/systemd-fsck-root.service.in \
591         units/user@.service.in \
592         units/debug-shell.service.in \
593         units/systemd-suspend.service.in \
594         units/quotaon.service.in \
595         units/initrd-parse-etc.service.in \
596         units/initrd-cleanup.service.in \
597         units/initrd-udevadm-cleanup-db.service.in \
598         units/initrd-switch-root.service.in \
599         units/systemd-nspawn@.service.in \
600         units/systemd-update-done.service.in
601
602 CLEANFILES += \
603         units/console-shell.service.m4 \
604         units/console-getty.service.m4 \
605         units/container-getty@.service.m4 \
606         units/user@.service.m4
607
608 if HAVE_SYSV_COMPAT
609 nodist_systemunit_DATA += \
610         units/rc-local.service \
611         units/halt-local.service
612
613 systemgenerator_PROGRAMS += \
614         systemd-sysv-generator \
615         systemd-rc-local-generator
616 endif
617
618 EXTRA_DIST += \
619         units/rc-local.service.in \
620         units/halt-local.service.in
621
622 # automake is broken and can't handle files with a dash in front
623 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
624 units-install-hook:
625         mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
626
627 units-uninstall-hook:
628         rm -f $(DESTDIR)/$(systemunitdir)/-.slice
629
630 INSTALL_DATA_HOOKS += units-install-hook
631 UNINSTALL_DATA_HOOKS += units-uninstall-hook
632
633 dist_doc_DATA = \
634         README \
635         NEWS \
636         LICENSE.LGPL2.1 \
637         LICENSE.GPL2 \
638         LICENSE.MIT \
639         DISTRO_PORTING \
640         src/libsystemd/sd-bus/PORTING-DBUS1 \
641         src/libsystemd/sd-bus/DIFFERENCES \
642         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
643
644 @INTLTOOL_POLICY_RULE@
645
646 # ------------------------------------------------------------------------------
647
648 MANPAGES =
649 MANPAGES_ALIAS =
650
651 include Makefile-man.am
652
653 .PHONY: man update-man-list
654 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
655
656 XML_FILES = \
657         ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
658 HTML_FILES = \
659         ${XML_FILES:.xml=.html}
660 HTML_ALIAS = \
661         ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
662
663 if ENABLE_MANPAGES
664 man_MANS = \
665         $(MANPAGES) \
666         $(MANPAGES_ALIAS)
667
668 noinst_DATA += \
669         $(HTML_FILES) \
670         $(HTML_ALIAS)
671
672 CLEANFILES += \
673         $(man_MANS) \
674         $(HTML_FILES) \
675         $(HTML_ALIAS)
676
677 docs/html/man:
678         $(AM_V_at)$(MKDIR_P) $(dir $@)
679         $(AM_V_LN)$(LN_S) -f ../../man $@
680
681 noinst_DATA += \
682         docs/html/man
683
684 CLEANFILES += \
685         docs/html/man
686
687 if HAVE_PYTHON
688 man/index.html: man/systemd.index.html
689         $(AM_V_LN)$(LN_S) -f systemd.index.html $@
690
691 noinst_DATA += \
692         man/index.html
693
694 CLEANFILES += \
695         man/index.html
696
697 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
698 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
699 SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
700
701 update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB)
702         $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
703         $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
704         @echo "Makefile-man.am has been regenerated"
705
706 man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
707         $(AM_V_at)$(MKDIR_P) $(dir $@)
708         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
709
710 man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
711         $(AM_V_at)$(MKDIR_P) $(dir $@)
712         $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
713
714 EXTRA_DIST += \
715         man/systemd.index.xml \
716         man/index.html \
717         man/systemd.directives.xml \
718         man/glib-event-glue.c
719
720 CLEANFILES += \
721         man/systemd.index.xml \
722         man/systemd.directives.xml
723
724 endif
725
726 endif
727
728 EXTRA_DIST += \
729         $(XML_FILES) \
730         $(HTML_FILES) \
731         $(HTML_ALIAS) \
732         $(man_MANS) \
733         tools/make-man-index.py \
734         tools/make-directive-index.py \
735         tools/xml_helper.py
736
737 # ------------------------------------------------------------------------------
738 noinst_LTLIBRARIES += \
739         libsystemd-shared.la
740
741 libsystemd_shared_la_SOURCES = \
742         src/shared/linux/auto_dev-ioctl.h \
743         src/shared/linux/fanotify.h \
744         src/shared/ioprio.h \
745         src/shared/missing.h \
746         src/shared/initreq.h \
747         src/shared/securebits.h \
748         src/shared/special.h \
749         src/shared/list.h \
750         src/shared/macro.h \
751         src/shared/def.h \
752         src/shared/sparse-endian.h \
753         src/shared/refcnt.h \
754         src/shared/udev-util.h \
755         src/shared/bus-errors.h \
756         src/shared/device-nodes.c \
757         src/shared/device-nodes.h \
758         src/shared/util.c \
759         src/shared/util.h \
760         src/shared/virt.c \
761         src/shared/virt.h \
762         src/shared/architecture.c \
763         src/shared/architecture.h \
764         src/shared/efivars.c \
765         src/shared/efivars.h \
766         src/shared/path-util.c \
767         src/shared/path-util.h \
768         src/shared/time-util.c \
769         src/shared/time-util.h \
770         src/shared/locale-util.c \
771         src/shared/locale-util.h \
772         src/shared/hashmap.c \
773         src/shared/hashmap.h \
774         src/shared/siphash24.c \
775         src/shared/siphash24.h \
776         src/shared/set.c \
777         src/shared/set.h \
778         src/shared/fdset.c \
779         src/shared/fdset.h \
780         src/shared/prioq.c \
781         src/shared/prioq.h \
782         src/shared/sleep-config.c \
783         src/shared/sleep-config.h \
784         src/shared/strv.c \
785         src/shared/strv.h \
786         src/shared/env-util.c \
787         src/shared/env-util.h \
788         src/shared/strbuf.c \
789         src/shared/strbuf.h \
790         src/shared/strxcpyx.c \
791         src/shared/strxcpyx.h \
792         src/shared/conf-parser.c \
793         src/shared/conf-parser.h \
794         src/shared/log.c \
795         src/shared/log.h \
796         src/shared/ratelimit.h \
797         src/shared/ratelimit.c \
798         src/shared/exit-status.c \
799         src/shared/exit-status.h \
800         src/shared/utf8.c \
801         src/shared/utf8.h \
802         src/shared/gunicode.c \
803         src/shared/gunicode.h \
804         src/shared/pager.c \
805         src/shared/pager.h \
806         src/shared/socket-util.c \
807         src/shared/socket-util.h \
808         src/shared/in-addr-util.c \
809         src/shared/in-addr-util.h \
810         src/shared/conf-files.c \
811         src/shared/conf-files.h \
812         src/shared/cgroup-util.c \
813         src/shared/cgroup-util.h \
814         src/shared/cgroup-show.c \
815         src/shared/cgroup-show.h \
816         src/shared/unit-name.c \
817         src/shared/unit-name.h \
818         src/shared/utmp-wtmp.h \
819         src/shared/watchdog.c \
820         src/shared/watchdog.h \
821         src/shared/spawn-ask-password-agent.c \
822         src/shared/spawn-ask-password-agent.h \
823         src/shared/replace-var.c \
824         src/shared/replace-var.h \
825         src/shared/spawn-polkit-agent.c \
826         src/shared/spawn-polkit-agent.h \
827         src/shared/clock-util.c \
828         src/shared/clock-util.h \
829         src/shared/time-dst.c \
830         src/shared/time-dst.h \
831         src/shared/calendarspec.c \
832         src/shared/calendarspec.h \
833         src/shared/fileio.c \
834         src/shared/fileio.h \
835         src/shared/output-mode.h \
836         src/shared/MurmurHash2.c \
837         src/shared/MurmurHash2.h \
838         src/shared/acpi-fpdt.h \
839         src/shared/acpi-fpdt.c \
840         src/shared/boot-timestamps.h \
841         src/shared/boot-timestamps.c \
842         src/shared/mkdir.c \
843         src/shared/mkdir.h \
844         src/shared/smack-util.c \
845         src/shared/smack-util.h \
846         src/shared/apparmor-util.c \
847         src/shared/apparmor-util.h \
848         src/shared/ima-util.c \
849         src/shared/ima-util.h \
850         src/shared/ptyfwd.c \
851         src/shared/ptyfwd.h \
852         src/shared/errno-list.c \
853         src/shared/errno-list.h \
854         src/shared/af-list.c \
855         src/shared/af-list.h \
856         src/shared/arphrd-list.c \
857         src/shared/arphrd-list.h \
858         src/shared/audit.c \
859         src/shared/audit.h \
860         src/shared/xml.c \
861         src/shared/xml.h \
862         src/shared/condition-util.c \
863         src/shared/condition-util.h \
864         src/shared/bus-label.c \
865         src/shared/bus-label.h \
866         src/shared/gpt.h \
867         src/shared/clean-ipc.h \
868         src/shared/clean-ipc.c \
869         src/shared/login-shared.c \
870         src/shared/login-shared.h \
871         src/shared/ring.c \
872         src/shared/ring.h \
873         src/shared/barrier.c \
874         src/shared/barrier.h \
875         src/shared/pty.c \
876         src/shared/pty.h \
877         src/shared/async.c \
878         src/shared/async.h \
879         src/shared/copy.c \
880         src/shared/copy.h \
881         src/shared/base-filesystem.c \
882         src/shared/base-filesystem.h \
883         src/shared/memfd.c \
884         src/shared/memfd.h \
885         src/shared/uid-range.c \
886         src/shared/uid-range.h \
887         src/shared/switch-root.h \
888         src/shared/switch-root.c \
889         src/shared/nss-util.h
890
891 if HAVE_UTMP
892 libsystemd_shared_la_SOURCES += \
893         src/shared/utmp-wtmp.c
894 endif
895
896 nodist_libsystemd_shared_la_SOURCES = \
897         src/shared/errno-from-name.h \
898         src/shared/errno-to-name.h \
899         src/shared/af-from-name.h \
900         src/shared/af-to-name.h \
901         src/shared/arphrd-from-name.h \
902         src/shared/arphrd-to-name.h
903
904 libsystemd_shared_la_CFLAGS = \
905         $(AM_CFLAGS) \
906         $(SECCOMP_CFLAGS) \
907         -pthread
908
909 # ------------------------------------------------------------------------------
910 noinst_LTLIBRARIES += \
911         libsystemd-units.la
912
913 libsystemd_units_la_SOURCES = \
914         src/shared/install.c \
915         src/shared/install.h \
916         src/shared/install-printf.c \
917         src/shared/install-printf.h \
918         src/shared/path-lookup.c \
919         src/shared/path-lookup.h \
920         src/shared/specifier.c \
921         src/shared/specifier.h
922
923 # ------------------------------------------------------------------------------
924 noinst_LTLIBRARIES += \
925         libsystemd-label.la
926
927 libsystemd_label_la_SOURCES = \
928         src/shared/socket-label.c \
929         src/shared/label.c \
930         src/shared/label.h \
931         src/shared/selinux-util.c \
932         src/shared/selinux-util.h \
933         src/shared/mkdir-label.c \
934         src/shared/ask-password-api.c \
935         src/shared/ask-password-api.h \
936         src/shared/fileio-label.c \
937         src/shared/fileio-label.h \
938         src/shared/dev-setup.c \
939         src/shared/dev-setup.h \
940         src/shared/dropin.c \
941         src/shared/dropin.h \
942         src/shared/generator.h \
943         src/shared/generator.c
944
945 libsystemd_label_la_CFLAGS = \
946         $(AM_CFLAGS) \
947         $(SELINUX_CFLAGS)
948
949 libsystemd_label_la_LIBADD = \
950         $(SELINUX_LIBS)
951
952 # -----------------------------------------------------------------------------
953
954 if ENABLE_LDCONFIG
955 dist_systemunit_DATA += \
956         units/ldconfig.service
957
958 SYSINIT_TARGET_WANTS += \
959         ldconfig.service
960 endif
961
962 # ------------------------------------------------------------------------------
963
964 if HAVE_SECCOMP
965 noinst_LTLIBRARIES += \
966         libsystemd-seccomp.la
967
968 libsystemd_seccomp_la_SOURCES = \
969         src/shared/seccomp-util.h \
970         src/shared/seccomp-util.c
971
972 libsystemd_seccomp_la_CFLAGS = \
973         $(AM_CFLAGS) \
974         $(SECCOMP_CFLAGS)
975
976 libsystemd_seccomp_la_LIBADD = \
977         $(SECCOMP_LIBS)
978 endif
979
980 # ------------------------------------------------------------------------------
981 noinst_LTLIBRARIES += \
982         libsystemd-logs.la
983
984 libsystemd_logs_la_SOURCES = \
985         src/shared/logs-show.c \
986         src/shared/logs-show.h
987
988 # ------------------------------------------------------------------------------
989 noinst_LTLIBRARIES += \
990         libsystemd-capability.la
991
992 libsystemd_capability_la_SOURCES = \
993         src/shared/capability.c \
994         src/shared/capability.h
995
996 libsystemd_capability_la_CFLAGS = \
997         $(AM_CFLAGS) \
998         $(CAP_CFLAGS)
999
1000 libsystemd_capability_la_LIBADD = \
1001         $(CAP_LIBS)
1002
1003 # ------------------------------------------------------------------------------
1004 if HAVE_ACL
1005 noinst_LTLIBRARIES += \
1006         libsystemd-acl.la
1007
1008 libsystemd_acl_la_SOURCES = \
1009         src/shared/acl-util.c \
1010         src/shared/acl-util.h
1011
1012 libsystemd_acl_la_CFLAGS = \
1013         $(AM_CFLAGS) \
1014         $(ACL_CFLAGS)
1015
1016 libsystemd_acl_la_LIBADD = \
1017         $(ACL_LIBS)
1018 endif
1019
1020 # ------------------------------------------------------------------------------
1021 noinst_LTLIBRARIES += \
1022         libsystemd-core.la
1023
1024 libsystemd_core_la_SOURCES = \
1025         src/core/unit.c \
1026         src/core/unit.h \
1027         src/core/unit-printf.c \
1028         src/core/unit-printf.h \
1029         src/core/job.c \
1030         src/core/job.h \
1031         src/core/manager.c \
1032         src/core/manager.h \
1033         src/core/transaction.c \
1034         src/core/transaction.h \
1035         src/core/load-fragment.c \
1036         src/core/load-fragment.h \
1037         src/core/service.c \
1038         src/core/service.h \
1039         src/core/socket.c \
1040         src/core/socket.h \
1041         src/core/busname.c \
1042         src/core/busname.h \
1043         src/core/bus-common.c \
1044         src/core/bus-common.h \
1045         src/core/bus-endpoint.c \
1046         src/core/bus-endpoint.h \
1047         src/core/target.c \
1048         src/core/target.h \
1049         src/core/snapshot.c \
1050         src/core/snapshot.h \
1051         src/core/device.c \
1052         src/core/device.h \
1053         src/core/mount.c \
1054         src/core/mount.h \
1055         src/core/automount.c \
1056         src/core/automount.h \
1057         src/core/swap.c \
1058         src/core/swap.h \
1059         src/core/timer.c \
1060         src/core/timer.h \
1061         src/core/path.c \
1062         src/core/path.h \
1063         src/core/slice.c \
1064         src/core/slice.h \
1065         src/core/scope.c \
1066         src/core/scope.h \
1067         src/core/load-dropin.c \
1068         src/core/load-dropin.h \
1069         src/core/execute.c \
1070         src/core/execute.h \
1071         src/core/kill.c \
1072         src/core/kill.h \
1073         src/core/dbus.c \
1074         src/core/dbus.h \
1075         src/core/dbus-manager.c \
1076         src/core/dbus-manager.h \
1077         src/core/dbus-unit.c \
1078         src/core/dbus-unit.h \
1079         src/core/dbus-job.c \
1080         src/core/dbus-job.h \
1081         src/core/dbus-service.c \
1082         src/core/dbus-service.h \
1083         src/core/dbus-socket.c \
1084         src/core/dbus-socket.h \
1085         src/core/dbus-busname.c \
1086         src/core/dbus-busname.h \
1087         src/core/dbus-target.c \
1088         src/core/dbus-target.h \
1089         src/core/dbus-snapshot.c \
1090         src/core/dbus-snapshot.h \
1091         src/core/dbus-device.c \
1092         src/core/dbus-device.h \
1093         src/core/dbus-mount.c \
1094         src/core/dbus-mount.h \
1095         src/core/dbus-automount.c \
1096         src/core/dbus-automount.h \
1097         src/core/dbus-swap.c \
1098         src/core/dbus-swap.h \
1099         src/core/dbus-timer.c \
1100         src/core/dbus-timer.h \
1101         src/core/dbus-path.c \
1102         src/core/dbus-path.h \
1103         src/core/dbus-slice.c \
1104         src/core/dbus-slice.h \
1105         src/core/dbus-scope.c \
1106         src/core/dbus-scope.h \
1107         src/core/dbus-execute.c \
1108         src/core/dbus-execute.h \
1109         src/core/dbus-kill.c \
1110         src/core/dbus-kill.h \
1111         src/core/dbus-cgroup.c \
1112         src/core/dbus-cgroup.h \
1113         src/core/cgroup.c \
1114         src/core/cgroup.h \
1115         src/core/selinux-access.c \
1116         src/core/selinux-access.h \
1117         src/core/selinux-setup.c \
1118         src/core/selinux-setup.h \
1119         src/core/smack-setup.c \
1120         src/core/smack-setup.h \
1121         src/core/ima-setup.c \
1122         src/core/ima-setup.h \
1123         src/core/locale-setup.h \
1124         src/core/locale-setup.c \
1125         src/core/hostname-setup.c \
1126         src/core/hostname-setup.h \
1127         src/core/machine-id-setup.c \
1128         src/core/machine-id-setup.h \
1129         src/core/mount-setup.c \
1130         src/core/mount-setup.h \
1131         src/core/loopback-setup.h \
1132         src/core/loopback-setup.c \
1133         src/core/condition.c \
1134         src/core/condition.h \
1135         src/core/namespace.c \
1136         src/core/namespace.h \
1137         src/core/build.h \
1138         src/core/sysfs-show.h \
1139         src/core/killall.h \
1140         src/core/killall.c \
1141         src/core/audit-fd.c \
1142         src/core/audit-fd.h \
1143         src/core/show-status.c \
1144         src/core/show-status.h \
1145         src/core/failure-action.c \
1146         src/core/failure-action.h
1147
1148 if HAVE_KMOD
1149 libsystemd_core_la_SOURCES += \
1150         src/core/kmod-setup.c \
1151         src/core/kmod-setup.h
1152 endif
1153
1154 nodist_libsystemd_core_la_SOURCES = \
1155         src/core/load-fragment-gperf.c \
1156         src/core/load-fragment-gperf-nulstr.c
1157
1158 libsystemd_core_la_CFLAGS = \
1159         $(AM_CFLAGS) \
1160         $(PAM_CFLAGS) \
1161         $(AUDIT_CFLAGS) \
1162         $(CAP_CFLAGS) \
1163         $(KMOD_CFLAGS) \
1164         $(APPARMOR_CFLAGS) \
1165         $(SECCOMP_CFLAGS) \
1166         -pthread
1167
1168 libsystemd_core_la_LIBADD = \
1169         libsystemd-capability.la \
1170         libsystemd-units.la \
1171         libsystemd-label.la \
1172         libudev-internal.la \
1173         libsystemd-shared.la \
1174         libsystemd-internal.la \
1175         $(PAM_LIBS) \
1176         $(AUDIT_LIBS) \
1177         $(CAP_LIBS) \
1178         $(KMOD_LIBS) \
1179         $(APPARMOR_LIBS) \
1180         $(SECCOMP_LIBS)
1181
1182 if HAVE_SECCOMP
1183 libsystemd_core_la_LIBADD += \
1184         libsystemd-seccomp.la
1185 endif
1186
1187 src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
1188         $(AM_V_at)$(MKDIR_P) $(dir $@)
1189         $(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 ";" }' < $< > $@
1190
1191 EXTRA_DIST += \
1192         src/core/load-fragment-gperf.gperf.m4
1193
1194 CLEANFILES += \
1195         src/core/load-fragment-gperf.gperf \
1196         src/core/load-fragment-gperf.c \
1197         src/core/load-fragment-gperf-nulstr.c \
1198         src/shared/errno-list.txt \
1199         src/shared/errno-from-name.gperf \
1200         src/shared/af-list.txt \
1201         src/shared/af-from-name.gperf \
1202         src/shared/arphrd-list.txt \
1203         src/shared/arphrd-from-name.gperf \
1204         src/shared/dns_type-list.txt \
1205         src/shared/dns_type-from-name.gperf
1206
1207 BUILT_SOURCES += \
1208         src/shared/errno-from-name.h \
1209         src/shared/errno-to-name.h \
1210         src/shared/af-from-name.h \
1211         src/shared/af-to-name.h \
1212         src/shared/arphrd-from-name.h \
1213         src/shared/arphrd-to-name.h \
1214         src/resolve/dns_type-from-name.h \
1215         src/resolve/dns_type-to-name.h
1216
1217 %-from-name.gperf: %-list.txt
1218         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
1219
1220 %-from-name.h: %-from-name.gperf
1221         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
1222
1223
1224 src/shared/errno-list.txt:
1225         $(AM_V_at)$(MKDIR_P) $(dir $@)
1226         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
1227
1228 src/shared/errno-to-name.h: src/shared/errno-list.txt
1229         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1230
1231
1232 src/shared/af-list.txt:
1233         $(AM_V_at)$(MKDIR_P) $(dir $@)
1234         $(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; }' >$@
1235
1236 src/shared/af-to-name.h: src/shared/af-list.txt
1237         $(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 "};"}' <$< >$@
1238
1239 src/shared/arphrd-list.txt:
1240         $(AM_V_at)$(MKDIR_P) $(dir $@)
1241         $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
1242
1243 src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
1244         $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
1245
1246 src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
1247         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
1248
1249
1250 src/resolve/dns_type-list.txt: src/resolve/dns-type.h
1251         $(AM_V_at)$(MKDIR_P) $(dir $@)
1252         $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
1253
1254 src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
1255         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf "        case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print "\ndefault: return NULL;\n\t}\n}\n" }' <$< >$@
1256
1257 src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
1258         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
1259
1260 # ------------------------------------------------------------------------------
1261 systemd_SOURCES = \
1262         src/core/main.c
1263
1264 systemd_CFLAGS = \
1265         $(AM_CFLAGS) \
1266         $(SECCOMP_CFLAGS)
1267
1268 systemd_LDADD = \
1269         libsystemd-core.la \
1270         $(RT_LIBS)
1271
1272 dist_pkgsysconf_DATA += \
1273         src/core/system.conf \
1274         src/core/user.conf
1275
1276 dist_dbuspolicy_DATA += \
1277         src/core/org.freedesktop.systemd1.conf
1278
1279 dist_dbussystemservice_DATA += \
1280         src/core/org.freedesktop.systemd1.service
1281
1282 polkitpolicy_in_in_files += \
1283         src/core/org.freedesktop.systemd1.policy.in.in
1284
1285 pkgconfigdata_DATA = \
1286         src/core/systemd.pc
1287
1288 nodist_rpmmacros_DATA = \
1289         src/core/macros.systemd
1290
1291 EXTRA_DIST += \
1292         src/core/systemd.pc.in \
1293         src/core/macros.systemd.in
1294
1295 CLEANFILES += \
1296         src/core/macros.systemd \
1297         src/core/org.freedesktop.systemd1.policy.in
1298
1299 # ------------------------------------------------------------------------------
1300
1301 manual_tests += \
1302         test-ns \
1303         test-loopback \
1304         test-hostname \
1305         test-daemon \
1306         test-cgroup \
1307         test-install \
1308         test-watchdog \
1309         test-log \
1310         test-ipcrm
1311
1312 if HAVE_KMOD
1313 manual_tests += \
1314         test-rtnl-manual
1315 endif
1316
1317 tests += \
1318         test-engine \
1319         test-cgroup-mask \
1320         test-job-type \
1321         test-env-replace \
1322         test-strbuf \
1323         test-strv \
1324         test-path-util \
1325         test-strxcpyx \
1326         test-unit-name \
1327         test-unit-file \
1328         test-utf8 \
1329         test-ellipsize \
1330         test-util \
1331         test-ring \
1332         test-barrier \
1333         test-pty \
1334         test-tmpfiles \
1335         test-namespace \
1336         test-date \
1337         test-sleep \
1338         test-replace-var \
1339         test-sched-prio \
1340         test-calendarspec \
1341         test-strip-tab-ansi \
1342         test-cgroup-util \
1343         test-prioq \
1344         test-fileio \
1345         test-time \
1346         test-hashmap \
1347         test-set \
1348         test-list \
1349         test-tables \
1350         test-device-nodes \
1351         test-xml \
1352         test-architecture \
1353         test-socket-util \
1354         test-fdset \
1355         test-conf-files \
1356         test-capability \
1357         test-async \
1358         test-ratelimit \
1359         test-condition-util \
1360         test-uid-range \
1361         test-bus-policy
1362
1363 EXTRA_DIST += \
1364         test/a.service \
1365         test/basic.target \
1366         test/b.service \
1367         test/c.service \
1368         test/daughter.service \
1369         test/d.service \
1370         test/end.service \
1371         test/e.service \
1372         test/f.service \
1373         test/grandchild.service \
1374         test/g.service \
1375         test/hello-after-sleep.target \
1376         test/hello.service \
1377         test/h.service \
1378         test/parent-deep.slice \
1379         test/parent.slice \
1380         test/paths.target \
1381         test/sched_idle_bad.service \
1382         test/sched_idle_ok.service \
1383         test/sched_rr_bad.service \
1384         test/sched_rr_change.service \
1385         test/sched_rr_ok.service \
1386         test/shutdown.target \
1387         test/sleep.service \
1388         test/sockets.target \
1389         test/son.service \
1390         test/sysinit.target \
1391         test/testsuite.target \
1392         test/timers.target \
1393         test/unstoppable.service \
1394         test/bus-policy/hello.conf \
1395         test/bus-policy/methods.conf \
1396         test/bus-policy/ownerships.conf \
1397         test/bus-policy/signals.conf
1398
1399
1400 EXTRA_DIST += \
1401         src/test/test-helper.h
1402
1403 test_device_nodes_SOURCES = \
1404         src/test/test-device-nodes.c
1405
1406 test_device_nodes_LDADD = \
1407         libsystemd-shared.la
1408
1409 test_engine_SOURCES = \
1410         src/test/test-engine.c
1411
1412 test_engine_CFLAGS = \
1413         $(AM_CFLAGS) \
1414         $(SECCOMP_CFLAGS)
1415
1416 test_engine_LDADD = \
1417         libsystemd-core.la \
1418         $(RT_LIBS)
1419
1420 test_job_type_SOURCES = \
1421         src/test/test-job-type.c
1422
1423 test_job_type_CFLAGS = \
1424         $(AM_CFLAGS) \
1425         $(SECCOMP_CFLAGS)
1426
1427 test_job_type_LDADD = \
1428         libsystemd-core.la \
1429         $(RT_LIBS)
1430
1431 test_ns_SOURCES = \
1432         src/test/test-ns.c
1433
1434 test_ns_CFLAGS = \
1435         $(AM_CFLAGS) \
1436         $(SECCOMP_CFLAGS)
1437
1438 test_ns_LDADD = \
1439         libsystemd-core.la
1440
1441 test_loopback_SOURCES = \
1442         src/test/test-loopback.c
1443
1444 test_loopback_LDADD = \
1445         libsystemd-core.la
1446
1447 test_hostname_SOURCES = \
1448         src/test/test-hostname.c
1449
1450 test_hostname_LDADD = \
1451         libsystemd-core.la
1452
1453 if ENABLE_EFI
1454 manual_tests += \
1455         test-boot-timestamp
1456
1457 test_boot_timestamp_SOURCES = \
1458         src/test/test-boot-timestamps.c
1459
1460 test_boot_timestamp_LDADD = \
1461         libsystemd-shared.la
1462 endif
1463
1464 test_unit_name_SOURCES = \
1465         src/test/test-unit-name.c
1466
1467 test_unit_name_CFLAGS = \
1468         $(AM_CFLAGS) \
1469         $(SECCOMP_CFLAGS)
1470
1471 test_unit_name_LDADD = \
1472         libsystemd-core.la \
1473         $(RT_LIBS)
1474
1475 test_unit_file_SOURCES = \
1476         src/test/test-unit-file.c
1477
1478 test_unit_file_CFLAGS = \
1479         $(AM_CFLAGS) \
1480         $(SECCOMP_CFLAGS)
1481
1482 test_unit_file_LDADD = \
1483         libsystemd-core.la \
1484         $(RT_LIBS)
1485
1486 test_utf8_SOURCES = \
1487         src/test/test-utf8.c
1488
1489 test_utf8_LDADD = \
1490         libsystemd-shared.la
1491
1492 test_capability_SOURCES = \
1493         src/test/test-capability.c
1494
1495 test_capability_LDADD = \
1496         libsystemd-shared.la \
1497         libsystemd-capability.la
1498
1499 test_async_SOURCES = \
1500         src/test/test-async.c
1501
1502 test_async_LDADD = \
1503         libsystemd-shared.la
1504
1505 test_condition_util_SOURCES = \
1506         src/test/test-condition-util.c
1507
1508 test_condition_util_LDADD = \
1509         libsystemd-shared.la \
1510         libsystemd-internal.la
1511
1512
1513 test_fdset_SOURCES = \
1514         src/test/test-fdset.c
1515
1516 test_fdset_LDADD = \
1517         libsystemd-core.la
1518
1519 test_ratelimit_SOURCES = \
1520         src/test/test-ratelimit.c
1521
1522 test_ratelimit_LDADD = \
1523         libsystemd-shared.la
1524
1525 test_util_SOURCES = \
1526         src/test/test-util.c
1527
1528 test_util_LDADD = \
1529         libsystemd-core.la
1530
1531 test_uid_range_SOURCES = \
1532         src/test/test-uid-range.c
1533
1534 test_uid_range_LDADD = \
1535         libsystemd-core.la
1536
1537 test_socket_util_SOURCES = \
1538         src/test/test-socket-util.c
1539
1540 test_socket_util_LDADD = \
1541         libsystemd-core.la
1542
1543 test_ring_SOURCES = \
1544         src/test/test-ring.c
1545
1546 test_ring_LDADD = \
1547         libsystemd-core.la
1548
1549 test_barrier_SOURCES = \
1550         src/test/test-barrier.c
1551
1552 test_barrier_LDADD = \
1553         libsystemd-core.la
1554
1555 test_pty_SOURCES = \
1556         src/test/test-pty.c
1557
1558 test_pty_LDADD = \
1559         libsystemd-core.la
1560
1561 test_tmpfiles_SOURCES = \
1562         src/test/test-tmpfiles.c
1563
1564 test_tmpfiles_LDADD = \
1565         libsystemd-shared.la
1566
1567 test_namespace_SOURCES = \
1568         src/test/test-namespace.c
1569
1570 test_namespace_LDADD = \
1571         libsystemd-core.la
1572
1573 test_hashmap_SOURCES = \
1574         src/test/test-hashmap.c
1575
1576 test_hashmap_LDADD = \
1577         libsystemd-core.la
1578
1579 test_set_SOURCES = \
1580         src/test/test-set.c
1581
1582 test_set_LDADD = \
1583         libsystemd-core.la
1584
1585 test_xml_SOURCES = \
1586         src/test/test-xml.c
1587
1588 test_xml_LDADD = \
1589         libsystemd-shared.la
1590
1591 test_list_SOURCES = \
1592         src/test/test-list.c
1593
1594 test_list_LDADD = \
1595         libsystemd-core.la
1596
1597 test_tables_SOURCES = \
1598         src/test/test-tables.c \
1599         src/shared/test-tables.h \
1600         src/bus-proxyd/bus-policy.c \
1601         src/bus-proxyd/bus-policy.h \
1602         src/journal/journald-server.c \
1603         src/journal/journald-server.h
1604
1605 test_tables_CPPFLAGS = \
1606         $(AM_CPPFLAGS) \
1607         -I$(top_srcdir)/src/bus-proxyd
1608
1609 test_tables_CFLAGS = \
1610         $(AM_CFLAGS) \
1611         $(SECCOMP_CFLAGS)
1612
1613 test_tables_LDADD = \
1614         libsystemd-logs.la \
1615         libsystemd-journal-internal.la \
1616         libsystemd-journal-core.la \
1617         libsystemd-core.la \
1618         libudev-core.la \
1619         $(RT_LIBS)
1620
1621 test_prioq_SOURCES = \
1622         src/test/test-prioq.c
1623
1624 test_prioq_LDADD = \
1625         libsystemd-core.la
1626
1627 test_fileio_SOURCES = \
1628         src/test/test-fileio.c
1629
1630 test_fileio_LDADD = \
1631         libsystemd-core.la
1632
1633 test_time_SOURCES = \
1634         src/test/test-time.c
1635
1636 test_time_LDADD = \
1637         libsystemd-core.la
1638
1639 test_architecture_SOURCES = \
1640         src/test/test-architecture.c
1641
1642 test_architecture_LDADD = \
1643         libsystemd-shared.la
1644
1645 test_log_SOURCES = \
1646         src/test/test-log.c
1647
1648 test_log_LDADD = \
1649         libsystemd-core.la
1650
1651 test_ipcrm_SOURCES = \
1652         src/test/test-ipcrm.c
1653
1654 test_ipcrm_LDADD = \
1655         libsystemd-shared.la \
1656         -lrt
1657
1658 test_rtnl_manual_SOURCES = \
1659         src/test/test-rtnl-manual.c
1660
1661 test_rtnl_manual_CFLAGS = \
1662         $(AM_CFLAGS) \
1663         $(KMOD_CFLAGS)
1664
1665 test_rtnl_manual_LDADD = \
1666         libsystemd-internal.la \
1667         libsystemd-shared.la \
1668         $(KMOD_LIBS)
1669
1670 test_ellipsize_SOURCES = \
1671         src/test/test-ellipsize.c
1672
1673 test_ellipsize_LDADD = \
1674         libsystemd-core.la
1675
1676 test_date_SOURCES = \
1677         src/test/test-date.c
1678
1679 test_date_LDADD = \
1680         libsystemd-core.la
1681
1682 test_sleep_SOURCES = \
1683         src/test/test-sleep.c
1684
1685 test_sleep_LDADD = \
1686         libsystemd-core.la
1687
1688 test_replace_var_SOURCES = \
1689         src/test/test-replace-var.c
1690
1691 test_replace_var_LDADD = \
1692         libsystemd-shared.la
1693
1694 test_calendarspec_SOURCES = \
1695         src/test/test-calendarspec.c
1696
1697 test_calendarspec_LDADD = \
1698         libsystemd-shared.la
1699
1700 test_strip_tab_ansi_SOURCES = \
1701         src/test/test-strip-tab-ansi.c
1702
1703 test_strip_tab_ansi_LDADD = \
1704         libsystemd-shared.la
1705
1706 test_daemon_SOURCES = \
1707         src/test/test-daemon.c
1708
1709 test_daemon_LDADD = \
1710         libsystemd-internal.la \
1711         libsystemd-shared.la
1712
1713 test_cgroup_SOURCES = \
1714         src/test/test-cgroup.c
1715
1716 test_cgroup_LDADD = \
1717         libsystemd-label.la \
1718         libsystemd-shared.la \
1719         libsystemd-internal.la
1720
1721 test_cgroup_mask_SOURCES = \
1722         src/test/test-cgroup-mask.c
1723
1724 test_cgroup_mask_CPPFLAGS = \
1725         $(AM_CPPFLAGS) \
1726         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1727
1728 test_cgroup_mask_CFLAGS = \
1729         $(AM_CFLAGS) \
1730         $(SECCOMP_CFLAGS)
1731
1732 test_cgroup_mask_LDADD = \
1733         libsystemd-core.la \
1734         $(RT_LIBS)
1735
1736 test_cgroup_util_SOURCES = \
1737         src/test/test-cgroup-util.c
1738
1739 test_cgroup_util_LDADD = \
1740         libsystemd-label.la \
1741         libsystemd-internal.la \
1742         libsystemd-shared.la
1743
1744 test_env_replace_SOURCES = \
1745         src/test/test-env-replace.c
1746
1747 test_env_replace_LDADD = \
1748         libsystemd-shared.la
1749
1750 test_strbuf_SOURCES = \
1751         src/test/test-strbuf.c
1752
1753 test_strbuf_LDADD = \
1754         libsystemd-shared.la
1755
1756 test_strv_SOURCES = \
1757         src/test/test-strv.c
1758
1759 test_strv_LDADD = \
1760         libsystemd-units.la \
1761         libsystemd-internal.la \
1762         libsystemd-shared.la
1763
1764 test_path_util_SOURCES = \
1765         src/test/test-path-util.c
1766
1767 test_path_util_LDADD = \
1768         libsystemd-shared.la
1769
1770 test_strxcpyx_SOURCES = \
1771         src/test/test-strxcpyx.c
1772
1773 test_strxcpyx_LDADD = \
1774         libsystemd-shared.la
1775
1776 test_install_SOURCES = \
1777         src/test/test-install.c
1778
1779 test_install_LDADD = \
1780         libsystemd-units.la \
1781         libsystemd-label.la \
1782         libsystemd-shared.la \
1783         libsystemd-internal.la
1784
1785 test_watchdog_SOURCES = \
1786         src/test/test-watchdog.c
1787
1788 test_watchdog_LDADD = \
1789         libsystemd-shared.la
1790
1791 test_sched_prio_SOURCES = \
1792         src/test/test-sched-prio.c
1793
1794 test_sched_prio_CPPFLAGS = \
1795         $(AM_CPPFLAGS) \
1796         -DTEST_DIR=\"$(abs_top_srcdir)/test\"
1797
1798 test_sched_prio_CFLAGS = \
1799         $(AM_CFLAGS) \
1800         $(SECCOMP_CFLAGS)
1801
1802 test_sched_prio_LDADD = \
1803         libsystemd-core.la \
1804         $(RT_LIBS)
1805
1806 test_conf_files_SOURCES = \
1807         src/test/test-conf-files.c
1808
1809 test_conf_files_LDADD = \
1810         libsystemd-shared.la
1811
1812 test_bus_policy_SOURCES = \
1813         src/bus-proxyd/test-bus-policy.c \
1814         src/bus-proxyd/bus-policy.c \
1815         src/bus-proxyd/bus-policy.h
1816
1817 test_bus_policy_LDADD = \
1818         libsystemd-capability.la \
1819         libsystemd-internal.la \
1820         libsystemd-shared.la
1821
1822 # ------------------------------------------------------------------------------
1823 ## .PHONY so it always rebuilds it
1824 .PHONY: coverage lcov-run lcov-report coverage-sync
1825
1826 # run lcov from scratch, always
1827 coverage: all
1828         $(MAKE) lcov-run
1829         $(MAKE) lcov-report
1830
1831 coverage_dir = coverage
1832 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
1833
1834 if ENABLE_COVERAGE
1835 # reset run coverage tests
1836 lcov-run:
1837         @rm -rf $(coverage_dir)
1838         lcov $(coverage_opts) --zerocounters
1839         -$(MAKE) check
1840
1841 # generate report based on current coverage data
1842 lcov-report:
1843         $(MKDIR_P) $(coverage_dir)
1844         lcov $(coverage_opts) --compat-libtool --capture --no-external \
1845                 | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
1846         genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.info
1847         @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
1848
1849 # lcov doesn't work properly with vpath builds, make sure that bad
1850 # output is not uploaded by mistake.
1851 coverage-sync: coverage
1852         test "$(builddir)" = "$(srcdir)"
1853         rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
1854
1855 else
1856 lcov-run lcov-report:
1857         echo "Need to reconfigure with --enable-coverage"
1858 endif
1859
1860 # ------------------------------------------------------------------------------
1861 systemd_analyze_SOURCES = \
1862         src/analyze/analyze.c \
1863         src/analyze/analyze-verify.c \
1864         src/analyze/analyze-verify.h
1865
1866 systemd_verify_CFLAGS = \
1867         $(AM_CFLAGS) \
1868         $(SECCOMP_CFLAGS)
1869
1870 systemd_analyze_LDADD = \
1871         libsystemd-core.la \
1872         libsystemd-internal.la \
1873         libsystemd-shared.la \
1874         $(RT_LIBS)
1875
1876 # ------------------------------------------------------------------------------
1877 systemd_initctl_SOURCES = \
1878         src/initctl/initctl.c
1879
1880 systemd_initctl_LDADD = \
1881         libsystemd-internal.la \
1882         libsystemd-shared.la
1883
1884 # ------------------------------------------------------------------------------
1885 systemd_update_utmp_SOURCES = \
1886         src/update-utmp/update-utmp.c
1887
1888 systemd_update_utmp_CFLAGS = \
1889         $(AM_CFLAGS) \
1890         $(AUDIT_CFLAGS)
1891
1892 systemd_update_utmp_LDADD = \
1893         libsystemd-internal.la \
1894         libsystemd-shared.la \
1895         $(AUDIT_LIBS)
1896
1897 # ------------------------------------------------------------------------------
1898 systemd_update_done_SOURCES = \
1899         src/update-done/update-done.c
1900
1901 systemd_update_done_LDADD = \
1902         libsystemd-internal.la \
1903         libsystemd-label.la \
1904         libsystemd-shared.la
1905
1906 # ------------------------------------------------------------------------------
1907 systemd_shutdownd_SOURCES = \
1908         src/shutdownd/shutdownd.c
1909
1910 systemd_shutdownd_LDADD = \
1911         libsystemd-label.la \
1912         libsystemd-internal.la \
1913         libsystemd-shared.la
1914
1915 dist_doc_DATA += \
1916         src/systemd/sd-shutdown.h
1917
1918 # ------------------------------------------------------------------------------
1919 systemd_shutdown_SOURCES = \
1920         src/core/umount.c \
1921         src/core/umount.h \
1922         src/core/shutdown.c \
1923         src/core/mount-setup.c \
1924         src/core/mount-setup.h \
1925         src/core/killall.h \
1926         src/core/killall.c
1927
1928 systemd_shutdown_LDADD = \
1929         libsystemd-label.la \
1930         libudev-internal.la \
1931         libsystemd-shared.la
1932
1933 # ------------------------------------------------------------------------------
1934 if HAVE_KMOD
1935 systemd_modules_load_SOURCES = \
1936         src/modules-load/modules-load.c
1937
1938 systemd_modules_load_CFLAGS = \
1939         $(AM_CFLAGS) \
1940         $(KMOD_CFLAGS)
1941
1942 systemd_modules_load_LDADD = \
1943         libsystemd-shared.la \
1944         $(KMOD_LIBS)
1945
1946 rootlibexec_PROGRAMS += \
1947         systemd-modules-load
1948
1949 nodist_systemunit_DATA += \
1950         units/systemd-modules-load.service
1951
1952 SYSINIT_TARGET_WANTS += \
1953         systemd-modules-load.service
1954
1955 if ENABLE_TMPFILES
1956 nodist_systemunit_DATA += \
1957         units/kmod-static-nodes.service
1958
1959 SYSINIT_TARGET_WANTS += \
1960         kmod-static-nodes.service
1961 endif
1962 endif
1963
1964 EXTRA_DIST += \
1965         units/systemd-modules-load.service.in \
1966         units/kmod-static-nodes.service.in
1967
1968 # ------------------------------------------------------------------------------
1969 if ENABLE_TMPFILES
1970 systemd_tmpfiles_SOURCES = \
1971         src/tmpfiles/tmpfiles.c
1972
1973 systemd_tmpfiles_LDADD = \
1974         libsystemd-units.la \
1975         libsystemd-label.la \
1976         libsystemd-capability.la \
1977         libsystemd-internal.la \
1978         libsystemd-shared.la
1979
1980 rootbin_PROGRAMS += \
1981         systemd-tmpfiles
1982
1983 dist_systemunit_DATA += \
1984         units/systemd-tmpfiles-clean.timer
1985
1986 nodist_systemunit_DATA += \
1987         units/systemd-tmpfiles-setup-dev.service \
1988         units/systemd-tmpfiles-setup.service \
1989         units/systemd-tmpfiles-clean.service
1990
1991 nodist_tmpfiles_DATA = \
1992         tmpfiles.d/etc.conf
1993
1994 dist_tmpfiles_DATA = \
1995         tmpfiles.d/systemd.conf \
1996         tmpfiles.d/systemd-nologin.conf \
1997         tmpfiles.d/systemd-remote.conf \
1998         tmpfiles.d/tmp.conf \
1999         tmpfiles.d/x11.conf \
2000         tmpfiles.d/var.conf
2001
2002 if HAVE_SYSV_COMPAT
2003 dist_tmpfiles_DATA += \
2004         tmpfiles.d/legacy.conf
2005 endif
2006
2007 SYSINIT_TARGET_WANTS += \
2008         systemd-tmpfiles-setup-dev.service \
2009         systemd-tmpfiles-setup.service
2010
2011 dist_zshcompletion_DATA += \
2012         shell-completion/zsh/_systemd-tmpfiles
2013
2014 TIMERS_TARGET_WANTS += \
2015         systemd-tmpfiles-clean.timer
2016
2017 INSTALL_DIRS += \
2018         $(tmpfilesdir) \
2019         $(sysconfdir)/tmpfiles.d
2020 endif
2021
2022 EXTRA_DIST += \
2023         tmpfiles.d/etc.conf.m4 \
2024         units/systemd-tmpfiles-setup-dev.service.in \
2025         units/systemd-tmpfiles-setup.service.in \
2026         units/systemd-tmpfiles-clean.service.in
2027
2028 CLEANFILES += \
2029         tmpfiles.d/etc.conf
2030
2031 # ------------------------------------------------------------------------------
2032 if ENABLE_SYSUSERS
2033 systemd_sysusers_SOURCES = \
2034         src/sysusers/sysusers.c
2035
2036 systemd_sysusers_LDADD = \
2037         libsystemd-units.la \
2038         libsystemd-label.la \
2039         libsystemd-capability.la \
2040         libsystemd-internal.la \
2041         libsystemd-shared.la
2042
2043 rootbin_PROGRAMS += \
2044         systemd-sysusers
2045
2046 nodist_systemunit_DATA += \
2047         units/systemd-sysusers.service
2048
2049 SYSINIT_TARGET_WANTS += \
2050         systemd-sysusers.service
2051
2052 dist_sysusers_DATA = \
2053         sysusers.d/systemd.conf \
2054         sysusers.d/systemd-remote.conf
2055
2056 nodist_sysusers_DATA = \
2057         sysusers.d/basic.conf
2058
2059 EXTRA_DIST += \
2060         units/systemd-sysusers.service.in \
2061         sysusers.d/basic.conf.in
2062
2063 CLEANFILES += \
2064         sysusers.d/basic.conf
2065
2066 INSTALL_DIRS += \
2067         $(sysusersdir)
2068 endif
2069
2070 # ------------------------------------------------------------------------------
2071 dist_factory_etc_DATA = \
2072         factory/etc/nsswitch.conf
2073
2074 if HAVE_PAM
2075 dist_factory_pam_DATA = \
2076         factory/etc/pam.d/system-auth \
2077         factory/etc/pam.d/other
2078 endif
2079
2080 # ------------------------------------------------------------------------------
2081 if ENABLE_FIRSTBOOT
2082 systemd_firstboot_SOURCES = \
2083         src/firstboot/firstboot.c
2084
2085 systemd_firstboot_LDADD = \
2086         libsystemd-units.la \
2087         libsystemd-label.la \
2088         libsystemd-capability.la \
2089         libsystemd-internal.la \
2090         libsystemd-shared.la \
2091         -lcrypt
2092
2093 rootbin_PROGRAMS += \
2094         systemd-firstboot
2095
2096 nodist_systemunit_DATA += \
2097         units/systemd-firstboot.service
2098
2099 EXTRA_DIST += \
2100         units/systemd-firstboot.service.in
2101
2102 SYSINIT_TARGET_WANTS += \
2103         systemd-firstboot.service
2104 endif
2105
2106 # ------------------------------------------------------------------------------
2107 systemd_machine_id_setup_SOURCES = \
2108         src/machine-id-setup/machine-id-setup-main.c \
2109         src/core/machine-id-setup.c \
2110         src/core/machine-id-setup.h
2111
2112 systemd_machine_id_setup_LDADD = \
2113         libsystemd-label.la \
2114         libsystemd-internal.la \
2115         libsystemd-shared.la
2116
2117 # ------------------------------------------------------------------------------
2118 systemd_sysctl_SOURCES = \
2119         src/sysctl/sysctl.c
2120
2121 systemd_sysctl_LDADD = \
2122         libsystemd-shared.la
2123
2124 # ------------------------------------------------------------------------------
2125 systemd_sleep_SOURCES = \
2126         src/sleep/sleep.c
2127
2128 systemd_sleep_LDADD = \
2129         libsystemd-shared.la
2130
2131 # ------------------------------------------------------------------------------
2132 systemd_fsck_SOURCES = \
2133         src/fsck/fsck.c
2134
2135 systemd_fsck_LDADD = \
2136         libsystemd-internal.la \
2137         libudev-internal.la \
2138         libsystemd-shared.la
2139
2140 # ------------------------------------------------------------------------------
2141 systemd_ac_power_SOURCES = \
2142         src/ac-power/ac-power.c
2143
2144 systemd_ac_power_LDADD = \
2145         libudev-internal.la \
2146         libsystemd-shared.la
2147
2148 # ------------------------------------------------------------------------------
2149 systemd_detect_virt_SOURCES = \
2150         src/detect-virt/detect-virt.c
2151
2152 systemd_detect_virt_LDADD = \
2153         libsystemd-shared.la
2154
2155 INSTALL_EXEC_HOOKS += \
2156         systemd-detect-virt-install-hook
2157
2158 # ------------------------------------------------------------------------------
2159 systemd_delta_SOURCES = \
2160         src/delta/delta.c
2161
2162 systemd_delta_LDADD = \
2163         libsystemd-shared.la
2164
2165 # ------------------------------------------------------------------------------
2166 systemd_getty_generator_SOURCES = \
2167         src/getty-generator/getty-generator.c
2168
2169 systemd_getty_generator_LDADD = \
2170         libsystemd-label.la \
2171         libsystemd-shared.la
2172
2173 # ------------------------------------------------------------------------------
2174 systemd_debug_generator_SOURCES = \
2175         src/debug-generator/debug-generator.c
2176
2177 systemd_debug_generator_LDADD = \
2178         libsystemd-label.la \
2179         libsystemd-shared.la
2180
2181 # ------------------------------------------------------------------------------
2182 systemd_fstab_generator_SOURCES = \
2183         src/fstab-generator/fstab-generator.c \
2184         src/core/mount-setup.c
2185
2186 systemd_fstab_generator_LDADD = \
2187         libsystemd-label.la \
2188         libsystemd-shared.la
2189
2190 # ------------------------------------------------------------------------------
2191 systemd_system_update_generator_SOURCES = \
2192         src/system-update-generator/system-update-generator.c
2193
2194 systemd_system_update_generator_LDADD = \
2195         libsystemd-label.la \
2196         libsystemd-shared.la
2197
2198 # ------------------------------------------------------------------------------
2199 if ENABLE_HIBERNATE
2200 systemgenerator_PROGRAMS += \
2201         systemd-hibernate-resume-generator
2202
2203 rootlibexec_PROGRAMS += \
2204         systemd-hibernate-resume
2205
2206 systemd_hibernate_resume_SOURCES = \
2207         src/hibernate-resume/hibernate-resume.c
2208
2209 systemd_hibernate_resume_LDADD = \
2210         libsystemd-internal.la \
2211         libsystemd-shared.la
2212
2213 systemd_hibernate_resume_generator_SOURCES = \
2214         src/hibernate-resume/hibernate-resume-generator.c
2215
2216 systemd_hibernate_resume_generator_LDADD = \
2217         libsystemd-label.la \
2218         libsystemd-shared.la
2219
2220 EXTRA_DIST += \
2221         units/systemd-hibernate.service.in \
2222         units/systemd-hibernate-resume@.service.in \
2223         units/systemd-hybrid-sleep.service.in
2224
2225 dist_systemunit_DATA += \
2226         units/hibernate.target \
2227         units/hybrid-sleep.target
2228
2229 nodist_systemunit_DATA += \
2230         units/systemd-hibernate.service \
2231         units/systemd-hibernate-resume@.service \
2232         units/systemd-hybrid-sleep.service
2233 endif
2234
2235 # ------------------------------------------------------------------------------
2236 if ENABLE_EFI
2237 systemgenerator_PROGRAMS +=  \
2238         systemd-efi-boot-generator
2239
2240 systemd_efi_boot_generator_SOURCES = \
2241         src/efi-boot-generator/efi-boot-generator.c
2242
2243 systemd_efi_boot_generator_LDADD = \
2244         libsystemd-label.la \
2245         libsystemd-shared.la
2246
2247 # ------------------------------------------------------------------------------
2248 bootctl_SOURCES = \
2249         src/boot/boot.h \
2250         src/boot/boot-loader.h \
2251         src/boot/bootctl.c \
2252         src/boot/boot-loader.c \
2253         src/boot/boot-efi.c
2254
2255 bootctl_LDADD = \
2256         libsystemd-shared.la \
2257         libsystemd-internal.la
2258
2259 bin_PROGRAMS += \
2260         bootctl
2261
2262 dist_bashcompletion_DATA += \
2263         shell-completion/bash/bootctl
2264
2265 dist_zshcompletion_DATA += \
2266         shell-completion/zsh/_bootctl
2267
2268 endif
2269
2270 # ------------------------------------------------------------------------------
2271 if HAVE_BLKID
2272 systemgenerator_PROGRAMS +=  \
2273         systemd-gpt-auto-generator
2274
2275 systemd_gpt_auto_generator_SOURCES = \
2276         src/gpt-auto-generator/gpt-auto-generator.c \
2277         src/shared/blkid-util.h
2278
2279 systemd_gpt_auto_generator_LDADD = \
2280         libsystemd-label.la \
2281         libsystemd-internal.la \
2282         libudev-internal.la \
2283         libsystemd-shared.la \
2284         $(BLKID_LIBS)
2285
2286 systemd_gpt_auto_generator_CFLAGS = \
2287         $(AM_CFLAGS) \
2288         $(BLKID_CFLAGS)
2289 endif
2290
2291 # ------------------------------------------------------------------------------
2292 if ENABLE_KDBUS
2293 systemgenerator_PROGRAMS +=  \
2294         systemd-dbus1-generator
2295
2296 systemd_dbus1_generator_SOURCES = \
2297         src/dbus1-generator/dbus1-generator.c
2298
2299 systemd_dbus1_generator_LDADD = \
2300         libsystemd-label.la \
2301         libsystemd-shared.la \
2302         libsystemd-internal.la
2303
2304 dbus1-generator-install-hook:
2305         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
2306         $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2307         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2308
2309 dbus1-generator-uninstall-hook:
2310         rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
2311
2312 INSTALL_EXEC_HOOKS += dbus1-generator-install-hook
2313 UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook
2314 endif
2315
2316 # ------------------------------------------------------------------------------
2317 systemd_sysv_generator_SOURCES = \
2318         src/sysv-generator/sysv-generator.c
2319
2320 systemd_sysv_generator_LDADD = \
2321         libsystemd-core.la \
2322         libsystemd-label.la \
2323         libsystemd-shared.la
2324
2325 # ------------------------------------------------------------------------------
2326 systemd_rc_local_generator_SOURCES = \
2327         src/rc-local-generator/rc-local-generator.c
2328
2329 systemd_rc_local_generator_LDADD = \
2330         libsystemd-label.la \
2331         libsystemd-shared.la
2332
2333 # ------------------------------------------------------------------------------
2334 systemd_remount_fs_SOURCES = \
2335         src/remount-fs/remount-fs.c \
2336         src/core/mount-setup.c \
2337         src/core/mount-setup.h
2338
2339 systemd_remount_fs_LDADD = \
2340         libsystemd-label.la \
2341         libsystemd-shared.la
2342
2343 # ------------------------------------------------------------------------------
2344 systemd_cgroups_agent_SOURCES = \
2345         src/cgroups-agent/cgroups-agent.c
2346
2347 systemd_cgroups_agent_LDADD = \
2348         libsystemd-internal.la \
2349         libsystemd-shared.la
2350
2351 # ------------------------------------------------------------------------------
2352 systemd_escape_SOURCES = \
2353         src/escape/escape.c
2354
2355 systemd_escape_LDADD = \
2356         libsystemd-shared.la
2357
2358 # -----------------------------------------------------------------------------
2359 systemctl_SOURCES = \
2360         src/systemctl/systemctl.c
2361
2362 systemctl_LDADD = \
2363         libsystemd-units.la \
2364         libsystemd-label.la \
2365         libsystemd-internal.la \
2366         libsystemd-logs.la \
2367         libsystemd-journal-internal.la \
2368         libsystemd-shared.la
2369
2370 # ------------------------------------------------------------------------------
2371 systemd_notify_SOURCES = \
2372         src/notify/notify.c
2373
2374 systemd_notify_LDADD = \
2375         libsystemd-internal.la \
2376         libsystemd-shared.la
2377
2378 # ------------------------------------------------------------------------------
2379 systemd_path_SOURCES = \
2380         src/path/path.c
2381
2382 systemd_path_LDADD = \
2383         libsystemd-internal.la \
2384         libsystemd-shared.la
2385
2386 # ------------------------------------------------------------------------------
2387 systemd_ask_password_SOURCES = \
2388         src/ask-password/ask-password.c
2389
2390 systemd_ask_password_LDADD = \
2391         libsystemd-label.la \
2392         libsystemd-shared.la
2393
2394 # ------------------------------------------------------------------------------
2395 systemd_reply_password_SOURCES = \
2396         src/reply-password/reply-password.c
2397
2398 systemd_reply_password_LDADD = \
2399         libsystemd-shared.la
2400
2401 # ------------------------------------------------------------------------------
2402 systemd_cgls_SOURCES = \
2403         src/cgls/cgls.c
2404
2405 systemd_cgls_LDADD = \
2406         libsystemd-internal.la \
2407         libsystemd-shared.la
2408
2409 # ------------------------------------------------------------------------------
2410 systemd_cgtop_SOURCES = \
2411         src/cgtop/cgtop.c
2412
2413 systemd_cgtop_LDADD = \
2414         libsystemd-shared.la
2415
2416 # ------------------------------------------------------------------------------
2417 systemd_nspawn_SOURCES = \
2418         src/nspawn/nspawn.c \
2419         src/core/mount-setup.c \
2420         src/core/mount-setup.h \
2421         src/core/loopback-setup.c \
2422         src/core/loopback-setup.h
2423
2424 systemd_nspawn_CFLAGS = \
2425         $(AM_CFLAGS) \
2426         $(SECCOMP_CFLAGS) \
2427         $(BLKID_CFLAGS)
2428
2429 systemd_nspawn_LDADD = \
2430         libsystemd-label.la \
2431         libsystemd-capability.la \
2432         libsystemd-internal.la \
2433         libudev-internal.la \
2434         libsystemd-shared.la \
2435         $(BLKID_LIBS)
2436
2437 if HAVE_SECCOMP
2438 systemd_nspawn_LDADD += \
2439         libsystemd-seccomp.la \
2440         $(SECCOMP_LIBS)
2441 endif
2442
2443 # ------------------------------------------------------------------------------
2444 systemd_run_SOURCES = \
2445         src/run/run.c
2446
2447 systemd_run_LDADD = \
2448         libsystemd-label.la \
2449         libsystemd-capability.la \
2450         libsystemd-internal.la \
2451         libsystemd-shared.la
2452
2453 # ------------------------------------------------------------------------------
2454 systemd_bus_proxyd_SOURCES = \
2455         src/bus-proxyd/bus-proxyd.c \
2456         src/bus-proxyd/bus-policy.c \
2457         src/bus-proxyd/bus-policy.h
2458
2459 systemd_bus_proxyd_LDADD = \
2460         libsystemd-capability.la \
2461         libsystemd-internal.la \
2462         libsystemd-shared.la
2463
2464 bus-proxyd-install-hook:
2465         $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
2466         $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2467         $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
2468
2469 bus-proxyd-uninstall-hook:
2470         rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
2471
2472 INSTALL_EXEC_HOOKS += bus-proxyd-install-hook
2473 UNINSTALL_EXEC_HOOKS += bus-proxyd-uninstall-hook
2474
2475 if ENABLE_KDBUS
2476 nodist_systemunit_DATA += \
2477         units/systemd-bus-proxyd@.service
2478
2479 dist_systemunit_DATA += \
2480         units/systemd-bus-proxyd.socket
2481
2482 nodist_userunit_DATA += \
2483         units/user/systemd-bus-proxyd@.service
2484
2485 dist_userunit_DATA += \
2486         units/user/systemd-bus-proxyd.socket
2487 endif
2488
2489 EXTRA_DIST += \
2490         units/systemd-bus-proxyd@.service.in \
2491         units/user/systemd-bus-proxyd@.service.in
2492
2493 # ------------------------------------------------------------------------------
2494 systemd_tty_ask_password_agent_SOURCES = \
2495         src/tty-ask-password-agent/tty-ask-password-agent.c
2496
2497 systemd_tty_ask_password_agent_LDADD = \
2498         libsystemd-label.la \
2499         libsystemd-shared.la
2500
2501 # ------------------------------------------------------------------------------
2502 libsystemd_internal_la_SOURCES = \
2503         src/systemd/sd-bus.h \
2504         src/systemd/sd-bus-protocol.h \
2505         src/systemd/sd-bus-vtable.h \
2506         src/systemd/sd-utf8.h \
2507         src/systemd/sd-event.h \
2508         src/systemd/sd-rtnl.h \
2509         src/systemd/sd-resolve.h \
2510         src/systemd/sd-login.h \
2511         src/systemd/sd-id128.h \
2512         src/systemd/sd-daemon.h \
2513         src/systemd/sd-path.h \
2514         src/systemd/sd-network.h \
2515         src/libsystemd/sd-bus/sd-bus.c \
2516         src/libsystemd/sd-bus/bus-control.c \
2517         src/libsystemd/sd-bus/bus-control.h \
2518         src/libsystemd/sd-bus/bus-error.c \
2519         src/libsystemd/sd-bus/bus-error.h \
2520         src/libsystemd/sd-bus/bus-internal.c \
2521         src/libsystemd/sd-bus/bus-internal.h \
2522         src/libsystemd/sd-bus/bus-socket.c \
2523         src/libsystemd/sd-bus/bus-socket.h \
2524         src/libsystemd/sd-bus/bus-kernel.c \
2525         src/libsystemd/sd-bus/bus-kernel.h \
2526         src/libsystemd/sd-bus/bus-container.c \
2527         src/libsystemd/sd-bus/bus-container.h \
2528         src/libsystemd/sd-bus/bus-message.c \
2529         src/libsystemd/sd-bus/bus-message.h \
2530         src/libsystemd/sd-bus/bus-creds.c \
2531         src/libsystemd/sd-bus/bus-creds.h \
2532         src/libsystemd/sd-bus/bus-signature.c \
2533         src/libsystemd/sd-bus/bus-signature.h \
2534         src/libsystemd/sd-bus/bus-type.c \
2535         src/libsystemd/sd-bus/bus-type.h \
2536         src/libsystemd/sd-bus/bus-match.c \
2537         src/libsystemd/sd-bus/bus-match.h \
2538         src/libsystemd/sd-bus/bus-bloom.c \
2539         src/libsystemd/sd-bus/bus-bloom.h \
2540         src/libsystemd/sd-bus/bus-introspect.c \
2541         src/libsystemd/sd-bus/bus-introspect.h \
2542         src/libsystemd/sd-bus/bus-objects.c \
2543         src/libsystemd/sd-bus/bus-objects.h \
2544         src/libsystemd/sd-bus/bus-gvariant.c \
2545         src/libsystemd/sd-bus/bus-gvariant.h \
2546         src/libsystemd/sd-bus/bus-convenience.c \
2547         src/libsystemd/sd-bus/bus-track.c \
2548         src/libsystemd/sd-bus/bus-track.h \
2549         src/libsystemd/sd-bus/bus-util.c \
2550         src/libsystemd/sd-bus/bus-util.h \
2551         src/libsystemd/sd-bus/bus-slot.c \
2552         src/libsystemd/sd-bus/bus-slot.h \
2553         src/libsystemd/sd-bus/bus-protocol.h \
2554         src/libsystemd/sd-bus/kdbus.h \
2555         src/libsystemd/sd-utf8/sd-utf8.c \
2556         src/libsystemd/sd-event/sd-event.c \
2557         src/libsystemd/sd-event/event-util.h \
2558         src/libsystemd/sd-rtnl/sd-rtnl.c \
2559         src/libsystemd/sd-rtnl/rtnl-internal.h \
2560         src/libsystemd/sd-rtnl/rtnl-message.c \
2561         src/libsystemd/sd-rtnl/rtnl-types.h \
2562         src/libsystemd/sd-rtnl/rtnl-types.c \
2563         src/libsystemd/sd-rtnl/rtnl-util.h \
2564         src/libsystemd/sd-rtnl/rtnl-util.c \
2565         src/libsystemd/sd-rtnl/local-addresses.h \
2566         src/libsystemd/sd-rtnl/local-addresses.c \
2567         src/libsystemd/sd-id128/sd-id128.c \
2568         src/libsystemd/sd-daemon/sd-daemon.c \
2569         src/libsystemd/sd-login/sd-login.c \
2570         src/libsystemd/sd-path/sd-path.c \
2571         src/libsystemd/sd-network/sd-network.c \
2572         src/libsystemd/sd-network/network-util.h \
2573         src/libsystemd/sd-network/network-util.c
2574
2575 nodist_libsystemd_internal_la_SOURCES = \
2576         src/libsystemd/libsystemd.sym \
2577         src/libsystemd/sd-bus/bus-error-mapping.c
2578
2579 libsystemd_internal_la_CFLAGS = \
2580         $(AM_CFLAGS) \
2581         -pthread
2582
2583 libsystemd_internal_la_LIBADD = \
2584         $(RT_LIBS)
2585
2586 libsystemd_resolve_la_SOURCES = \
2587         src/libsystemd/sd-resolve/sd-resolve.c \
2588         src/libsystemd/sd-resolve/resolve-util.h
2589
2590 libsystemd_resolve_la_CFLAGS = \
2591         $(AM_CFLAGS) \
2592         -pthread
2593
2594 libsystemd_resolve_la_LIBADD = \
2595         -lresolv
2596
2597 noinst_LTLIBRARIES += \
2598         libsystemd-internal.la \
2599         libsystemd-resolve.la
2600
2601 libsystemd_dump_la_SOURCES = \
2602         src/libsystemd/sd-bus/bus-dump.c \
2603         src/libsystemd/sd-bus/bus-dump.h
2604
2605 libsystemd_dump_la_CFLAGS = \
2606         $(AM_CFLAGS) \
2607         $(CAP_CFLAGS)
2608
2609 noinst_LTLIBRARIES += \
2610         libsystemd-dump.la
2611
2612 EXTRA_DIST += \
2613         src/libsystemd/libsystemd.sym.m4 \
2614         src/libsystemd/libsystemd.pc.in \
2615         src/libsystemd/sd-bus/bus-error-mapping.gperf \
2616         src/libsystemd/sd-bus/DIFFERENCES \
2617         src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
2618
2619 CLEANFILES += \
2620         src/libsystemd/libsystemd.sym \
2621         src/libsystemd/sd-bus/bus-error-mapping.c
2622
2623 BUILT_SOURCES += \
2624         src/libsystemd/libsystemd.sym
2625
2626 libsystemd_la_SOURCES = \
2627         $(libsystemd_internal_la_SOURCES) \
2628         $(libsystemd_resolve_la_SOURCES) \
2629         $(libsystemd_journal_internal_la_SOURCES)
2630
2631 nodist_libsystemd_la_SOURCES = \
2632         $(nodist_libsystemd_internal_la_SOURCES)
2633
2634 libsystemd_la_CFLAGS = \
2635         $(libsystemd_internal_la_CFLAGS) \
2636         $(libsystemd_resolve_la_CFLAGS) \
2637         $(libsystemd_journal_internal_la_CFLAGS)
2638
2639 libsystemd_la_LDFLAGS = \
2640         $(AM_LDFLAGS) \
2641         -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
2642         -Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
2643
2644 libsystemd_la_LIBADD = \
2645         libsystemd-shared.la \
2646         $(libsystemd_internal_la_LIBADD) \
2647         $(libsystemd_journal_internal_la_LIBADD) \
2648         $(libsystemd_resolve_la_LIBADD)
2649
2650 libsystemd-install-hook:
2651         libname=libsystemd.so && $(move-to-rootlibdir)
2652
2653 libsystemd-uninstall-hook:
2654         rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
2655
2656 INSTALL_EXEC_HOOKS += libsystemd-install-hook
2657 UNINSTALL_EXEC_HOOKS += libsystemd-uninstall-hook
2658
2659 pkgconfiglib_DATA += \
2660         src/libsystemd/libsystemd.pc
2661
2662 pkginclude_HEADERS += \
2663         src/systemd/sd-login.h \
2664         src/systemd/sd-id128.h \
2665         src/systemd/sd-daemon.h
2666
2667 if ENABLE_KDBUS
2668 pkginclude_HEADERS += \
2669         src/systemd/sd-bus.h \
2670         src/systemd/sd-bus-protocol.h \
2671         src/systemd/sd-bus-vtable.h \
2672         src/systemd/sd-utf8.h \
2673         src/systemd/sd-event.h \
2674         src/systemd/sd-rtnl.h \
2675         src/systemd/sd-resolve.h \
2676         src/systemd/sd-path.h
2677 endif
2678
2679 lib_LTLIBRARIES += \
2680         libsystemd.la
2681
2682 tests += \
2683         test-bus-marshal \
2684         test-bus-signature \
2685         test-bus-chat \
2686         test-bus-cleanup \
2687         test-bus-server \
2688         test-bus-match \
2689         test-bus-kernel \
2690         test-bus-kernel-bloom \
2691         test-bus-kernel-benchmark \
2692         test-bus-zero-copy \
2693         test-bus-introspect \
2694         test-bus-objects \
2695         test-bus-error \
2696         test-bus-creds \
2697         test-bus-gvariant \
2698         test-event \
2699         test-rtnl \
2700         test-resolve
2701
2702 bin_PROGRAMS += \
2703         busctl
2704
2705 test_bus_marshal_SOURCES = \
2706         src/libsystemd/sd-bus/test-bus-marshal.c
2707
2708 test_bus_marshal_LDADD = \
2709         libsystemd-internal.la \
2710         libsystemd-shared.la \
2711         libsystemd-dump.la \
2712         libsystemd-capability.la \
2713         $(GLIB_LIBS) \
2714         $(DBUS_LIBS) \
2715         $(CAP_LIBS)
2716
2717 test_bus_marshal_CFLAGS = \
2718         $(AM_CFLAGS) \
2719         $(GLIB_CFLAGS) \
2720         $(DBUS_CFLAGS) \
2721         $(CAP_CFLAGS)
2722
2723 test_bus_signature_SOURCES = \
2724         src/libsystemd/sd-bus/test-bus-signature.c
2725
2726 test_bus_signature_LDADD = \
2727         libsystemd-shared.la \
2728         libsystemd-internal.la
2729
2730 test_bus_chat_SOURCES = \
2731         src/libsystemd/sd-bus/test-bus-chat.c
2732
2733 test_bus_chat_CFLAGS = \
2734         $(AM_CFLAGS) \
2735         -pthread
2736
2737 test_bus_chat_LDADD = \
2738         libsystemd-internal.la \
2739         libsystemd-shared.la
2740
2741 test_bus_cleanup_SOURCES = \
2742         src/libsystemd/sd-bus/test-bus-cleanup.c
2743
2744 test_bus_cleanup_CFLAGS = \
2745         $(AM_CFLAGS) \
2746         $(SECCOMP_CFLAGS)
2747
2748 test_bus_cleanup_LDADD = \
2749         libsystemd-internal.la \
2750         libsystemd-shared.la
2751
2752 test_bus_server_SOURCES = \
2753         src/libsystemd/sd-bus/test-bus-server.c
2754
2755 test_bus_server_CFLAGS = \
2756         $(AM_CFLAGS) \
2757         -pthread
2758
2759 test_bus_server_LDADD = \
2760         libsystemd-internal.la \
2761         libsystemd-shared.la
2762
2763 test_bus_objects_SOURCES = \
2764         src/libsystemd/sd-bus/test-bus-objects.c
2765
2766 test_bus_objects_CFLAGS = \
2767         $(AM_CFLAGS) \
2768         $(CAP_CFLAGS) \
2769         -pthread
2770
2771 test_bus_objects_LDADD = \
2772         libsystemd-internal.la \
2773         libsystemd-shared.la \
2774         libsystemd-dump.la \
2775         libsystemd-capability.la \
2776         $(CAP_LIBS)
2777
2778 test_bus_error_SOURCES = \
2779         src/libsystemd/sd-bus/test-bus-error.c
2780
2781 test_bus_error_LDADD = \
2782         libsystemd-internal.la \
2783         libsystemd-shared.la
2784
2785 test_bus_gvariant_SOURCES = \
2786         src/libsystemd/sd-bus/test-bus-gvariant.c
2787
2788 test_bus_gvariant_LDADD = \
2789         libsystemd-internal.la \
2790         libsystemd-shared.la \
2791         libsystemd-dump.la \
2792         libsystemd-capability.la \
2793         $(GLIB_LIBS) \
2794         $(CAP_LIBS)
2795
2796 test_bus_gvariant_CFLAGS = \
2797         $(AM_CFLAGS) \
2798         $(GLIB_CFLAGS)
2799         $(CAP_CFLAGS)
2800
2801 test_bus_creds_SOURCES = \
2802         src/libsystemd/sd-bus/test-bus-creds.c
2803
2804 test_bus_creds_LDADD = \
2805         libsystemd-internal.la \
2806         libsystemd-shared.la \
2807         libsystemd-dump.la \
2808         libsystemd-capability.la
2809
2810 test_bus_match_SOURCES = \
2811         src/libsystemd/sd-bus/test-bus-match.c
2812
2813 test_bus_match_LDADD = \
2814         libsystemd-internal.la \
2815         libsystemd-shared.la
2816
2817 test_bus_kernel_SOURCES = \
2818         src/libsystemd/sd-bus/test-bus-kernel.c
2819
2820 test_bus_kernel_LDADD = \
2821         libsystemd-internal.la \
2822         libsystemd-shared.la \
2823         libsystemd-dump.la \
2824         libsystemd-capability.la \
2825         $(CAP_LIBS)
2826
2827 test_bus_kernel_CFLAGS = \
2828         $(AM_CFLAGS) \
2829         $(CAP_CFLAGS)
2830
2831 test_bus_kernel_bloom_SOURCES = \
2832         src/libsystemd/sd-bus/test-bus-kernel-bloom.c
2833
2834 test_bus_kernel_bloom_LDADD = \
2835         libsystemd-internal.la \
2836         libsystemd-shared.la
2837
2838 test_bus_kernel_benchmark_SOURCES = \
2839         src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
2840
2841 test_bus_kernel_benchmark_LDADD = \
2842         libsystemd-internal.la \
2843         libsystemd-shared.la
2844
2845 test_bus_zero_copy_SOURCES = \
2846         src/libsystemd/sd-bus/test-bus-zero-copy.c
2847
2848 test_bus_zero_copy_LDADD = \
2849         libsystemd-internal.la \
2850         libsystemd-shared.la \
2851         libsystemd-dump.la \
2852         libsystemd-capability.la \
2853         $(CAP_LIBS)
2854
2855 test_bus_zero_copy_CFLAGS = \
2856         $(AM_CFLAGS) \
2857         $(CAP_CFLAGS)
2858
2859 test_bus_introspect_SOURCES = \
2860         src/libsystemd/sd-bus/test-bus-introspect.c
2861
2862 test_bus_introspect_LDADD = \
2863         libsystemd-internal.la \
2864         libsystemd-shared.la
2865
2866 test_event_SOURCES = \
2867         src/libsystemd/sd-event/test-event.c
2868
2869 test_event_LDADD = \
2870         libsystemd-internal.la \
2871         libsystemd-shared.la
2872
2873 test_rtnl_SOURCES = \
2874         src/libsystemd/sd-rtnl/test-rtnl.c
2875
2876 test_rtnl_LDADD = \
2877         libsystemd-internal.la \
2878         libsystemd-shared.la
2879
2880 test_resolve_SOURCES = \
2881         src/libsystemd/sd-resolve/test-resolve.c
2882
2883 test_resolve_LDADD = \
2884         libsystemd-resolve.la \
2885         libsystemd-internal.la \
2886         libsystemd-shared.la
2887
2888 test_resolve_CFLAGS = \
2889         $(AM_CFLAGS) \
2890         -pthread
2891
2892 busctl_SOURCES = \
2893         src/libsystemd/sd-bus/busctl.c
2894
2895 busctl_LDADD = \
2896         libsystemd-internal.la \
2897         libsystemd-shared.la \
2898         libsystemd-dump.la \
2899         libsystemd-capability.la \
2900         $(CAP_LIBS)
2901
2902 busctl_CFLAGS = \
2903         $(AM_CFLAGS) \
2904         $(CAP_CFLAGS)
2905
2906 # ------------------------------------------------------------------------------
2907 noinst_LTLIBRARIES += \
2908         libsystemd-network.la
2909
2910 libsystemd_network_la_CFLAGS = \
2911         $(AM_CFLAGS) \
2912         $(KMOD_CFLAGS)
2913
2914 libsystemd_network_la_SOURCES = \
2915         src/systemd/sd-dhcp-client.h \
2916         src/systemd/sd-dhcp-server.h \
2917         src/systemd/sd-dhcp-lease.h \
2918         src/systemd/sd-ipv4ll.h \
2919         src/systemd/sd-icmp6-nd.h \
2920         src/systemd/sd-dhcp6-client.h \
2921         src/systemd/sd-dhcp6-lease.h \
2922         src/libsystemd-network/sd-dhcp-client.c \
2923         src/libsystemd-network/sd-dhcp-server.c \
2924         src/libsystemd-network/dhcp-network.c \
2925         src/libsystemd-network/dhcp-option.c \
2926         src/libsystemd-network/dhcp-packet.c \
2927         src/libsystemd-network/dhcp-internal.h \
2928         src/libsystemd-network/dhcp-server-internal.h \
2929         src/libsystemd-network/dhcp-protocol.h \
2930         src/libsystemd-network/dhcp-lease-internal.h \
2931         src/libsystemd-network/sd-dhcp-lease.c \
2932         src/libsystemd-network/sd-ipv4ll.c \
2933         src/libsystemd-network/ipv4ll-network.c \
2934         src/libsystemd-network/ipv4ll-packet.c \
2935         src/libsystemd-network/ipv4ll-internal.h \
2936         src/libsystemd-network/network-internal.c \
2937         src/libsystemd-network/network-internal.h \
2938         src/libsystemd-network/sd-icmp6-nd.c \
2939         src/libsystemd-network/sd-dhcp6-client.c \
2940         src/libsystemd-network/dhcp6-internal.h \
2941         src/libsystemd-network/dhcp6-protocol.h \
2942         src/libsystemd-network/dhcp6-network.c \
2943         src/libsystemd-network/dhcp6-option.c \
2944         src/libsystemd-network/dhcp6-lease-internal.h \
2945         src/libsystemd-network/sd-dhcp6-lease.c
2946
2947 libsystemd_network_la_LIBADD = \
2948         libudev-internal.la \
2949         libsystemd-label.la \
2950         libsystemd-internal.la \
2951         libsystemd-shared.la \
2952         $(KMOD_LIBS)
2953
2954 test_dhcp_option_SOURCES = \
2955         src/libsystemd-network/dhcp-protocol.h \
2956         src/libsystemd-network/dhcp-internal.h \
2957         src/libsystemd-network/test-dhcp-option.c
2958
2959 test_dhcp_option_LDADD = \
2960         libsystemd-network.la \
2961         libsystemd-internal.la \
2962         libsystemd-shared.la
2963
2964 test_dhcp_client_SOURCES = \
2965         src/systemd/sd-dhcp-client.h \
2966         src/libsystemd-network/dhcp-protocol.h \
2967         src/libsystemd-network/dhcp-internal.h \
2968         src/libsystemd-network/test-dhcp-client.c
2969
2970 test_dhcp_client_LDADD = \
2971         libsystemd-network.la \
2972         libsystemd-label.la \
2973         libsystemd-internal.la \
2974         libsystemd-shared.la
2975
2976 test_dhcp_server_SOURCES = \
2977         src/libsystemd-network/test-dhcp-server.c
2978
2979 test_dhcp_server_LDADD = \
2980         libsystemd-network.la \
2981         libsystemd-internal.la \
2982         libsystemd-shared.la
2983
2984 test_ipv4ll_SOURCES = \
2985         src/systemd/sd-ipv4ll.h \
2986         src/libsystemd-network/ipv4ll-internal.h \
2987         src/libsystemd-network/test-ipv4ll.c
2988
2989 test_ipv4ll_LDADD = \
2990         libsystemd-network.la \
2991         libsystemd-label.la \
2992         libsystemd-internal.la \
2993         libsystemd-shared.la
2994
2995 test_icmp6_rs_SOURCES = \
2996         src/systemd/sd-dhcp6-client.h \
2997         src/systemd/sd-icmp6-nd.h \
2998         src/libsystemd-network/dhcp6-internal.h \
2999         src/libsystemd-network/test-icmp6-rs.c
3000
3001 test_icmp6_rs_LDADD = \
3002         libsystemd-network.la \
3003         libsystemd-internal.la \
3004         libsystemd-shared.la
3005
3006 test_dhcp6_client_SOURCES = \
3007         src/systemd/sd-dhcp6-client.h \
3008         src/libsystemd-network/dhcp6-internal.h \
3009         src/libsystemd-network/test-dhcp6-client.c
3010
3011 test_dhcp6_client_LDADD = \
3012         libsystemd-network.la \
3013         libsystemd-internal.la \
3014         libsystemd-shared.la
3015
3016 tests += \
3017         test-dhcp-option \
3018         test-dhcp-client \
3019         test-dhcp-server \
3020         test-ipv4ll \
3021         test-icmp6-rs \
3022         test-dhcp6-client
3023
3024 # ------------------------------------------------------------------------------
3025 if ENABLE_TERMINAL
3026 noinst_LTLIBRARIES += \
3027         libsystemd-terminal.la
3028
3029 rootlibexec_PROGRAMS += \
3030         systemd-consoled
3031
3032 noinst_PROGRAMS += \
3033         systemd-evcat \
3034         systemd-modeset \
3035         systemd-subterm
3036
3037 dist_pkgdata_DATA += \
3038         src/libsystemd-terminal/unifont-glyph-array.bin
3039
3040 nodist_userunit_DATA += \
3041         units/user/systemd-consoled.service
3042
3043 USER_DEFAULT_TARGET_WANTS += \
3044         systemd-consoled.service
3045
3046 EXTRA_DIST += \
3047         units/user/systemd-consoled.service.in
3048
3049 tests += \
3050         test-term-page \
3051         test-term-parser \
3052         test-unifont
3053 endif
3054
3055 libsystemd_terminal_la_CFLAGS = \
3056         $(AM_CFLAGS) \
3057         $(TERMINAL_CFLAGS)
3058
3059 libsystemd_terminal_la_SOURCES = \
3060         src/libsystemd-terminal/grdev.h \
3061         src/libsystemd-terminal/grdev-internal.h \
3062         src/libsystemd-terminal/grdev.c \
3063         src/libsystemd-terminal/grdev-drm.c \
3064         src/libsystemd-terminal/idev.h \
3065         src/libsystemd-terminal/idev-internal.h \
3066         src/libsystemd-terminal/idev.c \
3067         src/libsystemd-terminal/idev-evdev.c \
3068         src/libsystemd-terminal/idev-keyboard.c \
3069         src/libsystemd-terminal/sysview.h \
3070         src/libsystemd-terminal/sysview-internal.h \
3071         src/libsystemd-terminal/sysview.c \
3072         src/libsystemd-terminal/term.h \
3073         src/libsystemd-terminal/term-internal.h \
3074         src/libsystemd-terminal/term-charset.c \
3075         src/libsystemd-terminal/term-page.c \
3076         src/libsystemd-terminal/term-parser.c \
3077         src/libsystemd-terminal/term-screen.c \
3078         src/libsystemd-terminal/term-wcwidth.c \
3079         src/libsystemd-terminal/unifont.h \
3080         src/libsystemd-terminal/unifont-def.h \
3081         src/libsystemd-terminal/unifont.c
3082
3083 libsystemd_terminal_la_LIBADD = \
3084         libudev-internal.la \
3085         libsystemd-internal.la \
3086         libsystemd-shared.la \
3087         $(TERMINAL_LIBS)
3088
3089 systemd_consoled_CFLAGS = \
3090         $(AM_CFLAGS) \
3091         $(TERMINAL_CFLAGS)
3092
3093 systemd_consoled_SOURCES = \
3094         src/console/consoled.h \
3095         src/console/consoled.c \
3096         src/console/consoled-display.c \
3097         src/console/consoled-manager.c \
3098         src/console/consoled-session.c \
3099         src/console/consoled-terminal.c \
3100         src/console/consoled-workspace.c
3101
3102 systemd_consoled_LDADD = \
3103         libsystemd-terminal.la \
3104         libsystemd-internal.la \
3105         libsystemd-shared.la \
3106         $(TERMINAL_LIBS)
3107
3108 systemd_evcat_CFLAGS = \
3109         $(AM_CFLAGS) \
3110         $(TERMINAL_CFLAGS)
3111
3112 systemd_evcat_SOURCES = \
3113         src/libsystemd-terminal/evcat.c
3114
3115 systemd_evcat_LDADD = \
3116         libsystemd-terminal.la \
3117         libsystemd-internal.la \
3118         libsystemd-shared.la \
3119         $(TERMINAL_LIBS)
3120
3121 systemd_modeset_CFLAGS = \
3122         $(AM_CFLAGS) \
3123         $(TERMINAL_CFLAGS)
3124
3125 systemd_modeset_SOURCES = \
3126         src/libsystemd-terminal/modeset.c
3127
3128 systemd_modeset_LDADD = \
3129         libsystemd-terminal.la \
3130         libsystemd-internal.la \
3131         libsystemd-shared.la \
3132         $(TERMINAL_LIBS)
3133
3134 systemd_subterm_SOURCES = \
3135         src/libsystemd-terminal/subterm.c
3136
3137 systemd_subterm_LDADD = \
3138         libsystemd-terminal.la \
3139         libsystemd-internal.la \
3140         libsystemd-shared.la
3141
3142 test_term_page_SOURCES = \
3143         src/libsystemd-terminal/test-term-page.c
3144
3145 test_term_page_LDADD = \
3146         libsystemd-terminal.la \
3147         libsystemd-internal.la \
3148         libsystemd-shared.la
3149
3150 test_term_parser_SOURCES = \
3151         src/libsystemd-terminal/test-term-parser.c
3152
3153 test_term_parser_LDADD = \
3154         libsystemd-terminal.la \
3155         libsystemd-internal.la \
3156         libsystemd-shared.la
3157
3158 test_unifont_SOURCES = \
3159         src/libsystemd-terminal/test-unifont.c
3160
3161 test_unifont_LDADD = \
3162         libsystemd-terminal.la \
3163         libsystemd-internal.la \
3164         libsystemd-shared.la
3165
3166 .PHONY: update-unifont
3167 update-unifont: tools/compile-unifont.py
3168         $(AM_V_GEN)$(PYTHON) $< \
3169                 <$(top_srcdir)/src/libsystemd-terminal/unifont.hex \
3170                 >$(top_srcdir)/src/libsystemd-terminal/unifont-glyph-array.bin
3171         @echo "unifont-glyph-array.bin has been regenerated"
3172
3173 # ------------------------------------------------------------------------------
3174 if ENABLE_GTK_DOC
3175 SUBDIRS += \
3176         docs/libudev
3177
3178 noinst_DATA += \
3179         docs/html/libudev \
3180         docs/html/gudev
3181 endif
3182
3183 include_HEADERS += \
3184         src/libudev/libudev.h
3185
3186 lib_LTLIBRARIES += \
3187         libudev.la
3188
3189 libudev_la_SOURCES =\
3190         src/libudev/libudev.sym \
3191         src/libudev/libudev-private.h \
3192         src/libudev/libudev.c \
3193         src/libudev/libudev-list.c \
3194         src/libudev/libudev-util.c \
3195         src/libudev/libudev-device.c \
3196         src/libudev/libudev-enumerate.c \
3197         src/libudev/libudev-monitor.c \
3198         src/libudev/libudev-queue.c \
3199         src/libudev/libudev-hwdb-def.h \
3200         src/libudev/libudev-hwdb.c
3201
3202 libudev_la_CFLAGS = \
3203         $(AM_CFLAGS) \
3204         -fvisibility=hidden
3205
3206 libudev_la_LDFLAGS = \
3207         $(AM_LDFLAGS) \
3208         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
3209         -Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
3210
3211 libudev_la_LIBADD = \
3212         libsystemd-internal.la \
3213         libsystemd-shared.la
3214
3215 pkgconfiglib_DATA += \
3216         src/libudev/libudev.pc
3217
3218 EXTRA_DIST += \
3219         src/libudev/libudev.pc.in
3220
3221 CLEANFILES += \
3222         src/libudev/libudev.pc \
3223         docs/html/libudev \
3224         docs/html/gudev
3225
3226 docs/html/libudev:
3227         $(AM_V_at)$(MKDIR_P) $(dir $@)
3228         $(AM_V_LN)$(LN_S) -f ../libudev/html $@
3229
3230 docs/html/gudev:
3231         $(AM_V_at)$(MKDIR_P) $(dir $@)
3232         $(AM_V_LN)$(LN_S) -f ../gudev/html $@
3233
3234 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
3235 libudev-install-hook:
3236         libname=libudev.so && $(move-to-rootlibdir)
3237
3238 libudev-uninstall-hook:
3239         rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
3240
3241 INSTALL_EXEC_HOOKS += libudev-install-hook
3242 UNINSTALL_EXEC_HOOKS += libudev-uninstall-hook
3243
3244 # ------------------------------------------------------------------------------
3245 noinst_LTLIBRARIES += \
3246         libudev-internal.la
3247
3248 libudev_internal_la_SOURCES =\
3249         $(libudev_la_SOURCES) \
3250         src/libudev/libudev-device-private.c
3251
3252 libudev_internal_la_CFLAGS = \
3253         $(AM_CFLAGS) \
3254         -fvisibility=default
3255
3256 # ------------------------------------------------------------------------------
3257 INSTALL_DIRS += \
3258         $(sysconfdir)/udev/rules.d \
3259         $(sysconfdir)/udev/hwdb.d
3260
3261 dist_network_DATA = \
3262         network/99-default.link \
3263         network/80-container-host0.network \
3264         network/80-container-ve.network
3265
3266 dist_udevrules_DATA += \
3267         rules/42-usb-hid-pm.rules \
3268         rules/50-udev-default.rules \
3269         rules/60-drm.rules \
3270         rules/60-keyboard.rules \
3271         rules/60-persistent-storage-tape.rules \
3272         rules/60-persistent-serial.rules \
3273         rules/60-persistent-input.rules \
3274         rules/60-persistent-alsa.rules \
3275         rules/60-persistent-storage.rules \
3276         rules/64-btrfs.rules \
3277         rules/75-net-description.rules \
3278         rules/75-tty-description.rules \
3279         rules/78-sound-card.rules \
3280         rules/80-net-setup-link.rules \
3281         rules/95-udev-late.rules
3282
3283 nodist_udevrules_DATA += \
3284         rules/99-systemd.rules
3285
3286 dist_udevhwdb_DATA = \
3287         hwdb/20-pci-vendor-model.hwdb \
3288         hwdb/20-pci-classes.hwdb \
3289         hwdb/20-usb-vendor-model.hwdb \
3290         hwdb/20-usb-classes.hwdb \
3291         hwdb/20-sdio-vendor-model.hwdb \
3292         hwdb/20-sdio-classes.hwdb \
3293         hwdb/20-bluetooth-vendor-product.hwdb \
3294         hwdb/20-acpi-vendor.hwdb \
3295         hwdb/20-OUI.hwdb \
3296         hwdb/20-net-ifname.hwdb \
3297         hwdb/60-keyboard.hwdb
3298
3299 udevconfdir = $(sysconfdir)/udev
3300 dist_udevconf_DATA = \
3301         src/udev/udev.conf
3302
3303 sharepkgconfigdir = $(datadir)/pkgconfig
3304 sharepkgconfig_DATA = \
3305         src/udev/udev.pc
3306
3307 EXTRA_DIST += \
3308         rules/99-systemd.rules.in \
3309         src/udev/udev.pc.in
3310
3311 CLEANFILES += \
3312         rules/99-systemd.rules \
3313         src/udev/udev.pc
3314
3315 EXTRA_DIST += \
3316         units/systemd-udevd.service.in \
3317         units/systemd-udev-trigger.service.in \
3318         units/systemd-udev-settle.service.in \
3319         units/systemd-udev-hwdb-update.service.in
3320
3321 CLEANFILES += \
3322         units/systemd-udevd.service \
3323         units/systemd-udev-trigger.service \
3324         units/systemd-udev-settle.service \
3325         units/systemd-udev-hwdb-update.service
3326
3327 SOCKETS_TARGET_WANTS += \
3328         systemd-udevd-control.socket \
3329         systemd-udevd-kernel.socket
3330
3331 SYSINIT_TARGET_WANTS += \
3332         systemd-udevd.service \
3333         systemd-udev-trigger.service \
3334         systemd-udev-hwdb-update.service
3335
3336 rootbin_PROGRAMS += \
3337         udevadm
3338
3339 rootlibexec_PROGRAMS += \
3340         systemd-udevd
3341
3342 noinst_LTLIBRARIES += \
3343         libudev-core.la
3344
3345 src/udev/keyboard-keys.txt:
3346         $(AM_V_at)$(MKDIR_P) $(dir $@)
3347         $(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/' > $@
3348
3349 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
3350         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
3351
3352 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
3353         $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
3354
3355 src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
3356         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
3357
3358 libudev_core_la_SOURCES = \
3359         src/udev/udev.h \
3360         src/udev/udev-event.c \
3361         src/udev/udev-watch.c \
3362         src/udev/udev-node.c \
3363         src/udev/udev-rules.c \
3364         src/udev/udev-ctrl.c \
3365         src/udev/udev-builtin.c \
3366         src/udev/udev-builtin-btrfs.c \
3367         src/udev/udev-builtin-hwdb.c \
3368         src/udev/udev-builtin-input_id.c \
3369         src/udev/udev-builtin-keyboard.c \
3370         src/udev/udev-builtin-net_id.c \
3371         src/udev/udev-builtin-net_setup_link.c \
3372         src/udev/udev-builtin-path_id.c \
3373         src/udev/udev-builtin-usb_id.c \
3374         src/udev/net/link-config.h \
3375         src/udev/net/link-config.c \
3376         src/udev/net/ethtool-util.h \
3377         src/udev/net/ethtool-util.c
3378
3379 nodist_libudev_core_la_SOURCES = \
3380         src/udev/keyboard-keys-from-name.h \
3381         src/udev/keyboard-keys-to-name.h \
3382         src/udev/net/link-config-gperf.c
3383
3384 BUILT_SOURCES += \
3385         $(nodist_libudev_core_la_SOURCES)
3386
3387 CLEANFILES += \
3388         src/udev/keyboard-keys-from-name.gperf \
3389         src/udev/keyboard-keys.txt \
3390         src/udev/net/link-config-gperf.c
3391
3392 EXTRA_DIST += \
3393         src/udev/net/link-config-gperf.gperf
3394
3395 libudev_core_la_CFLAGS = \
3396         $(AM_CFLAGS) \
3397         $(BLKID_CFLAGS) \
3398         $(KMOD_CFLAGS)
3399
3400 libudev_core_la_LIBADD = \
3401         libudev-internal.la \
3402         libsystemd-label.la \
3403         libsystemd-internal.la \
3404         libsystemd-network.la \
3405         libsystemd-shared.la \
3406         $(BLKID_LIBS) \
3407         $(KMOD_LIBS)
3408
3409 if HAVE_KMOD
3410 libudev_core_la_SOURCES += \
3411         src/udev/udev-builtin-kmod.c
3412
3413 dist_udevrules_DATA += \
3414         rules/80-drivers.rules
3415 endif
3416
3417 if HAVE_BLKID
3418 libudev_core_la_SOURCES += \
3419         src/udev/udev-builtin-blkid.c
3420 endif
3421
3422 if HAVE_ACL
3423 libudev_core_la_SOURCES += \
3424         src/udev/udev-builtin-uaccess.c \
3425         src/login/logind-acl.c \
3426         src/libsystemd/sd-login/sd-login.c \
3427         src/systemd/sd-login.h
3428
3429 libudev_core_la_LIBADD += \
3430         libsystemd-acl.la
3431 endif
3432
3433 systemd_udevd_SOURCES = \
3434         src/udev/udevd.c
3435
3436 systemd_udevd_LDADD = \
3437         libudev-core.la
3438
3439 udevadm_SOURCES = \
3440         src/udev/udevadm.c \
3441         src/udev/udevadm-info.c \
3442         src/udev/udevadm-control.c \
3443         src/udev/udevadm-monitor.c \
3444         src/udev/udevadm-hwdb.c \
3445         src/udev/udevadm-settle.c \
3446         src/udev/udevadm-trigger.c \
3447         src/udev/udevadm-test.c \
3448         src/udev/udevadm-test-builtin.c
3449
3450 udevadm_LDADD = \
3451         libudev-core.la
3452
3453 # Update hwdb on installation. Do not bother if installing
3454 # in DESTDIR, since this is likely for packaging purposes.
3455 hwdb-update-hook:
3456         -test -n "$(DESTDIR)" || $(rootbindir)/udevadm hwdb --update
3457
3458 INSTALL_DATA_HOOKS += \
3459         hwdb-update-hook
3460
3461 hwdb-remove-hook:
3462         -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
3463
3464 # ------------------------------------------------------------------------------
3465 TESTS += \
3466         test/udev-test.pl \
3467         test/rules-test.sh
3468
3469 manual_tests += \
3470         test-libudev \
3471         test-udev
3472
3473 test_libudev_SOURCES = \
3474         src/test/test-libudev.c
3475
3476 test_libudev_LDADD = \
3477         libsystemd-label.la \
3478         libudev-internal.la \
3479         libsystemd-shared.la
3480
3481 test_udev_SOURCES = \
3482         src/test/test-udev.c
3483
3484 test_udev_LDADD = \
3485         libudev-core.la \
3486         $(BLKID_LIBS) \
3487         $(KMOD_LIBS) \
3488         $(SELINUX_LIBS)
3489
3490 if HAVE_ACL
3491 test_udev_LDADD += \
3492         libsystemd-acl.la
3493 endif
3494
3495 check_DATA += \
3496         test/sys
3497
3498 # packed sysfs test tree
3499 test/sys:
3500         $(AM_V_at)$(MKDIR_P) $(dir $@)
3501         $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
3502
3503 test-sys-distclean:
3504         -rm -rf test/sys
3505 DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
3506
3507 EXTRA_DIST += \
3508         test/sys.tar.xz \
3509         test/udev-test.pl \
3510         test/rules-test.sh \
3511         test/rule-syntax-check.py
3512
3513 # ------------------------------------------------------------------------------
3514 ata_id_SOURCES = \
3515         src/udev/ata_id/ata_id.c
3516
3517 ata_id_LDADD = \
3518         libudev-internal.la \
3519         libsystemd-shared.la
3520
3521 udevlibexec_PROGRAMS += \
3522         ata_id
3523
3524 # ------------------------------------------------------------------------------
3525 cdrom_id_SOURCES = \
3526         src/udev/cdrom_id/cdrom_id.c
3527
3528 cdrom_id_LDADD = \
3529         libudev-internal.la \
3530         libsystemd-shared.la
3531
3532 udevlibexec_PROGRAMS += \
3533         cdrom_id
3534
3535 dist_udevrules_DATA += \
3536         rules/60-cdrom_id.rules
3537
3538 # ------------------------------------------------------------------------------
3539 collect_SOURCES = \
3540         src/udev/collect/collect.c
3541
3542 collect_LDADD = \
3543         libudev-internal.la \
3544         libsystemd-shared.la
3545
3546 udevlibexec_PROGRAMS += \
3547         collect
3548
3549 # ------------------------------------------------------------------------------
3550 scsi_id_SOURCES =\
3551         src/udev/scsi_id/scsi_id.c \
3552         src/udev/scsi_id/scsi_serial.c \
3553         src/udev/scsi_id/scsi.h \
3554         src/udev/scsi_id/scsi_id.h
3555
3556 scsi_id_LDADD = \
3557         libudev-internal.la \
3558         libsystemd-shared.la
3559
3560 udevlibexec_PROGRAMS += \
3561         scsi_id
3562
3563 EXTRA_DIST += \
3564         src/udev/scsi_id/README
3565
3566 # ------------------------------------------------------------------------------
3567 v4l_id_SOURCES = \
3568         src/udev/v4l_id/v4l_id.c
3569
3570 v4l_id_LDADD = \
3571         libudev-internal.la
3572
3573 udevlibexec_PROGRAMS += \
3574         v4l_id
3575
3576 dist_udevrules_DATA += \
3577         rules/60-persistent-v4l.rules
3578
3579 # ------------------------------------------------------------------------------
3580 accelerometer_SOURCES = \
3581         src/udev/accelerometer/accelerometer.c
3582
3583 accelerometer_LDADD = \
3584         libudev-internal.la -lm \
3585         libsystemd-shared.la
3586
3587 udevlibexec_PROGRAMS += \
3588         accelerometer
3589
3590 dist_udevrules_DATA += \
3591         rules/61-accelerometer.rules
3592
3593 # ------------------------------------------------------------------------------
3594 if ENABLE_GUDEV
3595 if ENABLE_GTK_DOC
3596 SUBDIRS += \
3597         docs/gudev
3598 endif
3599
3600 libgudev_includedir = \
3601         $(includedir)/gudev-1.0/gudev
3602
3603 libgudev_include_HEADERS = \
3604         src/gudev/gudev.h \
3605         src/gudev/gudevenums.h \
3606         src/gudev/gudevenumtypes.h \
3607         src/gudev/gudevtypes.h \
3608         src/gudev/gudevclient.h \
3609         src/gudev/gudevdevice.h \
3610         src/gudev/gudevenumerator.h
3611
3612 lib_LTLIBRARIES += libgudev-1.0.la
3613
3614 pkgconfiglib_DATA += \
3615         src/gudev/gudev-1.0.pc
3616
3617 CLEANFILES += \
3618         src/gudev/gudev-1.0.pc
3619
3620 libgudev_1_0_la_SOURCES = \
3621         src/gudev/libgudev-1.0.sym \
3622         src/gudev/gudevenums.h \
3623         src/gudev/gudevenumtypes.h \
3624         src/gudev/gudevenumtypes.h\
3625         src/gudev/gudevtypes.h \
3626         src/gudev/gudevclient.h \
3627         src/gudev/gudevclient.c \
3628         src/gudev/gudevdevice.h \
3629         src/gudev/gudevdevice.c \
3630         src/gudev/gudevenumerator.h \
3631         src/gudev/gudevenumerator.c \
3632         src/gudev/gudevprivate.h
3633
3634 nodist_libgudev_1_0_la_SOURCES = \
3635         src/gudev/gudevmarshal.h \
3636         src/gudev/gudevmarshal.c \
3637         src/gudev/gudevenumtypes.h \
3638         src/gudev/gudevenumtypes.c
3639
3640 BUILT_SOURCES += \
3641         $(nodist_libgudev_1_0_la_SOURCES)
3642
3643 libgudev_1_0_la_CPPFLAGS = \
3644         $(AM_CPPFLAGS) \
3645         -I$(top_builddir)/src\
3646         -I$(top_srcdir)/src\
3647         -I$(top_builddir)/src/gudev \
3648         -I$(top_srcdir)/src/gudev \
3649         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
3650         -D_GUDEV_COMPILATION \
3651         -DG_LOG_DOMAIN=\"GUdev\"
3652
3653 libgudev_1_0_la_CFLAGS = \
3654         $(AM_CFLAGS) \
3655         -fvisibility=default \
3656         $(GLIB_CFLAGS)
3657
3658 libgudev_1_0_la_LIBADD = \
3659         libudev.la \
3660         $(GLIB_LIBS)
3661
3662 libgudev_1_0_la_LDFLAGS = \
3663         $(AM_LDFLAGS) \
3664         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
3665         -export-dynamic \
3666         -no-undefined \
3667         -Wl,--version-script=$(top_srcdir)/src/gudev/libgudev-1.0.sym
3668
3669 src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
3670         $(AM_V_at)$(MKDIR_P) $(dir $@)
3671         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
3672
3673 src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
3674         $(AM_V_at)$(MKDIR_P) $(dir $@)
3675         $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
3676         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
3677
3678 src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
3679         $(AM_V_at)$(MKDIR_P) $(dir $@)
3680         $(AM_V_GEN)glib-mkenums --template $^ > $@
3681
3682 if HAVE_INTROSPECTION
3683 -include $(INTROSPECTION_MAKEFILE)
3684
3685 src/gudev/GUdev-1.0.gir: libgudev-1.0.la
3686
3687 src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
3688
3689 src_gudev_GUdev_1_0_gir_CFLAGS = \
3690         $(AM_CFLAGS) \
3691         $(INCLUDES) \
3692         -D_GUDEV_COMPILATION \
3693         -D_GUDEV_WORK_AROUND_DEV_T_BUG \
3694         -I$(top_srcdir)/src \
3695         -I$(top_builddir)/src \
3696         -I$(top_srcdir)/src/gudev \
3697         -I$(top_builddir)/src/gudev
3698
3699 src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
3700
3701 src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
3702         --pkg-export=gudev-1.0 \
3703         --warn-all
3704
3705 src_gudev_GUdev_1_0_gir_FILES = \
3706         src/gudev/gudev.h \
3707         src/gudev/gudevtypes.h \
3708         src/gudev/gudevenums.h \
3709         src/gudev/gudevenumtypes.h \
3710         src/gudev/gudevclient.h \
3711         src/gudev/gudevdevice.h \
3712         src/gudev/gudevenumerator.h \
3713         src/gudev/gudevclient.c \
3714         src/gudev/gudevdevice.c \
3715         src/gudev/gudevenumerator.c
3716
3717 INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
3718 INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
3719
3720 girdir = $(datadir)/gir-1.0
3721 gir_DATA = \
3722         src/gudev/GUdev-1.0.gir
3723
3724 typelibsdir = $(libdir)/girepository-1.0
3725 typelibs_DATA = \
3726         src/gudev/GUdev-1.0.typelib
3727
3728 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
3729 endif # HAVE_INTROSPECTION
3730 endif
3731
3732 EXTRA_DIST += \
3733         src/gudev/gudev-1.0.pc.in \
3734         src/gudev/gudevmarshal.list \
3735         src/gudev/gudevenumtypes.h.template \
3736         src/gudev/gudevenumtypes.c.template \
3737         src/gudev/gjs-example.js \
3738         src/gudev/seed-example-enum.js \
3739         src/gudev/seed-example.js
3740
3741 # ------------------------------------------------------------------------------
3742 mtd_probe_SOURCES =  \
3743         src/udev/mtd_probe/mtd_probe.c \
3744         src/udev/mtd_probe/mtd_probe.h \
3745         src/udev/mtd_probe/probe_smartmedia.c
3746
3747 dist_udevrules_DATA += \
3748         rules/75-probe_mtd.rules
3749
3750 udevlibexec_PROGRAMS += \
3751         mtd_probe
3752
3753 # ------------------------------------------------------------------------------
3754 test_id128_SOURCES = \
3755         src/test/test-id128.c
3756
3757 test_id128_LDADD = \
3758         libsystemd-internal.la \
3759         libsystemd-shared.la
3760
3761 tests += \
3762         test-id128
3763
3764 # ------------------------------------------------------------------------------
3765
3766 rootlibexec_PROGRAMS += \
3767         systemd-activate
3768
3769 systemd_activate_SOURCES = \
3770         src/activate/activate.c
3771
3772 systemd_activate_LDADD = \
3773         libsystemd-label.la \
3774         libsystemd-internal.la \
3775         libsystemd-shared.la
3776
3777 # ------------------------------------------------------------------------------
3778 systemd_journald_SOURCES = \
3779         src/journal/journald.c \
3780         src/journal/journald-server.h
3781
3782 systemd_journald_LDADD = \
3783         libsystemd-journal-core.la \
3784         libsystemd-internal.la \
3785         libsystemd-shared.la
3786
3787 systemd_cat_SOURCES = \
3788         src/journal/cat.c
3789
3790 systemd_cat_LDADD = \
3791         libsystemd-journal-core.la
3792
3793 if HAVE_MICROHTTPD
3794 rootlibexec_PROGRAMS += \
3795         systemd-journal-remote
3796
3797 systemd_journal_remote_SOURCES = \
3798         src/journal-remote/journal-remote-parse.h \
3799         src/journal-remote/journal-remote-parse.c \
3800         src/journal-remote/journal-remote-write.h \
3801         src/journal-remote/journal-remote-write.c \
3802         src/journal-remote/journal-remote.h \
3803         src/journal-remote/journal-remote.c
3804
3805 systemd_journal_remote_LDADD = \
3806         libsystemd-internal.la \
3807         libsystemd-journal-core.la
3808
3809 systemd_journal_remote_SOURCES += \
3810         src/journal-remote/microhttpd-util.h \
3811         src/journal-remote/microhttpd-util.c
3812
3813 systemd_journal_remote_CFLAGS = \
3814         $(AM_CFLAGS) \
3815         $(MICROHTTPD_CFLAGS)
3816
3817 systemd_journal_remote_LDADD += \
3818         $(MICROHTTPD_LIBS)
3819
3820 if HAVE_GNUTLS
3821 systemd_journal_remote_LDADD += \
3822         $(GNUTLS_LIBS)
3823
3824 # systemd-journal-remote make sense mostly with full crypto stack
3825 dist_systemunit_DATA += \
3826         units/systemd-journal-remote.socket
3827
3828 nodist_systemunit_DATA += \
3829         units/systemd-journal-remote.service
3830
3831 EXTRA_DIST += \
3832         units/systemd-journal-remote.service.in
3833
3834 journal-remote-install-hook: journal-install-hook
3835         -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
3836         -chown 0:0 $(DESTDIR)/var/log/journal/remote
3837         -chmod 755 $(DESTDIR)/var/log/journal/remote
3838
3839 INSTALL_EXEC_HOOKS += journal-remote-install-hook
3840
3841 endif
3842
3843 nodist_pkgsysconf_DATA += \
3844         src/journal-remote/journal-remote.conf
3845
3846 EXTRA_DIST += \
3847         src/journal-remote/journal-remote.conf.in
3848
3849 CLEANFILES += \
3850         src/journal-remote/journal-remote.conf
3851 endif
3852
3853 if HAVE_LIBCURL
3854 rootlibexec_PROGRAMS += \
3855         systemd-journal-upload
3856
3857 systemd_journal_upload_SOURCES = \
3858         src/journal-remote/journal-upload.h \
3859         src/journal-remote/journal-upload.c \
3860         src/journal-remote/journal-upload-journal.c
3861
3862 systemd_journal_upload_CFLAGS = \
3863         $(AM_CFLAGS) \
3864         $(LIBCURL_CFLAGS)
3865
3866 systemd_journal_upload_LDADD = \
3867         libsystemd-core.la \
3868         libsystemd-internal.la \
3869         libsystemd-journal-internal.la \
3870         libsystemd-shared.la \
3871         $(LIBCURL_LIBS)
3872
3873 nodist_systemunit_DATA += \
3874         units/systemd-journal-upload.service
3875
3876 EXTRA_DIST += \
3877         units/systemd-journal-upload.service.in
3878
3879 nodist_pkgsysconf_DATA += \
3880         src/journal-remote/journal-upload.conf
3881
3882 EXTRA_DIST += \
3883         src/journal-remote/journal-upload.conf.in
3884
3885 CLEANFILES += \
3886         src/journal-remote/journal-upload.conf
3887 endif
3888
3889 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
3890 journalctl_CFLAGS = \
3891         $(AM_CFLAGS)
3892
3893 journalctl_SOURCES = \
3894         src/journal/journalctl.c
3895
3896 journalctl_LDADD = \
3897         libsystemd-journal-internal.la \
3898         libsystemd-internal.la \
3899         libsystemd-logs.la \
3900         libsystemd-shared.la
3901
3902 if HAVE_ACL
3903 journalctl_LDADD += \
3904         libsystemd-acl.la
3905 endif
3906
3907 if HAVE_QRENCODE
3908 journalctl_SOURCES += \
3909         src/journal/journal-qrcode.c \
3910         src/journal/journal-qrcode.h
3911
3912 journalctl_CFLAGS += \
3913         $(QRENCODE_CFLAGS)
3914
3915 journalctl_LDADD += \
3916         $(QRENCODE_LIBS)
3917 endif
3918
3919 test_journal_SOURCES = \
3920         src/journal/test-journal.c
3921
3922 test_journal_LDADD = \
3923         libsystemd-journal-core.la
3924
3925 test_journal_send_SOURCES = \
3926         src/journal/test-journal-send.c
3927
3928 test_journal_send_LDADD = \
3929         libsystemd-journal-core.la
3930
3931 test_journal_syslog_SOURCES = \
3932         src/journal/test-journal-syslog.c
3933
3934 test_journal_syslog_LDADD = \
3935         libsystemd-journal-core.la
3936
3937 test_journal_match_SOURCES = \
3938         src/journal/test-journal-match.c
3939
3940 test_journal_match_LDADD = \
3941         libsystemd-journal-core.la
3942
3943 test_journal_enum_SOURCES = \
3944         src/journal/test-journal-enum.c
3945
3946 test_journal_enum_LDADD = \
3947         libsystemd-journal-core.la
3948
3949 test_journal_stream_SOURCES = \
3950         src/journal/test-journal-stream.c
3951
3952 test_journal_stream_LDADD = \
3953         libsystemd-journal-core.la
3954
3955 test_journal_flush_SOURCES = \
3956         src/journal/test-journal-flush.c
3957
3958 test_journal_flush_LDADD = \
3959         libsystemd-journal-core.la
3960
3961 test_journal_init_SOURCES = \
3962         src/journal/test-journal-init.c
3963
3964 test_journal_init_LDADD = \
3965         libsystemd-journal-core.la
3966
3967 test_journal_verify_SOURCES = \
3968         src/journal/test-journal-verify.c
3969
3970 test_journal_verify_LDADD = \
3971         libsystemd-journal-core.la
3972
3973 test_journal_interleaving_SOURCES = \
3974         src/journal/test-journal-interleaving.c
3975
3976 test_journal_interleaving_LDADD = \
3977         libsystemd-journal-core.la
3978
3979 test_mmap_cache_SOURCES = \
3980         src/journal/test-mmap-cache.c
3981
3982 test_mmap_cache_LDADD = \
3983         libsystemd-journal-core.la
3984
3985 test_catalog_SOURCES = \
3986         src/journal/test-catalog.c
3987
3988 test_catalog_CPPFLAGS = \
3989         $(AM_CPPFLAGS) \
3990         -DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
3991
3992 test_catalog_LDADD = \
3993         libsystemd-journal-core.la
3994
3995 test_compress_SOURCES = \
3996         src/journal/test-compress.c
3997
3998 test_compress_LDADD = \
3999         libsystemd-journal-internal.la \
4000         libsystemd-shared.la
4001
4002 test_compress_benchmark_SOURCES = \
4003         src/journal/test-compress-benchmark.c
4004
4005 test_compress_benchmark_LDADD = \
4006         libsystemd-journal-internal.la \
4007         libsystemd-shared.la
4008
4009 libsystemd_journal_core_la_SOURCES = \
4010         src/journal/journald-kmsg.c \
4011         src/journal/journald-kmsg.h \
4012         src/journal/journald-syslog.c \
4013         src/journal/journald-syslog.h \
4014         src/journal/journald-stream.c \
4015         src/journal/journald-stream.h \
4016         src/journal/journald-server.c \
4017         src/journal/journald-server.h \
4018         src/journal/journald-console.c \
4019         src/journal/journald-console.h \
4020         src/journal/journald-wall.c \
4021         src/journal/journald-wall.h \
4022         src/journal/journald-native.c \
4023         src/journal/journald-native.h \
4024         src/journal/journald-rate-limit.c \
4025         src/journal/journald-rate-limit.h \
4026         src/journal/journal-internal.h
4027
4028 nodist_libsystemd_journal_core_la_SOURCES = \
4029         src/journal/journald-gperf.c
4030
4031 libsystemd_journal_core_la_LIBADD = \
4032         libsystemd-journal-internal.la \
4033         libudev-internal.la \
4034         libsystemd-capability.la \
4035         libsystemd-label.la \
4036         libsystemd-internal.la \
4037         libsystemd-shared.la
4038
4039 if HAVE_ACL
4040 libsystemd_journal_core_la_LIBADD += \
4041         libsystemd-acl.la
4042 endif
4043
4044 noinst_LTLIBRARIES += \
4045         libsystemd-journal-core.la
4046
4047 journal-install-hook:
4048         -$(MKDIR_P) $(DESTDIR)/var/log/journal
4049         -chown 0:0 $(DESTDIR)/var/log/journal
4050         -chmod 755 $(DESTDIR)/var/log/journal
4051         -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
4052         -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
4053
4054 journal-uninstall-hook:
4055         -rmdir $(DESTDIR)/var/log/journal/remote
4056         -rmdir $(DESTDIR)/var/log/journal/
4057
4058 INSTALL_EXEC_HOOKS += journal-install-hook
4059 UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
4060
4061 # ------------------------------------------------------------------------------
4062 # Update catalog on installation. Do not bother if installing
4063 # in DESTDIR, since this is likely for packaging purposes.
4064 catalog-update-hook:
4065         -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
4066
4067 INSTALL_DATA_HOOKS += \
4068         catalog-update-hook
4069
4070 catalog-remove-hook:
4071         -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
4072
4073 UNINSTALL_DATA_HOOKS += \
4074         catalog-remove-hook
4075
4076 manual_tests += \
4077         test-journal-enum
4078
4079 tests += \
4080         test-journal \
4081         test-journal-send \
4082         test-journal-syslog \
4083         test-journal-match \
4084         test-journal-stream \
4085         test-journal-init \
4086         test-journal-verify \
4087         test-journal-interleaving \
4088         test-journal-flush \
4089         test-mmap-cache \
4090         test-catalog
4091
4092 if HAVE_COMPRESSION
4093 tests += \
4094         test-compress \
4095         test-compress-benchmark
4096 endif
4097
4098 pkginclude_HEADERS += \
4099         src/systemd/sd-journal.h \
4100         src/systemd/sd-messages.h \
4101         src/systemd/_sd-common.h
4102
4103 libsystemd_journal_internal_la_SOURCES = \
4104         src/journal/sd-journal.c \
4105         src/systemd/sd-journal.h \
4106         src/systemd/_sd-common.h \
4107         src/journal/journal-file.c \
4108         src/journal/journal-file.h \
4109         src/journal/journal-vacuum.c \
4110         src/journal/journal-vacuum.h \
4111         src/journal/journal-verify.c \
4112         src/journal/journal-verify.h \
4113         src/journal/lookup3.c \
4114         src/journal/lookup3.h \
4115         src/journal/journal-send.c \
4116         src/journal/journal-def.h \
4117         src/journal/compress.h \
4118         src/journal/catalog.c \
4119         src/journal/catalog.h \
4120         src/journal/mmap-cache.c \
4121         src/journal/mmap-cache.h
4122
4123 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
4124 libsystemd_journal_internal_la_CFLAGS = \
4125         $(AM_CFLAGS)
4126
4127 libsystemd_journal_internal_la_LIBADD =
4128
4129 libsystemd_journal_internal_la_SOURCES += \
4130         src/journal/compress.c
4131
4132 if HAVE_XZ
4133 libsystemd_journal_internal_la_CFLAGS += \
4134         $(XZ_CFLAGS)
4135
4136 libsystemd_journal_internal_la_LIBADD += \
4137         $(XZ_LIBS)
4138 endif
4139
4140 if HAVE_LZ4
4141 libsystemd_journal_internal_la_LIBADD += \
4142         -llz4
4143 endif
4144
4145 if HAVE_GCRYPT
4146 libsystemd_journal_internal_la_SOURCES += \
4147         src/journal/journal-authenticate.c \
4148         src/journal/journal-authenticate.h \
4149         src/journal/fsprg.c \
4150         src/journal/fsprg.h
4151
4152 libsystemd_journal_internal_la_LIBADD += \
4153         $(GCRYPT_LIBS)
4154
4155 # fsprg.c is a drop-in file using void pointer arithmetic
4156 libsystemd_journal_internal_la_CFLAGS += \
4157         $(GCRYPT_CFLAGS) \
4158         -Wno-pointer-arith
4159 endif
4160
4161 noinst_LTLIBRARIES += \
4162         libsystemd-journal-internal.la
4163
4164 rootlibexec_PROGRAMS += \
4165         systemd-journald
4166
4167 rootbin_PROGRAMS += \
4168         journalctl
4169
4170 bin_PROGRAMS += \
4171         systemd-cat
4172
4173 dist_systemunit_DATA += \
4174         units/systemd-journald.socket \
4175         units/systemd-journald-dev-log.socket
4176
4177 nodist_systemunit_DATA += \
4178         units/systemd-journald.service \
4179         units/systemd-journal-flush.service \
4180         units/systemd-journal-catalog-update.service
4181
4182 dist_pkgsysconf_DATA += \
4183         src/journal/journald.conf
4184
4185 dist_catalog_DATA = \
4186         catalog/systemd.fr.catalog \
4187         catalog/systemd.it.catalog \
4188         catalog/systemd.pl.catalog \
4189         catalog/systemd.ru.catalog \
4190         catalog/systemd.catalog
4191
4192 SOCKETS_TARGET_WANTS += \
4193         systemd-journald.socket \
4194         systemd-journald-dev-log.socket
4195
4196 SYSINIT_TARGET_WANTS += \
4197         systemd-journald.service \
4198         systemd-journal-flush.service \
4199         systemd-journal-catalog-update.service
4200
4201 EXTRA_DIST += \
4202         units/systemd-journald.service.in \
4203         units/systemd-journal-flush.service.in \
4204         units/systemd-journal-catalog-update.service.in \
4205         src/journal/journald-gperf.gperf
4206
4207 CLEANFILES += \
4208         src/journal/journald-gperf.c
4209
4210 # ------------------------------------------------------------------------------
4211 if HAVE_MICROHTTPD
4212 gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
4213
4214 rootlibexec_PROGRAMS += \
4215         systemd-journal-gatewayd
4216
4217 systemd_journal_gatewayd_SOURCES = \
4218         src/journal-remote/journal-gatewayd.c \
4219         src/journal-remote/microhttpd-util.h \
4220         src/journal-remote/microhttpd-util.c
4221
4222 systemd_journal_gatewayd_LDADD = \
4223         libsystemd-logs.la \
4224         libsystemd-journal-internal.la \
4225         libsystemd-internal.la \
4226         libsystemd-shared.la \
4227         $(MICROHTTPD_LIBS)
4228
4229 if HAVE_GNUTLS
4230 systemd_journal_gatewayd_LDADD += \
4231         $(GNUTLS_LIBS)
4232 endif
4233
4234 systemd_journal_gatewayd_CFLAGS = \
4235         $(AM_CFLAGS) \
4236         $(MICROHTTPD_CFLAGS)
4237
4238 systemd_journal_gatewayd_CPPFLAGS = \
4239         $(AM_CPPFLAGS) \
4240         -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
4241
4242 dist_systemunit_DATA += \
4243         units/systemd-journal-gatewayd.socket
4244
4245 nodist_systemunit_DATA += \
4246         units/systemd-journal-gatewayd.service
4247
4248 dist_gatewayddocumentroot_DATA = \
4249         src/journal-remote/browse.html
4250
4251 endif
4252
4253 EXTRA_DIST += \
4254         units/systemd-journal-gatewayd.service.in
4255
4256 # ------------------------------------------------------------------------------
4257
4258 systemd_socket_proxyd_SOURCES = \
4259         src/socket-proxy/socket-proxyd.c
4260
4261 systemd_socket_proxyd_LDADD = \
4262         libsystemd-logs.la \
4263         libsystemd-internal.la \
4264         libsystemd-journal-internal.la \
4265         libsystemd-shared.la \
4266         libsystemd-resolve.la
4267
4268 # ------------------------------------------------------------------------------
4269 if ENABLE_COREDUMP
4270 systemd_coredump_SOURCES = \
4271         src/journal/coredump.c \
4272         src/journal/coredump-vacuum.c \
4273         src/journal/coredump-vacuum.h
4274
4275 systemd_coredump_LDADD = \
4276         libsystemd-journal-internal.la \
4277         libsystemd-label.la \
4278         libsystemd-internal.la \
4279         libsystemd-shared.la
4280
4281 if HAVE_ELFUTILS
4282 systemd_coredump_SOURCES += \
4283         src/journal/stacktrace.c \
4284         src/journal/stacktrace.h
4285
4286 systemd_coredump_LDADD += \
4287         $(ELFUTILS_LIBS)
4288 endif
4289
4290 rootlibexec_PROGRAMS += \
4291         systemd-coredump
4292
4293 dist_pkgsysconf_DATA += \
4294         src/journal/coredump.conf
4295
4296 if HAVE_ACL
4297 systemd_coredump_LDADD += \
4298         libsystemd-acl.la
4299 endif
4300
4301 coredumpctl_SOURCES = \
4302         src/journal/coredumpctl.c
4303
4304 coredumpctl_LDADD = \
4305         libsystemd-journal-internal.la \
4306         libsystemd-internal.la \
4307         libsystemd-shared.la
4308
4309 bin_PROGRAMS += \
4310         coredumpctl
4311
4312 manual_tests += \
4313         test-coredump-vacuum
4314
4315 test_coredump_vacuum_SOURCES = \
4316         src/journal/test-coredump-vacuum.c  \
4317         src/journal/coredump-vacuum.c \
4318         src/journal/coredump-vacuum.h
4319
4320 test_coredump_vacuum_LDADD = \
4321         libsystemd-internal.la \
4322         libsystemd-shared.la
4323
4324 dist_bashcompletion_DATA += \
4325         shell-completion/bash/coredumpctl
4326
4327 dist_zshcompletion_DATA += \
4328         shell-completion/zsh/_coredumpctl
4329
4330 sysctl_DATA = \
4331         sysctl.d/50-coredump.conf
4332
4333 CLEANFILES += \
4334         sysctl.d/50-coredump.conf
4335 endif
4336
4337 EXTRA_DIST += \
4338         sysctl.d/50-coredump.conf.in
4339
4340 # ------------------------------------------------------------------------------
4341 if ENABLE_BINFMT
4342 systemd_binfmt_SOURCES = \
4343         src/binfmt/binfmt.c
4344
4345 systemd_binfmt_LDADD = \
4346         libsystemd-shared.la
4347
4348 rootlibexec_PROGRAMS += \
4349         systemd-binfmt
4350
4351 dist_systemunit_DATA += \
4352         units/proc-sys-fs-binfmt_misc.automount \
4353         units/proc-sys-fs-binfmt_misc.mount
4354
4355 nodist_systemunit_DATA += \
4356         units/systemd-binfmt.service
4357
4358 INSTALL_DIRS += \
4359         $(prefix)/lib/binfmt.d \
4360         $(sysconfdir)/binfmt.d
4361
4362 SYSINIT_TARGET_WANTS += \
4363         systemd-binfmt.service \
4364         proc-sys-fs-binfmt_misc.automount
4365
4366 endif
4367
4368 EXTRA_DIST += \
4369         units/systemd-binfmt.service.in
4370
4371 # ------------------------------------------------------------------------------
4372 if ENABLE_VCONSOLE
4373 systemd_vconsole_setup_SOURCES = \
4374         src/vconsole/vconsole-setup.c
4375
4376 systemd_vconsole_setup_LDADD = \
4377         libsystemd-shared.la
4378
4379 rootlibexec_PROGRAMS += \
4380         systemd-vconsole-setup
4381
4382 nodist_systemunit_DATA += \
4383         units/systemd-vconsole-setup.service
4384
4385 SYSINIT_TARGET_WANTS += \
4386         systemd-vconsole-setup.service
4387 endif
4388
4389 EXTRA_DIST += \
4390         units/systemd-vconsole-setup.service.in
4391
4392 # ------------------------------------------------------------------------------
4393 if ENABLE_BOOTCHART
4394 systemd_bootchart_SOURCES = \
4395         src/bootchart/bootchart.c \
4396         src/bootchart/bootchart.h \
4397         src/bootchart/store.c \
4398         src/bootchart/store.h \
4399         src/bootchart/svg.c \
4400         src/bootchart/svg.h
4401
4402 systemd_bootchart_LDADD = \
4403         libsystemd-journal-internal.la \
4404         libsystemd-shared.la
4405
4406 rootlibexec_PROGRAMS += \
4407         systemd-bootchart
4408
4409 dist_pkgsysconf_DATA += \
4410         src/bootchart/bootchart.conf
4411 endif
4412
4413 # ------------------------------------------------------------------------------
4414 if ENABLE_QUOTACHECK
4415 rootlibexec_PROGRAMS += \
4416         systemd-quotacheck
4417
4418 nodist_systemunit_DATA += \
4419         units/systemd-quotacheck.service
4420
4421 systemd_quotacheck_SOURCES = \
4422         src/quotacheck/quotacheck.c
4423
4424 systemd_quotacheck_LDADD = \
4425         libsystemd-shared.la
4426 endif
4427
4428 EXTRA_DIST += \
4429         units/systemd-quotacheck.service.in
4430
4431 nodist_systemunit_DATA += \
4432         units/quotaon.service
4433
4434 # ------------------------------------------------------------------------------
4435 if ENABLE_RANDOMSEED
4436 rootlibexec_PROGRAMS += \
4437         systemd-random-seed
4438
4439 nodist_systemunit_DATA += \
4440         units/systemd-random-seed.service
4441
4442 systemd_random_seed_SOURCES = \
4443         src/random-seed/random-seed.c
4444
4445 systemd_random_seed_LDADD = \
4446         libsystemd-label.la \
4447         libsystemd-shared.la
4448
4449 SYSINIT_TARGET_WANTS += \
4450         systemd-random-seed.service
4451
4452 endif
4453
4454 EXTRA_DIST += \
4455         units/systemd-random-seed.service.in
4456
4457 # ------------------------------------------------------------------------------
4458 if ENABLE_BACKLIGHT
4459 rootlibexec_PROGRAMS += \
4460         systemd-backlight
4461
4462 nodist_systemunit_DATA += \
4463         units/systemd-backlight@.service
4464
4465 systemd_backlight_SOURCES = \
4466         src/backlight/backlight.c
4467
4468 systemd_backlight_LDADD = \
4469         libsystemd-label.la \
4470         libudev-internal.la \
4471         libsystemd-shared.la
4472 endif
4473
4474 EXTRA_DIST += \
4475         units/systemd-backlight@.service.in
4476
4477 # ------------------------------------------------------------------------------
4478 if ENABLE_RFKILL
4479 rootlibexec_PROGRAMS += \
4480         systemd-rfkill
4481
4482 nodist_systemunit_DATA += \
4483         units/systemd-rfkill@.service
4484
4485 systemd_rfkill_SOURCES = \
4486         src/rfkill/rfkill.c
4487
4488 systemd_rfkill_LDADD = \
4489         libsystemd-label.la \
4490         libudev-internal.la \
4491         libsystemd-shared.la
4492 endif
4493
4494 EXTRA_DIST += \
4495         units/systemd-rfkill@.service.in
4496
4497 # ------------------------------------------------------------------------------
4498 if HAVE_LIBCRYPTSETUP
4499 rootlibexec_PROGRAMS += \
4500         systemd-cryptsetup
4501
4502 systemgenerator_PROGRAMS += \
4503         systemd-cryptsetup-generator
4504
4505 dist_systemunit_DATA += \
4506         units/cryptsetup.target \
4507         units/cryptsetup-pre.target
4508
4509 systemd_cryptsetup_SOURCES = \
4510         src/cryptsetup/cryptsetup.c
4511
4512 systemd_cryptsetup_CFLAGS = \
4513         $(AM_CFLAGS) \
4514         $(LIBCRYPTSETUP_CFLAGS)
4515
4516 systemd_cryptsetup_LDADD = \
4517         libsystemd-label.la \
4518         libudev-internal.la \
4519         libsystemd-shared.la \
4520         $(LIBCRYPTSETUP_LIBS)
4521
4522 systemd_cryptsetup_generator_SOURCES = \
4523         src/cryptsetup/cryptsetup-generator.c
4524
4525 systemd_cryptsetup_generator_LDADD = \
4526         libsystemd-label.la \
4527         libsystemd-shared.la
4528
4529 SYSINIT_TARGET_WANTS += \
4530         cryptsetup.target
4531
4532 endif
4533
4534 # ------------------------------------------------------------------------------
4535 if ENABLE_HOSTNAMED
4536 systemd_hostnamed_SOURCES = \
4537         src/hostname/hostnamed.c
4538
4539 systemd_hostnamed_LDADD = \
4540         libsystemd-label.la \
4541         libsystemd-internal.la \
4542         libsystemd-shared.la
4543
4544 rootlibexec_PROGRAMS += \
4545         systemd-hostnamed
4546
4547 nodist_systemunit_DATA += \
4548         units/systemd-hostnamed.service
4549
4550 dist_systemunit_DATA_busnames += \
4551         units/org.freedesktop.hostname1.busname
4552
4553 dist_dbuspolicy_DATA += \
4554         src/hostname/org.freedesktop.hostname1.conf
4555
4556 dist_dbussystemservice_DATA += \
4557         src/hostname/org.freedesktop.hostname1.service
4558
4559 polkitpolicy_files += \
4560         src/hostname/org.freedesktop.hostname1.policy
4561
4562 SYSTEM_UNIT_ALIASES += \
4563         systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
4564
4565 BUSNAMES_TARGET_WANTS += \
4566         org.freedesktop.hostname1.busname
4567
4568 hostnamectl_SOURCES = \
4569         src/hostname/hostnamectl.c
4570
4571 hostnamectl_LDADD = \
4572         libsystemd-internal.la \
4573         libsystemd-shared.la
4574
4575 bin_PROGRAMS += \
4576         hostnamectl
4577
4578 dist_bashcompletion_DATA += \
4579         shell-completion/bash/hostnamectl
4580
4581 dist_zshcompletion_DATA += \
4582         shell-completion/zsh/_hostnamectl
4583
4584 endif
4585
4586 polkitpolicy_in_files += \
4587         src/hostname/org.freedesktop.hostname1.policy.in
4588
4589 EXTRA_DIST += \
4590         units/systemd-hostnamed.service.in
4591
4592 # ------------------------------------------------------------------------------
4593 dist_systemunit_DATA_busnames += \
4594         units/org.freedesktop.systemd1.busname
4595
4596 BUSNAMES_TARGET_WANTS += \
4597         org.freedesktop.systemd1.busname
4598
4599 # ------------------------------------------------------------------------------
4600 if ENABLE_LOCALED
4601 systemd_localed_SOURCES = \
4602         src/locale/localed.c
4603
4604 systemd_localed_LDADD = \
4605         libsystemd-label.la \
4606         libsystemd-internal.la \
4607         libsystemd-shared.la
4608
4609 nodist_systemunit_DATA += \
4610         units/systemd-localed.service
4611
4612 dist_systemunit_DATA_busnames += \
4613         units/org.freedesktop.locale1.busname
4614
4615 rootlibexec_PROGRAMS += \
4616         systemd-localed
4617
4618 dist_dbuspolicy_DATA += \
4619         src/locale/org.freedesktop.locale1.conf
4620
4621 dist_dbussystemservice_DATA += \
4622         src/locale/org.freedesktop.locale1.service
4623
4624 polkitpolicy_files += \
4625         src/locale/org.freedesktop.locale1.policy
4626
4627 SYSTEM_UNIT_ALIASES += \
4628         systemd-localed.service dbus-org.freedesktop.locale1.service
4629
4630 BUSNAMES_TARGET_WANTS += \
4631         org.freedesktop.locale1.busname
4632
4633 dist_pkgdata_DATA += \
4634         src/locale/kbd-model-map
4635
4636 dist_noinst_SCRIPT = \
4637         src/locale/generate-kbd-model-map
4638
4639 localectl_SOURCES = \
4640         src/locale/localectl.c
4641
4642 localectl_LDADD = \
4643         libsystemd-internal.la \
4644         libsystemd-shared.la
4645
4646 bin_PROGRAMS += \
4647         localectl
4648
4649 dist_bashcompletion_DATA += \
4650         shell-completion/bash/localectl
4651
4652 dist_zshcompletion_DATA += \
4653         shell-completion/zsh/_localectl
4654
4655 endif
4656
4657 .PHONY: update-kbd-model-map
4658
4659 polkitpolicy_in_files += \
4660         src/locale/org.freedesktop.locale1.policy.in
4661
4662 EXTRA_DIST += \
4663         units/systemd-localed.service.in
4664
4665 # ------------------------------------------------------------------------------
4666 if ENABLE_TIMEDATED
4667 systemd_timedated_SOURCES = \
4668         src/timedate/timedated.c
4669
4670 systemd_timedated_LDADD = \
4671         libsystemd-label.la \
4672         libsystemd-internal.la \
4673         libsystemd-shared.la
4674
4675 rootlibexec_PROGRAMS += \
4676         systemd-timedated
4677
4678 dist_dbussystemservice_DATA += \
4679         src/timedate/org.freedesktop.timedate1.service
4680
4681 dist_dbuspolicy_DATA += \
4682         src/timedate/org.freedesktop.timedate1.conf
4683
4684 nodist_systemunit_DATA += \
4685         units/systemd-timedated.service
4686
4687 dist_systemunit_DATA_busnames += \
4688         units/org.freedesktop.timedate1.busname
4689
4690 polkitpolicy_files += \
4691         src/timedate/org.freedesktop.timedate1.policy
4692
4693 SYSTEM_UNIT_ALIASES += \
4694         systemd-timedated.service dbus-org.freedesktop.timedate1.service
4695
4696 BUSNAMES_TARGET_WANTS += \
4697         org.freedesktop.timedate1.busname
4698
4699 timedatectl_SOURCES = \
4700         src/timedate/timedatectl.c
4701
4702 timedatectl_LDADD = \
4703         libsystemd-internal.la \
4704         libsystemd-shared.la
4705
4706 bin_PROGRAMS += \
4707         timedatectl
4708
4709 dist_bashcompletion_DATA += \
4710         shell-completion/bash/timedatectl
4711
4712 dist_zshcompletion_DATA += \
4713         shell-completion/zsh/_timedatectl
4714 endif
4715
4716 polkitpolicy_in_files += \
4717         src/timedate/org.freedesktop.timedate1.policy.in
4718
4719 EXTRA_DIST += \
4720         units/systemd-timedated.service.in
4721
4722 # ------------------------------------------------------------------------------
4723 if ENABLE_TIMESYNCD
4724 systemd_timesyncd_SOURCES = \
4725         src/timesync/timesyncd.c \
4726         src/timesync/timesyncd-manager.c \
4727         src/timesync/timesyncd-manager.h \
4728         src/timesync/timesyncd-conf.c \
4729         src/timesync/timesyncd-conf.h \
4730         src/timesync/timesyncd-server.c \
4731         src/timesync/timesyncd-server.h
4732
4733 nodist_systemd_timesyncd_SOURCES = \
4734         src/timesync/timesyncd-gperf.c
4735
4736 EXTRA_DIST += \
4737         src/timesync/timesyncd-gperf.gperf
4738
4739 CLEANFILES += \
4740         src/timesync/timesyncd-gperf.c
4741
4742 systemd_timesyncd_LDADD = \
4743         libsystemd-resolve.la \
4744         libsystemd-network.la \
4745         libsystemd-label.la \
4746         libsystemd-capability.la \
4747         libsystemd-internal.la \
4748         libsystemd-shared.la \
4749         -lm
4750
4751 rootlibexec_PROGRAMS += \
4752         systemd-timesyncd
4753
4754 nodist_systemunit_DATA += \
4755         units/systemd-timesyncd.service
4756
4757 GENERAL_ALIASES += \
4758         $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
4759
4760 EXTRA_DIST += \
4761         units/systemd-timesyncd.service.in
4762
4763 nodist_pkgsysconf_DATA += \
4764         src/timesync/timesyncd.conf
4765
4766 EXTRA_DIST += \
4767         src/timesync/timesyncd.conf.in
4768
4769 CLEANFILES += \
4770         src/timesync/timesyncd.conf
4771 endif
4772
4773 # ------------------------------------------------------------------------------
4774 if HAVE_MYHOSTNAME
4775 libnss_myhostname_la_SOURCES = \
4776         src/nss-myhostname/nss-myhostname.sym \
4777         src/nss-myhostname/nss-myhostname.c
4778
4779 libnss_myhostname_la_LDFLAGS = \
4780         $(AM_LDFLAGS) \
4781         -module \
4782         -export-dynamic \
4783         -avoid-version \
4784         -shared \
4785         -shrext .so.2 \
4786         -Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
4787
4788 libnss_myhostname_la_LIBADD = \
4789         libsystemd-shared.la \
4790         libsystemd-internal.la
4791
4792 lib_LTLIBRARIES += \
4793         libnss_myhostname.la
4794 endif
4795
4796 # ------------------------------------------------------------------------------
4797 if ENABLE_MACHINED
4798 systemd_machined_SOURCES = \
4799         src/machine/machined.c \
4800         src/machine/machined.h
4801
4802 systemd_machined_LDADD = \
4803         libsystemd-machine-core.la
4804
4805 rootlibexec_PROGRAMS += \
4806         systemd-machined
4807
4808 libsystemd_machine_core_la_SOURCES = \
4809         src/machine/machined-dbus.c \
4810         src/machine/machine.c \
4811         src/machine/machine.h \
4812         src/machine/machine-dbus.c
4813
4814 libsystemd_machine_core_la_LIBADD = \
4815         libsystemd-label.la \
4816         libsystemd-internal.la \
4817         libudev-internal.la \
4818         libsystemd-shared.la
4819
4820 noinst_LTLIBRARIES += \
4821         libsystemd-machine-core.la
4822
4823 machinectl_SOURCES = \
4824         src/machine/machinectl.c
4825
4826 machinectl_LDADD = \
4827         libsystemd-internal.la \
4828         libsystemd-shared.la
4829
4830 rootbin_PROGRAMS += \
4831         machinectl
4832
4833 dist_bashcompletion_DATA += \
4834         shell-completion/bash/machinectl
4835
4836 test_machine_tables_SOURCES = \
4837         src/machine/test-machine-tables.c
4838
4839 test_machine_tables_LDADD = \
4840         libsystemd-machine-core.la
4841
4842 tests += \
4843         test-machine-tables
4844
4845 nodist_systemunit_DATA += \
4846         units/systemd-machined.service
4847
4848 dist_systemunit_DATA += \
4849         units/machine.slice
4850
4851 dist_systemunit_DATA_busnames += \
4852         units/org.freedesktop.machine1.busname
4853
4854 dist_dbussystemservice_DATA += \
4855         src/machine/org.freedesktop.machine1.service
4856
4857 dist_dbuspolicy_DATA += \
4858         src/machine/org.freedesktop.machine1.conf
4859
4860 dist_zshcompletion_DATA += \
4861         shell-completion/zsh/_machinectl \
4862         shell-completion/zsh/_sd_machines
4863
4864 SYSTEM_UNIT_ALIASES += \
4865         systemd-machined.service dbus-org.freedesktop.machine1.service
4866
4867 BUSNAMES_TARGET_WANTS += \
4868         org.freedesktop.machine1.busname
4869
4870 EXTRA_DIST += \
4871         units/systemd-machined.service.in
4872
4873 libnss_mymachines_la_SOURCES = \
4874         src/nss-mymachines/nss-mymachines.sym \
4875         src/nss-mymachines/nss-mymachines.c
4876
4877 libnss_mymachines_la_LDFLAGS = \
4878         $(AM_LDFLAGS) \
4879         -module \
4880         -export-dynamic \
4881         -avoid-version \
4882         -shared \
4883         -shrext .so.2 \
4884         -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
4885
4886 libnss_mymachines_la_LIBADD = \
4887         libsystemd-shared.la \
4888         libsystemd-internal.la
4889
4890 lib_LTLIBRARIES += \
4891         libnss_mymachines.la
4892 endif
4893
4894 # ------------------------------------------------------------------------------
4895 if ENABLE_RESOLVED
4896 systemd_resolved_SOURCES = \
4897         src/resolve/resolved.c \
4898         src/resolve/resolved-manager.c \
4899         src/resolve/resolved-manager.h \
4900         src/resolve/resolved-conf.c \
4901         src/resolve/resolved-conf.h \
4902         src/resolve/resolved-bus.c \
4903         src/resolve/resolved-bus.h \
4904         src/resolve/resolved-link.h \
4905         src/resolve/resolved-link.c \
4906         src/resolve/resolved-def.h \
4907         src/resolve/resolved-dns-domain.h \
4908         src/resolve/resolved-dns-domain.c \
4909         src/resolve/resolved-dns-rr.h \
4910         src/resolve/resolved-dns-rr.c \
4911         src/resolve/resolved-dns-question.h \
4912         src/resolve/resolved-dns-question.c \
4913         src/resolve/resolved-dns-answer.h \
4914         src/resolve/resolved-dns-answer.c \
4915         src/resolve/resolved-dns-packet.h \
4916         src/resolve/resolved-dns-packet.c \
4917         src/resolve/resolved-dns-query.h \
4918         src/resolve/resolved-dns-query.c \
4919         src/resolve/resolved-dns-transaction.h \
4920         src/resolve/resolved-dns-transaction.c \
4921         src/resolve/resolved-dns-scope.h \
4922         src/resolve/resolved-dns-scope.c \
4923         src/resolve/resolved-dns-server.h \
4924         src/resolve/resolved-dns-server.c \
4925         src/resolve/resolved-dns-cache.h \
4926         src/resolve/resolved-dns-cache.c \
4927         src/resolve/resolved-dns-zone.h \
4928         src/resolve/resolved-dns-zone.c \
4929         src/resolve/resolved-dns-stream.h \
4930         src/resolve/resolved-dns-stream.c \
4931         src/resolve/dns-type.c \
4932         src/resolve/dns-type.h \
4933         src/resolve/dns_type-from-name.h \
4934         src/resolve/dns_type-to-name.h
4935
4936 nodist_systemd_resolved_SOURCES = \
4937         src/resolve/resolved-gperf.c
4938
4939 EXTRA_DIST += \
4940         src/resolve/resolved-gperf.gperf \
4941         src/resolve/dns_type-from-name.gperf
4942
4943 CLEANFILES += \
4944         src/resolve/resolved-gperf.c
4945
4946 systemd_resolved_LDADD = \
4947         libsystemd-capability.la \
4948         libsystemd-network.la \
4949         libsystemd-label.la \
4950         libsystemd-internal.la \
4951         libsystemd-shared.la \
4952         -lm \
4953         $(LIBIDN_LIBS)
4954
4955 rootlibexec_PROGRAMS += \
4956         systemd-resolved
4957
4958 nodist_systemunit_DATA += \
4959         units/systemd-resolved.service
4960
4961 dist_systemunit_DATA_busnames += \
4962         units/org.freedesktop.resolve1.busname
4963
4964 dist_dbuspolicy_DATA += \
4965         src/resolve/org.freedesktop.resolve1.conf
4966
4967 dist_dbussystemservice_DATA += \
4968         src/resolve/org.freedesktop.resolve1.service
4969
4970 EXTRA_DIST += \
4971         units/systemd-resolved.service.in
4972
4973 SYSTEM_UNIT_ALIASES += \
4974         systemd-resolved.service dbus-org.freedesktop.resolve1.service
4975
4976 BUSNAMES_TARGET_WANTS += \
4977         org.freedesktop.resolve1.busname
4978
4979 GENERAL_ALIASES += \
4980         $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
4981
4982 nodist_pkgsysconf_DATA += \
4983         src/resolve/resolved.conf
4984
4985 EXTRA_DIST += \
4986         src/resolve/resolved.conf.in
4987
4988 CLEANFILES += \
4989         src/resolve/resolved.conf
4990
4991 tests += \
4992         test-dns-domain
4993
4994 test_dns_domain_SOURCES = \
4995         src/resolve/resolved-dns-domain.h \
4996         src/resolve/resolved-dns-domain.c \
4997         src/resolve/test-dns-domain.c
4998
4999 test_dns_domain_LDADD = \
5000         libsystemd-capability.la \
5001         libsystemd-network.la \
5002         libsystemd-label.la \
5003         libsystemd-internal.la \
5004         libsystemd-shared.la \
5005         $(LIBIDN_LIBS)
5006
5007 libnss_resolve_la_SOURCES = \
5008         src/nss-resolve/nss-resolve.sym \
5009         src/nss-resolve/nss-resolve.c
5010
5011 libnss_resolve_la_LDFLAGS = \
5012         $(AM_LDFLAGS) \
5013         -module \
5014         -export-dynamic \
5015         -avoid-version \
5016         -shared \
5017         -shrext .so.2 \
5018         -Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
5019
5020 libnss_resolve_la_LIBADD = \
5021         libsystemd-shared.la \
5022         libsystemd-internal.la
5023
5024 lib_LTLIBRARIES += \
5025         libnss_resolve.la
5026
5027 systemd_resolve_host_SOURCES = \
5028         src/resolve-host/resolve-host.c \
5029         src/resolve/resolved-dns-packet.c \
5030         src/resolve/resolved-dns-packet.h \
5031         src/resolve/resolved-dns-rr.c \
5032         src/resolve/resolved-dns-rr.h \
5033         src/resolve/resolved-dns-answer.c \
5034         src/resolve/resolved-dns-answer.h \
5035         src/resolve/resolved-dns-question.c \
5036         src/resolve/resolved-dns-question.h \
5037         src/resolve/resolved-dns-domain.c \
5038         src/resolve/resolved-dns-domain.h \
5039         src/resolve/dns-type.c \
5040         src/resolve/dns-type.h \
5041         src/resolve/dns_type-from-name.h \
5042         src/resolve/dns_type-to-name.h
5043
5044 systemd_resolve_host_LDADD = \
5045         libsystemd-internal.la \
5046         libsystemd-shared.la \
5047         -lm \
5048         $(LIBIDN_LIBS)
5049
5050 rootlibexec_PROGRAMS += \
5051         systemd-resolve-host
5052
5053 endif
5054
5055 # ------------------------------------------------------------------------------
5056 if ENABLE_NETWORKD
5057 rootlibexec_PROGRAMS += \
5058         systemd-networkd
5059
5060 systemd_networkd_SOURCES = \
5061         src/network/networkd.c
5062
5063 systemd_networkd_LDADD = \
5064         libsystemd-networkd-core.la \
5065         libsystemd-capability.la
5066
5067 noinst_LTLIBRARIES += \
5068         libsystemd-networkd-core.la
5069
5070 libsystemd_networkd_core_la_CFLAGS = \
5071         $(AM_CFLAGS)
5072
5073 libsystemd_networkd_core_la_SOURCES = \
5074         src/libsystemd-network/network-internal.h \
5075         src/network/networkd.h \
5076         src/network/networkd-link.h \
5077         src/network/networkd-netdev.h \
5078         src/network/networkd-netdev-tunnel.h \
5079         src/network/networkd-netdev-veth.h \
5080         src/network/networkd-netdev-vxlan.h \
5081         src/network/networkd-netdev-vlan.h \
5082         src/network/networkd-netdev-macvlan.h \
5083         src/network/networkd-netdev-dummy.h \
5084         src/network/networkd-netdev-tuntap.h \
5085         src/network/networkd-netdev-bond.h \
5086         src/network/networkd-netdev-bridge.h \
5087         src/network/networkd-netdev.c \
5088         src/network/networkd-netdev-tunnel.c \
5089         src/network/networkd-netdev-veth.c \
5090         src/network/networkd-netdev-vxlan.c \
5091         src/network/networkd-netdev-vlan.c \
5092         src/network/networkd-netdev-macvlan.c \
5093         src/network/networkd-netdev-dummy.c \
5094         src/network/networkd-netdev-tuntap.c \
5095         src/network/networkd-netdev-bond.c \
5096         src/network/networkd-netdev-bridge.c \
5097         src/network/networkd-link.c \
5098         src/network/networkd-ipv4ll.c \
5099         src/network/networkd-dhcp4.c \
5100         src/network/networkd-network.c \
5101         src/network/networkd-address.c \
5102         src/network/networkd-route.c \
5103         src/network/networkd-manager.c \
5104         src/network/networkd-address-pool.c
5105
5106 nodist_libsystemd_networkd_core_la_SOURCES = \
5107         src/network/networkd-network-gperf.c \
5108         src/network/networkd-netdev-gperf.c
5109
5110 libsystemd_networkd_core_la_LIBADD = \
5111         libudev-internal.la \
5112         libsystemd-internal.la \
5113         libsystemd-network.la \
5114         libsystemd-label.la \
5115         libsystemd-shared.la
5116
5117 rootlibexec_PROGRAMS += \
5118         systemd-networkd-wait-online
5119
5120 systemd_networkd_wait_online_CFLAGS = \
5121         $(AM_CFLAGS)
5122
5123 systemd_networkd_wait_online_SOURCES = \
5124         src/libsystemd-network/network-internal.h \
5125         src/network/networkd-wait-online.h \
5126         src/network/networkd-wait-online-link.h \
5127         src/network/networkd-wait-online.c \
5128         src/network/networkd-wait-online-manager.c \
5129         src/network/networkd-wait-online-link.c
5130
5131 systemd_networkd_wait_online_LDADD = \
5132         libsystemd-network.la \
5133         libudev-internal.la \
5134         libsystemd-internal.la \
5135         libsystemd-shared.la
5136
5137 rootbin_PROGRAMS += \
5138         networkctl
5139
5140 networkctl_SOURCES = \
5141         src/network/networkctl.c
5142
5143 networkctl_LDADD = \
5144         libsystemd-internal.la \
5145         libudev-internal.la \
5146         libsystemd-shared.la \
5147         libsystemd-network.la
5148
5149 test_network_SOURCES = \
5150         src/network/test-network.c
5151
5152 test_network_CFLAGS = \
5153         $(AM_CFLAGS)
5154
5155 test_network_LDADD = \
5156         libsystemd-networkd-core.la
5157
5158 test_network_tables_SOURCES = \
5159         src/network/test-network-tables.c \
5160         src/shared/test-tables.h
5161
5162 test_network_tables_LDADD = \
5163         libsystemd-networkd-core.la \
5164         libudev-core.la
5165
5166 tests += \
5167         test-network \
5168         test-network-tables
5169
5170 nodist_systemunit_DATA += \
5171         units/systemd-networkd.service \
5172         units/systemd-networkd-wait-online.service
5173
5174 GENERAL_ALIASES += \
5175         $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
5176         $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
5177
5178 EXTRA_DIST += \
5179         src/network/networkd-network-gperf.gperf \
5180         src/network/networkd-netdev-gperf.gperf \
5181         units/systemd-networkd.service.in \
5182         units/systemd-networkd-wait-online.service.in
5183
5184 CLEANFILES += \
5185         src/network/networkd-network-gperf.c \
5186         src/network/networkd-netdev-gperf.c
5187 endif
5188
5189 # ------------------------------------------------------------------------------
5190 if ENABLE_LOGIND
5191 systemd_logind_SOURCES = \
5192         src/login/logind.c \
5193         src/login/logind.h
5194
5195 nodist_systemd_logind_SOURCES = \
5196         src/login/logind-gperf.c
5197
5198 systemd_logind_LDADD = \
5199         libsystemd-logind-core.la
5200
5201 libsystemd_logind_core_la_SOURCES = \
5202         src/login/logind-core.c \
5203         src/login/logind-device.c \
5204         src/login/logind-device.h \
5205         src/login/logind-button.c \
5206         src/login/logind-button.h \
5207         src/login/logind-action.c \
5208         src/login/logind-action.h \
5209         src/login/logind-seat.c \
5210         src/login/logind-seat.h \
5211         src/login/logind-session.c \
5212         src/login/logind-session.h \
5213         src/login/logind-session-device.c \
5214         src/login/logind-session-device.h \
5215         src/login/logind-user.c \
5216         src/login/logind-user.h \
5217         src/login/logind-inhibit.c \
5218         src/login/logind-inhibit.h \
5219         src/login/logind-dbus.c \
5220         src/login/logind-session-dbus.c \
5221         src/login/logind-seat-dbus.c \
5222         src/login/logind-user-dbus.c \
5223         src/login/logind-acl.h
5224
5225 libsystemd_logind_core_la_LIBADD = \
5226         libsystemd-label.la \
5227         libsystemd-capability.la \
5228         libsystemd-internal.la \
5229         libudev-internal.la \
5230         libsystemd-shared.la
5231
5232 if HAVE_ACL
5233 libsystemd_logind_core_la_SOURCES += \
5234         src/login/logind-acl.c
5235
5236 libsystemd_logind_core_la_LIBADD += \
5237         libsystemd-acl.la
5238 endif
5239
5240 noinst_LTLIBRARIES += \
5241         libsystemd-logind-core.la
5242
5243 systemd_user_sessions_SOURCES = \
5244         src/login/user-sessions.c
5245
5246 systemd_user_sessions_LDADD = \
5247         libsystemd-shared.la
5248
5249 rootlibexec_PROGRAMS += \
5250         systemd-logind \
5251         systemd-user-sessions
5252
5253 loginctl_SOURCES = \
5254         src/login/loginctl.c \
5255         src/login/sysfs-show.c
5256
5257 loginctl_LDADD = \
5258         libsystemd-internal.la \
5259         libudev-internal.la \
5260         libsystemd-shared.la
5261
5262 rootbin_PROGRAMS += \
5263         loginctl
5264
5265 dist_bashcompletion_DATA += \
5266         shell-completion/bash/loginctl
5267
5268 dist_zshcompletion_DATA += \
5269         shell-completion/zsh/_loginctl \
5270         shell-completion/zsh/_systemd-inhibit
5271
5272 systemd_inhibit_SOURCES = \
5273         src/login/inhibit.c
5274
5275 systemd_inhibit_LDADD = \
5276         libsystemd-internal.la \
5277         libsystemd-shared.la
5278
5279 rootbin_PROGRAMS += \
5280         systemd-inhibit
5281
5282 test_login_SOURCES = \
5283         src/libsystemd/sd-login/test-login.c
5284
5285 test_login_LDADD = \
5286         libsystemd-internal.la \
5287         libsystemd-shared.la
5288
5289 test_login_shared_SOURCES = \
5290         src/login/test-login-shared.c
5291
5292 test_login_shared_LDADD = \
5293         libsystemd-internal.la \
5294         libsystemd-shared.la
5295
5296 test_inhibit_SOURCES = \
5297         src/login/test-inhibit.c
5298
5299 test_inhibit_LDADD = \
5300         libsystemd-internal.la \
5301         libsystemd-shared.la
5302
5303 test_login_tables_SOURCES = \
5304         src/login/test-login-tables.c
5305
5306 test_login_tables_LDADD = \
5307         libsystemd-logind-core.la
5308
5309 manual_tests += \
5310         test-login \
5311         test-inhibit
5312
5313 tests += \
5314         test-login-tables \
5315         test-login-shared
5316
5317 if HAVE_PAM
5318 pam_systemd_la_SOURCES = \
5319         src/login/pam_systemd.sym \
5320         src/login/pam_systemd.c
5321
5322 pam_systemd_la_CFLAGS = \
5323         $(AM_CFLAGS) \
5324         $(PAM_CFLAGS) \
5325         -fvisibility=hidden
5326
5327 pam_systemd_la_LDFLAGS = \
5328         $(AM_LDFLAGS) \
5329         -module \
5330         -export-dynamic \
5331         -avoid-version \
5332         -shared \
5333         -Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
5334
5335 pam_systemd_la_LIBADD = \
5336         libsystemd-capability.la \
5337         libsystemd-internal.la \
5338         libsystemd-shared.la \
5339         $(PAM_LIBS)
5340
5341 pamlib_LTLIBRARIES = \
5342         pam_systemd.la
5343
5344 dist_pamconf_DATA = \
5345         src/login/systemd-user
5346 endif
5347
5348 nodist_systemunit_DATA += \
5349         units/systemd-logind.service \
5350         units/systemd-user-sessions.service
5351
5352 dist_systemunit_DATA += \
5353         units/user.slice
5354
5355 dist_systemunit_DATA_busnames += \
5356         units/org.freedesktop.login1.busname
5357
5358 dist_dbussystemservice_DATA += \
5359         src/login/org.freedesktop.login1.service
5360
5361 dist_dbuspolicy_DATA += \
5362         src/login/org.freedesktop.login1.conf
5363
5364 dist_pkgsysconf_DATA += \
5365         src/login/logind.conf
5366
5367 polkitpolicy_files += \
5368         src/login/org.freedesktop.login1.policy
5369
5370 INSTALL_DIRS += \
5371         $(systemdstatedir)
5372
5373 MULTI_USER_TARGET_WANTS += \
5374         systemd-logind.service \
5375         systemd-user-sessions.service
5376
5377 SYSTEM_UNIT_ALIASES += \
5378         systemd-logind.service dbus-org.freedesktop.login1.service
5379
5380 BUSNAMES_TARGET_WANTS += \
5381         org.freedesktop.login1.busname
5382
5383 if ENABLE_MULTI_SEAT_X
5384
5385 systemd_multi_seat_x_SOURCES = \
5386         src/login/multi-seat-x.c
5387
5388 systemd_multi_seat_x_LDADD = \
5389         libsystemd-label.la \
5390         libsystemd-shared.la
5391
5392 rootlibexec_PROGRAMS += \
5393         systemd-multi-seat-x
5394
5395 endif
5396
5397 dist_udevrules_DATA += \
5398         src/login/70-uaccess.rules \
5399         src/login/70-power-switch.rules
5400
5401 nodist_udevrules_DATA += \
5402         src/login/71-seat.rules \
5403         src/login/73-seat-late.rules
5404
5405 CLEANFILES += \
5406         src/login/logind-gperf.c \
5407         src/login/71-seat.rules \
5408         src/login/73-seat-late.rules
5409 endif
5410
5411 polkitpolicy_in_files += \
5412         src/login/org.freedesktop.login1.policy.in
5413
5414 EXTRA_DIST += \
5415         src/login/logind-gperf.gperf \
5416         src/login/71-seat.rules.in \
5417         src/login/73-seat-late.rules.in \
5418         units/systemd-logind.service.in \
5419         units/systemd-user-sessions.service.in
5420
5421 # ------------------------------------------------------------------------------
5422 if HAVE_PYTHON_DEVEL
5423 pkgpyexec_LTLIBRARIES = \
5424         _journal.la \
5425         id128.la \
5426         _daemon.la \
5427         _reader.la \
5428         login.la
5429
5430 _journal_la_SOURCES = \
5431         src/python-systemd/_journal.c
5432
5433 _journal_la_CFLAGS = \
5434         $(AM_CFLAGS) \
5435         -fvisibility=default \
5436         $(PYTHON_DEVEL_CFLAGS)
5437
5438 _journal_la_LDFLAGS = \
5439         $(AM_LDFLAGS) \
5440         -shared \
5441         -module \
5442         -avoid-version
5443
5444 _journal_la_LIBADD = \
5445         $(PYTHON_DEVEL_LIBS) \
5446         libsystemd.la
5447
5448 id128_la_SOURCES = \
5449         src/python-systemd/id128.c \
5450         src/python-systemd/pyutil.c \
5451         src/python-systemd/pyutil.h
5452
5453 nodist_id128_la_SOURCES = \
5454         src/python-systemd/id128-constants.h
5455
5456 id128_la_CFLAGS = \
5457         $(AM_CFLAGS) \
5458         -fvisibility=default \
5459         $(PYTHON_DEVEL_CFLAGS) \
5460         -I$(top_builddir)/src/python-systemd
5461
5462 id128_la_LDFLAGS = \
5463         $(AM_LDFLAGS) \
5464         -shared \
5465         -module \
5466         -avoid-version
5467
5468 id128_la_LIBADD = \
5469         $(PYTHON_DEVEL_LIBS) \
5470         libsystemd-shared.la \
5471         libsystemd.la
5472
5473 _daemon_la_SOURCES = \
5474         src/python-systemd/_daemon.c \
5475         src/python-systemd/pyutil.c \
5476         src/python-systemd/pyutil.h
5477
5478 _daemon_la_CFLAGS = \
5479         $(AM_CFLAGS) \
5480         -fvisibility=default \
5481         $(PYTHON_DEVEL_CFLAGS) \
5482         -I$(top_builddir)/src/python-systemd
5483
5484 _daemon_la_LDFLAGS = \
5485         $(AM_LDFLAGS) \
5486         -shared \
5487         -module \
5488         -avoid-version
5489
5490 _daemon_la_LIBADD = \
5491         $(PYTHON_DEVEL_LIBS) \
5492         libsystemd-shared.la \
5493         libsystemd.la
5494
5495 _reader_la_SOURCES = \
5496         src/python-systemd/_reader.c \
5497         src/python-systemd/pyutil.c \
5498         src/python-systemd/pyutil.h
5499
5500 _reader_la_CFLAGS = \
5501         $(AM_CFLAGS) \
5502         -fvisibility=default \
5503         $(PYTHON_DEVEL_CFLAGS)
5504
5505 _reader_la_LDFLAGS = \
5506         $(AM_LDFLAGS) \
5507         -shared \
5508         -module \
5509         -avoid-version
5510
5511 _reader_la_LIBADD = \
5512         $(PYTHON_DEVEL_LIBS) \
5513         libsystemd-shared.la \
5514         libsystemd.la
5515
5516 login_la_SOURCES = \
5517         src/python-systemd/login.c \
5518         src/python-systemd/pyutil.c \
5519         src/python-systemd/pyutil.h
5520
5521 login_la_CFLAGS = \
5522         $(AM_CFLAGS) \
5523         -fvisibility=default \
5524         $(PYTHON_DEVEL_CFLAGS)
5525
5526 login_la_LDFLAGS = \
5527         $(AM_LDFLAGS) \
5528         -shared \
5529         -module \
5530         -avoid-version
5531
5532 login_la_LIBADD = \
5533         $(PYTHON_DEVEL_LIBS) \
5534         libsystemd-shared.la \
5535         libsystemd.la
5536
5537 dist_pkgpyexec_PYTHON = \
5538         src/python-systemd/journal.py \
5539         src/python-systemd/daemon.py \
5540         src/python-systemd/__init__.py
5541
5542 src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
5543         $(AM_V_at)$(MKDIR_P) $(dir $@)
5544         $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
5545
5546 BUILT_SOURCES += \
5547         src/python-systemd/id128-constants.h
5548
5549 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
5550 sphinx-%:
5551         $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
5552         $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
5553         $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
5554
5555 python-shell:
5556         $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
5557         $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
5558
5559 destdir-sphinx: all
5560         dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
5561                 $(MAKE) DESTDIR="$$dir" install && \
5562                 $(MAKE) DESTDIR="$$dir" sphinx-html && \
5563                 rm -rf "$$dir"
5564
5565 endif
5566
5567 CLEAN_LOCAL_HOOKS += clean-sphinx
5568
5569 .PHONY: python-shell destdir-sphinx clean-sphinx clean-python
5570
5571 clean-sphinx:
5572         -rm -rf docs/html/python-systemd/
5573
5574 # Remove Python stuff, e.g. to force rebuilding for a different Python version.
5575 clean-python:
5576         -rm -rf src/python-systemd/.libs src/python-systemd/*.l[ao]
5577         -rm -f _daemon.la id128.la _journal.la login.la _reader.la
5578
5579 # ------------------------------------------------------------------------------
5580 if ENABLE_COMPAT_LIBS
5581 EXTRA_DIST += \
5582         src/compat-libs/linkwarning.h
5583
5584 libsystemd-%.c: src/compat-libs/libsystemd-%.sym
5585         $(AM_V_at)$(MKDIR_P) $(dir $@)
5586         $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
5587
5588 BUILT_SOURCES += \
5589         libsystemd-journal.c \
5590         libsystemd-login.c \
5591         libsystemd-id128.c \
5592         libsystemd-daemon.c
5593
5594 libsystemd_journal_la_SOURCES = \
5595         libsystemd-journal.c \
5596         src/compat-libs/libsystemd-journal.sym
5597
5598 libsystemd_journal_la_CPPFLAGS = \
5599         $(AM_CFLAGS) \
5600         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5601
5602 libsystemd_journal_la_LDFLAGS = \
5603         $(AM_LDFLAGS) \
5604         -version-info $(LIBSYSTEMD_JOURNAL_CURRENT):$(LIBSYSTEMD_JOURNAL_REVISION):$(LIBSYSTEMD_JOURNAL_AGE) \
5605         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-journal.sym
5606
5607 libsystemd_journal_la_LIBADD = \
5608         libsystemd-journal-internal.la \
5609         libsystemd-internal.la \
5610         libsystemd-shared.la
5611
5612 libsystemd_login_la_SOURCES = \
5613         libsystemd-login.c \
5614         src/compat-libs/libsystemd-login.sym
5615
5616 libsystemd_login_la_CPPFLAGS = \
5617         $(AM_CFLAGS) \
5618         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5619
5620 libsystemd_login_la_LDFLAGS = \
5621         $(AM_LDFLAGS) \
5622         -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \
5623         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
5624
5625 libsystemd_login_la_LIBADD = \
5626         libsystemd-internal.la \
5627         libsystemd-shared.la
5628
5629 libsystemd_id128_la_SOURCES = \
5630         libsystemd-id128.c \
5631         src/compat-libs/libsystemd-id128.sym
5632
5633 libsystemd_id128_la_CPPFLAGS = \
5634         $(AM_CFLAGS) \
5635         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5636
5637 libsystemd_id128_la_LDFLAGS = \
5638         $(AM_LDFLAGS) \
5639         -version-info $(LIBSYSTEMD_ID128_CURRENT):$(LIBSYSTEMD_ID128_REVISION):$(LIBSYSTEMD_ID128_AGE) \
5640         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
5641
5642 libsystemd_id128_la_LIBADD = \
5643         libsystemd-internal.la \
5644         libsystemd-shared.la
5645
5646 libsystemd_daemon_la_SOURCES = \
5647         libsystemd-daemon.c \
5648         src/compat-libs/libsystemd-daemon.sym
5649
5650 libsystemd_daemon_la_CPPFLAGS = \
5651         $(AM_CFLAGS) \
5652         -imacros$(top_srcdir)/src/compat-libs/linkwarning.h
5653
5654 libsystemd_daemon_la_LDFLAGS = \
5655         $(AM_LDFLAGS) \
5656         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
5657         -Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
5658
5659 libsystemd_daemon_la_LIBADD = \
5660         libsystemd-internal.la \
5661         libsystemd-shared.la
5662
5663 lib_LTLIBRARIES += \
5664         libsystemd-journal.la \
5665         libsystemd-login.la \
5666         libsystemd-id128.la \
5667         libsystemd-daemon.la
5668
5669 pkgconfiglib_DATA += \
5670         src/compat-libs/libsystemd-journal.pc \
5671         src/compat-libs/libsystemd-login.pc \
5672         src/compat-libs/libsystemd-id128.pc \
5673         src/compat-libs/libsystemd-daemon.pc
5674
5675 # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
5676 compat-lib-install-hook:
5677         libname=libsystemd-login.so && $(move-to-rootlibdir)
5678         libname=libsystemd-journal.so && $(move-to-rootlibdir)
5679         libname=libsystemd-id128.so && $(move-to-rootlibdir)
5680         libname=libsystemd-daemon.so && $(move-to-rootlibdir)
5681
5682 compat-lib-uninstall-hook:
5683         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-login.so*
5684         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
5685         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-id128.so*
5686         rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
5687
5688 INSTALL_EXEC_HOOKS += compat-lib-install-hook
5689 UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
5690 endif
5691
5692 EXTRA_DIST += \
5693         src/compat-libs/libsystemd-journal.pc.in \
5694         src/compat-libs/libsystemd-login.pc.in \
5695         src/compat-libs/libsystemd-id128.pc.in \
5696         src/compat-libs/libsystemd-daemon.pc.in
5697
5698 # ------------------------------------------------------------------------------
5699 substitutions = \
5700        '|rootlibexecdir=$(rootlibexecdir)|' \
5701        '|rootbindir=$(rootbindir)|' \
5702        '|bindir=$(bindir)|' \
5703        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
5704        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
5705        '|pkgsysconfdir=$(pkgsysconfdir)|' \
5706        '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
5707        '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
5708        '|pkgdatadir=$(pkgdatadir)|' \
5709        '|systemunitdir=$(systemunitdir)|' \
5710        '|userunitdir=$(userunitdir)|' \
5711        '|systempresetdir=$(systempresetdir)|' \
5712        '|userpresetdir=$(userpresetdir)|' \
5713        '|udevhwdbdir=$(udevhwdbdir)|' \
5714        '|udevrulesdir=$(udevrulesdir)|' \
5715        '|catalogdir=$(catalogdir)|' \
5716        '|tmpfilesdir=$(tmpfilesdir)|' \
5717        '|sysusersdir=$(sysusersdir)|' \
5718        '|sysctldir=$(sysctldir)|' \
5719        '|systemgeneratordir=$(systemgeneratordir)|' \
5720        '|usergeneratordir=$(usergeneratordir)|' \
5721        '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
5722        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
5723        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
5724        '|PACKAGE_URL=$(PACKAGE_URL)|' \
5725        '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
5726        '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
5727        '|prefix=$(prefix)|' \
5728        '|exec_prefix=$(exec_prefix)|' \
5729        '|libdir=$(libdir)|' \
5730        '|includedir=$(includedir)|' \
5731        '|VERSION=$(VERSION)|' \
5732        '|rootprefix=$(rootprefix)|' \
5733        '|udevlibexecdir=$(udevlibexecdir)|' \
5734        '|SUSHELL=$(SUSHELL)|' \
5735        '|DEBUGTTY=$(DEBUGTTY)|' \
5736        '|KILL=$(KILL)|' \
5737        '|KMOD=$(KMOD)|' \
5738        '|MKDIR_P=$(MKDIR_P)|' \
5739        '|QUOTAON=$(QUOTAON)|' \
5740        '|QUOTACHECK=$(QUOTACHECK)|' \
5741        '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
5742        '|VARLOGDIR=$(varlogdir)|' \
5743        '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
5744        '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
5745        '|PYTHON=$(PYTHON)|' \
5746        '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
5747        '|NTP_SERVERS=$(NTP_SERVERS)|' \
5748        '|DNS_SERVERS=$(DNS_SERVERS)|' \
5749        '|systemuidmax=$(SYSTEM_UID_MAX)|' \
5750        '|systemgidmax=$(SYSTEM_GID_MAX)|' \
5751        '|TTY_GID=$(TTY_GID)|' \
5752        '|systemsleepdir=$(systemsleepdir)|' \
5753        '|systemshutdowndir=$(systemshutdowndir)|' \
5754        '|binfmtdir=$(binfmtdir)|' \
5755        '|modulesloaddir=$(modulesloaddir)|'
5756
5757 SED_PROCESS = \
5758         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
5759         $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
5760                 < $< > $@
5761
5762 units/%: units/%.in
5763         $(SED_PROCESS)
5764
5765 man/%: man/%.in
5766         $(SED_PROCESS)
5767
5768 sysctl.d/%: sysctl.d/%.in
5769         $(SED_PROCESS)
5770
5771 %.pc: %.pc.in
5772         $(SED_PROCESS)
5773
5774 %.conf: %.conf.in
5775         $(SED_PROCESS)
5776
5777 src/core/macros.%: src/core/macros.%.in
5778         $(SED_PROCESS)
5779
5780 src/%.policy.in: src/%.policy.in.in
5781         $(SED_PROCESS)
5782
5783 shell-completion/%: shell-completion/%.in
5784         $(SED_PROCESS)
5785
5786 %.rules: %.rules.in
5787         $(SED_PROCESS)
5788
5789 %.conf: %.conf.in
5790         $(SED_PROCESS)
5791
5792 %.sh: %.sh.in
5793         $(SED_PROCESS)
5794         $(AM_V_GEN)chmod +x $@
5795
5796 src/%.c: src/%.gperf
5797         $(AM_V_at)$(MKDIR_P) $(dir $@)
5798         $(AM_V_GPERF)$(GPERF) < $< > $@
5799
5800 src/%: src/%.m4
5801         $(AM_V_at)$(MKDIR_P) $(dir $@)
5802         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
5803
5804 tmpfiles.d/%: tmpfiles.d/%.m4
5805         $(AM_V_at)$(MKDIR_P) $(dir $@)
5806         $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
5807
5808
5809 units/%: units/%.m4
5810         $(AM_V_at)$(MKDIR_P) $(dir $@)
5811         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
5812
5813 units/user/%: units/%.m4
5814         $(AM_V_at)$(MKDIR_P) $(dir $@)
5815         $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
5816
5817 if ENABLE_POLKIT
5818 nodist_polkitpolicy_DATA = \
5819         $(polkitpolicy_files) \
5820         $(polkitpolicy_in_in_files:.policy.in.in=.policy)
5821 endif
5822
5823 EXTRA_DIST += \
5824         $(polkitpolicy_in_files) \
5825         $(polkitpolicy_in_in_files)
5826
5827 CLEANFILES += \
5828         $(nodist_systemunit_DATA) \
5829         $(nodist_userunit_DATA) \
5830         $(pkgconfigdata_DATA) \
5831         $(pkgconfiglib_DATA) \
5832         $(nodist_polkitpolicy_DATA)
5833
5834 # ------------------------------------------------------------------------------
5835 if ENABLE_MANPAGES
5836 man/custom-entities.ent: configure.ac
5837         $(AM_V_GEN)$(MKDIR_P) $(dir $@)
5838         $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
5839          printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
5840          > $@ # '
5841
5842 DISTCLEANFILES += \
5843         man/custom-entities.ent
5844
5845 XSLTPROC_FLAGS = \
5846         --nonet \
5847         --xinclude \
5848         --stringparam man.output.quietly 1 \
5849         --stringparam funcsynopsis.style ansi \
5850         --stringparam man.authors.section.enabled 0 \
5851         --stringparam man.copyright.section.enabled 0 \
5852         --stringparam systemd.version $(VERSION) \
5853         --path '$(builddir)/man:$(srcdir)/man'
5854
5855 XSLTPROC_PROCESS_MAN = \
5856         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
5857
5858 XSLTPROC_PROCESS_HTML = \
5859         $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
5860
5861 man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
5862         $(XSLTPROC_PROCESS_MAN)
5863
5864 man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
5865         $(XSLTPROC_PROCESS_MAN)
5866
5867 man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
5868         $(XSLTPROC_PROCESS_MAN)
5869
5870 man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
5871         $(XSLTPROC_PROCESS_MAN)
5872
5873 man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
5874         $(XSLTPROC_PROCESS_MAN)
5875
5876 man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
5877         $(XSLTPROC_PROCESS_HTML)
5878
5879 define html-alias
5880         $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
5881 endef
5882
5883 endif
5884
5885 EXTRA_DIST += \
5886         man/custom-html.xsl \
5887         man/custom-man.xsl
5888
5889 # ------------------------------------------------------------------------------
5890 if HAVE_SYSV_COMPAT
5891 sysvinit_DATA = \
5892         docs/sysvinit/README
5893
5894 varlog_DATA = \
5895         docs/var-log/README
5896
5897 docs/sysvinit/README: docs/sysvinit/README.in
5898         $(SED_PROCESS)
5899
5900 docs/var-log/README: docs/var-log/README.in
5901         $(SED_PROCESS)
5902
5903 CLEANFILES += \
5904         docs/sysvinit/README \
5905         docs/var-log/README
5906 endif
5907
5908 EXTRA_DIST += \
5909         docs/sysvinit/README.in \
5910         docs/var-log/README.in
5911
5912 SOCKETS_TARGET_WANTS += \
5913         systemd-initctl.socket \
5914         systemd-shutdownd.socket
5915
5916 if HAVE_UTMP
5917 if HAVE_SYSV_COMPAT
5918 RUNLEVEL1_TARGET_WANTS += \
5919         systemd-update-utmp-runlevel.service
5920 RUNLEVEL2_TARGET_WANTS += \
5921         systemd-update-utmp-runlevel.service
5922 RUNLEVEL3_TARGET_WANTS += \
5923         systemd-update-utmp-runlevel.service
5924 RUNLEVEL4_TARGET_WANTS += \
5925         systemd-update-utmp-runlevel.service
5926 RUNLEVEL5_TARGET_WANTS += \
5927         systemd-update-utmp-runlevel.service
5928 endif
5929
5930 SYSINIT_TARGET_WANTS += \
5931         systemd-update-utmp.service
5932 endif
5933
5934 SYSINIT_TARGET_WANTS += \
5935         systemd-update-done.service
5936
5937 LOCAL_FS_TARGET_WANTS += \
5938         systemd-remount-fs.service \
5939         tmp.mount
5940
5941 MULTI_USER_TARGET_WANTS += \
5942         getty.target \
5943         systemd-ask-password-wall.path
5944
5945 SYSINIT_TARGET_WANTS += \
5946         dev-hugepages.mount \
5947         dev-mqueue.mount \
5948         sys-kernel-config.mount \
5949         sys-kernel-debug.mount \
5950         sys-fs-fuse-connections.mount \
5951         systemd-sysctl.service \
5952         systemd-ask-password-console.path
5953
5954 if HAVE_SYSV_COMPAT
5955 SYSTEM_UNIT_ALIASES += \
5956         poweroff.target runlevel0.target \
5957         rescue.target runlevel1.target \
5958         multi-user.target runlevel2.target \
5959         multi-user.target runlevel3.target \
5960         multi-user.target runlevel4.target \
5961         graphical.target runlevel5.target \
5962         reboot.target runlevel6.target
5963 endif
5964
5965 SYSTEM_UNIT_ALIASES += \
5966         graphical.target default.target \
5967         reboot.target ctrl-alt-del.target \
5968         getty@.service autovt@.service
5969
5970 USER_UNIT_ALIASES += \
5971         $(systemunitdir)/shutdown.target shutdown.target \
5972         $(systemunitdir)/sockets.target sockets.target \
5973         $(systemunitdir)/timers.target timers.target \
5974         $(systemunitdir)/paths.target paths.target \
5975         $(systemunitdir)/bluetooth.target bluetooth.target \
5976         $(systemunitdir)/printer.target printer.target \
5977         $(systemunitdir)/sound.target sound.target \
5978         $(systemunitdir)/smartcard.target smartcard.target
5979
5980 if ENABLE_KDBUS
5981 USER_UNIT_ALIASES += \
5982         $(systemunitdir)/busnames.target busnames.target
5983 endif
5984
5985 GENERAL_ALIASES += \
5986         $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
5987         $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
5988         $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
5989         $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
5990
5991 if HAVE_SYSV_COMPAT
5992 INSTALL_DIRS += \
5993         $(systemunitdir)/runlevel1.target.wants \
5994         $(systemunitdir)/runlevel2.target.wants \
5995         $(systemunitdir)/runlevel3.target.wants \
5996         $(systemunitdir)/runlevel4.target.wants \
5997         $(systemunitdir)/runlevel5.target.wants
5998 endif
5999
6000 INSTALL_DIRS += \
6001         $(prefix)/lib/modules-load.d \
6002         $(sysconfdir)/modules-load.d \
6003         $(prefix)/lib/systemd/network \
6004         $(sysconfdir)/systemd/network \
6005         $(prefix)/lib/sysctl.d \
6006         $(sysconfdir)/sysctl.d \
6007         $(prefix)/lib/kernel/install.d \
6008         $(sysconfdir)/kernel/install.d \
6009         $(systemshutdowndir) \
6010         $(systemsleepdir) \
6011         $(systemgeneratordir) \
6012         $(usergeneratordir) \
6013         \
6014         $(userunitdir) \
6015         $(pkgsysconfdir)/system \
6016         $(pkgsysconfdir)/system/multi-user.target.wants \
6017         $(pkgsysconfdir)/system/getty.target.wants \
6018         $(pkgsysconfdir)/user \
6019         $(dbussessionservicedir) \
6020         $(sysconfdir)/xdg/systemd
6021
6022 install-exec-hook: $(INSTALL_EXEC_HOOKS)
6023
6024 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
6025
6026 install-data-hook: $(INSTALL_DATA_HOOKS)
6027
6028 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
6029
6030 clean-local: $(CLEAN_LOCAL_HOOKS)
6031         rm -rf $(abs_srcdir)/install-tree
6032         rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
6033               $(abs_srcdir)/hwdb/iab.txt
6034
6035 DISTCHECK_CONFIGURE_FLAGS = \
6036         --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
6037         --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
6038         --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
6039         --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
6040         --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
6041         --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
6042         --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
6043         --with-rootprefix=$$dc_install_base \
6044         --disable-split-usr \
6045         --enable-kdbus \
6046         --enable-compat-libs
6047
6048 if HAVE_SYSV_COMPAT
6049 DISTCHECK_CONFIGURE_FLAGS += \
6050         --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
6051         --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
6052 else
6053 DISTCHECK_CONFIGURE_FLAGS += \
6054         --with-sysvinit-path= \
6055         --with-sysvrcnd-path=
6056 endif
6057
6058 if HAVE_PYTHON
6059 DISTCHECK_CONFIGURE_FLAGS += \
6060         --with-python
6061 endif
6062
6063 if ENABLE_GTK_DOC
6064 DISTCHECK_CONFIGURE_FLAGS += \
6065         --enable-gtk-doc
6066 endif
6067
6068 #
6069 # Require python when making dist
6070 #
6071 .PHONY: dist-check-python
6072 dist-check-python:
6073 if !HAVE_PYTHON
6074         @echo "*** python and python-lxml module must be installed and enabled in order to make dist"
6075         @false
6076 endif
6077
6078 dist-check-compat-libs:
6079 if !ENABLE_COMPAT_LIBS
6080         @echo "*** compat-libs must be enabled in order to make dist"
6081         @false
6082 endif
6083
6084 dist: dist-check-python dist-check-compat-libs
6085
6086 # check "broken" platforms limited toolchains for link breakage before we release
6087 .PHONY: linkcheck
6088 linkcheck:
6089         $(MAKE) CFLAGS='-fno-lto' LDFLAGS='-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections' distcheck
6090
6091 .PHONY: hwdb-update
6092 hwdb-update:
6093         ( cd $(top_srcdir)/hwdb && \
6094         wget -N http://www.linux-usb.org/usb.ids \
6095                 http://pci-ids.ucw.cz/v2.2/pci.ids \
6096                 http://standards.ieee.org/develop/regauth/oui/oui.txt \
6097                 http://standards.ieee.org/develop/regauth/iab/iab.txt && \
6098         ./ids-update.pl )
6099
6100 .PHONY: kdbus-update
6101 kdbus-update:
6102         ( cd $(top_srcdir)/src/libsystemd/sd-bus/ && \
6103         wget -N https://d-bus.googlecode.com/git/kdbus.h )
6104
6105 .PHONY: git-tag
6106 git-tag:
6107         git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
6108
6109 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
6110 .PHONY: upload
6111 upload: all check dist
6112         scp systemd-$(VERSION).tar.xz $(www_target)
6113
6114 .PHONY: doc-sync
6115 doc-sync: all destdir-sphinx
6116         gtkdoc-rebase --html-dir=docs/libudev/html --online
6117         rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
6118         gtkdoc-rebase --html-dir=docs/gudev/html --online
6119         rsync -rlv --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
6120         rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
6121         rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
6122
6123 .PHONY: tango
6124 tango: upload
6125         cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
6126         scp man/*.html tango:public/systemd-man/
6127
6128 .PHONY: install-tree
6129 install-tree: all
6130         rm -rf $(abs_srcdir)/install-tree
6131         $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
6132         tree $(abs_srcdir)/install-tree
6133
6134 # Let's run all tests of the test suite, but under valgrind. Let's
6135 # exclude the one perl script we have in there
6136 .PHONY: valgrind-tests
6137 valgrind-tests: $(TESTS)
6138         $(AM_V_GEN)for f in $(filter-out %.pl, $^); do \
6139                 if file $$f | grep -q shell; then \
6140                 echo -e "$${x}Skipping non-binary $$f"; else \
6141                 echo -e "$${x}Running $$f"; \
6142                 libtool --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
6143                 x="\n\n"; \
6144         done
6145
6146 exported-%: %
6147         $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
6148
6149 exported: $(addprefix exported-, $(lib_LTLIBRARIES))
6150         $(AM_V_GEN)cat $^ > $@
6151
6152 .PHONY: check-api-docs
6153 check-api-docs: exported man
6154         $(AM_V_GEN)for symbol in `cat exported` ; do \
6155                 if test -f $(builddir)/man/$$symbol.html ; then \
6156                         echo "  Symbol $$symbol() is documented." ; \
6157                 else \
6158                         echo "‣ Symbol $$symbol() lacks documentation." ; \
6159                 fi ; \
6160         done
6161
6162 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
6163 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
6164
6165 undefined defined: $(ALL_OBJECTS)
6166         $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
6167                 $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
6168         done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
6169
6170 CLEANFILES += \
6171         defined \
6172         undefined
6173
6174 .PHONY: check-api-unused
6175 check-api-unused: defined undefined exported
6176         ( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
6177
6178 .PHONY: check-includes
6179 check-includes: $(top_srcdir)/tools/check-includes.pl
6180         $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
6181                 | xargs $(top_srcdir)/tools/check-includes.pl
6182
6183 EXTRA_DIST += \
6184         $(top_srcdir)/tools/check-includes.pl
6185
6186 # Stupid test that everything purported to be exported really is
6187 define generate-sym-test
6188         $(AM_V_at)$(MKDIR_P) $(dir $@)
6189         $(AM_V_at)printf '#include <stdio.h>\n' > $@
6190         $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
6191         $(AM_V_at)printf 'void* functions[] = {\n' >> $@
6192         $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
6193         $(AM_V_at)printf '};\nint main(void) {\n' >> $@
6194         $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
6195         $(AM_V_at)printf 'return 0; }\n' >> $@
6196 endef
6197
6198 test-libsystemd-sym.c: \
6199                 $(top_builddir)/src/libsystemd/libsystemd.sym \
6200                 src/systemd/sd-journal.h \
6201                 src/systemd/sd-daemon.h \
6202                 src/systemd/sd-login.h \
6203                 src/systemd/sd-bus.h \
6204                 src/systemd/sd-utf8.h \
6205                 src/systemd/sd-resolve.h \
6206                 src/systemd/sd-path.h
6207         $(generate-sym-test)
6208
6209 test-libudev-sym.c: \
6210                 src/libudev/libudev.sym \
6211                 src/udev/udev.h
6212         $(generate-sym-test)
6213
6214 test_libsystemd_sym_SOURCES = \
6215         test-libsystemd-sym.c
6216 test_libsystemd_sym_LDADD = \
6217         libsystemd.la
6218
6219 test_libudev_sym_SOURCES = \
6220         test-libudev-sym.c
6221 test_libudev_sym_CFLAGS = \
6222         $(AM_CFLAGS) \
6223         -Wno-deprecated-declarations
6224 test_libudev_sym_LDADD = \
6225         libudev.la
6226
6227 BUILT_SOURCES += \
6228         $(test_libsystemd_sym_SOURCES) \
6229         $(test_libudev_sym_SOURCES)
6230
6231 tests += \
6232         test-libsystemd-sym \
6233         test-libudev-sym
6234
6235 .PHONY: cppcheck
6236 cppcheck:
6237         cppcheck --enable=all -q $(top_srcdir)
6238
6239 # Used to extract compile flags for YCM.
6240 print-%:
6241         @echo $($*)
6242
6243 git-contrib:
6244         @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | awk '{ print $$0 "," }' | sort -u