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