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