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