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