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