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