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