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